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 STLPORT_LIB
 658 LIBZIP_CAN_USE_MMAP
 659 LIBDL
 660 LIBM
 661 USE_EXTERNAL_LCMS
 662 LCMS_LIBS
 663 LCMS_CFLAGS
 664 USE_EXTERNAL_LIBZ
 665 USE_EXTERNAL_LIBPNG
 666 PNG_LIBS
 667 PNG_CFLAGS
 668 USE_EXTERNAL_LIBGIF
 669 USE_EXTERNAL_LIBJPEG
 670 LLVM_LIBS
 671 LLVM_LDFLAGS
 672 LLVM_CFLAGS
 673 LLVM_CONFIG
 674 LIBFFI_LIBS
 675 LIBFFI_CFLAGS
 676 ALSA_LIBS
 677 ALSA_CFLAGS
 678 FREETYPE_BUNDLE_LIB_PATH
 679 FREETYPE_LIBS
 680 FREETYPE_CFLAGS
 681 CUPS_CFLAGS
 682 X_EXTRA_LIBS
 683 X_LIBS
 684 X_PRE_LIBS
 685 X_CFLAGS
 686 XMKMF
 687 MSVCP_DLL
 688 MSVCR_DLL
 689 LIBCXX
 690 FIXPATH_DETACH_FLAG
 691 FIXPATH
 692 BUILD_GTEST
 693 VALID_JVM_FEATURES
 694 JVM_FEATURES_custom
 695 JVM_FEATURES_zeroshark
 696 JVM_FEATURES_zero
 697 JVM_FEATURES_minimal
 698 JVM_FEATURES_core
 699 JVM_FEATURES_client
 700 JVM_FEATURES_server
 701 INCLUDE_DTRACE
 702 GCOV_ENABLED
 703 STRIP_POLICY
 704 DEBUG_BINARIES
 705 ZIP_EXTERNAL_DEBUG_SYMBOLS
 706 COPY_DEBUG_SYMBOLS
 707 COMPILE_WITH_DEBUG_SYMBOLS
 708 CFLAGS_WARNINGS_ARE_ERRORS
 709 BUILD_CC_DISABLE_WARNING_PREFIX
 710 DISABLE_WARNING_PREFIX
 711 HOTSPOT_SET_WARNINGS_AS_ERRORS
 712 WARNINGS_AS_ERRORS
 713 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 714 ZERO_ARCHFLAG
 715 LDFLAGS_TESTEXE
 716 LDFLAGS_TESTLIB
 717 CXXFLAGS_TESTEXE
 718 CXXFLAGS_TESTLIB
 719 CFLAGS_TESTEXE
 720 CFLAGS_TESTLIB
 721 OPENJDK_BUILD_JVM_LIBS
 722 OPENJDK_BUILD_JVM_ASFLAGS
 723 OPENJDK_BUILD_JVM_LDFLAGS
 724 OPENJDK_BUILD_JVM_CFLAGS
 725 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 726 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 727 OPENJDK_BUILD_JDKEXE_LIBS
 728 OPENJDK_BUILD_JDKLIB_LIBS
 729 OPENJDK_BUILD_LDFLAGS_JDKEXE
 730 OPENJDK_BUILD_LDFLAGS_JDKLIB
 731 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 732 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 733 OPENJDK_BUILD_CFLAGS_JDKEXE
 734 OPENJDK_BUILD_CFLAGS_JDKLIB
 735 OPENJDK_BUILD_CXXSTD_CXXFLAG
 736 JVM_LIBS
 737 JVM_ASFLAGS
 738 JVM_LDFLAGS
 739 JVM_CFLAGS
 740 LDFLAGS_HASH_STYLE
 741 LDFLAGS_CXX_JDK
 742 JDKEXE_LIBS
 743 JDKLIB_LIBS
 744 LDFLAGS_JDKEXE
 745 LDFLAGS_JDKLIB
 746 CXXFLAGS_JDKEXE
 747 CXXFLAGS_JDKLIB
 748 CFLAGS_JDKEXE
 749 CFLAGS_JDKLIB
 750 MACOSX_VERSION_MIN
 751 CXXSTD_CXXFLAG
 752 CXX_O_FLAG_SIZE
 753 CXX_O_FLAG_NONE
 754 CXX_O_FLAG_DEBUG
 755 CXX_O_FLAG_NORM
 756 CXX_O_FLAG_HI
 757 CXX_O_FLAG_HIGHEST
 758 CXX_O_FLAG_HIGHEST_JVM
 759 C_O_FLAG_SIZE
 760 C_O_FLAG_NONE
 761 C_O_FLAG_DEBUG
 762 C_O_FLAG_NORM
 763 C_O_FLAG_HI
 764 C_O_FLAG_HIGHEST
 765 C_O_FLAG_HIGHEST_JVM
 766 JVM_CFLAGS_SYMBOLS
 767 CXXFLAGS_DEBUG_SYMBOLS
 768 CFLAGS_DEBUG_SYMBOLS
 769 CXX_FLAG_DEPS
 770 C_FLAG_DEPS
 771 SHARED_LIBRARY_FLAGS
 772 SET_SHARED_LIBRARY_MAPFILE
 773 SET_SHARED_LIBRARY_NAME
 774 SET_SHARED_LIBRARY_ORIGIN
 775 SET_EXECUTABLE_ORIGIN
 776 CXX_FLAG_REORDER
 777 C_FLAG_REORDER
 778 JVM_RCFLAGS
 779 RC_FLAGS
 780 AR_OUT_OPTION
 781 LD_OUT_OPTION
 782 EXE_OUT_OPTION
 783 CC_OUT_OPTION
 784 STRIPFLAGS
 785 ARFLAGS
 786 COMPILER_BINDCMD_FILE_FLAG
 787 COMPILER_COMMAND_FILE_FLAG
 788 COMPILER_TARGET_BITS_FLAG
 789 JT_HOME
 790 JTREGEXE
 791 HOTSPOT_TOOLCHAIN_TYPE
 792 USING_BROKEN_SUSE_LD
 793 PACKAGE_PATH
 794 USE_CLANG
 795 HOTSPOT_LD
 796 HOTSPOT_CXX
 797 HOTSPOT_RC
 798 HOTSPOT_MT
 799 BUILD_AS
 800 BUILD_LDCXX
 801 BUILD_LD
 802 BUILD_STRIP
 803 BUILD_OBJCOPY
 804 BUILD_AR
 805 BUILD_NM
 806 BUILD_CXX
 807 BUILD_CC
 808 BUILD_SYSROOT_LDFLAGS
 809 BUILD_SYSROOT_CFLAGS
 810 ac_ct_OBJDUMP
 811 OBJDUMP
 812 ac_ct_OBJCOPY
 813 OBJCOPY
 814 ac_ct_NM
 815 ac_ct_STRIP
 816 GNM
 817 NM
 818 STRIP
 819 MSBUILD
 820 DUMPBIN
 821 RC
 822 MT
 823 LIPO
 824 ac_ct_AR
 825 AR
 826 AS
 827 LDCXX
 828 LD
 829 CXXCPP
 830 CPP
 831 CXX_VERSION_NUMBER
 832 CC_VERSION_NUMBER
 833 ac_ct_CXX
 834 CXXFLAGS
 835 CXX
 836 TOOLCHAIN_PATH_CXX
 837 POTENTIAL_CXX
 838 OBJEXT
 839 EXEEXT
 840 ac_ct_CC
 841 CPPFLAGS
 842 LDFLAGS
 843 CFLAGS
 844 CC
 845 TOOLCHAIN_PATH_CC
 846 POTENTIAL_CC
 847 TOOLCHAIN_VERSION
 848 VS_LIB
 849 VS_INCLUDE
 850 VS_PATH
 851 CYGWIN_LINK
 852 SYSROOT_LDFLAGS
 853 SYSROOT_CFLAGS
 854 EXTRA_LDFLAGS
 855 EXTRA_CXXFLAGS
 856 EXTRA_CFLAGS
 857 LEGACY_EXTRA_LDFLAGS
 858 LEGACY_EXTRA_CXXFLAGS
 859 LEGACY_EXTRA_CFLAGS
 860 EXE_SUFFIX
 861 OBJ_SUFFIX
 862 STATIC_LIBRARY
 863 SHARED_LIBRARY
 864 STATIC_LIBRARY_SUFFIX
 865 SHARED_LIBRARY_SUFFIX
 866 LIBRARY_PREFIX
 867 TOOLCHAIN_TYPE
 868 STATIC_BUILD
 869 IMPORT_MODULES_MAKE
 870 IMPORT_MODULES_SRC
 871 IMPORT_MODULES_CONF
 872 IMPORT_MODULES_LIBS
 873 IMPORT_MODULES_CMDS
 874 IMPORT_MODULES_CLASSES
 875 BUILD_OUTPUT
 876 JDK_TOPDIR
 877 NASHORN_TOPDIR
 878 HOTSPOT_TOPDIR
 879 JAXWS_TOPDIR
 880 JAXP_TOPDIR
 881 CORBA_TOPDIR
 882 LANGTOOLS_TOPDIR
 883 EXTERNAL_BUILDJDK
 884 BUILD_JDK
 885 CREATE_BUILDJDK
 886 JLINK
 887 JMOD
 888 BOOT_JDK_BITS
 889 JAVAC_FLAGS
 890 BOOT_JDK_MODULAR
 891 BOOT_JDK_SOURCETARGET
 892 JARSIGNER
 893 JAR
 894 JAVAH
 895 JAVAC
 896 JAVA
 897 BOOT_JDK
 898 JAVA_CHECK
 899 JAVAC_CHECK
 900 VERSION_IS_GA
 901 VERSION_SHORT
 902 VERSION_STRING
 903 VERSION_NUMBER_FOUR_POSITIONS
 904 VERSION_NUMBER
 905 VERSION_OPT
 906 VERSION_BUILD
 907 VERSION_PRE
 908 VERSION_PATCH
 909 VERSION_SECURITY
 910 VERSION_MINOR
 911 VERSION_MAJOR
 912 MACOSX_BUNDLE_ID_BASE
 913 MACOSX_BUNDLE_NAME_BASE
 914 HOTSPOT_VM_DISTRO
 915 COMPANY_NAME
 916 JDK_RC_PLATFORM_NAME
 917 PRODUCT_SUFFIX
 918 PRODUCT_NAME
 919 LAUNCHER_NAME
 920 JLINK_KEEP_PACKAGED_MODULES
 921 COPYRIGHT_YEAR
 922 COMPRESS_JARS
 923 INCLUDE_SA
 924 UNLIMITED_CRYPTO
 925 CACERTS_FILE
 926 ENABLE_HEADLESS_ONLY
 927 DEFAULT_MAKE_TARGET
 928 OS_VERSION_MICRO
 929 OS_VERSION_MINOR
 930 OS_VERSION_MAJOR
 931 PKG_CONFIG
 932 BASH_ARGS
 933 SETFILE
 934 CODESIGN
 935 XATTR
 936 DSYMUTIL
 937 IS_GNU_TIME
 938 PATCH
 939 DTRACE
 940 TIME
 941 STAT
 942 HG
 943 READELF
 944 OTOOL
 945 LDD
 946 ZIP
 947 UNZIP
 948 TAR_SUPPORTS_TRANSFORM
 949 TAR_INCLUDE_PARAM
 950 TAR_CREATE_EXTRA_PARAM
 951 TAR_TYPE
 952 FIND_DELETE
 953 OUTPUT_SYNC
 954 OUTPUT_SYNC_SUPPORTED
 955 CHECK_TOOLSDIR_MAKE
 956 CHECK_TOOLSDIR_GMAKE
 957 CHECK_MAKE
 958 CHECK_GMAKE
 959 MAKE
 960 PKGHANDLER
 961 CONFIGURESUPPORT_OUTPUTDIR
 962 OUTPUT_ROOT
 963 CONF_NAME
 964 SPEC
 965 SDKROOT
 966 XCODEBUILD
 967 JVM_VARIANT_MAIN
 968 VALID_JVM_VARIANTS
 969 JVM_VARIANTS
 970 DEBUG_LEVEL
 971 HOTSPOT_DEBUG_LEVEL
 972 JDK_VARIANT
 973 USERNAME
 974 CANONICAL_TOPDIR
 975 ORIGINAL_TOPDIR
 976 TOPDIR
 977 PATH_SEP
 978 ZERO_ARCHDEF
 979 HOTSPOT_BUILD_CPU_DEFINE
 980 HOTSPOT_BUILD_CPU_ARCH
 981 HOTSPOT_BUILD_CPU
 982 HOTSPOT_BUILD_OS_TYPE
 983 HOTSPOT_BUILD_OS
 984 OPENJDK_BUILD_BUNDLE_PLATFORM
 985 OPENJDK_BUILD_CPU_BUNDLE
 986 OPENJDK_BUILD_OS_BUNDLE
 987 OPENJDK_BUILD_OS_EXPORT_DIR
 988 OPENJDK_BUILD_CPU_JLI_CFLAGS
 989 OPENJDK_BUILD_CPU_OSARCH
 990 OPENJDK_BUILD_CPU_ISADIR
 991 OPENJDK_BUILD_CPU_LIBDIR
 992 OPENJDK_BUILD_CPU_LEGACY_LIB
 993 OPENJDK_BUILD_CPU_LEGACY
 994 HOTSPOT_TARGET_CPU_DEFINE
 995 HOTSPOT_TARGET_CPU_ARCH
 996 HOTSPOT_TARGET_CPU
 997 HOTSPOT_TARGET_OS_TYPE
 998 HOTSPOT_TARGET_OS
 999 DEFINE_CROSS_COMPILE_ARCH
1000 LP64
1001 OPENJDK_TARGET_BUNDLE_PLATFORM
1002 OPENJDK_TARGET_CPU_BUNDLE
1003 OPENJDK_TARGET_OS_BUNDLE
1004 OPENJDK_TARGET_OS_EXPORT_DIR
1005 OPENJDK_TARGET_CPU_JLI_CFLAGS
1006 OPENJDK_TARGET_CPU_OSARCH
1007 OPENJDK_TARGET_CPU_ISADIR
1008 OPENJDK_TARGET_CPU_LIBDIR
1009 OPENJDK_TARGET_CPU_LEGACY_LIB
1010 OPENJDK_TARGET_CPU_LEGACY
1011 REQUIRED_OS_VERSION
1012 REQUIRED_OS_NAME
1013 COMPILE_TYPE
1014 OPENJDK_TARGET_CPU_ENDIAN
1015 OPENJDK_TARGET_CPU_BITS
1016 OPENJDK_TARGET_CPU_ARCH
1017 OPENJDK_TARGET_CPU
1018 OPENJDK_TARGET_OS_ENV
1019 OPENJDK_TARGET_OS_TYPE
1020 OPENJDK_TARGET_OS
1021 OPENJDK_BUILD_CPU_ENDIAN
1022 OPENJDK_BUILD_CPU_BITS
1023 OPENJDK_BUILD_CPU_ARCH
1024 OPENJDK_BUILD_CPU
1025 OPENJDK_BUILD_OS_ENV
1026 OPENJDK_BUILD_OS_TYPE
1027 OPENJDK_BUILD_OS
1028 OPENJDK_BUILD_AUTOCONF_NAME
1029 OPENJDK_TARGET_AUTOCONF_NAME
1030 target_os
1031 target_vendor
1032 target_cpu
1033 target
1034 host_os
1035 host_vendor
1036 host_cpu
1037 host
1038 build_os
1039 build_vendor
1040 build_cpu
1041 build
1042 NICE
1043 CPIO
1044 DF
1045 READLINK
1046 CYGPATH
1047 SED
1048 FGREP
1049 EGREP
1050 GREP
1051 AWK
1052 XARGS
1053 WHICH
1054 WC
1055 UNIQ
1056 UNAME
1057 TR
1058 TOUCH
1059 TEE
1060 TAR
1061 TAIL
1062 SORT
1063 SH
1064 RMDIR
1065 RM
1066 PRINTF
1067 NAWK
1068 MV
1069 MKTEMP
1070 MKDIR
1071 LS
1072 LN
1073 GZIP
1074 GUNZIP
1075 HEAD
1076 FIND
1077 FILE
1078 EXPR
1079 ECHO
1080 DIRNAME
1081 DIFF
1082 DATE
1083 CUT
1084 CP
1085 COMM
1086 CMP
1087 CHMOD
1088 CAT
1089 BASH
1090 BASENAME
1091 DATE_WHEN_CONFIGURED
1092 ORIGINAL_PATH
1093 CONFIGURE_COMMAND_LINE
1094 target_alias
1095 host_alias
1096 build_alias
1097 LIBS
1098 ECHO_T
1099 ECHO_N
1100 ECHO_C
1101 DEFS
1102 mandir
1103 localedir
1104 libdir
1105 psdir
1106 pdfdir
1107 dvidir
1108 htmldir
1109 infodir
1110 docdir
1111 oldincludedir
1112 includedir
1113 localstatedir
1114 sharedstatedir
1115 sysconfdir
1116 datadir
1117 datarootdir
1118 libexecdir
1119 sbindir
1120 bindir
1121 program_transform_name
1122 prefix
1123 exec_prefix
1124 PACKAGE_URL
1125 PACKAGE_BUGREPORT
1126 PACKAGE_STRING
1127 PACKAGE_VERSION
1128 PACKAGE_TARNAME
1129 PACKAGE_NAME
1130 PATH_SEPARATOR
1131 SHELL'
1132 ac_subst_files=''
1133 ac_user_opts='
1134 enable_option_checking
1135 with_target_bits
1136 enable_openjdk_only
1137 with_custom_make_dir
1138 with_jdk_variant
1139 enable_debug
1140 with_debug_level
1141 with_jvm_variants
1142 with_devkit
1143 with_sys_root
1144 with_sysroot
1145 with_tools_dir
1146 with_toolchain_path
1147 with_extra_path
1148 with_sdk_name
1149 with_conf_name
1150 with_output_sync
1151 with_default_make_target
1152 enable_headless_only
1153 with_cacerts_file
1154 enable_unlimited_crypto
1155 with_copyright_year
1156 enable_keep_packaged_modules
1157 with_milestone
1158 with_update_version
1159 with_user_release_suffix
1160 with_build_number
1161 with_version_string
1162 with_version_pre
1163 with_version_opt
1164 with_version_build
1165 with_version_major
1166 with_version_minor
1167 with_version_security
1168 with_version_patch
1169 with_boot_jdk
1170 with_build_jdk
1171 with_add_source_root
1172 with_override_source_root
1173 with_adds_and_overrides
1174 with_override_langtools
1175 with_override_corba
1176 with_override_jaxp
1177 with_override_jaxws
1178 with_override_hotspot
1179 with_override_nashorn
1180 with_override_jdk
1181 with_import_hotspot
1182 with_import_modules
1183 enable_static_build
1184 with_toolchain_type
1185 with_extra_cflags
1186 with_extra_cxxflags
1187 with_extra_ldflags
1188 with_toolchain_version
1189 with_build_devkit
1190 with_jtreg
1191 enable_warnings_as_errors
1192 with_native_debug_symbols
1193 enable_debug_symbols
1194 enable_zip_debug_info
1195 enable_native_coverage
1196 enable_dtrace
1197 with_jvm_features
1198 with_jvm_interpreter
1199 enable_hotspot_gtest
1200 with_stdc__lib
1201 with_msvcr_dll
1202 with_msvcp_dll
1203 with_x
1204 with_cups
1205 with_cups_include
1206 with_freetype
1207 with_freetype_include
1208 with_freetype_lib
1209 with_freetype_src
1210 enable_freetype_bundling
1211 with_alsa
1212 with_alsa_include
1213 with_alsa_lib
1214 with_libffi
1215 with_libffi_include
1216 with_libffi_lib
1217 with_libjpeg
1218 with_giflib
1219 with_libpng
1220 with_zlib
1221 with_lcms
1222 with_dxsdk
1223 with_dxsdk_lib
1224 with_dxsdk_include
1225 enable_jtreg_failure_handler
1226 enable_generate_classlist
1227 with_num_cores
1228 with_memory_size
1229 with_jobs
1230 with_test_jobs
1231 with_boot_jdk_jvmargs
1232 with_sjavac_server_java
1233 enable_sjavac
1234 enable_javac_server
1235 enable_icecc
1236 enable_precompiled_headers
1237 enable_ccache
1238 with_ccache_dir
1239 '
1240       ac_precious_vars='build_alias
1241 host_alias
1242 target_alias
1243 BASENAME
1244 BASH
1245 CAT
1246 CHMOD
1247 CMP
1248 COMM
1249 CP
1250 CUT
1251 DATE
1252 DIFF
1253 DIRNAME
1254 ECHO
1255 EXPR
1256 FILE
1257 FIND
1258 HEAD
1259 GUNZIP
1260 GZIP
1261 LN
1262 LS
1263 MKDIR
1264 MKTEMP
1265 MV
1266 NAWK
1267 PRINTF
1268 RM
1269 RMDIR
1270 SH
1271 SORT
1272 TAIL
1273 TAR
1274 TEE
1275 TOUCH
1276 TR
1277 UNAME
1278 UNIQ
1279 WC
1280 WHICH
1281 XARGS
1282 AWK
1283 GREP
1284 EGREP
1285 FGREP
1286 SED
1287 CYGPATH
1288 READLINK
1289 DF
1290 CPIO
1291 NICE
1292 MAKE
1293 UNZIP
1294 ZIP
1295 LDD
1296 OTOOL
1297 READELF
1298 HG
1299 STAT
1300 TIME
1301 DTRACE
1302 PATCH
1303 DSYMUTIL
1304 XATTR
1305 CODESIGN
1306 SETFILE
1307 PKG_CONFIG
1308 JAVA
1309 JAVAC
1310 JAVAH
1311 JAR
1312 JARSIGNER
1313 CC
1314 CFLAGS
1315 LDFLAGS
1316 LIBS
1317 CPPFLAGS
1318 CXX
1319 CXXFLAGS
1320 CCC
1321 CPP
1322 CXXCPP
1323 AS
1324 AR
1325 LIPO
1326 STRIP
1327 NM
1328 GNM
1329 OBJCOPY
1330 OBJDUMP
1331 BUILD_CC
1332 BUILD_CXX
1333 BUILD_NM
1334 BUILD_AR
1335 BUILD_OBJCOPY
1336 BUILD_STRIP
1337 JTREGEXE
1338 XMKMF
1339 FREETYPE_CFLAGS
1340 FREETYPE_LIBS
1341 ALSA_CFLAGS
1342 ALSA_LIBS
1343 LIBFFI_CFLAGS
1344 LIBFFI_LIBS
1345 PNG_CFLAGS
1346 PNG_LIBS
1347 LCMS_CFLAGS
1348 LCMS_LIBS
1349 ICECC_CMD
1350 ICECC_CREATE_ENV
1351 ICECC_WRAPPER
1352 CCACHE'
1353 
1354 
1355 # Initialize some variables set by options.
1356 ac_init_help=
1357 ac_init_version=false
1358 ac_unrecognized_opts=
1359 ac_unrecognized_sep=
1360 # The variables have the same names as the options, with
1361 # dashes changed to underlines.
1362 cache_file=/dev/null
1363 exec_prefix=NONE
1364 no_create=
1365 no_recursion=
1366 prefix=NONE
1367 program_prefix=NONE
1368 program_suffix=NONE
1369 program_transform_name=s,x,x,
1370 silent=
1371 site=
1372 srcdir=
1373 verbose=
1374 x_includes=NONE
1375 x_libraries=NONE
1376 
1377 # Installation directory options.
1378 # These are left unexpanded so users can "make install exec_prefix=/foo"
1379 # and all the variables that are supposed to be based on exec_prefix
1380 # by default will actually change.
1381 # Use braces instead of parens because sh, perl, etc. also accept them.
1382 # (The list follows the same order as the GNU Coding Standards.)
1383 bindir='${exec_prefix}/bin'
1384 sbindir='${exec_prefix}/sbin'
1385 libexecdir='${exec_prefix}/libexec'
1386 datarootdir='${prefix}/share'
1387 datadir='${datarootdir}'
1388 sysconfdir='${prefix}/etc'
1389 sharedstatedir='${prefix}/com'
1390 localstatedir='${prefix}/var'
1391 includedir='${prefix}/include'
1392 oldincludedir='/usr/include'
1393 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1394 infodir='${datarootdir}/info'
1395 htmldir='${docdir}'
1396 dvidir='${docdir}'
1397 pdfdir='${docdir}'
1398 psdir='${docdir}'
1399 libdir='${exec_prefix}/lib'
1400 localedir='${datarootdir}/locale'
1401 mandir='${datarootdir}/man'
1402 
1403 ac_prev=
1404 ac_dashdash=
1405 for ac_option
1406 do
1407   # If the previous option needs an argument, assign it.
1408   if test -n "$ac_prev"; then
1409     eval $ac_prev=\$ac_option
1410     ac_prev=
1411     continue
1412   fi
1413 
1414   case $ac_option in
1415   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1416   *=)   ac_optarg= ;;
1417   *)    ac_optarg=yes ;;
1418   esac
1419 
1420   # Accept the important Cygnus configure options, so we can diagnose typos.
1421 
1422   case $ac_dashdash$ac_option in
1423   --)
1424     ac_dashdash=yes ;;
1425 
1426   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1427     ac_prev=bindir ;;
1428   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1429     bindir=$ac_optarg ;;
1430 
1431   -build | --build | --buil | --bui | --bu)
1432     ac_prev=build_alias ;;
1433   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1434     build_alias=$ac_optarg ;;
1435 
1436   -cache-file | --cache-file | --cache-fil | --cache-fi \
1437   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1438     ac_prev=cache_file ;;
1439   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1440   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1441     cache_file=$ac_optarg ;;
1442 
1443   --config-cache | -C)
1444     cache_file=config.cache ;;
1445 
1446   -datadir | --datadir | --datadi | --datad)
1447     ac_prev=datadir ;;
1448   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1449     datadir=$ac_optarg ;;
1450 
1451   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1452   | --dataroo | --dataro | --datar)
1453     ac_prev=datarootdir ;;
1454   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1455   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1456     datarootdir=$ac_optarg ;;
1457 
1458   -disable-* | --disable-*)
1459     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1460     # Reject names that are not valid shell variable names.
1461     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1462       as_fn_error $? "invalid feature name: $ac_useropt"
1463     ac_useropt_orig=$ac_useropt
1464     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1465     case $ac_user_opts in
1466       *"
1467 "enable_$ac_useropt"
1468 "*) ;;
1469       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1470          ac_unrecognized_sep=', ';;
1471     esac
1472     eval enable_$ac_useropt=no ;;
1473 
1474   -docdir | --docdir | --docdi | --doc | --do)
1475     ac_prev=docdir ;;
1476   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1477     docdir=$ac_optarg ;;
1478 
1479   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1480     ac_prev=dvidir ;;
1481   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1482     dvidir=$ac_optarg ;;
1483 
1484   -enable-* | --enable-*)
1485     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1486     # Reject names that are not valid shell variable names.
1487     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1488       as_fn_error $? "invalid feature name: $ac_useropt"
1489     ac_useropt_orig=$ac_useropt
1490     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1491     case $ac_user_opts in
1492       *"
1493 "enable_$ac_useropt"
1494 "*) ;;
1495       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1496          ac_unrecognized_sep=', ';;
1497     esac
1498     eval enable_$ac_useropt=\$ac_optarg ;;
1499 
1500   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1501   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1502   | --exec | --exe | --ex)
1503     ac_prev=exec_prefix ;;
1504   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1505   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1506   | --exec=* | --exe=* | --ex=*)
1507     exec_prefix=$ac_optarg ;;
1508 
1509   -gas | --gas | --ga | --g)
1510     # Obsolete; use --with-gas.
1511     with_gas=yes ;;
1512 
1513   -help | --help | --hel | --he | -h)
1514     ac_init_help=long ;;
1515   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1516     ac_init_help=recursive ;;
1517   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1518     ac_init_help=short ;;
1519 
1520   -host | --host | --hos | --ho)
1521     ac_prev=host_alias ;;
1522   -host=* | --host=* | --hos=* | --ho=*)
1523     host_alias=$ac_optarg ;;
1524 
1525   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1526     ac_prev=htmldir ;;
1527   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1528   | --ht=*)
1529     htmldir=$ac_optarg ;;
1530 
1531   -includedir | --includedir | --includedi | --included | --include \
1532   | --includ | --inclu | --incl | --inc)
1533     ac_prev=includedir ;;
1534   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1535   | --includ=* | --inclu=* | --incl=* | --inc=*)
1536     includedir=$ac_optarg ;;
1537 
1538   -infodir | --infodir | --infodi | --infod | --info | --inf)
1539     ac_prev=infodir ;;
1540   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1541     infodir=$ac_optarg ;;
1542 
1543   -libdir | --libdir | --libdi | --libd)
1544     ac_prev=libdir ;;
1545   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1546     libdir=$ac_optarg ;;
1547 
1548   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1549   | --libexe | --libex | --libe)
1550     ac_prev=libexecdir ;;
1551   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1552   | --libexe=* | --libex=* | --libe=*)
1553     libexecdir=$ac_optarg ;;
1554 
1555   -localedir | --localedir | --localedi | --localed | --locale)
1556     ac_prev=localedir ;;
1557   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1558     localedir=$ac_optarg ;;
1559 
1560   -localstatedir | --localstatedir | --localstatedi | --localstated \
1561   | --localstate | --localstat | --localsta | --localst | --locals)
1562     ac_prev=localstatedir ;;
1563   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1564   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1565     localstatedir=$ac_optarg ;;
1566 
1567   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1568     ac_prev=mandir ;;
1569   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1570     mandir=$ac_optarg ;;
1571 
1572   -nfp | --nfp | --nf)
1573     # Obsolete; use --without-fp.
1574     with_fp=no ;;
1575 
1576   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1577   | --no-cr | --no-c | -n)
1578     no_create=yes ;;
1579 
1580   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1581   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1582     no_recursion=yes ;;
1583 
1584   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1585   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1586   | --oldin | --oldi | --old | --ol | --o)
1587     ac_prev=oldincludedir ;;
1588   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1589   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1590   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1591     oldincludedir=$ac_optarg ;;
1592 
1593   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1594     ac_prev=prefix ;;
1595   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1596     prefix=$ac_optarg ;;
1597 
1598   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1599   | --program-pre | --program-pr | --program-p)
1600     ac_prev=program_prefix ;;
1601   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1602   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1603     program_prefix=$ac_optarg ;;
1604 
1605   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1606   | --program-suf | --program-su | --program-s)
1607     ac_prev=program_suffix ;;
1608   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1609   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1610     program_suffix=$ac_optarg ;;
1611 
1612   -program-transform-name | --program-transform-name \
1613   | --program-transform-nam | --program-transform-na \
1614   | --program-transform-n | --program-transform- \
1615   | --program-transform | --program-transfor \
1616   | --program-transfo | --program-transf \
1617   | --program-trans | --program-tran \
1618   | --progr-tra | --program-tr | --program-t)
1619     ac_prev=program_transform_name ;;
1620   -program-transform-name=* | --program-transform-name=* \
1621   | --program-transform-nam=* | --program-transform-na=* \
1622   | --program-transform-n=* | --program-transform-=* \
1623   | --program-transform=* | --program-transfor=* \
1624   | --program-transfo=* | --program-transf=* \
1625   | --program-trans=* | --program-tran=* \
1626   | --progr-tra=* | --program-tr=* | --program-t=*)
1627     program_transform_name=$ac_optarg ;;
1628 
1629   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1630     ac_prev=pdfdir ;;
1631   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1632     pdfdir=$ac_optarg ;;
1633 
1634   -psdir | --psdir | --psdi | --psd | --ps)
1635     ac_prev=psdir ;;
1636   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1637     psdir=$ac_optarg ;;
1638 
1639   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1640   | -silent | --silent | --silen | --sile | --sil)
1641     silent=yes ;;
1642 
1643   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1644     ac_prev=sbindir ;;
1645   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1646   | --sbi=* | --sb=*)
1647     sbindir=$ac_optarg ;;
1648 
1649   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1650   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1651   | --sharedst | --shareds | --shared | --share | --shar \
1652   | --sha | --sh)
1653     ac_prev=sharedstatedir ;;
1654   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1655   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1656   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1657   | --sha=* | --sh=*)
1658     sharedstatedir=$ac_optarg ;;
1659 
1660   -site | --site | --sit)
1661     ac_prev=site ;;
1662   -site=* | --site=* | --sit=*)
1663     site=$ac_optarg ;;
1664 
1665   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1666     ac_prev=srcdir ;;
1667   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1668     srcdir=$ac_optarg ;;
1669 
1670   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1671   | --syscon | --sysco | --sysc | --sys | --sy)
1672     ac_prev=sysconfdir ;;
1673   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1674   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1675     sysconfdir=$ac_optarg ;;
1676 
1677   -target | --target | --targe | --targ | --tar | --ta | --t)
1678     ac_prev=target_alias ;;
1679   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1680     target_alias=$ac_optarg ;;
1681 
1682   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1683     verbose=yes ;;
1684 
1685   -version | --version | --versio | --versi | --vers | -V)
1686     ac_init_version=: ;;
1687 
1688   -with-* | --with-*)
1689     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1690     # Reject names that are not valid shell variable names.
1691     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1692       as_fn_error $? "invalid package name: $ac_useropt"
1693     ac_useropt_orig=$ac_useropt
1694     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1695     case $ac_user_opts in
1696       *"
1697 "with_$ac_useropt"
1698 "*) ;;
1699       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1700          ac_unrecognized_sep=', ';;
1701     esac
1702     eval with_$ac_useropt=\$ac_optarg ;;
1703 
1704   -without-* | --without-*)
1705     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1706     # Reject names that are not valid shell variable names.
1707     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1708       as_fn_error $? "invalid package name: $ac_useropt"
1709     ac_useropt_orig=$ac_useropt
1710     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1711     case $ac_user_opts in
1712       *"
1713 "with_$ac_useropt"
1714 "*) ;;
1715       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1716          ac_unrecognized_sep=', ';;
1717     esac
1718     eval with_$ac_useropt=no ;;
1719 
1720   --x)
1721     # Obsolete; use --with-x.
1722     with_x=yes ;;
1723 
1724   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1725   | --x-incl | --x-inc | --x-in | --x-i)
1726     ac_prev=x_includes ;;
1727   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1728   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1729     x_includes=$ac_optarg ;;
1730 
1731   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1732   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1733     ac_prev=x_libraries ;;
1734   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1735   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1736     x_libraries=$ac_optarg ;;
1737 
1738   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1739 Try \`$0 --help' for more information"
1740     ;;
1741 
1742   *=*)
1743     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1744     # Reject names that are not valid shell variable names.
1745     case $ac_envvar in #(
1746       '' | [0-9]* | *[!_$as_cr_alnum]* )
1747       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1748     esac
1749     eval $ac_envvar=\$ac_optarg
1750     export $ac_envvar ;;
1751 
1752   *)
1753     # FIXME: should be removed in autoconf 3.0.
1754     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1755     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1756       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1757     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1758     ;;
1759 
1760   esac
1761 done
1762 
1763 if test -n "$ac_prev"; then
1764   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1765   as_fn_error $? "missing argument to $ac_option"
1766 fi
1767 
1768 if test -n "$ac_unrecognized_opts"; then
1769   case $enable_option_checking in
1770     no) ;;
1771     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1772     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1773   esac
1774 fi
1775 
1776 # Check all directory arguments for consistency.
1777 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1778                 datadir sysconfdir sharedstatedir localstatedir includedir \
1779                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1780                 libdir localedir mandir
1781 do
1782   eval ac_val=\$$ac_var
1783   # Remove trailing slashes.
1784   case $ac_val in
1785     */ )
1786       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1787       eval $ac_var=\$ac_val;;
1788   esac
1789   # Be sure to have absolute directory names.
1790   case $ac_val in
1791     [\\/$]* | ?:[\\/]* )  continue;;
1792     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1793   esac
1794   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1795 done
1796 
1797 # There might be people who depend on the old broken behavior: `$host'
1798 # used to hold the argument of --host etc.
1799 # FIXME: To remove some day.
1800 build=$build_alias
1801 host=$host_alias
1802 target=$target_alias
1803 
1804 # FIXME: To remove some day.
1805 if test "x$host_alias" != x; then
1806   if test "x$build_alias" = x; then
1807     cross_compiling=maybe
1808   elif test "x$build_alias" != "x$host_alias"; then
1809     cross_compiling=yes
1810   fi
1811 fi
1812 
1813 ac_tool_prefix=
1814 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1815 
1816 test "$silent" = yes && exec 6>/dev/null
1817 
1818 
1819 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1820 ac_ls_di=`ls -di .` &&
1821 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1822   as_fn_error $? "working directory cannot be determined"
1823 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1824   as_fn_error $? "pwd does not report name of working directory"
1825 
1826 
1827 # Find the source files, if location was not specified.
1828 if test -z "$srcdir"; then
1829   ac_srcdir_defaulted=yes
1830   # Try the directory containing this script, then the parent directory.
1831   ac_confdir=`$as_dirname -- "$as_myself" ||
1832 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1833          X"$as_myself" : 'X\(//\)[^/]' \| \
1834          X"$as_myself" : 'X\(//\)$' \| \
1835          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1836 $as_echo X"$as_myself" |
1837     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1838             s//\1/
1839             q
1840           }
1841           /^X\(\/\/\)[^/].*/{
1842             s//\1/
1843             q
1844           }
1845           /^X\(\/\/\)$/{
1846             s//\1/
1847             q
1848           }
1849           /^X\(\/\).*/{
1850             s//\1/
1851             q
1852           }
1853           s/.*/./; q'`
1854   srcdir=$ac_confdir
1855   if test ! -r "$srcdir/$ac_unique_file"; then
1856     srcdir=..
1857   fi
1858 else
1859   ac_srcdir_defaulted=no
1860 fi
1861 if test ! -r "$srcdir/$ac_unique_file"; then
1862   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1863   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1864 fi
1865 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1866 ac_abs_confdir=`(
1867         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1868         pwd)`
1869 # When building in place, set srcdir=.
1870 if test "$ac_abs_confdir" = "$ac_pwd"; then
1871   srcdir=.
1872 fi
1873 # Remove unnecessary trailing slashes from srcdir.
1874 # Double slashes in file names in object file debugging info
1875 # mess up M-x gdb in Emacs.
1876 case $srcdir in
1877 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1878 esac
1879 for ac_var in $ac_precious_vars; do
1880   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1881   eval ac_env_${ac_var}_value=\$${ac_var}
1882   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1883   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1884 done
1885 
1886 #
1887 # Report the --help message.
1888 #
1889 if test "$ac_init_help" = "long"; then
1890   # Omit some internal or obsolete options to make the list less imposing.
1891   # This message is too long to be a string in the A/UX 3.1 sh.
1892   cat <<_ACEOF
1893 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1894 
1895 Usage: $0 [OPTION]... [VAR=VALUE]...
1896 
1897 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1898 VAR=VALUE.  See below for descriptions of some of the useful variables.
1899 
1900 Defaults for the options are specified in brackets.
1901 
1902 Configuration:
1903   -h, --help              display this help and exit
1904       --help=short        display options specific to this package
1905       --help=recursive    display the short help of all the included packages
1906   -V, --version           display version information and exit
1907   -q, --quiet, --silent   do not print \`checking ...' messages
1908       --cache-file=FILE   cache test results in FILE [disabled]
1909   -C, --config-cache      alias for \`--cache-file=config.cache'
1910   -n, --no-create         do not create output files
1911       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1912 
1913 Installation directories:
1914   --prefix=PREFIX         install architecture-independent files in PREFIX
1915                           [$ac_default_prefix]
1916   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1917                           [PREFIX]
1918 
1919 By default, \`make install' will install all the files in
1920 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1921 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1922 for instance \`--prefix=\$HOME'.
1923 
1924 For better control, use the options below.
1925 
1926 Fine tuning of the installation directories:
1927   --bindir=DIR            user executables [EPREFIX/bin]
1928   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1929   --libexecdir=DIR        program executables [EPREFIX/libexec]
1930   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1931   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1932   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1933   --libdir=DIR            object code libraries [EPREFIX/lib]
1934   --includedir=DIR        C header files [PREFIX/include]
1935   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1936   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1937   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1938   --infodir=DIR           info documentation [DATAROOTDIR/info]
1939   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1940   --mandir=DIR            man documentation [DATAROOTDIR/man]
1941   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1942   --htmldir=DIR           html documentation [DOCDIR]
1943   --dvidir=DIR            dvi documentation [DOCDIR]
1944   --pdfdir=DIR            pdf documentation [DOCDIR]
1945   --psdir=DIR             ps documentation [DOCDIR]
1946 _ACEOF
1947 
1948   cat <<\_ACEOF
1949 
1950 X features:
1951   --x-includes=DIR    X include files are in DIR
1952   --x-libraries=DIR   X library files are in DIR
1953 
1954 System types:
1955   --build=BUILD     configure for building on BUILD [guessed]
1956   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1957   --target=TARGET   configure for building compilers for TARGET [HOST]
1958 _ACEOF
1959 fi
1960 
1961 if test -n "$ac_init_help"; then
1962   case $ac_init_help in
1963      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1964    esac
1965   cat <<\_ACEOF
1966 
1967 Optional Features:
1968   --disable-option-checking  ignore unrecognized --enable/--with options
1969   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1970   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1971   --enable-openjdk-only   suppress building custom source even if present
1972                           [disabled]
1973   --enable-debug          set the debug level to fastdebug (shorthand for
1974                           --with-debug-level=fastdebug) [disabled]
1975   --enable-headless-only  only build headless (no GUI) support [disabled]
1976   --enable-unlimited-crypto
1977                           Enable unlimited crypto policy [disabled]
1978   --disable-keep-packaged-modules
1979                           Do not keep packaged modules in jdk image [enable]
1980   --enable-static-build   enable static library build [disabled]
1981   --disable-warnings-as-errors
1982                           do not consider native warnings to be an error
1983                           [enabled]
1984   --enable-debug-symbols  Deprecated. Option is kept for backwards
1985                           compatibility and is ignored
1986   --enable-zip-debug-info Deprecated. Option is kept for backwards
1987                           compatibility and is ignored
1988   --enable-native-coverage
1989                           enable native compilation with code coverage
1990                           data[disabled]
1991   --enable-dtrace[=yes/no/auto]
1992                           enable dtrace. Default is auto, where dtrace is
1993                           enabled if all dependencies are present.
1994   --disable-hotspot-gtest Disables building of the Hotspot unit tests
1995   --disable-freetype-bundling
1996                           disable bundling of the freetype library with the
1997                           build result [enabled on Windows or when using
1998                           --with-freetype, disabled otherwise]
1999   --enable-jtreg-failure-handler
2000                           forces build of the jtreg failure handler to be
2001                           enabled, missing dependencies become fatal errors.
2002                           Default is auto, where the failure handler is built
2003                           if all dependencies are present and otherwise just
2004                           disabled.
2005   --disable-generate-classlist
2006                           forces enabling or disabling of the generation of a
2007                           CDS classlist at build time. Default is to generate
2008                           it when either the server or client JVMs are built.
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-devkit           use this devkit for compilers, tools and resources
2034   --with-sys-root         alias for --with-sysroot for backwards compatability
2035   --with-sysroot          use this directory as sysroot
2036   --with-tools-dir        alias for --with-toolchain-path for backwards
2037                           compatibility
2038   --with-toolchain-path   prepend these directories when searching for
2039                           toolchain binaries (compilers etc)
2040   --with-extra-path       prepend these directories to the default path
2041   --with-sdk-name         use the platform SDK of the given name. [macosx]
2042   --with-conf-name        use this as the name of the configuration [generated
2043                           from important configuration options]
2044   --with-output-sync      set make output sync type if supported by make.
2045                           [recurse]
2046   --with-default-make-target
2047                           set the default make target [exploded-image]
2048   --with-cacerts-file     specify alternative cacerts file
2049   --with-copyright-year   Set copyright year value for build [current year]
2050   --with-milestone        Deprecated. Option is kept for backwards
2051                           compatibility and is ignored
2052   --with-update-version   Deprecated. Option is kept for backwards
2053                           compatibility and is ignored
2054   --with-user-release-suffix
2055                           Deprecated. Option is kept for backwards
2056                           compatibility and is ignored
2057   --with-build-number     Deprecated. Option is kept for backwards
2058                           compatibility and is ignored
2059   --with-version-string   Set version string [calculated]
2060   --with-version-pre      Set the base part of the version 'PRE' field
2061                           (pre-release identifier) ['internal']
2062   --with-version-opt      Set version 'OPT' field (build metadata)
2063                           [<timestamp>.<user>.<dirname>]
2064   --with-version-build    Set version 'BUILD' field (build number) [not
2065                           specified]
2066   --with-version-major    Set version 'MAJOR' field (first number) [current
2067                           source value]
2068   --with-version-minor    Set version 'MINOR' field (second number) [current
2069                           source value]
2070   --with-version-security Set version 'SECURITY' field (third number) [current
2071                           source value]
2072   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2073                           specified]
2074   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2075   --with-build-jdk        path to JDK of same version as is being built[the
2076                           newly built JDK]
2077   --with-add-source-root  Deprecated. Option is kept for backwards
2078                           compatibility and is ignored
2079   --with-override-source-root
2080                           Deprecated. Option is kept for backwards
2081                           compatibility and is ignored
2082   --with-adds-and-overrides
2083                           Deprecated. Option is kept for backwards
2084                           compatibility and is ignored
2085   --with-override-langtools
2086                           Deprecated. Option is kept for backwards
2087                           compatibility and is ignored
2088   --with-override-corba   Deprecated. Option is kept for backwards
2089                           compatibility and is ignored
2090   --with-override-jaxp    Deprecated. Option is kept for backwards
2091                           compatibility and is ignored
2092   --with-override-jaxws   Deprecated. Option is kept for backwards
2093                           compatibility and is ignored
2094   --with-override-hotspot Deprecated. Option is kept for backwards
2095                           compatibility and is ignored
2096   --with-override-nashorn Deprecated. Option is kept for backwards
2097                           compatibility and is ignored
2098   --with-override-jdk     Deprecated. Option is kept for backwards
2099                           compatibility and is ignored
2100   --with-import_hotspot   Deprecated. Option is kept for backwards
2101                           compatibility and is ignored
2102   --with-import-modules   import a set of prebuilt modules either as a zip
2103                           file or an exploded directory
2104   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2105                           to show possible values [platform dependent]
2106   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2107   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2108   --with-extra-ldflags    extra flags to be used when linking jdk
2109   --with-toolchain-version
2110                           the version of the toolchain to look for, use
2111                           '--help' to show possible values [platform
2112                           dependent]
2113   --with-build-devkit     Devkit to use for the build platform toolchain
2114   --with-jtreg            Regression Test Harness [probed]
2115   --with-native-debug-symbols
2116                           set the native debug symbol configuration (none,
2117                           internal, external, zipped) [varying]
2118   --with-jvm-features     additional JVM features to enable (separated by
2119                           comma), use '--help' to show possible values [none]
2120   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2121                           compatibility and is ignored
2122   --with-stdc++lib=<static>,<dynamic>,<default>
2123                           force linking of the C++ runtime on Linux to either
2124                           static or dynamic, default is static with dynamic as
2125                           fallback
2126   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2127                           (Windows only) [probed]
2128   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2129                           (Windows only) [probed]
2130   --with-x                use the X Window System
2131   --with-cups             specify prefix directory for the cups package
2132                           (expecting the headers under PATH/include)
2133   --with-cups-include     specify directory for the cups include files
2134   --with-freetype         specify prefix directory for the freetype package
2135                           (expecting the libraries under PATH/lib and the
2136                           headers under PATH/include)
2137   --with-freetype-include specify directory for the freetype include files
2138   --with-freetype-lib     specify directory for the freetype library
2139   --with-freetype-src     specify directory with freetype sources to
2140                           automatically build the library (experimental,
2141                           Windows-only)
2142   --with-alsa             specify prefix directory for the alsa package
2143                           (expecting the libraries under PATH/lib and the
2144                           headers under PATH/include)
2145   --with-alsa-include     specify directory for the alsa include files
2146   --with-alsa-lib         specify directory for the alsa library
2147   --with-libffi           specify prefix directory for the libffi package
2148                           (expecting the libraries under PATH/lib and the
2149                           headers under PATH/include)
2150   --with-libffi-include   specify directory for the libffi include files
2151   --with-libffi-lib       specify directory for the libffi library
2152   --with-libjpeg          use libjpeg from build system or OpenJDK source
2153                           (system, bundled) [bundled]
2154   --with-giflib           use giflib from build system or OpenJDK source
2155                           (system, bundled) [bundled]
2156   --with-libpng           use libpng from build system or OpenJDK source
2157                           (system, bundled) [bundled]
2158   --with-zlib             use zlib from build system or OpenJDK source
2159                           (system, bundled) [bundled]
2160   --with-lcms             use lcms2 from build system or OpenJDK source
2161                           (system, bundled) [bundled]
2162   --with-dxsdk            Deprecated. Option is kept for backwards
2163                           compatibility and is ignored
2164   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2165                           compatibility and is ignored
2166   --with-dxsdk-include    Deprecated. Option is kept for backwards
2167                           compatibility and is ignored
2168   --with-num-cores        number of cores in the build system, e.g.
2169                           --with-num-cores=8 [probed]
2170   --with-memory-size      memory (in MB) available in the build system, e.g.
2171                           --with-memory-size=1024 [probed]
2172   --with-jobs             number of parallel jobs to let make run [calculated
2173                           based on cores and memory]
2174   --with-test-jobs        number of parallel tests jobs to run [based on build
2175                           jobs]
2176   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2177                           invocations of boot JDK, overriding the default
2178                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2179                           -enableassertions"
2180   --with-sjavac-server-java
2181                           use this java binary for running the sjavac
2182                           background server [Boot JDK java]
2183   --with-ccache-dir       where to store ccache files [~/.ccache]
2184 
2185 Some influential environment variables:
2186   BASENAME    Override default value for BASENAME
2187   BASH        Override default value for BASH
2188   CAT         Override default value for CAT
2189   CHMOD       Override default value for CHMOD
2190   CMP         Override default value for CMP
2191   COMM        Override default value for COMM
2192   CP          Override default value for CP
2193   CUT         Override default value for CUT
2194   DATE        Override default value for DATE
2195   DIFF        Override default value for DIFF
2196   DIRNAME     Override default value for DIRNAME
2197   ECHO        Override default value for ECHO
2198   EXPR        Override default value for EXPR
2199   FILE        Override default value for FILE
2200   FIND        Override default value for FIND
2201   HEAD        Override default value for HEAD
2202   GUNZIP      Override default value for GUNZIP
2203   GZIP        Override default value for GZIP
2204   LN          Override default value for LN
2205   LS          Override default value for LS
2206   MKDIR       Override default value for MKDIR
2207   MKTEMP      Override default value for MKTEMP
2208   MV          Override default value for MV
2209   NAWK        Override default value for NAWK
2210   PRINTF      Override default value for PRINTF
2211   RM          Override default value for RM
2212   RMDIR       Override default value for RMDIR
2213   SH          Override default value for SH
2214   SORT        Override default value for SORT
2215   TAIL        Override default value for TAIL
2216   TAR         Override default value for TAR
2217   TEE         Override default value for TEE
2218   TOUCH       Override default value for TOUCH
2219   TR          Override default value for TR
2220   UNAME       Override default value for UNAME
2221   UNIQ        Override default value for UNIQ
2222   WC          Override default value for WC
2223   WHICH       Override default value for WHICH
2224   XARGS       Override default value for XARGS
2225   AWK         Override default value for AWK
2226   GREP        Override default value for GREP
2227   EGREP       Override default value for EGREP
2228   FGREP       Override default value for FGREP
2229   SED         Override default value for SED
2230   CYGPATH     Override default value for CYGPATH
2231   READLINK    Override default value for READLINK
2232   DF          Override default value for DF
2233   CPIO        Override default value for CPIO
2234   NICE        Override default value for NICE
2235   MAKE        Override default value for MAKE
2236   UNZIP       Override default value for UNZIP
2237   ZIP         Override default value for ZIP
2238   LDD         Override default value for LDD
2239   OTOOL       Override default value for OTOOL
2240   READELF     Override default value for READELF
2241   HG          Override default value for HG
2242   STAT        Override default value for STAT
2243   TIME        Override default value for TIME
2244   DTRACE      Override default value for DTRACE
2245   PATCH       Override default value for PATCH
2246   DSYMUTIL    Override default value for DSYMUTIL
2247   XATTR       Override default value for XATTR
2248   CODESIGN    Override default value for CODESIGN
2249   SETFILE     Override default value for SETFILE
2250   PKG_CONFIG  path to pkg-config utility
2251   JAVA        Override default value for JAVA
2252   JAVAC       Override default value for JAVAC
2253   JAVAH       Override default value for JAVAH
2254   JAR         Override default value for JAR
2255   JARSIGNER   Override default value for JARSIGNER
2256   CC          C compiler command
2257   CFLAGS      C compiler flags
2258   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2259               nonstandard directory <lib dir>
2260   LIBS        libraries to pass to the linker, e.g. -l<library>
2261   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2262               you have headers in a nonstandard directory <include dir>
2263   CXX         C++ compiler command
2264   CXXFLAGS    C++ compiler flags
2265   CPP         C preprocessor
2266   CXXCPP      C++ preprocessor
2267   AS          Override default value for AS
2268   AR          Override default value for AR
2269   LIPO        Override default value for LIPO
2270   STRIP       Override default value for STRIP
2271   NM          Override default value for NM
2272   GNM         Override default value for GNM
2273   OBJCOPY     Override default value for OBJCOPY
2274   OBJDUMP     Override default value for OBJDUMP
2275   BUILD_CC    Override default value for BUILD_CC
2276   BUILD_CXX   Override default value for BUILD_CXX
2277   BUILD_NM    Override default value for BUILD_NM
2278   BUILD_AR    Override default value for BUILD_AR
2279   BUILD_OBJCOPY
2280               Override default value for BUILD_OBJCOPY
2281   BUILD_STRIP Override default value for BUILD_STRIP
2282   JTREGEXE    Override default value for JTREGEXE
2283   XMKMF       Path to xmkmf, Makefile generator for X Window System
2284   FREETYPE_CFLAGS
2285               C compiler flags for FREETYPE, overriding pkg-config
2286   FREETYPE_LIBS
2287               linker flags for FREETYPE, overriding pkg-config
2288   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2289   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2290   LIBFFI_CFLAGS
2291               C compiler flags for LIBFFI, overriding pkg-config
2292   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2293   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2294   PNG_LIBS    linker flags for PNG, overriding pkg-config
2295   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2296   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2297   ICECC_CMD   Override default value for ICECC_CMD
2298   ICECC_CREATE_ENV
2299               Override default value for ICECC_CREATE_ENV
2300   ICECC_WRAPPER
2301               Override default value for ICECC_WRAPPER
2302   CCACHE      Override default value for CCACHE
2303 
2304 Use these variables to override the choices made by `configure' or to help
2305 it to find libraries and programs with nonstandard names/locations.
2306 
2307 Report bugs to <build-dev@openjdk.java.net>.
2308 OpenJDK home page: <http://openjdk.java.net>.
2309 _ACEOF
2310 ac_status=$?
2311 fi
2312 
2313 if test "$ac_init_help" = "recursive"; then
2314   # If there are subdirs, report their specific --help.
2315   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2316     test -d "$ac_dir" ||
2317       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2318       continue
2319     ac_builddir=.
2320 
2321 case "$ac_dir" in
2322 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2323 *)
2324   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2325   # A ".." for each directory in $ac_dir_suffix.
2326   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2327   case $ac_top_builddir_sub in
2328   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2329   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2330   esac ;;
2331 esac
2332 ac_abs_top_builddir=$ac_pwd
2333 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2334 # for backward compatibility:
2335 ac_top_builddir=$ac_top_build_prefix
2336 
2337 case $srcdir in
2338   .)  # We are building in place.
2339     ac_srcdir=.
2340     ac_top_srcdir=$ac_top_builddir_sub
2341     ac_abs_top_srcdir=$ac_pwd ;;
2342   [\\/]* | ?:[\\/]* )  # Absolute name.
2343     ac_srcdir=$srcdir$ac_dir_suffix;
2344     ac_top_srcdir=$srcdir
2345     ac_abs_top_srcdir=$srcdir ;;
2346   *) # Relative name.
2347     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2348     ac_top_srcdir=$ac_top_build_prefix$srcdir
2349     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2350 esac
2351 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2352 
2353     cd "$ac_dir" || { ac_status=$?; continue; }
2354     # Check for guested configure.
2355     if test -f "$ac_srcdir/configure.gnu"; then
2356       echo &&
2357       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2358     elif test -f "$ac_srcdir/configure"; then
2359       echo &&
2360       $SHELL "$ac_srcdir/configure" --help=recursive
2361     else
2362       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2363     fi || ac_status=$?
2364     cd "$ac_pwd" || { ac_status=$?; break; }
2365   done
2366 fi
2367 
2368 test -n "$ac_init_help" && exit $ac_status
2369 if $ac_init_version; then
2370   cat <<\_ACEOF
2371 OpenJDK configure jdk9
2372 generated by GNU Autoconf 2.69
2373 
2374 Copyright (C) 2012 Free Software Foundation, Inc.
2375 This configure script is free software; the Free Software Foundation
2376 gives unlimited permission to copy, distribute and modify it.
2377 _ACEOF
2378   exit
2379 fi
2380 
2381 ## ------------------------ ##
2382 ## Autoconf initialization. ##
2383 ## ------------------------ ##
2384 
2385 # ac_fn_c_try_compile LINENO
2386 # --------------------------
2387 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2388 ac_fn_c_try_compile ()
2389 {
2390   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391   rm -f conftest.$ac_objext
2392   if { { ac_try="$ac_compile"
2393 case "(($ac_try" in
2394   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2395   *) ac_try_echo=$ac_try;;
2396 esac
2397 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2398 $as_echo "$ac_try_echo"; } >&5
2399   (eval "$ac_compile") 2>conftest.err
2400   ac_status=$?
2401   if test -s conftest.err; then
2402     grep -v '^ *+' conftest.err >conftest.er1
2403     cat conftest.er1 >&5
2404     mv -f conftest.er1 conftest.err
2405   fi
2406   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2407   test $ac_status = 0; } && {
2408          test -z "$ac_c_werror_flag" ||
2409          test ! -s conftest.err
2410        } && test -s conftest.$ac_objext; then :
2411   ac_retval=0
2412 else
2413   $as_echo "$as_me: failed program was:" >&5
2414 sed 's/^/| /' conftest.$ac_ext >&5
2415 
2416         ac_retval=1
2417 fi
2418   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2419   as_fn_set_status $ac_retval
2420 
2421 } # ac_fn_c_try_compile
2422 
2423 # ac_fn_cxx_try_compile LINENO
2424 # ----------------------------
2425 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2426 ac_fn_cxx_try_compile ()
2427 {
2428   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429   rm -f conftest.$ac_objext
2430   if { { ac_try="$ac_compile"
2431 case "(($ac_try" in
2432   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2433   *) ac_try_echo=$ac_try;;
2434 esac
2435 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2436 $as_echo "$ac_try_echo"; } >&5
2437   (eval "$ac_compile") 2>conftest.err
2438   ac_status=$?
2439   if test -s conftest.err; then
2440     grep -v '^ *+' conftest.err >conftest.er1
2441     cat conftest.er1 >&5
2442     mv -f conftest.er1 conftest.err
2443   fi
2444   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2445   test $ac_status = 0; } && {
2446          test -z "$ac_cxx_werror_flag" ||
2447          test ! -s conftest.err
2448        } && test -s conftest.$ac_objext; then :
2449   ac_retval=0
2450 else
2451   $as_echo "$as_me: failed program was:" >&5
2452 sed 's/^/| /' conftest.$ac_ext >&5
2453 
2454         ac_retval=1
2455 fi
2456   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2457   as_fn_set_status $ac_retval
2458 
2459 } # ac_fn_cxx_try_compile
2460 
2461 # ac_fn_c_try_cpp LINENO
2462 # ----------------------
2463 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2464 ac_fn_c_try_cpp ()
2465 {
2466   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2467   if { { ac_try="$ac_cpp conftest.$ac_ext"
2468 case "(($ac_try" in
2469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2470   *) ac_try_echo=$ac_try;;
2471 esac
2472 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2473 $as_echo "$ac_try_echo"; } >&5
2474   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2475   ac_status=$?
2476   if test -s conftest.err; then
2477     grep -v '^ *+' conftest.err >conftest.er1
2478     cat conftest.er1 >&5
2479     mv -f conftest.er1 conftest.err
2480   fi
2481   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2482   test $ac_status = 0; } > conftest.i && {
2483          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2484          test ! -s conftest.err
2485        }; then :
2486   ac_retval=0
2487 else
2488   $as_echo "$as_me: failed program was:" >&5
2489 sed 's/^/| /' conftest.$ac_ext >&5
2490 
2491     ac_retval=1
2492 fi
2493   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2494   as_fn_set_status $ac_retval
2495 
2496 } # ac_fn_c_try_cpp
2497 
2498 # ac_fn_cxx_try_cpp LINENO
2499 # ------------------------
2500 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2501 ac_fn_cxx_try_cpp ()
2502 {
2503   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2504   if { { ac_try="$ac_cpp conftest.$ac_ext"
2505 case "(($ac_try" in
2506   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2507   *) ac_try_echo=$ac_try;;
2508 esac
2509 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2510 $as_echo "$ac_try_echo"; } >&5
2511   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2512   ac_status=$?
2513   if test -s conftest.err; then
2514     grep -v '^ *+' conftest.err >conftest.er1
2515     cat conftest.er1 >&5
2516     mv -f conftest.er1 conftest.err
2517   fi
2518   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2519   test $ac_status = 0; } > conftest.i && {
2520          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2521          test ! -s conftest.err
2522        }; then :
2523   ac_retval=0
2524 else
2525   $as_echo "$as_me: failed program was:" >&5
2526 sed 's/^/| /' conftest.$ac_ext >&5
2527 
2528     ac_retval=1
2529 fi
2530   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2531   as_fn_set_status $ac_retval
2532 
2533 } # ac_fn_cxx_try_cpp
2534 
2535 # ac_fn_c_try_link LINENO
2536 # -----------------------
2537 # Try to link conftest.$ac_ext, and return whether this succeeded.
2538 ac_fn_c_try_link ()
2539 {
2540   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2541   rm -f conftest.$ac_objext conftest$ac_exeext
2542   if { { ac_try="$ac_link"
2543 case "(($ac_try" in
2544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2545   *) ac_try_echo=$ac_try;;
2546 esac
2547 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2548 $as_echo "$ac_try_echo"; } >&5
2549   (eval "$ac_link") 2>conftest.err
2550   ac_status=$?
2551   if test -s conftest.err; then
2552     grep -v '^ *+' conftest.err >conftest.er1
2553     cat conftest.er1 >&5
2554     mv -f conftest.er1 conftest.err
2555   fi
2556   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2557   test $ac_status = 0; } && {
2558          test -z "$ac_c_werror_flag" ||
2559          test ! -s conftest.err
2560        } && test -s conftest$ac_exeext && {
2561          test "$cross_compiling" = yes ||
2562          test -x conftest$ac_exeext
2563        }; then :
2564   ac_retval=0
2565 else
2566   $as_echo "$as_me: failed program was:" >&5
2567 sed 's/^/| /' conftest.$ac_ext >&5
2568 
2569         ac_retval=1
2570 fi
2571   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2572   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2573   # interfere with the next link command; also delete a directory that is
2574   # left behind by Apple's compiler.  We do this before executing the actions.
2575   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2576   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577   as_fn_set_status $ac_retval
2578 
2579 } # ac_fn_c_try_link
2580 
2581 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2582 # ---------------------------------------------------------
2583 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2584 # the include files in INCLUDES and setting the cache variable VAR
2585 # accordingly.
2586 ac_fn_cxx_check_header_mongrel ()
2587 {
2588   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2589   if eval \${$3+:} false; then :
2590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2591 $as_echo_n "checking for $2... " >&6; }
2592 if eval \${$3+:} false; then :
2593   $as_echo_n "(cached) " >&6
2594 fi
2595 eval ac_res=\$$3
2596                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2597 $as_echo "$ac_res" >&6; }
2598 else
2599   # Is the header compilable?
2600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2601 $as_echo_n "checking $2 usability... " >&6; }
2602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2603 /* end confdefs.h.  */
2604 $4
2605 #include <$2>
2606 _ACEOF
2607 if ac_fn_cxx_try_compile "$LINENO"; then :
2608   ac_header_compiler=yes
2609 else
2610   ac_header_compiler=no
2611 fi
2612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2614 $as_echo "$ac_header_compiler" >&6; }
2615 
2616 # Is the header present?
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2618 $as_echo_n "checking $2 presence... " >&6; }
2619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2620 /* end confdefs.h.  */
2621 #include <$2>
2622 _ACEOF
2623 if ac_fn_cxx_try_cpp "$LINENO"; then :
2624   ac_header_preproc=yes
2625 else
2626   ac_header_preproc=no
2627 fi
2628 rm -f conftest.err conftest.i conftest.$ac_ext
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2630 $as_echo "$ac_header_preproc" >&6; }
2631 
2632 # So?  What about this header?
2633 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2634   yes:no: )
2635     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2636 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2637     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2638 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2639     ;;
2640   no:yes:* )
2641     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2642 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2643     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2644 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2645     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2646 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2647     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2648 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2649     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2650 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2651 ( $as_echo "## ----------------------------------------- ##
2652 ## Report this to build-dev@openjdk.java.net ##
2653 ## ----------------------------------------- ##"
2654      ) | sed "s/^/$as_me: WARNING:     /" >&2
2655     ;;
2656 esac
2657   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2658 $as_echo_n "checking for $2... " >&6; }
2659 if eval \${$3+:} false; then :
2660   $as_echo_n "(cached) " >&6
2661 else
2662   eval "$3=\$ac_header_compiler"
2663 fi
2664 eval ac_res=\$$3
2665                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2666 $as_echo "$ac_res" >&6; }
2667 fi
2668   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2669 
2670 } # ac_fn_cxx_check_header_mongrel
2671 
2672 # ac_fn_cxx_try_run LINENO
2673 # ------------------------
2674 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2675 # that executables *can* be run.
2676 ac_fn_cxx_try_run ()
2677 {
2678   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2679   if { { ac_try="$ac_link"
2680 case "(($ac_try" in
2681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2682   *) ac_try_echo=$ac_try;;
2683 esac
2684 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2685 $as_echo "$ac_try_echo"; } >&5
2686   (eval "$ac_link") 2>&5
2687   ac_status=$?
2688   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2689   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2690   { { case "(($ac_try" in
2691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2692   *) ac_try_echo=$ac_try;;
2693 esac
2694 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2695 $as_echo "$ac_try_echo"; } >&5
2696   (eval "$ac_try") 2>&5
2697   ac_status=$?
2698   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2699   test $ac_status = 0; }; }; then :
2700   ac_retval=0
2701 else
2702   $as_echo "$as_me: program exited with status $ac_status" >&5
2703        $as_echo "$as_me: failed program was:" >&5
2704 sed 's/^/| /' conftest.$ac_ext >&5
2705 
2706        ac_retval=$ac_status
2707 fi
2708   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2709   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2710   as_fn_set_status $ac_retval
2711 
2712 } # ac_fn_cxx_try_run
2713 
2714 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2715 # ---------------------------------------------------------
2716 # Tests whether HEADER exists and can be compiled using the include files in
2717 # INCLUDES, setting the cache variable VAR accordingly.
2718 ac_fn_cxx_check_header_compile ()
2719 {
2720   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2721   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2722 $as_echo_n "checking for $2... " >&6; }
2723 if eval \${$3+:} false; then :
2724   $as_echo_n "(cached) " >&6
2725 else
2726   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2727 /* end confdefs.h.  */
2728 $4
2729 #include <$2>
2730 _ACEOF
2731 if ac_fn_cxx_try_compile "$LINENO"; then :
2732   eval "$3=yes"
2733 else
2734   eval "$3=no"
2735 fi
2736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2737 fi
2738 eval ac_res=\$$3
2739                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2740 $as_echo "$ac_res" >&6; }
2741   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2742 
2743 } # ac_fn_cxx_check_header_compile
2744 
2745 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2746 # ----------------------------------------------
2747 # Tries to find the compile-time value of EXPR in a program that includes
2748 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2749 # computed
2750 ac_fn_cxx_compute_int ()
2751 {
2752   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2753   if test "$cross_compiling" = yes; then
2754     # Depending upon the size, compute the lo and hi bounds.
2755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2756 /* end confdefs.h.  */
2757 $4
2758 int
2759 main ()
2760 {
2761 static int test_array [1 - 2 * !(($2) >= 0)];
2762 test_array [0] = 0;
2763 return test_array [0];
2764 
2765   ;
2766   return 0;
2767 }
2768 _ACEOF
2769 if ac_fn_cxx_try_compile "$LINENO"; then :
2770   ac_lo=0 ac_mid=0
2771   while :; do
2772     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2773 /* end confdefs.h.  */
2774 $4
2775 int
2776 main ()
2777 {
2778 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2779 test_array [0] = 0;
2780 return test_array [0];
2781 
2782   ;
2783   return 0;
2784 }
2785 _ACEOF
2786 if ac_fn_cxx_try_compile "$LINENO"; then :
2787   ac_hi=$ac_mid; break
2788 else
2789   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2790                         if test $ac_lo -le $ac_mid; then
2791                           ac_lo= ac_hi=
2792                           break
2793                         fi
2794                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2795 fi
2796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2797   done
2798 else
2799   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2800 /* end confdefs.h.  */
2801 $4
2802 int
2803 main ()
2804 {
2805 static int test_array [1 - 2 * !(($2) < 0)];
2806 test_array [0] = 0;
2807 return test_array [0];
2808 
2809   ;
2810   return 0;
2811 }
2812 _ACEOF
2813 if ac_fn_cxx_try_compile "$LINENO"; then :
2814   ac_hi=-1 ac_mid=-1
2815   while :; do
2816     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2817 /* end confdefs.h.  */
2818 $4
2819 int
2820 main ()
2821 {
2822 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2823 test_array [0] = 0;
2824 return test_array [0];
2825 
2826   ;
2827   return 0;
2828 }
2829 _ACEOF
2830 if ac_fn_cxx_try_compile "$LINENO"; then :
2831   ac_lo=$ac_mid; break
2832 else
2833   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2834                         if test $ac_mid -le $ac_hi; then
2835                           ac_lo= ac_hi=
2836                           break
2837                         fi
2838                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2839 fi
2840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2841   done
2842 else
2843   ac_lo= ac_hi=
2844 fi
2845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2846 fi
2847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848 # Binary search between lo and hi bounds.
2849 while test "x$ac_lo" != "x$ac_hi"; do
2850   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2852 /* end confdefs.h.  */
2853 $4
2854 int
2855 main ()
2856 {
2857 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2858 test_array [0] = 0;
2859 return test_array [0];
2860 
2861   ;
2862   return 0;
2863 }
2864 _ACEOF
2865 if ac_fn_cxx_try_compile "$LINENO"; then :
2866   ac_hi=$ac_mid
2867 else
2868   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2869 fi
2870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871 done
2872 case $ac_lo in #((
2873 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2874 '') ac_retval=1 ;;
2875 esac
2876   else
2877     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2878 /* end confdefs.h.  */
2879 $4
2880 static long int longval () { return $2; }
2881 static unsigned long int ulongval () { return $2; }
2882 #include <stdio.h>
2883 #include <stdlib.h>
2884 int
2885 main ()
2886 {
2887 
2888   FILE *f = fopen ("conftest.val", "w");
2889   if (! f)
2890     return 1;
2891   if (($2) < 0)
2892     {
2893       long int i = longval ();
2894       if (i != ($2))
2895         return 1;
2896       fprintf (f, "%ld", i);
2897     }
2898   else
2899     {
2900       unsigned long int i = ulongval ();
2901       if (i != ($2))
2902         return 1;
2903       fprintf (f, "%lu", i);
2904     }
2905   /* Do not output a trailing newline, as this causes \r\n confusion
2906      on some platforms.  */
2907   return ferror (f) || fclose (f) != 0;
2908 
2909   ;
2910   return 0;
2911 }
2912 _ACEOF
2913 if ac_fn_cxx_try_run "$LINENO"; then :
2914   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2915 else
2916   ac_retval=1
2917 fi
2918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2919   conftest.$ac_objext conftest.beam conftest.$ac_ext
2920 rm -f conftest.val
2921 
2922   fi
2923   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2924   as_fn_set_status $ac_retval
2925 
2926 } # ac_fn_cxx_compute_int
2927 
2928 # ac_fn_cxx_try_link LINENO
2929 # -------------------------
2930 # Try to link conftest.$ac_ext, and return whether this succeeded.
2931 ac_fn_cxx_try_link ()
2932 {
2933   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2934   rm -f conftest.$ac_objext conftest$ac_exeext
2935   if { { ac_try="$ac_link"
2936 case "(($ac_try" in
2937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2938   *) ac_try_echo=$ac_try;;
2939 esac
2940 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2941 $as_echo "$ac_try_echo"; } >&5
2942   (eval "$ac_link") 2>conftest.err
2943   ac_status=$?
2944   if test -s conftest.err; then
2945     grep -v '^ *+' conftest.err >conftest.er1
2946     cat conftest.er1 >&5
2947     mv -f conftest.er1 conftest.err
2948   fi
2949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2950   test $ac_status = 0; } && {
2951          test -z "$ac_cxx_werror_flag" ||
2952          test ! -s conftest.err
2953        } && test -s conftest$ac_exeext && {
2954          test "$cross_compiling" = yes ||
2955          test -x conftest$ac_exeext
2956        }; then :
2957   ac_retval=0
2958 else
2959   $as_echo "$as_me: failed program was:" >&5
2960 sed 's/^/| /' conftest.$ac_ext >&5
2961 
2962         ac_retval=1
2963 fi
2964   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2965   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2966   # interfere with the next link command; also delete a directory that is
2967   # left behind by Apple's compiler.  We do this before executing the actions.
2968   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2969   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2970   as_fn_set_status $ac_retval
2971 
2972 } # ac_fn_cxx_try_link
2973 
2974 # ac_fn_cxx_check_func LINENO FUNC VAR
2975 # ------------------------------------
2976 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2977 ac_fn_cxx_check_func ()
2978 {
2979   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2980   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2981 $as_echo_n "checking for $2... " >&6; }
2982 if eval \${$3+:} false; then :
2983   $as_echo_n "(cached) " >&6
2984 else
2985   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2986 /* end confdefs.h.  */
2987 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2988    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2989 #define $2 innocuous_$2
2990 
2991 /* System header to define __stub macros and hopefully few prototypes,
2992     which can conflict with char $2 (); below.
2993     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2994     <limits.h> exists even on freestanding compilers.  */
2995 
2996 #ifdef __STDC__
2997 # include <limits.h>
2998 #else
2999 # include <assert.h>
3000 #endif
3001 
3002 #undef $2
3003 
3004 /* Override any GCC internal prototype to avoid an error.
3005    Use char because int might match the return type of a GCC
3006    builtin and then its argument prototype would still apply.  */
3007 #ifdef __cplusplus
3008 extern "C"
3009 #endif
3010 char $2 ();
3011 /* The GNU C library defines this for functions which it implements
3012     to always fail with ENOSYS.  Some functions are actually named
3013     something starting with __ and the normal name is an alias.  */
3014 #if defined __stub_$2 || defined __stub___$2
3015 choke me
3016 #endif
3017 
3018 int
3019 main ()
3020 {
3021 return $2 ();
3022   ;
3023   return 0;
3024 }
3025 _ACEOF
3026 if ac_fn_cxx_try_link "$LINENO"; then :
3027   eval "$3=yes"
3028 else
3029   eval "$3=no"
3030 fi
3031 rm -f core conftest.err conftest.$ac_objext \
3032     conftest$ac_exeext conftest.$ac_ext
3033 fi
3034 eval ac_res=\$$3
3035                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3036 $as_echo "$ac_res" >&6; }
3037   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3038 
3039 } # ac_fn_cxx_check_func
3040 
3041 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3042 # -------------------------------------------------------
3043 # Tests whether HEADER exists and can be compiled using the include files in
3044 # INCLUDES, setting the cache variable VAR accordingly.
3045 ac_fn_c_check_header_compile ()
3046 {
3047   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3048   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3049 $as_echo_n "checking for $2... " >&6; }
3050 if eval \${$3+:} false; then :
3051   $as_echo_n "(cached) " >&6
3052 else
3053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3054 /* end confdefs.h.  */
3055 $4
3056 #include <$2>
3057 _ACEOF
3058 if ac_fn_c_try_compile "$LINENO"; then :
3059   eval "$3=yes"
3060 else
3061   eval "$3=no"
3062 fi
3063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3064 fi
3065 eval ac_res=\$$3
3066                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3067 $as_echo "$ac_res" >&6; }
3068   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3069 
3070 } # ac_fn_c_check_header_compile
3071 cat >config.log <<_ACEOF
3072 This file contains any messages produced by compilers while
3073 running configure, to aid debugging if configure makes a mistake.
3074 
3075 It was created by OpenJDK $as_me jdk9, which was
3076 generated by GNU Autoconf 2.69.  Invocation command line was
3077 
3078   $ $0 $@
3079 
3080 _ACEOF
3081 exec 5>>config.log
3082 {
3083 cat <<_ASUNAME
3084 ## --------- ##
3085 ## Platform. ##
3086 ## --------- ##
3087 
3088 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3089 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3090 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3091 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3092 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3093 
3094 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3095 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3096 
3097 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3098 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3099 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3100 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3101 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3102 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3103 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3104 
3105 _ASUNAME
3106 
3107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3108 for as_dir in $PATH
3109 do
3110   IFS=$as_save_IFS
3111   test -z "$as_dir" && as_dir=.
3112     $as_echo "PATH: $as_dir"
3113   done
3114 IFS=$as_save_IFS
3115 
3116 } >&5
3117 
3118 cat >&5 <<_ACEOF
3119 
3120 
3121 ## ----------- ##
3122 ## Core tests. ##
3123 ## ----------- ##
3124 
3125 _ACEOF
3126 
3127 
3128 # Keep a trace of the command line.
3129 # Strip out --no-create and --no-recursion so they do not pile up.
3130 # Strip out --silent because we don't want to record it for future runs.
3131 # Also quote any args containing shell meta-characters.
3132 # Make two passes to allow for proper duplicate-argument suppression.
3133 ac_configure_args=
3134 ac_configure_args0=
3135 ac_configure_args1=
3136 ac_must_keep_next=false
3137 for ac_pass in 1 2
3138 do
3139   for ac_arg
3140   do
3141     case $ac_arg in
3142     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3143     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3144     | -silent | --silent | --silen | --sile | --sil)
3145       continue ;;
3146     *\'*)
3147       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3148     esac
3149     case $ac_pass in
3150     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3151     2)
3152       as_fn_append ac_configure_args1 " '$ac_arg'"
3153       if test $ac_must_keep_next = true; then
3154         ac_must_keep_next=false # Got value, back to normal.
3155       else
3156         case $ac_arg in
3157           *=* | --config-cache | -C | -disable-* | --disable-* \
3158           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3159           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3160           | -with-* | --with-* | -without-* | --without-* | --x)
3161             case "$ac_configure_args0 " in
3162               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3163             esac
3164             ;;
3165           -* ) ac_must_keep_next=true ;;
3166         esac
3167       fi
3168       as_fn_append ac_configure_args " '$ac_arg'"
3169       ;;
3170     esac
3171   done
3172 done
3173 { ac_configure_args0=; unset ac_configure_args0;}
3174 { ac_configure_args1=; unset ac_configure_args1;}
3175 
3176 # When interrupted or exit'd, cleanup temporary files, and complete
3177 # config.log.  We remove comments because anyway the quotes in there
3178 # would cause problems or look ugly.
3179 # WARNING: Use '\'' to represent an apostrophe within the trap.
3180 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3181 trap 'exit_status=$?
3182   # Save into config.log some information that might help in debugging.
3183   {
3184     echo
3185 
3186     $as_echo "## ---------------- ##
3187 ## Cache variables. ##
3188 ## ---------------- ##"
3189     echo
3190     # The following way of writing the cache mishandles newlines in values,
3191 (
3192   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3193     eval ac_val=\$$ac_var
3194     case $ac_val in #(
3195     *${as_nl}*)
3196       case $ac_var in #(
3197       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3198 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3199       esac
3200       case $ac_var in #(
3201       _ | IFS | as_nl) ;; #(
3202       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3203       *) { eval $ac_var=; unset $ac_var;} ;;
3204       esac ;;
3205     esac
3206   done
3207   (set) 2>&1 |
3208     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3209     *${as_nl}ac_space=\ *)
3210       sed -n \
3211         "s/'\''/'\''\\\\'\'''\''/g;
3212           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3213       ;; #(
3214     *)
3215       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3216       ;;
3217     esac |
3218     sort
3219 )
3220     echo
3221 
3222     $as_echo "## ----------------- ##
3223 ## Output variables. ##
3224 ## ----------------- ##"
3225     echo
3226     for ac_var in $ac_subst_vars
3227     do
3228       eval ac_val=\$$ac_var
3229       case $ac_val in
3230       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3231       esac
3232       $as_echo "$ac_var='\''$ac_val'\''"
3233     done | sort
3234     echo
3235 
3236     if test -n "$ac_subst_files"; then
3237       $as_echo "## ------------------- ##
3238 ## File substitutions. ##
3239 ## ------------------- ##"
3240       echo
3241       for ac_var in $ac_subst_files
3242       do
3243         eval ac_val=\$$ac_var
3244         case $ac_val in
3245         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3246         esac
3247         $as_echo "$ac_var='\''$ac_val'\''"
3248       done | sort
3249       echo
3250     fi
3251 
3252     if test -s confdefs.h; then
3253       $as_echo "## ----------- ##
3254 ## confdefs.h. ##
3255 ## ----------- ##"
3256       echo
3257       cat confdefs.h
3258       echo
3259     fi
3260     test "$ac_signal" != 0 &&
3261       $as_echo "$as_me: caught signal $ac_signal"
3262     $as_echo "$as_me: exit $exit_status"
3263   } >&5
3264   rm -f core *.core core.conftest.* &&
3265     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3266     exit $exit_status
3267 ' 0
3268 for ac_signal in 1 2 13 15; do
3269   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3270 done
3271 ac_signal=0
3272 
3273 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3274 rm -f -r conftest* confdefs.h
3275 
3276 $as_echo "/* confdefs.h */" > confdefs.h
3277 
3278 # Predefined preprocessor variables.
3279 
3280 cat >>confdefs.h <<_ACEOF
3281 #define PACKAGE_NAME "$PACKAGE_NAME"
3282 _ACEOF
3283 
3284 cat >>confdefs.h <<_ACEOF
3285 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3286 _ACEOF
3287 
3288 cat >>confdefs.h <<_ACEOF
3289 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3290 _ACEOF
3291 
3292 cat >>confdefs.h <<_ACEOF
3293 #define PACKAGE_STRING "$PACKAGE_STRING"
3294 _ACEOF
3295 
3296 cat >>confdefs.h <<_ACEOF
3297 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3298 _ACEOF
3299 
3300 cat >>confdefs.h <<_ACEOF
3301 #define PACKAGE_URL "$PACKAGE_URL"
3302 _ACEOF
3303 
3304 
3305 # Let the site file select an alternate cache file if it wants to.
3306 # Prefer an explicitly selected file to automatically selected ones.
3307 ac_site_file1=NONE
3308 ac_site_file2=NONE
3309 if test -n "$CONFIG_SITE"; then
3310   # We do not want a PATH search for config.site.
3311   case $CONFIG_SITE in #((
3312     -*)  ac_site_file1=./$CONFIG_SITE;;
3313     */*) ac_site_file1=$CONFIG_SITE;;
3314     *)   ac_site_file1=./$CONFIG_SITE;;
3315   esac
3316 elif test "x$prefix" != xNONE; then
3317   ac_site_file1=$prefix/share/config.site
3318   ac_site_file2=$prefix/etc/config.site
3319 else
3320   ac_site_file1=$ac_default_prefix/share/config.site
3321   ac_site_file2=$ac_default_prefix/etc/config.site
3322 fi
3323 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3324 do
3325   test "x$ac_site_file" = xNONE && continue
3326   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3327     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3328 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3329     sed 's/^/| /' "$ac_site_file" >&5
3330     . "$ac_site_file" \
3331       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3332 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3333 as_fn_error $? "failed to load site script $ac_site_file
3334 See \`config.log' for more details" "$LINENO" 5; }
3335   fi
3336 done
3337 
3338 if test -r "$cache_file"; then
3339   # Some versions of bash will fail to source /dev/null (special files
3340   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3341   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3342     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3343 $as_echo "$as_me: loading cache $cache_file" >&6;}
3344     case $cache_file in
3345       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3346       *)                      . "./$cache_file";;
3347     esac
3348   fi
3349 else
3350   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3351 $as_echo "$as_me: creating cache $cache_file" >&6;}
3352   >$cache_file
3353 fi
3354 
3355 # Check that the precious variables saved in the cache have kept the same
3356 # value.
3357 ac_cache_corrupted=false
3358 for ac_var in $ac_precious_vars; do
3359   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3360   eval ac_new_set=\$ac_env_${ac_var}_set
3361   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3362   eval ac_new_val=\$ac_env_${ac_var}_value
3363   case $ac_old_set,$ac_new_set in
3364     set,)
3365       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3366 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3367       ac_cache_corrupted=: ;;
3368     ,set)
3369       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3370 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3371       ac_cache_corrupted=: ;;
3372     ,);;
3373     *)
3374       if test "x$ac_old_val" != "x$ac_new_val"; then
3375         # differences in whitespace do not lead to failure.
3376         ac_old_val_w=`echo x $ac_old_val`
3377         ac_new_val_w=`echo x $ac_new_val`
3378         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3379           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3380 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3381           ac_cache_corrupted=:
3382         else
3383           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3384 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3385           eval $ac_var=\$ac_old_val
3386         fi
3387         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3388 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3389         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3390 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3391       fi;;
3392   esac
3393   # Pass precious variables to config.status.
3394   if test "$ac_new_set" = set; then
3395     case $ac_new_val in
3396     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3397     *) ac_arg=$ac_var=$ac_new_val ;;
3398     esac
3399     case " $ac_configure_args " in
3400       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3401       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3402     esac
3403   fi
3404 done
3405 if $ac_cache_corrupted; then
3406   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3408   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3409 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3410   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3411 fi
3412 ## -------------------- ##
3413 ## Main body of script. ##
3414 ## -------------------- ##
3415 
3416 ac_ext=c
3417 ac_cpp='$CPP $CPPFLAGS'
3418 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3419 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3420 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3421 
3422 
3423 
3424 ac_aux_dir=
3425 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3426   if test -f "$ac_dir/install-sh"; then
3427     ac_aux_dir=$ac_dir
3428     ac_install_sh="$ac_aux_dir/install-sh -c"
3429     break
3430   elif test -f "$ac_dir/install.sh"; then
3431     ac_aux_dir=$ac_dir
3432     ac_install_sh="$ac_aux_dir/install.sh -c"
3433     break
3434   elif test -f "$ac_dir/shtool"; then
3435     ac_aux_dir=$ac_dir
3436     ac_install_sh="$ac_aux_dir/shtool install -c"
3437     break
3438   fi
3439 done
3440 if test -z "$ac_aux_dir"; then
3441   as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3442 fi
3443 
3444 # These three variables are undocumented and unsupported,
3445 # and are intended to be withdrawn in a future Autoconf release.
3446 # They can cause serious problems if a builder's source tree is in a directory
3447 # whose full name contains unusual characters.
3448 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3449 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3450 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3451 
3452 
3453 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3454 
3455 #
3456 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3457 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3458 #
3459 # This code is free software; you can redistribute it and/or modify it
3460 # under the terms of the GNU General Public License version 2 only, as
3461 # published by the Free Software Foundation.  Oracle designates this
3462 # particular file as subject to the "Classpath" exception as provided
3463 # by Oracle in the LICENSE file that accompanied this code.
3464 #
3465 # This code is distributed in the hope that it will be useful, but WITHOUT
3466 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3467 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3468 # version 2 for more details (a copy is included in the LICENSE file that
3469 # accompanied this code).
3470 #
3471 # You should have received a copy of the GNU General Public License version
3472 # 2 along with this work; if not, write to the Free Software Foundation,
3473 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3474 #
3475 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3476 # or visit www.oracle.com if you need additional information or have any
3477 # questions.
3478 #
3479 
3480 #
3481 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3482 #
3483 # This program is free software; you can redistribute it and/or modify
3484 # it under the terms of the GNU General Public License as published by
3485 # the Free Software Foundation; either version 2 of the License, or
3486 # (at your option) any later version.
3487 #
3488 # This program is distributed in the hope that it will be useful, but
3489 # WITHOUT ANY WARRANTY; without even the implied warranty of
3490 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3491 # General Public License for more details.
3492 #
3493 # You should have received a copy of the GNU General Public License
3494 # along with this program; if not, write to the Free Software
3495 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3496 #
3497 # As a special exception to the GNU General Public License, if you
3498 # distribute this file as part of a program that contains a
3499 # configuration script generated by Autoconf, you may include it under
3500 # the same distribution terms that you use for the rest of that program.
3501 
3502 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3503 # ----------------------------------
3504 # PKG_PROG_PKG_CONFIG
3505 
3506 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3507 #
3508 # Check to see whether a particular set of modules exists.  Similar
3509 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3510 #
3511 #
3512 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3513 # this or PKG_CHECK_MODULES is called, or make sure to call
3514 # PKG_CHECK_EXISTS manually
3515 # --------------------------------------------------------------
3516 
3517 
3518 
3519 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3520 # ---------------------------------------------
3521 # _PKG_CONFIG
3522 
3523 # _PKG_SHORT_ERRORS_SUPPORTED
3524 # -----------------------------
3525 # _PKG_SHORT_ERRORS_SUPPORTED
3526 
3527 
3528 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3529 # [ACTION-IF-NOT-FOUND])
3530 #
3531 #
3532 # Note that if there is a possibility the first call to
3533 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3534 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3535 #
3536 #
3537 # --------------------------------------------------------------
3538 # PKG_CHECK_MODULES
3539 
3540 
3541 # Include these first...
3542 #
3543 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3544 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3545 #
3546 # This code is free software; you can redistribute it and/or modify it
3547 # under the terms of the GNU General Public License version 2 only, as
3548 # published by the Free Software Foundation.  Oracle designates this
3549 # particular file as subject to the "Classpath" exception as provided
3550 # by Oracle in the LICENSE file that accompanied this code.
3551 #
3552 # This code is distributed in the hope that it will be useful, but WITHOUT
3553 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3554 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3555 # version 2 for more details (a copy is included in the LICENSE file that
3556 # accompanied this code).
3557 #
3558 # You should have received a copy of the GNU General Public License version
3559 # 2 along with this work; if not, write to the Free Software Foundation,
3560 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3561 #
3562 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3563 # or visit www.oracle.com if you need additional information or have any
3564 # questions.
3565 #
3566 
3567 # Create a function/macro that takes a series of named arguments. The call is
3568 # similar to AC_DEFUN, but the setup of the function looks like this:
3569 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3570 # ... do something
3571 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3572 # ])
3573 # A star (*) in front of a named argument means that it is required and it's
3574 # presence will be verified. To pass e.g. the first value as a normal indexed
3575 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3576 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3577 # "ARG_FOO".
3578 #
3579 # The generated function can be called like this:
3580 # MYFUNC(FOO: [foo-val],
3581 #     BAR: [
3582 #         $ECHO hello world
3583 #     ])
3584 # Note that the argument value must start on the same line as the argument name.
3585 #
3586 # Argument 1: Name of the function to define
3587 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3588 # Argument 3: Argument array to treat as named, typically $@
3589 # Argument 4: The main function body
3590 
3591 
3592 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3593 # If so, then append $1 to $2 \
3594 # Also set JVM_ARG_OK to true/false depending on outcome.
3595 
3596 
3597 # Appends a string to a path variable, only adding the : when needed.
3598 
3599 
3600 # Prepends a string to a path variable, only adding the : when needed.
3601 
3602 
3603 # This will make sure the given variable points to a full and proper
3604 # path. This means:
3605 # 1) There will be no spaces in the path. On unix platforms,
3606 #    spaces in the path will result in an error. On Windows,
3607 #    the path will be rewritten using short-style to be space-free.
3608 # 2) The path will be absolute, and it will be in unix-style (on
3609 #     cygwin).
3610 # $1: The name of the variable to fix
3611 
3612 
3613 # This will make sure the given variable points to a executable
3614 # with a full and proper path. This means:
3615 # 1) There will be no spaces in the path. On unix platforms,
3616 #    spaces in the path will result in an error. On Windows,
3617 #    the path will be rewritten using short-style to be space-free.
3618 # 2) The path will be absolute, and it will be in unix-style (on
3619 #     cygwin).
3620 # Any arguments given to the executable is preserved.
3621 # If the input variable does not have a directory specification, then
3622 # it need to be in the PATH.
3623 # $1: The name of the variable to fix
3624 
3625 
3626 
3627 
3628 # Register a --with argument but mark it as deprecated
3629 # $1: The name of the with argument to deprecate, not including --with-
3630 
3631 
3632 # Register a --enable argument but mark it as deprecated
3633 # $1: The name of the with argument to deprecate, not including --enable-
3634 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3635 # $3: Messages to user.
3636 
3637 
3638 
3639 
3640 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3641 # $1: variable to check
3642 
3643 
3644 # Check that there are no unprocessed overridden variables left.
3645 # If so, they are an incorrect argument and we will exit with an error.
3646 
3647 
3648 # Setup a tool for the given variable. If correctly specified by the user,
3649 # use that value, otherwise search for the tool using the supplied code snippet.
3650 # $1: variable to set
3651 # $2: code snippet to call to look for the tool
3652 # $3: code snippet to call if variable was used to find tool
3653 
3654 
3655 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3656 # $1: variable to set
3657 # $2: executable name (or list of names) to look for
3658 # $3: [path]
3659 
3660 
3661 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3662 # $1: variable to set
3663 # $2: executable name (or list of names) to look for
3664 
3665 
3666 # Like BASIC_PATH_PROGS but fails if no tool was found.
3667 # $1: variable to set
3668 # $2: executable name (or list of names) to look for
3669 # $3: [path]
3670 
3671 
3672 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3673 # $1: variable to set
3674 # $2: autoconf macro to call to look for the special tool
3675 
3676 
3677 # Setup the most fundamental tools that relies on not much else to set up,
3678 # but is used by much of the early bootstrap code.
3679 
3680 
3681 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3682 
3683 
3684 # Evaluates platform specific overrides for devkit variables.
3685 # $1: Name of variable
3686 
3687 
3688 
3689 
3690 
3691 
3692 #%%% Simple tools %%%
3693 
3694 # Check if we have found a usable version of make
3695 # $1: the path to a potential make binary (or empty)
3696 # $2: the description on how we found this
3697 
3698 
3699 
3700 
3701 # Goes looking for a usable version of GNU make.
3702 
3703 
3704 
3705 
3706 
3707 
3708 
3709 
3710 # Check if build directory is on local disk. If not possible to determine,
3711 # we prefer to claim it's local.
3712 # Argument 1: directory to test
3713 # Argument 2: what to do if it is on local disk
3714 # Argument 3: what to do otherwise (remote disk or failure)
3715 
3716 
3717 # Check that source files have basic read permissions set. This might
3718 # not be the case in cygwin in certain conditions.
3719 
3720 
3721 
3722 
3723 # Check for support for specific options in bash
3724 
3725 
3726 ################################################################################
3727 #
3728 # Default make target
3729 #
3730 
3731 
3732 # Code to run after AC_OUTPUT
3733 
3734 
3735 #
3736 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3737 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738 #
3739 # This code is free software; you can redistribute it and/or modify it
3740 # under the terms of the GNU General Public License version 2 only, as
3741 # published by the Free Software Foundation.  Oracle designates this
3742 # particular file as subject to the "Classpath" exception as provided
3743 # by Oracle in the LICENSE file that accompanied this code.
3744 #
3745 # This code is distributed in the hope that it will be useful, but WITHOUT
3746 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748 # version 2 for more details (a copy is included in the LICENSE file that
3749 # accompanied this code).
3750 #
3751 # You should have received a copy of the GNU General Public License version
3752 # 2 along with this work; if not, write to the Free Software Foundation,
3753 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754 #
3755 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756 # or visit www.oracle.com if you need additional information or have any
3757 # questions.
3758 #
3759 
3760 
3761 
3762 
3763 
3764 # Helper function which possibly converts a path using DOS-style short mode.
3765 # If so, the updated path is stored in $new_path.
3766 # $1: The path to check
3767 
3768 
3769 # Helper function which possibly converts a path using DOS-style short mode.
3770 # If so, the updated path is stored in $new_path.
3771 # $1: The path to check
3772 
3773 
3774 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3775 # and could probably be heavily simplified. However, all changes in this
3776 # area tend to need lot of testing in different scenarios, and in lack of
3777 # proper unit testing, cleaning this up has not been deemed worth the effort
3778 # at the moment.
3779 
3780 
3781 
3782 
3783 
3784 
3785 
3786 
3787 
3788 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3789 
3790 
3791 
3792 
3793 # ... then the rest
3794 #
3795 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3796 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3797 #
3798 # This code is free software; you can redistribute it and/or modify it
3799 # under the terms of the GNU General Public License version 2 only, as
3800 # published by the Free Software Foundation.  Oracle designates this
3801 # particular file as subject to the "Classpath" exception as provided
3802 # by Oracle in the LICENSE file that accompanied this code.
3803 #
3804 # This code is distributed in the hope that it will be useful, but WITHOUT
3805 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3806 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3807 # version 2 for more details (a copy is included in the LICENSE file that
3808 # accompanied this code).
3809 #
3810 # You should have received a copy of the GNU General Public License version
3811 # 2 along with this work; if not, write to the Free Software Foundation,
3812 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3813 #
3814 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3815 # or visit www.oracle.com if you need additional information or have any
3816 # questions.
3817 #
3818 
3819 ########################################################################
3820 # This file handles detection of the Boot JDK. The Boot JDK detection
3821 # process has been developed as a response to solve a complex real-world
3822 # problem. Initially, it was simple, but it has grown as platform after
3823 # platform, idiosyncracy after idiosyncracy has been supported.
3824 #
3825 # The basic idea is this:
3826 # 1) You need an acceptable *) JDK to use as a Boot JDK
3827 # 2) There are several ways to locate a JDK, that are mostly platform
3828 #    dependent **)
3829 # 3) You can have multiple JDKs installed
3830 # 4) If possible, configure should try to dig out an acceptable JDK
3831 #    automatically, without having to resort to command-line options
3832 #
3833 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3834 #     javac) and not a JRE, etc.
3835 #
3836 # **) On Windows we typically use a well-known path.
3837 #     On MacOSX we typically use the tool java_home.
3838 #     On Linux we typically find javac in the $PATH, and then follow a
3839 #     chain of symlinks that often ends up in a real JDK.
3840 #
3841 # This leads to the code where we check in different ways to locate a
3842 # JDK, and if one is found, check if it is acceptable. If not, we print
3843 # our reasons for rejecting it (useful when debugging non-working
3844 # configure situations) and continue checking the next one.
3845 ########################################################################
3846 
3847 # Execute the check given as argument, and verify the result
3848 # If the Boot JDK was previously found, do nothing
3849 # $1 A command line (typically autoconf macro) to execute
3850 
3851 
3852 # Test: Is bootjdk explicitely set by command line arguments?
3853 
3854 
3855 # Test: Is $JAVA_HOME set?
3856 
3857 
3858 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3859 
3860 
3861 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3862 # $1: Argument to the java_home binary (optional)
3863 
3864 
3865 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3866 
3867 
3868 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3869 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3870 # $1 = Path to directory containing jdk installations.
3871 # $2 = String to append to the found JDK directory to get the proper JDK home
3872 
3873 
3874 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3875 # environmental variable as base for where to look.
3876 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3877 
3878 
3879 # Test: Is there a JDK installed in default, well-known locations?
3880 
3881 
3882 # Check that a command-line tool in the Boot JDK is correct
3883 # $1 = name of variable to assign
3884 # $2 = name of binary
3885 
3886 
3887 ###############################################################################
3888 #
3889 # We need a Boot JDK to bootstrap the build.
3890 #
3891 
3892 
3893 
3894 
3895 
3896 # BUILD_JDK: the location of the latest JDK that can run
3897 #   on the host system and supports the target class file version
3898 #   generated in this JDK build.  This variable should only be
3899 #   used after the launchers are built.
3900 #
3901 
3902 # Execute the check given as argument, and verify the result.
3903 # If the JDK was previously found, do nothing.
3904 # $1 A command line (typically autoconf macro) to execute
3905 
3906 
3907 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3908 # is different than the host system doing the build (e.g. cross-compilation),
3909 # a special BUILD_JDK is built as part of the build process.  An external
3910 # prebuilt BUILD_JDK can also be supplied.
3911 
3912 
3913 #
3914 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3915 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3916 #
3917 # This code is free software; you can redistribute it and/or modify it
3918 # under the terms of the GNU General Public License version 2 only, as
3919 # published by the Free Software Foundation.  Oracle designates this
3920 # particular file as subject to the "Classpath" exception as provided
3921 # by Oracle in the LICENSE file that accompanied this code.
3922 #
3923 # This code is distributed in the hope that it will be useful, but WITHOUT
3924 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3925 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3926 # version 2 for more details (a copy is included in the LICENSE file that
3927 # accompanied this code).
3928 #
3929 # You should have received a copy of the GNU General Public License version
3930 # 2 along with this work; if not, write to the Free Software Foundation,
3931 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3932 #
3933 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3934 # or visit www.oracle.com if you need additional information or have any
3935 # questions.
3936 #
3937 
3938 
3939 
3940 
3941 
3942 
3943 
3944 
3945 
3946 
3947 
3948 
3949 
3950 
3951 
3952 
3953 
3954 ################################################################################
3955 #
3956 # Runs icecc-create-env once and prints the error if it fails
3957 #
3958 # $1: arguments to icecc-create-env
3959 # $2: log file
3960 #
3961 
3962 
3963 ################################################################################
3964 #
3965 # Optionally enable distributed compilation of native code using icecc/icecream
3966 #
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 #
3975 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3976 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977 #
3978 # This code is free software; you can redistribute it and/or modify it
3979 # under the terms of the GNU General Public License version 2 only, as
3980 # published by the Free Software Foundation.  Oracle designates this
3981 # particular file as subject to the "Classpath" exception as provided
3982 # by Oracle in the LICENSE file that accompanied this code.
3983 #
3984 # This code is distributed in the hope that it will be useful, but WITHOUT
3985 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987 # version 2 for more details (a copy is included in the LICENSE file that
3988 # accompanied this code).
3989 #
3990 # You should have received a copy of the GNU General Public License version
3991 # 2 along with this work; if not, write to the Free Software Foundation,
3992 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993 #
3994 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995 # or visit www.oracle.com if you need additional information or have any
3996 # questions.
3997 #
3998 
3999 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4000 # corresponding configure arguments instead
4001 
4002 
4003 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4004 # that configure can use them while detecting compilers.
4005 # TOOLCHAIN_TYPE is available here.
4006 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4007 
4008 
4009 
4010 
4011 
4012 
4013 # Documentation on common flags used for solstudio in HIGHEST.
4014 #
4015 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4016 #          done with care, there are some assumptions below that need to
4017 #          be understood about the use of pointers, and IEEE behavior.
4018 #
4019 # -fns: Use non-standard floating point mode (not IEEE 754)
4020 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4021 # -fsingle: Use single precision floating point with 'float'
4022 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4023 #   (Source with excessing pointer casting and data access with mixed
4024 #    pointer types are not recommended)
4025 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4026 #   (If you expect perfect errno behavior, do not use this)
4027 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4028 # -xrestrict: Pointer parameters to functions do not overlap
4029 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4030 #    If you pass in multiple pointers to the same data, do not use this)
4031 # -xlibmil: Inline some library routines
4032 #   (If you expect perfect errno behavior, do not use this)
4033 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4034 #   (If you expect perfect errno behavior, do not use this)
4035 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4036 
4037     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4038     # Bug?
4039     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4040     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4041     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4042     #fi
4043 
4044 
4045 
4046 
4047 
4048 
4049 ################################################################################
4050 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4051 #      conditionals against.
4052 # $2 - Optional prefix for each variable defined.
4053 
4054 
4055 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4056 #                                  IF_FALSE: [RUN-IF-FALSE])
4057 # ------------------------------------------------------------
4058 # Check that the C compiler supports an argument
4059 
4060 
4061 
4062 
4063 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4064 #                                    IF_FALSE: [RUN-IF-FALSE])
4065 # ------------------------------------------------------------
4066 # Check that the C++ compiler supports an argument
4067 
4068 
4069 
4070 
4071 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4072 #                                IF_FALSE: [RUN-IF-FALSE])
4073 # ------------------------------------------------------------
4074 # Check that the C and C++ compilers support an argument
4075 
4076 
4077 
4078 
4079 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4080 #                                   IF_FALSE: [RUN-IF-FALSE])
4081 # ------------------------------------------------------------
4082 # Check that the linker support an argument
4083 
4084 
4085 
4086 
4087 
4088 
4089 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4090 # Arguments:
4091 # $1 - Optional prefix for each variable defined.
4092 
4093 
4094 #
4095 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4096 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4097 #
4098 # This code is free software; you can redistribute it and/or modify it
4099 # under the terms of the GNU General Public License version 2 only, as
4100 # published by the Free Software Foundation.  Oracle designates this
4101 # particular file as subject to the "Classpath" exception as provided
4102 # by Oracle in the LICENSE file that accompanied this code.
4103 #
4104 # This code is distributed in the hope that it will be useful, but WITHOUT
4105 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4106 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4107 # version 2 for more details (a copy is included in the LICENSE file that
4108 # accompanied this code).
4109 #
4110 # You should have received a copy of the GNU General Public License version
4111 # 2 along with this work; if not, write to the Free Software Foundation,
4112 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4113 #
4114 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4115 # or visit www.oracle.com if you need additional information or have any
4116 # questions.
4117 #
4118 
4119 
4120 
4121 
4122 
4123 cygwin_help() {
4124   case $1 in
4125     unzip)
4126       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4127       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4128       ;;
4129     zip)
4130       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4131       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132       ;;
4133     make)
4134       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4135       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4136       ;;
4137     freetype)
4138       HELP_MSG="
4139 The freetype library can now be build during the configure process.
4140 Download the freetype sources and unpack them into an arbitrary directory:
4141 
4142 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4143 tar -xzf freetype-2.5.3.tar.gz
4144 
4145 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4146 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4147 builds or into '<freetype_src>/lib32' for 32-bit builds.
4148 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4149 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4150 
4151 Alternatively you can unpack the sources like this to use the default directory:
4152 
4153 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4154       ;;
4155   esac
4156 }
4157 
4158 msys_help() {
4159   PKGHANDLER_COMMAND=""
4160 }
4161 
4162 apt_help() {
4163   case $1 in
4164     reduced)
4165       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4166     devkit)
4167       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4168     openjdk)
4169       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4170     alsa)
4171       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4172     cups)
4173       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4174     freetype)
4175       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4176     ffi)
4177       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4178     x11)
4179       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4180     ccache)
4181       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4182     dtrace)
4183       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4184   esac
4185 }
4186 
4187 yum_help() {
4188   case $1 in
4189     devkit)
4190       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4191     openjdk)
4192       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4193     alsa)
4194       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4195     cups)
4196       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4197     freetype)
4198       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4199     x11)
4200       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4201     ccache)
4202       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4203   esac
4204 }
4205 
4206 port_help() {
4207   PKGHANDLER_COMMAND=""
4208 }
4209 
4210 pkgutil_help() {
4211   PKGHANDLER_COMMAND=""
4212 }
4213 
4214 pkgadd_help() {
4215   PKGHANDLER_COMMAND=""
4216 }
4217 
4218 # This function will check if we're called from the "configure" wrapper while
4219 # printing --help. If so, we will print out additional information that can
4220 # only be extracted within the autoconf script, and then exit. This must be
4221 # called at the very beginning in configure.ac.
4222 
4223 
4224 
4225 
4226 
4227 
4228 #
4229 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4230 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4231 #
4232 # This code is free software; you can redistribute it and/or modify it
4233 # under the terms of the GNU General Public License version 2 only, as
4234 # published by the Free Software Foundation.  Oracle designates this
4235 # particular file as subject to the "Classpath" exception as provided
4236 # by Oracle in the LICENSE file that accompanied this code.
4237 #
4238 # This code is distributed in the hope that it will be useful, but WITHOUT
4239 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4240 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4241 # version 2 for more details (a copy is included in the LICENSE file that
4242 # accompanied this code).
4243 #
4244 # You should have received a copy of the GNU General Public License version
4245 # 2 along with this work; if not, write to the Free Software Foundation,
4246 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4247 #
4248 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4249 # or visit www.oracle.com if you need additional information or have any
4250 # questions.
4251 #
4252 
4253 # All valid JVM features, regardless of platform
4254 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4255     fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4256 
4257 # All valid JVM variants
4258 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4259 
4260 ###############################################################################
4261 # Check if the specified JVM variant should be built. To be used in shell if
4262 # constructs, like this:
4263 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4264 #
4265 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4266 
4267 # Definition kept in one line to allow inlining in if statements.
4268 # Additional [] needed to keep m4 from mangling shell constructs.
4269 
4270 
4271 ###############################################################################
4272 # Check if the specified JVM features are explicitly enabled. To be used in
4273 # shell if constructs, like this:
4274 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4275 #
4276 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4277 
4278 # Definition kept in one line to allow inlining in if statements.
4279 # Additional [] needed to keep m4 from mangling shell constructs.
4280 
4281 
4282 ###############################################################################
4283 # Check which variants of the JVM that we want to build. Available variants are:
4284 #   server: normal interpreter, and a tiered C1/C2 compiler
4285 #   client: normal interpreter, and C1 (no C2 compiler)
4286 #   minimal: reduced form of client with optional features stripped out
4287 #   core: normal interpreter only, no compiler
4288 #   zero: C++ based interpreter only, no compiler
4289 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4290 #   custom: baseline JVM with no default features
4291 #
4292 
4293 
4294 ###############################################################################
4295 # Check if dtrace should be enabled and has all prerequisites present.
4296 #
4297 
4298 
4299 ###############################################################################
4300 # Set up all JVM features for each JVM variant.
4301 #
4302 
4303 
4304 ###############################################################################
4305 # Validate JVM features once all setup is complete, including custom setup.
4306 #
4307 
4308 
4309 ################################################################################
4310 # Check if gtest should be built
4311 #
4312 
4313 
4314 #
4315 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4316 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4317 #
4318 # This code is free software; you can redistribute it and/or modify it
4319 # under the terms of the GNU General Public License version 2 only, as
4320 # published by the Free Software Foundation.  Oracle designates this
4321 # particular file as subject to the "Classpath" exception as provided
4322 # by Oracle in the LICENSE file that accompanied this code.
4323 #
4324 # This code is distributed in the hope that it will be useful, but WITHOUT
4325 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4326 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4327 # version 2 for more details (a copy is included in the LICENSE file that
4328 # accompanied this code).
4329 #
4330 # You should have received a copy of the GNU General Public License version
4331 # 2 along with this work; if not, write to the Free Software Foundation,
4332 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4333 #
4334 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4335 # or visit www.oracle.com if you need additional information or have any
4336 # questions.
4337 #
4338 
4339 ###############################################################################
4340 # Check which variant of the JDK that we want to build.
4341 # Currently we have:
4342 #    normal:   standard edition
4343 # but the custom make system may add other variants
4344 #
4345 # Effectively the JDK variant gives a name to a specific set of
4346 # modules to compile into the JDK.
4347 
4348 
4349 ###############################################################################
4350 # Set the debug level
4351 #    release: no debug information, all optimizations, no asserts.
4352 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4353 #    fastdebug: debug information (-g), all optimizations, all asserts
4354 #    slowdebug: debug information (-g), no optimizations, all asserts
4355 
4356 
4357 ###############################################################################
4358 #
4359 # Should we build only OpenJDK even if closed sources are present?
4360 #
4361 
4362 
4363 
4364 
4365 ###############################################################################
4366 #
4367 # Enable or disable the elliptic curve crypto implementation
4368 #
4369 
4370 
4371 
4372 
4373 ################################################################################
4374 #
4375 # Gcov coverage data for hotspot
4376 #
4377 
4378 
4379 ################################################################################
4380 #
4381 # Static build support.  When enabled will generate static
4382 # libraries instead of shared libraries for all JDK libs.
4383 #
4384 
4385 
4386 ################################################################################
4387 #
4388 # jlink options.
4389 # We always keep packaged modules in JDK image.
4390 #
4391 
4392 
4393 ################################################################################
4394 #
4395 # Check if building of the jtreg failure handler should be enabled.
4396 #
4397 
4398 
4399 ################################################################################
4400 #
4401 # Enable or disable generation of the classlist at build time
4402 #
4403 
4404 
4405 #
4406 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4407 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4408 #
4409 # This code is free software; you can redistribute it and/or modify it
4410 # under the terms of the GNU General Public License version 2 only, as
4411 # published by the Free Software Foundation.  Oracle designates this
4412 # particular file as subject to the "Classpath" exception as provided
4413 # by Oracle in the LICENSE file that accompanied this code.
4414 #
4415 # This code is distributed in the hope that it will be useful, but WITHOUT
4416 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4417 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4418 # version 2 for more details (a copy is included in the LICENSE file that
4419 # accompanied this code).
4420 #
4421 # You should have received a copy of the GNU General Public License version
4422 # 2 along with this work; if not, write to the Free Software Foundation,
4423 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4424 #
4425 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4426 # or visit www.oracle.com if you need additional information or have any
4427 # questions.
4428 #
4429 
4430 ###############################################################################
4431 #
4432 # Setup version numbers
4433 #
4434 
4435 # Verify that a given string represents a valid version number, and assign it
4436 # to a variable.
4437 
4438 # Argument 1: the variable to assign to
4439 # Argument 2: the value given by the user
4440 
4441 
4442 
4443 
4444 #
4445 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4446 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4447 #
4448 # This code is free software; you can redistribute it and/or modify it
4449 # under the terms of the GNU General Public License version 2 only, as
4450 # published by the Free Software Foundation.  Oracle designates this
4451 # particular file as subject to the "Classpath" exception as provided
4452 # by Oracle in the LICENSE file that accompanied this code.
4453 #
4454 # This code is distributed in the hope that it will be useful, but WITHOUT
4455 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4456 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4457 # version 2 for more details (a copy is included in the LICENSE file that
4458 # accompanied this code).
4459 #
4460 # You should have received a copy of the GNU General Public License version
4461 # 2 along with this work; if not, write to the Free Software Foundation,
4462 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4463 #
4464 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4465 # or visit www.oracle.com if you need additional information or have any
4466 # questions.
4467 #
4468 
4469 # Major library component reside in separate files.
4470 #
4471 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4472 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4473 #
4474 # This code is free software; you can redistribute it and/or modify it
4475 # under the terms of the GNU General Public License version 2 only, as
4476 # published by the Free Software Foundation.  Oracle designates this
4477 # particular file as subject to the "Classpath" exception as provided
4478 # by Oracle in the LICENSE file that accompanied this code.
4479 #
4480 # This code is distributed in the hope that it will be useful, but WITHOUT
4481 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4482 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4483 # version 2 for more details (a copy is included in the LICENSE file that
4484 # accompanied this code).
4485 #
4486 # You should have received a copy of the GNU General Public License version
4487 # 2 along with this work; if not, write to the Free Software Foundation,
4488 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4489 #
4490 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4491 # or visit www.oracle.com if you need additional information or have any
4492 # questions.
4493 #
4494 
4495 ################################################################################
4496 # Setup alsa (Advanced Linux Sound Architecture)
4497 ################################################################################
4498 
4499 
4500 #
4501 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4502 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4503 #
4504 # This code is free software; you can redistribute it and/or modify it
4505 # under the terms of the GNU General Public License version 2 only, as
4506 # published by the Free Software Foundation.  Oracle designates this
4507 # particular file as subject to the "Classpath" exception as provided
4508 # by Oracle in the LICENSE file that accompanied this code.
4509 #
4510 # This code is distributed in the hope that it will be useful, but WITHOUT
4511 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4512 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4513 # version 2 for more details (a copy is included in the LICENSE file that
4514 # accompanied this code).
4515 #
4516 # You should have received a copy of the GNU General Public License version
4517 # 2 along with this work; if not, write to the Free Software Foundation,
4518 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4519 #
4520 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4521 # or visit www.oracle.com if you need additional information or have any
4522 # questions.
4523 #
4524 
4525 ################################################################################
4526 # Setup bundled libraries.
4527 #
4528 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4529 # OpenJDK repository. Default is to use these libraries as bundled, but they
4530 # might be replaced by en external version by the user.
4531 ################################################################################
4532 
4533 
4534 ################################################################################
4535 # Setup libjpeg
4536 ################################################################################
4537 
4538 
4539 ################################################################################
4540 # Setup giflib
4541 ################################################################################
4542 
4543 
4544 ################################################################################
4545 # Setup libpng
4546 ################################################################################
4547 
4548 
4549 ################################################################################
4550 # Setup zlib
4551 ################################################################################
4552 
4553 
4554 ################################################################################
4555 # Setup lcms (Little CMS)
4556 ################################################################################
4557 
4558 
4559 #
4560 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4561 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4562 #
4563 # This code is free software; you can redistribute it and/or modify it
4564 # under the terms of the GNU General Public License version 2 only, as
4565 # published by the Free Software Foundation.  Oracle designates this
4566 # particular file as subject to the "Classpath" exception as provided
4567 # by Oracle in the LICENSE file that accompanied this code.
4568 #
4569 # This code is distributed in the hope that it will be useful, but WITHOUT
4570 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4571 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4572 # version 2 for more details (a copy is included in the LICENSE file that
4573 # accompanied this code).
4574 #
4575 # You should have received a copy of the GNU General Public License version
4576 # 2 along with this work; if not, write to the Free Software Foundation,
4577 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4578 #
4579 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4580 # or visit www.oracle.com if you need additional information or have any
4581 # questions.
4582 #
4583 
4584 ################################################################################
4585 # Setup cups (Common Unix Printing System)
4586 ################################################################################
4587 
4588 
4589 #
4590 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4591 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4592 #
4593 # This code is free software; you can redistribute it and/or modify it
4594 # under the terms of the GNU General Public License version 2 only, as
4595 # published by the Free Software Foundation.  Oracle designates this
4596 # particular file as subject to the "Classpath" exception as provided
4597 # by Oracle in the LICENSE file that accompanied this code.
4598 #
4599 # This code is distributed in the hope that it will be useful, but WITHOUT
4600 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4601 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4602 # version 2 for more details (a copy is included in the LICENSE file that
4603 # accompanied this code).
4604 #
4605 # You should have received a copy of the GNU General Public License version
4606 # 2 along with this work; if not, write to the Free Software Foundation,
4607 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4608 #
4609 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4610 # or visit www.oracle.com if you need additional information or have any
4611 # questions.
4612 #
4613 
4614 ################################################################################
4615 # Setup libffi (Foreign Function Interface)
4616 ################################################################################
4617 
4618 
4619 #
4620 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4621 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4622 #
4623 # This code is free software; you can redistribute it and/or modify it
4624 # under the terms of the GNU General Public License version 2 only, as
4625 # published by the Free Software Foundation.  Oracle designates this
4626 # particular file as subject to the "Classpath" exception as provided
4627 # by Oracle in the LICENSE file that accompanied this code.
4628 #
4629 # This code is distributed in the hope that it will be useful, but WITHOUT
4630 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4631 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4632 # version 2 for more details (a copy is included in the LICENSE file that
4633 # accompanied this code).
4634 #
4635 # You should have received a copy of the GNU General Public License version
4636 # 2 along with this work; if not, write to the Free Software Foundation,
4637 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4638 #
4639 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4640 # or visit www.oracle.com if you need additional information or have any
4641 # questions.
4642 #
4643 
4644 ################################################################################
4645 # Build the freetype lib from source
4646 ################################################################################
4647 
4648 
4649 ################################################################################
4650 # Check if a potential freeype library match is correct and usable
4651 ################################################################################
4652 
4653 
4654 ################################################################################
4655 # Setup freetype (The FreeType2 font rendering library)
4656 ################################################################################
4657 
4658 
4659 #
4660 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4661 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4662 #
4663 # This code is free software; you can redistribute it and/or modify it
4664 # under the terms of the GNU General Public License version 2 only, as
4665 # published by the Free Software Foundation.  Oracle designates this
4666 # particular file as subject to the "Classpath" exception as provided
4667 # by Oracle in the LICENSE file that accompanied this code.
4668 #
4669 # This code is distributed in the hope that it will be useful, but WITHOUT
4670 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4671 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4672 # version 2 for more details (a copy is included in the LICENSE file that
4673 # accompanied this code).
4674 #
4675 # You should have received a copy of the GNU General Public License version
4676 # 2 along with this work; if not, write to the Free Software Foundation,
4677 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4678 #
4679 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4680 # or visit www.oracle.com if you need additional information or have any
4681 # questions.
4682 #
4683 
4684 ################################################################################
4685 # Setup the standard C/C++ runtime libraries.
4686 #
4687 # Most importantly, determine if stdc++ should be linked statically or
4688 # dynamically.
4689 ################################################################################
4690 
4691 
4692 #
4693 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4694 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4695 #
4696 # This code is free software; you can redistribute it and/or modify it
4697 # under the terms of the GNU General Public License version 2 only, as
4698 # published by the Free Software Foundation.  Oracle designates this
4699 # particular file as subject to the "Classpath" exception as provided
4700 # by Oracle in the LICENSE file that accompanied this code.
4701 #
4702 # This code is distributed in the hope that it will be useful, but WITHOUT
4703 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4704 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4705 # version 2 for more details (a copy is included in the LICENSE file that
4706 # accompanied this code).
4707 #
4708 # You should have received a copy of the GNU General Public License version
4709 # 2 along with this work; if not, write to the Free Software Foundation,
4710 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4711 #
4712 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4713 # or visit www.oracle.com if you need additional information or have any
4714 # questions.
4715 #
4716 
4717 ################################################################################
4718 # Setup X11 Windows system
4719 ################################################################################
4720 
4721 
4722 
4723 ################################################################################
4724 # Determine which libraries are needed for this configuration
4725 ################################################################################
4726 
4727 
4728 ################################################################################
4729 # Parse library options, and setup needed libraries
4730 ################################################################################
4731 
4732 
4733 ################################################################################
4734 # Setup llvm (Low-Level VM)
4735 ################################################################################
4736 
4737 
4738 ################################################################################
4739 # Setup various libraries, typically small system libraries
4740 ################################################################################
4741 
4742 
4743 ################################################################################
4744 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4745 # redistribute it in the test image.
4746 ################################################################################
4747 
4748 
4749 
4750 #
4751 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4752 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4753 #
4754 # This code is free software; you can redistribute it and/or modify it
4755 # under the terms of the GNU General Public License version 2 only, as
4756 # published by the Free Software Foundation.  Oracle designates this
4757 # particular file as subject to the "Classpath" exception as provided
4758 # by Oracle in the LICENSE file that accompanied this code.
4759 #
4760 # This code is distributed in the hope that it will be useful, but WITHOUT
4761 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4762 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4763 # version 2 for more details (a copy is included in the LICENSE file that
4764 # accompanied this code).
4765 #
4766 # You should have received a copy of the GNU General Public License version
4767 # 2 along with this work; if not, write to the Free Software Foundation,
4768 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4769 #
4770 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4771 # or visit www.oracle.com if you need additional information or have any
4772 # questions.
4773 #
4774 
4775 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4776 # Converts autoconf style CPU name to OpenJDK style, into
4777 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4778 
4779 
4780 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4781 # Converts autoconf style OS name to OpenJDK style, into
4782 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4783 
4784 
4785 # Expects $host_os $host_cpu $build_os and $build_cpu
4786 # and $with_target_bits to have been setup!
4787 #
4788 # Translate the standard triplet(quadruplet) definition
4789 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4790 # OPENJDK_BUILD_OS, etc.
4791 
4792 
4793 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4794 # accordingly. Must be done after setting up build and target system, but before
4795 # doing anything else with these values.
4796 
4797 
4798 # Setup the legacy variables, for controlling the old makefiles.
4799 #
4800 
4801 
4802 # $1 - Either TARGET or BUILD to setup the variables for.
4803 
4804 
4805 
4806 
4807 #%%% Build and target systems %%%
4808 
4809 
4810 
4811 
4812 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4813 # Add -mX to various FLAGS variables.
4814 
4815 
4816 
4817 
4818 
4819 
4820 #
4821 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4822 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4823 #
4824 # This code is free software; you can redistribute it and/or modify it
4825 # under the terms of the GNU General Public License version 2 only, as
4826 # published by the Free Software Foundation.  Oracle designates this
4827 # particular file as subject to the "Classpath" exception as provided
4828 # by Oracle in the LICENSE file that accompanied this code.
4829 #
4830 # This code is distributed in the hope that it will be useful, but WITHOUT
4831 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4832 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4833 # version 2 for more details (a copy is included in the LICENSE file that
4834 # accompanied this code).
4835 #
4836 # You should have received a copy of the GNU General Public License version
4837 # 2 along with this work; if not, write to the Free Software Foundation,
4838 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4839 #
4840 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4841 # or visit www.oracle.com if you need additional information or have any
4842 # questions.
4843 #
4844 
4845 
4846 
4847 
4848 
4849 
4850 
4851 ################################################################################
4852 # Define a mechanism for importing extra prebuilt modules
4853 #
4854 
4855 
4856 
4857 #
4858 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4859 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4860 #
4861 # This code is free software; you can redistribute it and/or modify it
4862 # under the terms of the GNU General Public License version 2 only, as
4863 # published by the Free Software Foundation.  Oracle designates this
4864 # particular file as subject to the "Classpath" exception as provided
4865 # by Oracle in the LICENSE file that accompanied this code.
4866 #
4867 # This code is distributed in the hope that it will be useful, but WITHOUT
4868 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4869 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4870 # version 2 for more details (a copy is included in the LICENSE file that
4871 # accompanied this code).
4872 #
4873 # You should have received a copy of the GNU General Public License version
4874 # 2 along with this work; if not, write to the Free Software Foundation,
4875 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4876 #
4877 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4878 # or visit www.oracle.com if you need additional information or have any
4879 # questions.
4880 #
4881 
4882 ########################################################################
4883 # This file is responsible for detecting, verifying and setting up the
4884 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4885 # proper paths to the binaries, but it will not setup any flags.
4886 #
4887 # The binaries used is determined by the toolchain type, which is the family of
4888 # compilers and related tools that are used.
4889 ########################################################################
4890 
4891 
4892 # All valid toolchains, regardless of platform (used by help.m4)
4893 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4894 
4895 # These toolchains are valid on different platforms
4896 VALID_TOOLCHAINS_linux="gcc clang"
4897 VALID_TOOLCHAINS_solaris="solstudio"
4898 VALID_TOOLCHAINS_macosx="gcc clang"
4899 VALID_TOOLCHAINS_aix="xlc"
4900 VALID_TOOLCHAINS_windows="microsoft"
4901 
4902 # Toolchain descriptions
4903 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4904 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4905 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4906 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4907 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4908 
4909 # Minimum supported versions, empty means unspecified
4910 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4911 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4912 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4913 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4914 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4915 
4916 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4917 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4918 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4919 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4920 
4921 
4922 # Check if the configured compiler (C and C++) is of a specific version or
4923 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4924 #
4925 # Arguments:
4926 #   VERSION:   The version string to check against the found version
4927 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4928 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4929 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4930 
4931 
4932 
4933 
4934 # Setup a number of variables describing how native output files are
4935 # named on this platform/toolchain.
4936 
4937 
4938 # Determine which toolchain type to use, and make sure it is valid for this
4939 # platform. Setup various information about the selected toolchain.
4940 
4941 
4942 # Before we start detecting the toolchain executables, we might need some
4943 # special setup, e.g. additional paths etc.
4944 
4945 
4946 # Restore path, etc
4947 
4948 
4949 # Check if a compiler is of the toolchain type we expect, and save the version
4950 # information from it. If the compiler does not match the expected type,
4951 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4952 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4953 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4954 #
4955 # $1 = compiler to test (CC or CXX)
4956 # $2 = human readable name of compiler (C or C++)
4957 
4958 
4959 # Try to locate the given C or C++ compiler in the path, or otherwise.
4960 #
4961 # $1 = compiler to test (CC or CXX)
4962 # $2 = human readable name of compiler (C or C++)
4963 # $3 = list of compiler names to search for
4964 
4965 
4966 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4967 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4968 # archiver (AR). Verify that the compilers are correct according to the
4969 # toolchain type.
4970 
4971 
4972 # Setup additional tools that is considered a part of the toolchain, but not the
4973 # core part. Many of these are highly platform-specific and do not exist,
4974 # and/or are not needed on all platforms.
4975 
4976 
4977 # Setup the build tools (i.e, the compiler and linker used to build programs
4978 # that should be run on the build platform, not the target platform, as a build
4979 # helper). Since the non-cross-compile case uses the normal, target compilers
4980 # for this, we can only do this after these have been setup.
4981 
4982 
4983 # Setup legacy variables that are still needed as alternative ways to refer to
4984 # parts of the toolchain.
4985 
4986 
4987 # Do some additional checks on the detected tools.
4988 
4989 
4990 # Setup the JTReg Regression Test Harness.
4991 
4992 
4993 #
4994 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4995 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4996 #
4997 # This code is free software; you can redistribute it and/or modify it
4998 # under the terms of the GNU General Public License version 2 only, as
4999 # published by the Free Software Foundation.  Oracle designates this
5000 # particular file as subject to the "Classpath" exception as provided
5001 # by Oracle in the LICENSE file that accompanied this code.
5002 #
5003 # This code is distributed in the hope that it will be useful, but WITHOUT
5004 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5005 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5006 # version 2 for more details (a copy is included in the LICENSE file that
5007 # accompanied this code).
5008 #
5009 # You should have received a copy of the GNU General Public License version
5010 # 2 along with this work; if not, write to the Free Software Foundation,
5011 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5012 #
5013 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5014 # or visit www.oracle.com if you need additional information or have any
5015 # questions.
5016 #
5017 
5018 ################################################################################
5019 # The order of these defines the priority by which we try to find them.
5020 VALID_VS_VERSIONS="2013 2012 2010"
5021 
5022 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5023 VS_VERSION_INTERNAL_2010=100
5024 VS_MSVCR_2010=msvcr100.dll
5025 # We don't use msvcp on Visual Studio 2010
5026 #VS_MSVCP_2010=msvcp100.dll
5027 VS_ENVVAR_2010="VS100COMNTOOLS"
5028 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5029 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5030 VS_VS_PLATFORM_NAME_2010="v100"
5031 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5032 
5033 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5034 VS_VERSION_INTERNAL_2012=110
5035 VS_MSVCR_2012=msvcr110.dll
5036 VS_MSVCP_2012=msvcp110.dll
5037 VS_ENVVAR_2012="VS110COMNTOOLS"
5038 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5039 VS_SDK_INSTALLDIR_2012=
5040 VS_VS_PLATFORM_NAME_2012="v110"
5041 VS_SDK_PLATFORM_NAME_2012=
5042 
5043 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5044 VS_VERSION_INTERNAL_2013=120
5045 VS_MSVCR_2013=msvcr120.dll
5046 VS_MSVCP_2013=msvcp120.dll
5047 VS_ENVVAR_2013="VS120COMNTOOLS"
5048 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5049 VS_SDK_INSTALLDIR_2013=
5050 VS_VS_PLATFORM_NAME_2013="v120"
5051 VS_SDK_PLATFORM_NAME_2013=
5052 
5053 ################################################################################
5054 
5055 
5056 
5057 ################################################################################
5058 
5059 
5060 
5061 ################################################################################
5062 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5063 # build environment and assigns it to VS_ENV_CMD
5064 
5065 
5066 ################################################################################
5067 
5068 
5069 
5070 ################################################################################
5071 # Check if the VS env variables were setup prior to running configure.
5072 # If not, then find vcvarsall.bat and run it automatically, and integrate
5073 # the set env variables into the spec file.
5074 
5075 
5076 
5077 
5078 
5079 
5080 
5081 
5082 
5083 
5084 
5085 
5086 
5087 
5088 # This line needs to be here, verbatim, after all includes and the dummy hook
5089 # definitions. It is replaced with custom functionality when building
5090 # custom sources.
5091 #CUSTOM_AUTOCONF_INCLUDE
5092 
5093 # Do not change or remove the following line, it is needed for consistency checks:
5094 DATE_WHEN_GENERATED=1479997584
5095 
5096 ###############################################################################
5097 #
5098 # Initialization / Boot-strapping
5099 #
5100 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5101 # thus it jumps back and forth, each time gaining something needed later on.
5102 #
5103 ###############################################################################
5104 
5105 # If we are requested to print additional help, do that and then exit.
5106 # This must be the very first call.
5107 
5108   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5109 
5110     # Print available toolchains
5111     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5112     $PRINTF "Which are valid to use depends on the build platform.\n"
5113     for toolchain in $VALID_TOOLCHAINS_all; do
5114       # Use indirect variable referencing
5115       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5116       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5117       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5118     done
5119     $PRINTF "\n"
5120 
5121     # Print available jvm features
5122     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5123     $PRINTF "Which are valid to use depends on the target platform.\n  "
5124     $PRINTF "%s " $VALID_JVM_FEATURES
5125     $PRINTF "\n"
5126 
5127     # And now exit directly
5128     exit 0
5129   fi
5130 
5131 
5132 # Basic initialization that must happen first of all in the normal process.
5133 
5134   # Save the original command line. This is passed to us by the wrapper configure script.
5135 
5136   # Save the path variable before it gets changed
5137   ORIGINAL_PATH="$PATH"
5138 
5139   DATE_WHEN_CONFIGURED=`LANG=C date`
5140 
5141   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5142 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5143   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5144 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5145 
5146 
5147   # Start with tools that do not need have cross compilation support
5148   # and can be expected to be found in the default PATH. These tools are
5149   # used by configure.
5150 
5151   # First are all the simple required tools.
5152 
5153 
5154 
5155   # Publish this variable in the help.
5156 
5157 
5158   if [ -z "${BASENAME+x}" ]; then
5159     # The variable is not set by user, try to locate tool using the code snippet
5160     for ac_prog in basename
5161 do
5162   # Extract the first word of "$ac_prog", so it can be a program name with args.
5163 set dummy $ac_prog; ac_word=$2
5164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5165 $as_echo_n "checking for $ac_word... " >&6; }
5166 if ${ac_cv_path_BASENAME+:} false; then :
5167   $as_echo_n "(cached) " >&6
5168 else
5169   case $BASENAME in
5170   [\\/]* | ?:[\\/]*)
5171   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5172   ;;
5173   *)
5174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5175 for as_dir in $PATH
5176 do
5177   IFS=$as_save_IFS
5178   test -z "$as_dir" && as_dir=.
5179     for ac_exec_ext in '' $ac_executable_extensions; do
5180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5181     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5183     break 2
5184   fi
5185 done
5186   done
5187 IFS=$as_save_IFS
5188 
5189   ;;
5190 esac
5191 fi
5192 BASENAME=$ac_cv_path_BASENAME
5193 if test -n "$BASENAME"; then
5194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5195 $as_echo "$BASENAME" >&6; }
5196 else
5197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198 $as_echo "no" >&6; }
5199 fi
5200 
5201 
5202   test -n "$BASENAME" && break
5203 done
5204 
5205   else
5206     # The variable is set, but is it from the command line or the environment?
5207 
5208     # Try to remove the string !BASENAME! from our list.
5209     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5210     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5211       # If it failed, the variable was not from the command line. Ignore it,
5212       # but warn the user (except for BASH, which is always set by the calling BASH).
5213       if test "xBASENAME" != xBASH; then
5214         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5215 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5216       fi
5217       # Try to locate tool using the code snippet
5218       for ac_prog in basename
5219 do
5220   # Extract the first word of "$ac_prog", so it can be a program name with args.
5221 set dummy $ac_prog; ac_word=$2
5222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223 $as_echo_n "checking for $ac_word... " >&6; }
5224 if ${ac_cv_path_BASENAME+:} false; then :
5225   $as_echo_n "(cached) " >&6
5226 else
5227   case $BASENAME in
5228   [\\/]* | ?:[\\/]*)
5229   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5230   ;;
5231   *)
5232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233 for as_dir in $PATH
5234 do
5235   IFS=$as_save_IFS
5236   test -z "$as_dir" && as_dir=.
5237     for ac_exec_ext in '' $ac_executable_extensions; do
5238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241     break 2
5242   fi
5243 done
5244   done
5245 IFS=$as_save_IFS
5246 
5247   ;;
5248 esac
5249 fi
5250 BASENAME=$ac_cv_path_BASENAME
5251 if test -n "$BASENAME"; then
5252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5253 $as_echo "$BASENAME" >&6; }
5254 else
5255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256 $as_echo "no" >&6; }
5257 fi
5258 
5259 
5260   test -n "$BASENAME" && break
5261 done
5262 
5263     else
5264       # If it succeeded, then it was overridden by the user. We will use it
5265       # for the tool.
5266 
5267       # First remove it from the list of overridden variables, so we can test
5268       # for unknown variables in the end.
5269       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5270 
5271       # Check if we try to supply an empty value
5272       if test "x$BASENAME" = x; then
5273         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5274 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5275         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5276 $as_echo_n "checking for BASENAME... " >&6; }
5277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5278 $as_echo "disabled" >&6; }
5279       else
5280         # Check if the provided tool contains a complete path.
5281         tool_specified="$BASENAME"
5282         tool_basename="${tool_specified##*/}"
5283         if test "x$tool_basename" = "x$tool_specified"; then
5284           # A command without a complete path is provided, search $PATH.
5285           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5286 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5287           # Extract the first word of "$tool_basename", so it can be a program name with args.
5288 set dummy $tool_basename; ac_word=$2
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5290 $as_echo_n "checking for $ac_word... " >&6; }
5291 if ${ac_cv_path_BASENAME+:} false; then :
5292   $as_echo_n "(cached) " >&6
5293 else
5294   case $BASENAME in
5295   [\\/]* | ?:[\\/]*)
5296   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5297   ;;
5298   *)
5299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5300 for as_dir in $PATH
5301 do
5302   IFS=$as_save_IFS
5303   test -z "$as_dir" && as_dir=.
5304     for ac_exec_ext in '' $ac_executable_extensions; do
5305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5306     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5308     break 2
5309   fi
5310 done
5311   done
5312 IFS=$as_save_IFS
5313 
5314   ;;
5315 esac
5316 fi
5317 BASENAME=$ac_cv_path_BASENAME
5318 if test -n "$BASENAME"; then
5319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5320 $as_echo "$BASENAME" >&6; }
5321 else
5322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323 $as_echo "no" >&6; }
5324 fi
5325 
5326 
5327           if test "x$BASENAME" = x; then
5328             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5329           fi
5330         else
5331           # Otherwise we believe it is a complete path. Use it as it is.
5332           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5333 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5334           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5335 $as_echo_n "checking for BASENAME... " >&6; }
5336           if test ! -x "$tool_specified"; then
5337             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5338 $as_echo "not found" >&6; }
5339             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5340           fi
5341           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5342 $as_echo "$tool_specified" >&6; }
5343         fi
5344       fi
5345     fi
5346 
5347   fi
5348 
5349 
5350 
5351   if test "x$BASENAME" = x; then
5352     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5353   fi
5354 
5355 
5356 
5357 
5358 
5359   # Publish this variable in the help.
5360 
5361 
5362   if [ -z "${BASH+x}" ]; then
5363     # The variable is not set by user, try to locate tool using the code snippet
5364     for ac_prog in bash
5365 do
5366   # Extract the first word of "$ac_prog", so it can be a program name with args.
5367 set dummy $ac_prog; ac_word=$2
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5369 $as_echo_n "checking for $ac_word... " >&6; }
5370 if ${ac_cv_path_BASH+:} false; then :
5371   $as_echo_n "(cached) " >&6
5372 else
5373   case $BASH in
5374   [\\/]* | ?:[\\/]*)
5375   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5376   ;;
5377   *)
5378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379 for as_dir in $PATH
5380 do
5381   IFS=$as_save_IFS
5382   test -z "$as_dir" && as_dir=.
5383     for ac_exec_ext in '' $ac_executable_extensions; do
5384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5385     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387     break 2
5388   fi
5389 done
5390   done
5391 IFS=$as_save_IFS
5392 
5393   ;;
5394 esac
5395 fi
5396 BASH=$ac_cv_path_BASH
5397 if test -n "$BASH"; then
5398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5399 $as_echo "$BASH" >&6; }
5400 else
5401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402 $as_echo "no" >&6; }
5403 fi
5404 
5405 
5406   test -n "$BASH" && break
5407 done
5408 
5409   else
5410     # The variable is set, but is it from the command line or the environment?
5411 
5412     # Try to remove the string !BASH! from our list.
5413     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5414     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5415       # If it failed, the variable was not from the command line. Ignore it,
5416       # but warn the user (except for BASH, which is always set by the calling BASH).
5417       if test "xBASH" != xBASH; then
5418         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5419 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5420       fi
5421       # Try to locate tool using the code snippet
5422       for ac_prog in bash
5423 do
5424   # Extract the first word of "$ac_prog", so it can be a program name with args.
5425 set dummy $ac_prog; ac_word=$2
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5427 $as_echo_n "checking for $ac_word... " >&6; }
5428 if ${ac_cv_path_BASH+:} false; then :
5429   $as_echo_n "(cached) " >&6
5430 else
5431   case $BASH in
5432   [\\/]* | ?:[\\/]*)
5433   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5434   ;;
5435   *)
5436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5437 for as_dir in $PATH
5438 do
5439   IFS=$as_save_IFS
5440   test -z "$as_dir" && as_dir=.
5441     for ac_exec_ext in '' $ac_executable_extensions; do
5442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5443     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5445     break 2
5446   fi
5447 done
5448   done
5449 IFS=$as_save_IFS
5450 
5451   ;;
5452 esac
5453 fi
5454 BASH=$ac_cv_path_BASH
5455 if test -n "$BASH"; then
5456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5457 $as_echo "$BASH" >&6; }
5458 else
5459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5460 $as_echo "no" >&6; }
5461 fi
5462 
5463 
5464   test -n "$BASH" && break
5465 done
5466 
5467     else
5468       # If it succeeded, then it was overridden by the user. We will use it
5469       # for the tool.
5470 
5471       # First remove it from the list of overridden variables, so we can test
5472       # for unknown variables in the end.
5473       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5474 
5475       # Check if we try to supply an empty value
5476       if test "x$BASH" = x; then
5477         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5478 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5479         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5480 $as_echo_n "checking for BASH... " >&6; }
5481         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5482 $as_echo "disabled" >&6; }
5483       else
5484         # Check if the provided tool contains a complete path.
5485         tool_specified="$BASH"
5486         tool_basename="${tool_specified##*/}"
5487         if test "x$tool_basename" = "x$tool_specified"; then
5488           # A command without a complete path is provided, search $PATH.
5489           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5490 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5491           # Extract the first word of "$tool_basename", so it can be a program name with args.
5492 set dummy $tool_basename; ac_word=$2
5493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5494 $as_echo_n "checking for $ac_word... " >&6; }
5495 if ${ac_cv_path_BASH+:} false; then :
5496   $as_echo_n "(cached) " >&6
5497 else
5498   case $BASH in
5499   [\\/]* | ?:[\\/]*)
5500   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5501   ;;
5502   *)
5503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5504 for as_dir in $PATH
5505 do
5506   IFS=$as_save_IFS
5507   test -z "$as_dir" && as_dir=.
5508     for ac_exec_ext in '' $ac_executable_extensions; do
5509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5510     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5512     break 2
5513   fi
5514 done
5515   done
5516 IFS=$as_save_IFS
5517 
5518   ;;
5519 esac
5520 fi
5521 BASH=$ac_cv_path_BASH
5522 if test -n "$BASH"; then
5523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5524 $as_echo "$BASH" >&6; }
5525 else
5526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527 $as_echo "no" >&6; }
5528 fi
5529 
5530 
5531           if test "x$BASH" = x; then
5532             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5533           fi
5534         else
5535           # Otherwise we believe it is a complete path. Use it as it is.
5536           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5537 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5538           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5539 $as_echo_n "checking for BASH... " >&6; }
5540           if test ! -x "$tool_specified"; then
5541             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5542 $as_echo "not found" >&6; }
5543             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5544           fi
5545           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5546 $as_echo "$tool_specified" >&6; }
5547         fi
5548       fi
5549     fi
5550 
5551   fi
5552 
5553 
5554 
5555   if test "x$BASH" = x; then
5556     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5557   fi
5558 
5559 
5560 
5561 
5562 
5563   # Publish this variable in the help.
5564 
5565 
5566   if [ -z "${CAT+x}" ]; then
5567     # The variable is not set by user, try to locate tool using the code snippet
5568     for ac_prog in cat
5569 do
5570   # Extract the first word of "$ac_prog", so it can be a program name with args.
5571 set dummy $ac_prog; ac_word=$2
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573 $as_echo_n "checking for $ac_word... " >&6; }
5574 if ${ac_cv_path_CAT+:} false; then :
5575   $as_echo_n "(cached) " >&6
5576 else
5577   case $CAT in
5578   [\\/]* | ?:[\\/]*)
5579   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5580   ;;
5581   *)
5582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583 for as_dir in $PATH
5584 do
5585   IFS=$as_save_IFS
5586   test -z "$as_dir" && as_dir=.
5587     for ac_exec_ext in '' $ac_executable_extensions; do
5588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591     break 2
5592   fi
5593 done
5594   done
5595 IFS=$as_save_IFS
5596 
5597   ;;
5598 esac
5599 fi
5600 CAT=$ac_cv_path_CAT
5601 if test -n "$CAT"; then
5602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5603 $as_echo "$CAT" >&6; }
5604 else
5605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606 $as_echo "no" >&6; }
5607 fi
5608 
5609 
5610   test -n "$CAT" && break
5611 done
5612 
5613   else
5614     # The variable is set, but is it from the command line or the environment?
5615 
5616     # Try to remove the string !CAT! from our list.
5617     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5618     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5619       # If it failed, the variable was not from the command line. Ignore it,
5620       # but warn the user (except for BASH, which is always set by the calling BASH).
5621       if test "xCAT" != xBASH; then
5622         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5623 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5624       fi
5625       # Try to locate tool using the code snippet
5626       for ac_prog in cat
5627 do
5628   # Extract the first word of "$ac_prog", so it can be a program name with args.
5629 set dummy $ac_prog; ac_word=$2
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631 $as_echo_n "checking for $ac_word... " >&6; }
5632 if ${ac_cv_path_CAT+:} false; then :
5633   $as_echo_n "(cached) " >&6
5634 else
5635   case $CAT in
5636   [\\/]* | ?:[\\/]*)
5637   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5638   ;;
5639   *)
5640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641 for as_dir in $PATH
5642 do
5643   IFS=$as_save_IFS
5644   test -z "$as_dir" && as_dir=.
5645     for ac_exec_ext in '' $ac_executable_extensions; do
5646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5647     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5649     break 2
5650   fi
5651 done
5652   done
5653 IFS=$as_save_IFS
5654 
5655   ;;
5656 esac
5657 fi
5658 CAT=$ac_cv_path_CAT
5659 if test -n "$CAT"; then
5660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5661 $as_echo "$CAT" >&6; }
5662 else
5663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5664 $as_echo "no" >&6; }
5665 fi
5666 
5667 
5668   test -n "$CAT" && break
5669 done
5670 
5671     else
5672       # If it succeeded, then it was overridden by the user. We will use it
5673       # for the tool.
5674 
5675       # First remove it from the list of overridden variables, so we can test
5676       # for unknown variables in the end.
5677       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5678 
5679       # Check if we try to supply an empty value
5680       if test "x$CAT" = x; then
5681         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5682 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5683         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5684 $as_echo_n "checking for CAT... " >&6; }
5685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5686 $as_echo "disabled" >&6; }
5687       else
5688         # Check if the provided tool contains a complete path.
5689         tool_specified="$CAT"
5690         tool_basename="${tool_specified##*/}"
5691         if test "x$tool_basename" = "x$tool_specified"; then
5692           # A command without a complete path is provided, search $PATH.
5693           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5694 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5695           # Extract the first word of "$tool_basename", so it can be a program name with args.
5696 set dummy $tool_basename; ac_word=$2
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698 $as_echo_n "checking for $ac_word... " >&6; }
5699 if ${ac_cv_path_CAT+:} false; then :
5700   $as_echo_n "(cached) " >&6
5701 else
5702   case $CAT in
5703   [\\/]* | ?:[\\/]*)
5704   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5705   ;;
5706   *)
5707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5708 for as_dir in $PATH
5709 do
5710   IFS=$as_save_IFS
5711   test -z "$as_dir" && as_dir=.
5712     for ac_exec_ext in '' $ac_executable_extensions; do
5713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5714     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5716     break 2
5717   fi
5718 done
5719   done
5720 IFS=$as_save_IFS
5721 
5722   ;;
5723 esac
5724 fi
5725 CAT=$ac_cv_path_CAT
5726 if test -n "$CAT"; then
5727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5728 $as_echo "$CAT" >&6; }
5729 else
5730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731 $as_echo "no" >&6; }
5732 fi
5733 
5734 
5735           if test "x$CAT" = x; then
5736             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5737           fi
5738         else
5739           # Otherwise we believe it is a complete path. Use it as it is.
5740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5741 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5742           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5743 $as_echo_n "checking for CAT... " >&6; }
5744           if test ! -x "$tool_specified"; then
5745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5746 $as_echo "not found" >&6; }
5747             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5748           fi
5749           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5750 $as_echo "$tool_specified" >&6; }
5751         fi
5752       fi
5753     fi
5754 
5755   fi
5756 
5757 
5758 
5759   if test "x$CAT" = x; then
5760     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5761   fi
5762 
5763 
5764 
5765 
5766 
5767   # Publish this variable in the help.
5768 
5769 
5770   if [ -z "${CHMOD+x}" ]; then
5771     # The variable is not set by user, try to locate tool using the code snippet
5772     for ac_prog in chmod
5773 do
5774   # Extract the first word of "$ac_prog", so it can be a program name with args.
5775 set dummy $ac_prog; ac_word=$2
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777 $as_echo_n "checking for $ac_word... " >&6; }
5778 if ${ac_cv_path_CHMOD+:} false; then :
5779   $as_echo_n "(cached) " >&6
5780 else
5781   case $CHMOD in
5782   [\\/]* | ?:[\\/]*)
5783   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5784   ;;
5785   *)
5786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787 for as_dir in $PATH
5788 do
5789   IFS=$as_save_IFS
5790   test -z "$as_dir" && as_dir=.
5791     for ac_exec_ext in '' $ac_executable_extensions; do
5792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795     break 2
5796   fi
5797 done
5798   done
5799 IFS=$as_save_IFS
5800 
5801   ;;
5802 esac
5803 fi
5804 CHMOD=$ac_cv_path_CHMOD
5805 if test -n "$CHMOD"; then
5806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5807 $as_echo "$CHMOD" >&6; }
5808 else
5809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810 $as_echo "no" >&6; }
5811 fi
5812 
5813 
5814   test -n "$CHMOD" && break
5815 done
5816 
5817   else
5818     # The variable is set, but is it from the command line or the environment?
5819 
5820     # Try to remove the string !CHMOD! from our list.
5821     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5822     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5823       # If it failed, the variable was not from the command line. Ignore it,
5824       # but warn the user (except for BASH, which is always set by the calling BASH).
5825       if test "xCHMOD" != xBASH; then
5826         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5827 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5828       fi
5829       # Try to locate tool using the code snippet
5830       for ac_prog in chmod
5831 do
5832   # Extract the first word of "$ac_prog", so it can be a program name with args.
5833 set dummy $ac_prog; ac_word=$2
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5835 $as_echo_n "checking for $ac_word... " >&6; }
5836 if ${ac_cv_path_CHMOD+:} false; then :
5837   $as_echo_n "(cached) " >&6
5838 else
5839   case $CHMOD in
5840   [\\/]* | ?:[\\/]*)
5841   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5842   ;;
5843   *)
5844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845 for as_dir in $PATH
5846 do
5847   IFS=$as_save_IFS
5848   test -z "$as_dir" && as_dir=.
5849     for ac_exec_ext in '' $ac_executable_extensions; do
5850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5851     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853     break 2
5854   fi
5855 done
5856   done
5857 IFS=$as_save_IFS
5858 
5859   ;;
5860 esac
5861 fi
5862 CHMOD=$ac_cv_path_CHMOD
5863 if test -n "$CHMOD"; then
5864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5865 $as_echo "$CHMOD" >&6; }
5866 else
5867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5868 $as_echo "no" >&6; }
5869 fi
5870 
5871 
5872   test -n "$CHMOD" && break
5873 done
5874 
5875     else
5876       # If it succeeded, then it was overridden by the user. We will use it
5877       # for the tool.
5878 
5879       # First remove it from the list of overridden variables, so we can test
5880       # for unknown variables in the end.
5881       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5882 
5883       # Check if we try to supply an empty value
5884       if test "x$CHMOD" = x; then
5885         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5886 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5887         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5888 $as_echo_n "checking for CHMOD... " >&6; }
5889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5890 $as_echo "disabled" >&6; }
5891       else
5892         # Check if the provided tool contains a complete path.
5893         tool_specified="$CHMOD"
5894         tool_basename="${tool_specified##*/}"
5895         if test "x$tool_basename" = "x$tool_specified"; then
5896           # A command without a complete path is provided, search $PATH.
5897           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5898 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5899           # Extract the first word of "$tool_basename", so it can be a program name with args.
5900 set dummy $tool_basename; ac_word=$2
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902 $as_echo_n "checking for $ac_word... " >&6; }
5903 if ${ac_cv_path_CHMOD+:} false; then :
5904   $as_echo_n "(cached) " >&6
5905 else
5906   case $CHMOD in
5907   [\\/]* | ?:[\\/]*)
5908   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5909   ;;
5910   *)
5911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5912 for as_dir in $PATH
5913 do
5914   IFS=$as_save_IFS
5915   test -z "$as_dir" && as_dir=.
5916     for ac_exec_ext in '' $ac_executable_extensions; do
5917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5918     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5920     break 2
5921   fi
5922 done
5923   done
5924 IFS=$as_save_IFS
5925 
5926   ;;
5927 esac
5928 fi
5929 CHMOD=$ac_cv_path_CHMOD
5930 if test -n "$CHMOD"; then
5931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5932 $as_echo "$CHMOD" >&6; }
5933 else
5934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935 $as_echo "no" >&6; }
5936 fi
5937 
5938 
5939           if test "x$CHMOD" = x; then
5940             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5941           fi
5942         else
5943           # Otherwise we believe it is a complete path. Use it as it is.
5944           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5945 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5946           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5947 $as_echo_n "checking for CHMOD... " >&6; }
5948           if test ! -x "$tool_specified"; then
5949             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5950 $as_echo "not found" >&6; }
5951             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5952           fi
5953           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5954 $as_echo "$tool_specified" >&6; }
5955         fi
5956       fi
5957     fi
5958 
5959   fi
5960 
5961 
5962 
5963   if test "x$CHMOD" = x; then
5964     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5965   fi
5966 
5967 
5968 
5969 
5970 
5971   # Publish this variable in the help.
5972 
5973 
5974   if [ -z "${CMP+x}" ]; then
5975     # The variable is not set by user, try to locate tool using the code snippet
5976     for ac_prog in cmp
5977 do
5978   # Extract the first word of "$ac_prog", so it can be a program name with args.
5979 set dummy $ac_prog; ac_word=$2
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5981 $as_echo_n "checking for $ac_word... " >&6; }
5982 if ${ac_cv_path_CMP+:} false; then :
5983   $as_echo_n "(cached) " >&6
5984 else
5985   case $CMP in
5986   [\\/]* | ?:[\\/]*)
5987   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5988   ;;
5989   *)
5990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991 for as_dir in $PATH
5992 do
5993   IFS=$as_save_IFS
5994   test -z "$as_dir" && as_dir=.
5995     for ac_exec_ext in '' $ac_executable_extensions; do
5996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999     break 2
6000   fi
6001 done
6002   done
6003 IFS=$as_save_IFS
6004 
6005   ;;
6006 esac
6007 fi
6008 CMP=$ac_cv_path_CMP
6009 if test -n "$CMP"; then
6010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6011 $as_echo "$CMP" >&6; }
6012 else
6013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014 $as_echo "no" >&6; }
6015 fi
6016 
6017 
6018   test -n "$CMP" && break
6019 done
6020 
6021   else
6022     # The variable is set, but is it from the command line or the environment?
6023 
6024     # Try to remove the string !CMP! from our list.
6025     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6026     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6027       # If it failed, the variable was not from the command line. Ignore it,
6028       # but warn the user (except for BASH, which is always set by the calling BASH).
6029       if test "xCMP" != xBASH; then
6030         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6031 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6032       fi
6033       # Try to locate tool using the code snippet
6034       for ac_prog in cmp
6035 do
6036   # Extract the first word of "$ac_prog", so it can be a program name with args.
6037 set dummy $ac_prog; ac_word=$2
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6039 $as_echo_n "checking for $ac_word... " >&6; }
6040 if ${ac_cv_path_CMP+:} false; then :
6041   $as_echo_n "(cached) " >&6
6042 else
6043   case $CMP in
6044   [\\/]* | ?:[\\/]*)
6045   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6046   ;;
6047   *)
6048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049 for as_dir in $PATH
6050 do
6051   IFS=$as_save_IFS
6052   test -z "$as_dir" && as_dir=.
6053     for ac_exec_ext in '' $ac_executable_extensions; do
6054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6055     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6057     break 2
6058   fi
6059 done
6060   done
6061 IFS=$as_save_IFS
6062 
6063   ;;
6064 esac
6065 fi
6066 CMP=$ac_cv_path_CMP
6067 if test -n "$CMP"; then
6068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6069 $as_echo "$CMP" >&6; }
6070 else
6071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072 $as_echo "no" >&6; }
6073 fi
6074 
6075 
6076   test -n "$CMP" && break
6077 done
6078 
6079     else
6080       # If it succeeded, then it was overridden by the user. We will use it
6081       # for the tool.
6082 
6083       # First remove it from the list of overridden variables, so we can test
6084       # for unknown variables in the end.
6085       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6086 
6087       # Check if we try to supply an empty value
6088       if test "x$CMP" = x; then
6089         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6090 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6092 $as_echo_n "checking for CMP... " >&6; }
6093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6094 $as_echo "disabled" >&6; }
6095       else
6096         # Check if the provided tool contains a complete path.
6097         tool_specified="$CMP"
6098         tool_basename="${tool_specified##*/}"
6099         if test "x$tool_basename" = "x$tool_specified"; then
6100           # A command without a complete path is provided, search $PATH.
6101           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6102 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6103           # Extract the first word of "$tool_basename", so it can be a program name with args.
6104 set dummy $tool_basename; ac_word=$2
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6106 $as_echo_n "checking for $ac_word... " >&6; }
6107 if ${ac_cv_path_CMP+:} false; then :
6108   $as_echo_n "(cached) " >&6
6109 else
6110   case $CMP in
6111   [\\/]* | ?:[\\/]*)
6112   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6113   ;;
6114   *)
6115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6116 for as_dir in $PATH
6117 do
6118   IFS=$as_save_IFS
6119   test -z "$as_dir" && as_dir=.
6120     for ac_exec_ext in '' $ac_executable_extensions; do
6121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6122     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6124     break 2
6125   fi
6126 done
6127   done
6128 IFS=$as_save_IFS
6129 
6130   ;;
6131 esac
6132 fi
6133 CMP=$ac_cv_path_CMP
6134 if test -n "$CMP"; then
6135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6136 $as_echo "$CMP" >&6; }
6137 else
6138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6139 $as_echo "no" >&6; }
6140 fi
6141 
6142 
6143           if test "x$CMP" = x; then
6144             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6145           fi
6146         else
6147           # Otherwise we believe it is a complete path. Use it as it is.
6148           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6149 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6150           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6151 $as_echo_n "checking for CMP... " >&6; }
6152           if test ! -x "$tool_specified"; then
6153             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6154 $as_echo "not found" >&6; }
6155             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6156           fi
6157           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6158 $as_echo "$tool_specified" >&6; }
6159         fi
6160       fi
6161     fi
6162 
6163   fi
6164 
6165 
6166 
6167   if test "x$CMP" = x; then
6168     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6169   fi
6170 
6171 
6172 
6173 
6174 
6175   # Publish this variable in the help.
6176 
6177 
6178   if [ -z "${COMM+x}" ]; then
6179     # The variable is not set by user, try to locate tool using the code snippet
6180     for ac_prog in comm
6181 do
6182   # Extract the first word of "$ac_prog", so it can be a program name with args.
6183 set dummy $ac_prog; ac_word=$2
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185 $as_echo_n "checking for $ac_word... " >&6; }
6186 if ${ac_cv_path_COMM+:} false; then :
6187   $as_echo_n "(cached) " >&6
6188 else
6189   case $COMM in
6190   [\\/]* | ?:[\\/]*)
6191   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6192   ;;
6193   *)
6194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195 for as_dir in $PATH
6196 do
6197   IFS=$as_save_IFS
6198   test -z "$as_dir" && as_dir=.
6199     for ac_exec_ext in '' $ac_executable_extensions; do
6200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6201     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6203     break 2
6204   fi
6205 done
6206   done
6207 IFS=$as_save_IFS
6208 
6209   ;;
6210 esac
6211 fi
6212 COMM=$ac_cv_path_COMM
6213 if test -n "$COMM"; then
6214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6215 $as_echo "$COMM" >&6; }
6216 else
6217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218 $as_echo "no" >&6; }
6219 fi
6220 
6221 
6222   test -n "$COMM" && break
6223 done
6224 
6225   else
6226     # The variable is set, but is it from the command line or the environment?
6227 
6228     # Try to remove the string !COMM! from our list.
6229     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6230     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6231       # If it failed, the variable was not from the command line. Ignore it,
6232       # but warn the user (except for BASH, which is always set by the calling BASH).
6233       if test "xCOMM" != xBASH; then
6234         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6235 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6236       fi
6237       # Try to locate tool using the code snippet
6238       for ac_prog in comm
6239 do
6240   # Extract the first word of "$ac_prog", so it can be a program name with args.
6241 set dummy $ac_prog; ac_word=$2
6242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6243 $as_echo_n "checking for $ac_word... " >&6; }
6244 if ${ac_cv_path_COMM+:} false; then :
6245   $as_echo_n "(cached) " >&6
6246 else
6247   case $COMM in
6248   [\\/]* | ?:[\\/]*)
6249   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6250   ;;
6251   *)
6252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253 for as_dir in $PATH
6254 do
6255   IFS=$as_save_IFS
6256   test -z "$as_dir" && as_dir=.
6257     for ac_exec_ext in '' $ac_executable_extensions; do
6258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6259     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6261     break 2
6262   fi
6263 done
6264   done
6265 IFS=$as_save_IFS
6266 
6267   ;;
6268 esac
6269 fi
6270 COMM=$ac_cv_path_COMM
6271 if test -n "$COMM"; then
6272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6273 $as_echo "$COMM" >&6; }
6274 else
6275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6276 $as_echo "no" >&6; }
6277 fi
6278 
6279 
6280   test -n "$COMM" && break
6281 done
6282 
6283     else
6284       # If it succeeded, then it was overridden by the user. We will use it
6285       # for the tool.
6286 
6287       # First remove it from the list of overridden variables, so we can test
6288       # for unknown variables in the end.
6289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6290 
6291       # Check if we try to supply an empty value
6292       if test "x$COMM" = x; then
6293         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6294 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6296 $as_echo_n "checking for COMM... " >&6; }
6297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6298 $as_echo "disabled" >&6; }
6299       else
6300         # Check if the provided tool contains a complete path.
6301         tool_specified="$COMM"
6302         tool_basename="${tool_specified##*/}"
6303         if test "x$tool_basename" = "x$tool_specified"; then
6304           # A command without a complete path is provided, search $PATH.
6305           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6306 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6307           # Extract the first word of "$tool_basename", so it can be a program name with args.
6308 set dummy $tool_basename; ac_word=$2
6309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6310 $as_echo_n "checking for $ac_word... " >&6; }
6311 if ${ac_cv_path_COMM+:} false; then :
6312   $as_echo_n "(cached) " >&6
6313 else
6314   case $COMM in
6315   [\\/]* | ?:[\\/]*)
6316   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6317   ;;
6318   *)
6319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320 for as_dir in $PATH
6321 do
6322   IFS=$as_save_IFS
6323   test -z "$as_dir" && as_dir=.
6324     for ac_exec_ext in '' $ac_executable_extensions; do
6325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6326     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6328     break 2
6329   fi
6330 done
6331   done
6332 IFS=$as_save_IFS
6333 
6334   ;;
6335 esac
6336 fi
6337 COMM=$ac_cv_path_COMM
6338 if test -n "$COMM"; then
6339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6340 $as_echo "$COMM" >&6; }
6341 else
6342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6343 $as_echo "no" >&6; }
6344 fi
6345 
6346 
6347           if test "x$COMM" = x; then
6348             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6349           fi
6350         else
6351           # Otherwise we believe it is a complete path. Use it as it is.
6352           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6353 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6354           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6355 $as_echo_n "checking for COMM... " >&6; }
6356           if test ! -x "$tool_specified"; then
6357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6358 $as_echo "not found" >&6; }
6359             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6360           fi
6361           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6362 $as_echo "$tool_specified" >&6; }
6363         fi
6364       fi
6365     fi
6366 
6367   fi
6368 
6369 
6370 
6371   if test "x$COMM" = x; then
6372     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6373   fi
6374 
6375 
6376 
6377 
6378 
6379   # Publish this variable in the help.
6380 
6381 
6382   if [ -z "${CP+x}" ]; then
6383     # The variable is not set by user, try to locate tool using the code snippet
6384     for ac_prog in cp
6385 do
6386   # Extract the first word of "$ac_prog", so it can be a program name with args.
6387 set dummy $ac_prog; ac_word=$2
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389 $as_echo_n "checking for $ac_word... " >&6; }
6390 if ${ac_cv_path_CP+:} false; then :
6391   $as_echo_n "(cached) " >&6
6392 else
6393   case $CP in
6394   [\\/]* | ?:[\\/]*)
6395   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6396   ;;
6397   *)
6398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399 for as_dir in $PATH
6400 do
6401   IFS=$as_save_IFS
6402   test -z "$as_dir" && as_dir=.
6403     for ac_exec_ext in '' $ac_executable_extensions; do
6404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407     break 2
6408   fi
6409 done
6410   done
6411 IFS=$as_save_IFS
6412 
6413   ;;
6414 esac
6415 fi
6416 CP=$ac_cv_path_CP
6417 if test -n "$CP"; then
6418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6419 $as_echo "$CP" >&6; }
6420 else
6421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422 $as_echo "no" >&6; }
6423 fi
6424 
6425 
6426   test -n "$CP" && break
6427 done
6428 
6429   else
6430     # The variable is set, but is it from the command line or the environment?
6431 
6432     # Try to remove the string !CP! from our list.
6433     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6434     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6435       # If it failed, the variable was not from the command line. Ignore it,
6436       # but warn the user (except for BASH, which is always set by the calling BASH).
6437       if test "xCP" != xBASH; then
6438         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6439 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6440       fi
6441       # Try to locate tool using the code snippet
6442       for ac_prog in cp
6443 do
6444   # Extract the first word of "$ac_prog", so it can be a program name with args.
6445 set dummy $ac_prog; ac_word=$2
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6447 $as_echo_n "checking for $ac_word... " >&6; }
6448 if ${ac_cv_path_CP+:} false; then :
6449   $as_echo_n "(cached) " >&6
6450 else
6451   case $CP in
6452   [\\/]* | ?:[\\/]*)
6453   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6454   ;;
6455   *)
6456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457 for as_dir in $PATH
6458 do
6459   IFS=$as_save_IFS
6460   test -z "$as_dir" && as_dir=.
6461     for ac_exec_ext in '' $ac_executable_extensions; do
6462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6463     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6465     break 2
6466   fi
6467 done
6468   done
6469 IFS=$as_save_IFS
6470 
6471   ;;
6472 esac
6473 fi
6474 CP=$ac_cv_path_CP
6475 if test -n "$CP"; then
6476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6477 $as_echo "$CP" >&6; }
6478 else
6479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6480 $as_echo "no" >&6; }
6481 fi
6482 
6483 
6484   test -n "$CP" && break
6485 done
6486 
6487     else
6488       # If it succeeded, then it was overridden by the user. We will use it
6489       # for the tool.
6490 
6491       # First remove it from the list of overridden variables, so we can test
6492       # for unknown variables in the end.
6493       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6494 
6495       # Check if we try to supply an empty value
6496       if test "x$CP" = x; then
6497         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6498 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6499         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6500 $as_echo_n "checking for CP... " >&6; }
6501         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6502 $as_echo "disabled" >&6; }
6503       else
6504         # Check if the provided tool contains a complete path.
6505         tool_specified="$CP"
6506         tool_basename="${tool_specified##*/}"
6507         if test "x$tool_basename" = "x$tool_specified"; then
6508           # A command without a complete path is provided, search $PATH.
6509           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6510 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6511           # Extract the first word of "$tool_basename", so it can be a program name with args.
6512 set dummy $tool_basename; ac_word=$2
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6514 $as_echo_n "checking for $ac_word... " >&6; }
6515 if ${ac_cv_path_CP+:} false; then :
6516   $as_echo_n "(cached) " >&6
6517 else
6518   case $CP in
6519   [\\/]* | ?:[\\/]*)
6520   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6521   ;;
6522   *)
6523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6524 for as_dir in $PATH
6525 do
6526   IFS=$as_save_IFS
6527   test -z "$as_dir" && as_dir=.
6528     for ac_exec_ext in '' $ac_executable_extensions; do
6529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6530     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6532     break 2
6533   fi
6534 done
6535   done
6536 IFS=$as_save_IFS
6537 
6538   ;;
6539 esac
6540 fi
6541 CP=$ac_cv_path_CP
6542 if test -n "$CP"; then
6543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6544 $as_echo "$CP" >&6; }
6545 else
6546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6547 $as_echo "no" >&6; }
6548 fi
6549 
6550 
6551           if test "x$CP" = x; then
6552             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6553           fi
6554         else
6555           # Otherwise we believe it is a complete path. Use it as it is.
6556           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6557 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6558           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6559 $as_echo_n "checking for CP... " >&6; }
6560           if test ! -x "$tool_specified"; then
6561             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6562 $as_echo "not found" >&6; }
6563             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6564           fi
6565           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6566 $as_echo "$tool_specified" >&6; }
6567         fi
6568       fi
6569     fi
6570 
6571   fi
6572 
6573 
6574 
6575   if test "x$CP" = x; then
6576     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6577   fi
6578 
6579 
6580 
6581 
6582 
6583   # Publish this variable in the help.
6584 
6585 
6586   if [ -z "${CUT+x}" ]; then
6587     # The variable is not set by user, try to locate tool using the code snippet
6588     for ac_prog in cut
6589 do
6590   # Extract the first word of "$ac_prog", so it can be a program name with args.
6591 set dummy $ac_prog; ac_word=$2
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593 $as_echo_n "checking for $ac_word... " >&6; }
6594 if ${ac_cv_path_CUT+:} false; then :
6595   $as_echo_n "(cached) " >&6
6596 else
6597   case $CUT in
6598   [\\/]* | ?:[\\/]*)
6599   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6600   ;;
6601   *)
6602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603 for as_dir in $PATH
6604 do
6605   IFS=$as_save_IFS
6606   test -z "$as_dir" && as_dir=.
6607     for ac_exec_ext in '' $ac_executable_extensions; do
6608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611     break 2
6612   fi
6613 done
6614   done
6615 IFS=$as_save_IFS
6616 
6617   ;;
6618 esac
6619 fi
6620 CUT=$ac_cv_path_CUT
6621 if test -n "$CUT"; then
6622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6623 $as_echo "$CUT" >&6; }
6624 else
6625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626 $as_echo "no" >&6; }
6627 fi
6628 
6629 
6630   test -n "$CUT" && break
6631 done
6632 
6633   else
6634     # The variable is set, but is it from the command line or the environment?
6635 
6636     # Try to remove the string !CUT! from our list.
6637     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6638     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6639       # If it failed, the variable was not from the command line. Ignore it,
6640       # but warn the user (except for BASH, which is always set by the calling BASH).
6641       if test "xCUT" != xBASH; then
6642         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6643 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6644       fi
6645       # Try to locate tool using the code snippet
6646       for ac_prog in cut
6647 do
6648   # Extract the first word of "$ac_prog", so it can be a program name with args.
6649 set dummy $ac_prog; ac_word=$2
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6651 $as_echo_n "checking for $ac_word... " >&6; }
6652 if ${ac_cv_path_CUT+:} false; then :
6653   $as_echo_n "(cached) " >&6
6654 else
6655   case $CUT in
6656   [\\/]* | ?:[\\/]*)
6657   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6658   ;;
6659   *)
6660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6661 for as_dir in $PATH
6662 do
6663   IFS=$as_save_IFS
6664   test -z "$as_dir" && as_dir=.
6665     for ac_exec_ext in '' $ac_executable_extensions; do
6666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6667     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6669     break 2
6670   fi
6671 done
6672   done
6673 IFS=$as_save_IFS
6674 
6675   ;;
6676 esac
6677 fi
6678 CUT=$ac_cv_path_CUT
6679 if test -n "$CUT"; then
6680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6681 $as_echo "$CUT" >&6; }
6682 else
6683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6684 $as_echo "no" >&6; }
6685 fi
6686 
6687 
6688   test -n "$CUT" && break
6689 done
6690 
6691     else
6692       # If it succeeded, then it was overridden by the user. We will use it
6693       # for the tool.
6694 
6695       # First remove it from the list of overridden variables, so we can test
6696       # for unknown variables in the end.
6697       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6698 
6699       # Check if we try to supply an empty value
6700       if test "x$CUT" = x; then
6701         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6702 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6703         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6704 $as_echo_n "checking for CUT... " >&6; }
6705         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6706 $as_echo "disabled" >&6; }
6707       else
6708         # Check if the provided tool contains a complete path.
6709         tool_specified="$CUT"
6710         tool_basename="${tool_specified##*/}"
6711         if test "x$tool_basename" = "x$tool_specified"; then
6712           # A command without a complete path is provided, search $PATH.
6713           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6714 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6715           # Extract the first word of "$tool_basename", so it can be a program name with args.
6716 set dummy $tool_basename; ac_word=$2
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6718 $as_echo_n "checking for $ac_word... " >&6; }
6719 if ${ac_cv_path_CUT+:} false; then :
6720   $as_echo_n "(cached) " >&6
6721 else
6722   case $CUT in
6723   [\\/]* | ?:[\\/]*)
6724   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6725   ;;
6726   *)
6727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6728 for as_dir in $PATH
6729 do
6730   IFS=$as_save_IFS
6731   test -z "$as_dir" && as_dir=.
6732     for ac_exec_ext in '' $ac_executable_extensions; do
6733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6734     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6736     break 2
6737   fi
6738 done
6739   done
6740 IFS=$as_save_IFS
6741 
6742   ;;
6743 esac
6744 fi
6745 CUT=$ac_cv_path_CUT
6746 if test -n "$CUT"; then
6747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6748 $as_echo "$CUT" >&6; }
6749 else
6750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6751 $as_echo "no" >&6; }
6752 fi
6753 
6754 
6755           if test "x$CUT" = x; then
6756             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6757           fi
6758         else
6759           # Otherwise we believe it is a complete path. Use it as it is.
6760           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6761 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6762           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6763 $as_echo_n "checking for CUT... " >&6; }
6764           if test ! -x "$tool_specified"; then
6765             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6766 $as_echo "not found" >&6; }
6767             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6768           fi
6769           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6770 $as_echo "$tool_specified" >&6; }
6771         fi
6772       fi
6773     fi
6774 
6775   fi
6776 
6777 
6778 
6779   if test "x$CUT" = x; then
6780     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6781   fi
6782 
6783 
6784 
6785 
6786 
6787   # Publish this variable in the help.
6788 
6789 
6790   if [ -z "${DATE+x}" ]; then
6791     # The variable is not set by user, try to locate tool using the code snippet
6792     for ac_prog in date
6793 do
6794   # Extract the first word of "$ac_prog", so it can be a program name with args.
6795 set dummy $ac_prog; ac_word=$2
6796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6797 $as_echo_n "checking for $ac_word... " >&6; }
6798 if ${ac_cv_path_DATE+:} false; then :
6799   $as_echo_n "(cached) " >&6
6800 else
6801   case $DATE in
6802   [\\/]* | ?:[\\/]*)
6803   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6804   ;;
6805   *)
6806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807 for as_dir in $PATH
6808 do
6809   IFS=$as_save_IFS
6810   test -z "$as_dir" && as_dir=.
6811     for ac_exec_ext in '' $ac_executable_extensions; do
6812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815     break 2
6816   fi
6817 done
6818   done
6819 IFS=$as_save_IFS
6820 
6821   ;;
6822 esac
6823 fi
6824 DATE=$ac_cv_path_DATE
6825 if test -n "$DATE"; then
6826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6827 $as_echo "$DATE" >&6; }
6828 else
6829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830 $as_echo "no" >&6; }
6831 fi
6832 
6833 
6834   test -n "$DATE" && break
6835 done
6836 
6837   else
6838     # The variable is set, but is it from the command line or the environment?
6839 
6840     # Try to remove the string !DATE! from our list.
6841     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6842     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6843       # If it failed, the variable was not from the command line. Ignore it,
6844       # but warn the user (except for BASH, which is always set by the calling BASH).
6845       if test "xDATE" != xBASH; then
6846         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6847 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6848       fi
6849       # Try to locate tool using the code snippet
6850       for ac_prog in date
6851 do
6852   # Extract the first word of "$ac_prog", so it can be a program name with args.
6853 set dummy $ac_prog; ac_word=$2
6854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6855 $as_echo_n "checking for $ac_word... " >&6; }
6856 if ${ac_cv_path_DATE+:} false; then :
6857   $as_echo_n "(cached) " >&6
6858 else
6859   case $DATE in
6860   [\\/]* | ?:[\\/]*)
6861   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6862   ;;
6863   *)
6864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6865 for as_dir in $PATH
6866 do
6867   IFS=$as_save_IFS
6868   test -z "$as_dir" && as_dir=.
6869     for ac_exec_ext in '' $ac_executable_extensions; do
6870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6871     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6873     break 2
6874   fi
6875 done
6876   done
6877 IFS=$as_save_IFS
6878 
6879   ;;
6880 esac
6881 fi
6882 DATE=$ac_cv_path_DATE
6883 if test -n "$DATE"; then
6884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6885 $as_echo "$DATE" >&6; }
6886 else
6887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6888 $as_echo "no" >&6; }
6889 fi
6890 
6891 
6892   test -n "$DATE" && break
6893 done
6894 
6895     else
6896       # If it succeeded, then it was overridden by the user. We will use it
6897       # for the tool.
6898 
6899       # First remove it from the list of overridden variables, so we can test
6900       # for unknown variables in the end.
6901       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6902 
6903       # Check if we try to supply an empty value
6904       if test "x$DATE" = x; then
6905         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6906 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6907         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6908 $as_echo_n "checking for DATE... " >&6; }
6909         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6910 $as_echo "disabled" >&6; }
6911       else
6912         # Check if the provided tool contains a complete path.
6913         tool_specified="$DATE"
6914         tool_basename="${tool_specified##*/}"
6915         if test "x$tool_basename" = "x$tool_specified"; then
6916           # A command without a complete path is provided, search $PATH.
6917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6918 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6919           # Extract the first word of "$tool_basename", so it can be a program name with args.
6920 set dummy $tool_basename; ac_word=$2
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6922 $as_echo_n "checking for $ac_word... " >&6; }
6923 if ${ac_cv_path_DATE+:} false; then :
6924   $as_echo_n "(cached) " >&6
6925 else
6926   case $DATE in
6927   [\\/]* | ?:[\\/]*)
6928   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6929   ;;
6930   *)
6931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6932 for as_dir in $PATH
6933 do
6934   IFS=$as_save_IFS
6935   test -z "$as_dir" && as_dir=.
6936     for ac_exec_ext in '' $ac_executable_extensions; do
6937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6938     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6940     break 2
6941   fi
6942 done
6943   done
6944 IFS=$as_save_IFS
6945 
6946   ;;
6947 esac
6948 fi
6949 DATE=$ac_cv_path_DATE
6950 if test -n "$DATE"; then
6951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6952 $as_echo "$DATE" >&6; }
6953 else
6954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6955 $as_echo "no" >&6; }
6956 fi
6957 
6958 
6959           if test "x$DATE" = x; then
6960             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6961           fi
6962         else
6963           # Otherwise we believe it is a complete path. Use it as it is.
6964           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6965 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6966           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6967 $as_echo_n "checking for DATE... " >&6; }
6968           if test ! -x "$tool_specified"; then
6969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6970 $as_echo "not found" >&6; }
6971             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6972           fi
6973           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6974 $as_echo "$tool_specified" >&6; }
6975         fi
6976       fi
6977     fi
6978 
6979   fi
6980 
6981 
6982 
6983   if test "x$DATE" = x; then
6984     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6985   fi
6986 
6987 
6988 
6989 
6990 
6991   # Publish this variable in the help.
6992 
6993 
6994   if [ -z "${DIFF+x}" ]; then
6995     # The variable is not set by user, try to locate tool using the code snippet
6996     for ac_prog in gdiff diff
6997 do
6998   # Extract the first word of "$ac_prog", so it can be a program name with args.
6999 set dummy $ac_prog; ac_word=$2
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7001 $as_echo_n "checking for $ac_word... " >&6; }
7002 if ${ac_cv_path_DIFF+:} false; then :
7003   $as_echo_n "(cached) " >&6
7004 else
7005   case $DIFF in
7006   [\\/]* | ?:[\\/]*)
7007   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7008   ;;
7009   *)
7010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011 for as_dir in $PATH
7012 do
7013   IFS=$as_save_IFS
7014   test -z "$as_dir" && as_dir=.
7015     for ac_exec_ext in '' $ac_executable_extensions; do
7016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7017     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7019     break 2
7020   fi
7021 done
7022   done
7023 IFS=$as_save_IFS
7024 
7025   ;;
7026 esac
7027 fi
7028 DIFF=$ac_cv_path_DIFF
7029 if test -n "$DIFF"; then
7030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7031 $as_echo "$DIFF" >&6; }
7032 else
7033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034 $as_echo "no" >&6; }
7035 fi
7036 
7037 
7038   test -n "$DIFF" && break
7039 done
7040 
7041   else
7042     # The variable is set, but is it from the command line or the environment?
7043 
7044     # Try to remove the string !DIFF! from our list.
7045     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7046     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7047       # If it failed, the variable was not from the command line. Ignore it,
7048       # but warn the user (except for BASH, which is always set by the calling BASH).
7049       if test "xDIFF" != xBASH; then
7050         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7051 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7052       fi
7053       # Try to locate tool using the code snippet
7054       for ac_prog in gdiff diff
7055 do
7056   # Extract the first word of "$ac_prog", so it can be a program name with args.
7057 set dummy $ac_prog; ac_word=$2
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7059 $as_echo_n "checking for $ac_word... " >&6; }
7060 if ${ac_cv_path_DIFF+:} false; then :
7061   $as_echo_n "(cached) " >&6
7062 else
7063   case $DIFF in
7064   [\\/]* | ?:[\\/]*)
7065   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7066   ;;
7067   *)
7068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7069 for as_dir in $PATH
7070 do
7071   IFS=$as_save_IFS
7072   test -z "$as_dir" && as_dir=.
7073     for ac_exec_ext in '' $ac_executable_extensions; do
7074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7075     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7077     break 2
7078   fi
7079 done
7080   done
7081 IFS=$as_save_IFS
7082 
7083   ;;
7084 esac
7085 fi
7086 DIFF=$ac_cv_path_DIFF
7087 if test -n "$DIFF"; then
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7089 $as_echo "$DIFF" >&6; }
7090 else
7091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7092 $as_echo "no" >&6; }
7093 fi
7094 
7095 
7096   test -n "$DIFF" && break
7097 done
7098 
7099     else
7100       # If it succeeded, then it was overridden by the user. We will use it
7101       # for the tool.
7102 
7103       # First remove it from the list of overridden variables, so we can test
7104       # for unknown variables in the end.
7105       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7106 
7107       # Check if we try to supply an empty value
7108       if test "x$DIFF" = x; then
7109         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7110 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7112 $as_echo_n "checking for DIFF... " >&6; }
7113         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7114 $as_echo "disabled" >&6; }
7115       else
7116         # Check if the provided tool contains a complete path.
7117         tool_specified="$DIFF"
7118         tool_basename="${tool_specified##*/}"
7119         if test "x$tool_basename" = "x$tool_specified"; then
7120           # A command without a complete path is provided, search $PATH.
7121           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7122 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7123           # Extract the first word of "$tool_basename", so it can be a program name with args.
7124 set dummy $tool_basename; ac_word=$2
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7126 $as_echo_n "checking for $ac_word... " >&6; }
7127 if ${ac_cv_path_DIFF+:} false; then :
7128   $as_echo_n "(cached) " >&6
7129 else
7130   case $DIFF in
7131   [\\/]* | ?:[\\/]*)
7132   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7133   ;;
7134   *)
7135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7136 for as_dir in $PATH
7137 do
7138   IFS=$as_save_IFS
7139   test -z "$as_dir" && as_dir=.
7140     for ac_exec_ext in '' $ac_executable_extensions; do
7141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7142     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7144     break 2
7145   fi
7146 done
7147   done
7148 IFS=$as_save_IFS
7149 
7150   ;;
7151 esac
7152 fi
7153 DIFF=$ac_cv_path_DIFF
7154 if test -n "$DIFF"; then
7155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7156 $as_echo "$DIFF" >&6; }
7157 else
7158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7159 $as_echo "no" >&6; }
7160 fi
7161 
7162 
7163           if test "x$DIFF" = x; then
7164             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7165           fi
7166         else
7167           # Otherwise we believe it is a complete path. Use it as it is.
7168           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7169 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7170           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7171 $as_echo_n "checking for DIFF... " >&6; }
7172           if test ! -x "$tool_specified"; then
7173             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7174 $as_echo "not found" >&6; }
7175             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7176           fi
7177           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7178 $as_echo "$tool_specified" >&6; }
7179         fi
7180       fi
7181     fi
7182 
7183   fi
7184 
7185 
7186 
7187   if test "x$DIFF" = x; then
7188     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7189   fi
7190 
7191 
7192 
7193 
7194 
7195   # Publish this variable in the help.
7196 
7197 
7198   if [ -z "${DIRNAME+x}" ]; then
7199     # The variable is not set by user, try to locate tool using the code snippet
7200     for ac_prog in dirname
7201 do
7202   # Extract the first word of "$ac_prog", so it can be a program name with args.
7203 set dummy $ac_prog; ac_word=$2
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205 $as_echo_n "checking for $ac_word... " >&6; }
7206 if ${ac_cv_path_DIRNAME+:} false; then :
7207   $as_echo_n "(cached) " >&6
7208 else
7209   case $DIRNAME in
7210   [\\/]* | ?:[\\/]*)
7211   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7212   ;;
7213   *)
7214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215 for as_dir in $PATH
7216 do
7217   IFS=$as_save_IFS
7218   test -z "$as_dir" && as_dir=.
7219     for ac_exec_ext in '' $ac_executable_extensions; do
7220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223     break 2
7224   fi
7225 done
7226   done
7227 IFS=$as_save_IFS
7228 
7229   ;;
7230 esac
7231 fi
7232 DIRNAME=$ac_cv_path_DIRNAME
7233 if test -n "$DIRNAME"; then
7234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7235 $as_echo "$DIRNAME" >&6; }
7236 else
7237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238 $as_echo "no" >&6; }
7239 fi
7240 
7241 
7242   test -n "$DIRNAME" && break
7243 done
7244 
7245   else
7246     # The variable is set, but is it from the command line or the environment?
7247 
7248     # Try to remove the string !DIRNAME! from our list.
7249     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7250     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7251       # If it failed, the variable was not from the command line. Ignore it,
7252       # but warn the user (except for BASH, which is always set by the calling BASH).
7253       if test "xDIRNAME" != xBASH; then
7254         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7255 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7256       fi
7257       # Try to locate tool using the code snippet
7258       for ac_prog in dirname
7259 do
7260   # Extract the first word of "$ac_prog", so it can be a program name with args.
7261 set dummy $ac_prog; ac_word=$2
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7263 $as_echo_n "checking for $ac_word... " >&6; }
7264 if ${ac_cv_path_DIRNAME+:} false; then :
7265   $as_echo_n "(cached) " >&6
7266 else
7267   case $DIRNAME in
7268   [\\/]* | ?:[\\/]*)
7269   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7270   ;;
7271   *)
7272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7273 for as_dir in $PATH
7274 do
7275   IFS=$as_save_IFS
7276   test -z "$as_dir" && as_dir=.
7277     for ac_exec_ext in '' $ac_executable_extensions; do
7278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7279     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7281     break 2
7282   fi
7283 done
7284   done
7285 IFS=$as_save_IFS
7286 
7287   ;;
7288 esac
7289 fi
7290 DIRNAME=$ac_cv_path_DIRNAME
7291 if test -n "$DIRNAME"; then
7292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7293 $as_echo "$DIRNAME" >&6; }
7294 else
7295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7296 $as_echo "no" >&6; }
7297 fi
7298 
7299 
7300   test -n "$DIRNAME" && break
7301 done
7302 
7303     else
7304       # If it succeeded, then it was overridden by the user. We will use it
7305       # for the tool.
7306 
7307       # First remove it from the list of overridden variables, so we can test
7308       # for unknown variables in the end.
7309       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7310 
7311       # Check if we try to supply an empty value
7312       if test "x$DIRNAME" = x; then
7313         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7314 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7315         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7316 $as_echo_n "checking for DIRNAME... " >&6; }
7317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7318 $as_echo "disabled" >&6; }
7319       else
7320         # Check if the provided tool contains a complete path.
7321         tool_specified="$DIRNAME"
7322         tool_basename="${tool_specified##*/}"
7323         if test "x$tool_basename" = "x$tool_specified"; then
7324           # A command without a complete path is provided, search $PATH.
7325           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7326 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7327           # Extract the first word of "$tool_basename", so it can be a program name with args.
7328 set dummy $tool_basename; ac_word=$2
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7330 $as_echo_n "checking for $ac_word... " >&6; }
7331 if ${ac_cv_path_DIRNAME+:} false; then :
7332   $as_echo_n "(cached) " >&6
7333 else
7334   case $DIRNAME in
7335   [\\/]* | ?:[\\/]*)
7336   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7337   ;;
7338   *)
7339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7340 for as_dir in $PATH
7341 do
7342   IFS=$as_save_IFS
7343   test -z "$as_dir" && as_dir=.
7344     for ac_exec_ext in '' $ac_executable_extensions; do
7345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7346     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7348     break 2
7349   fi
7350 done
7351   done
7352 IFS=$as_save_IFS
7353 
7354   ;;
7355 esac
7356 fi
7357 DIRNAME=$ac_cv_path_DIRNAME
7358 if test -n "$DIRNAME"; then
7359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7360 $as_echo "$DIRNAME" >&6; }
7361 else
7362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7363 $as_echo "no" >&6; }
7364 fi
7365 
7366 
7367           if test "x$DIRNAME" = x; then
7368             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7369           fi
7370         else
7371           # Otherwise we believe it is a complete path. Use it as it is.
7372           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7373 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7374           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7375 $as_echo_n "checking for DIRNAME... " >&6; }
7376           if test ! -x "$tool_specified"; then
7377             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7378 $as_echo "not found" >&6; }
7379             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7380           fi
7381           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7382 $as_echo "$tool_specified" >&6; }
7383         fi
7384       fi
7385     fi
7386 
7387   fi
7388 
7389 
7390 
7391   if test "x$DIRNAME" = x; then
7392     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7393   fi
7394 
7395 
7396 
7397 
7398 
7399   # Publish this variable in the help.
7400 
7401 
7402   if [ -z "${ECHO+x}" ]; then
7403     # The variable is not set by user, try to locate tool using the code snippet
7404     for ac_prog in echo
7405 do
7406   # Extract the first word of "$ac_prog", so it can be a program name with args.
7407 set dummy $ac_prog; ac_word=$2
7408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409 $as_echo_n "checking for $ac_word... " >&6; }
7410 if ${ac_cv_path_ECHO+:} false; then :
7411   $as_echo_n "(cached) " >&6
7412 else
7413   case $ECHO in
7414   [\\/]* | ?:[\\/]*)
7415   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7416   ;;
7417   *)
7418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419 for as_dir in $PATH
7420 do
7421   IFS=$as_save_IFS
7422   test -z "$as_dir" && as_dir=.
7423     for ac_exec_ext in '' $ac_executable_extensions; do
7424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7425     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7427     break 2
7428   fi
7429 done
7430   done
7431 IFS=$as_save_IFS
7432 
7433   ;;
7434 esac
7435 fi
7436 ECHO=$ac_cv_path_ECHO
7437 if test -n "$ECHO"; then
7438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7439 $as_echo "$ECHO" >&6; }
7440 else
7441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442 $as_echo "no" >&6; }
7443 fi
7444 
7445 
7446   test -n "$ECHO" && break
7447 done
7448 
7449   else
7450     # The variable is set, but is it from the command line or the environment?
7451 
7452     # Try to remove the string !ECHO! from our list.
7453     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7454     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7455       # If it failed, the variable was not from the command line. Ignore it,
7456       # but warn the user (except for BASH, which is always set by the calling BASH).
7457       if test "xECHO" != xBASH; then
7458         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7459 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7460       fi
7461       # Try to locate tool using the code snippet
7462       for ac_prog in echo
7463 do
7464   # Extract the first word of "$ac_prog", so it can be a program name with args.
7465 set dummy $ac_prog; ac_word=$2
7466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7467 $as_echo_n "checking for $ac_word... " >&6; }
7468 if ${ac_cv_path_ECHO+:} false; then :
7469   $as_echo_n "(cached) " >&6
7470 else
7471   case $ECHO in
7472   [\\/]* | ?:[\\/]*)
7473   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7474   ;;
7475   *)
7476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7477 for as_dir in $PATH
7478 do
7479   IFS=$as_save_IFS
7480   test -z "$as_dir" && as_dir=.
7481     for ac_exec_ext in '' $ac_executable_extensions; do
7482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7483     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7485     break 2
7486   fi
7487 done
7488   done
7489 IFS=$as_save_IFS
7490 
7491   ;;
7492 esac
7493 fi
7494 ECHO=$ac_cv_path_ECHO
7495 if test -n "$ECHO"; then
7496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7497 $as_echo "$ECHO" >&6; }
7498 else
7499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7500 $as_echo "no" >&6; }
7501 fi
7502 
7503 
7504   test -n "$ECHO" && break
7505 done
7506 
7507     else
7508       # If it succeeded, then it was overridden by the user. We will use it
7509       # for the tool.
7510 
7511       # First remove it from the list of overridden variables, so we can test
7512       # for unknown variables in the end.
7513       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7514 
7515       # Check if we try to supply an empty value
7516       if test "x$ECHO" = x; then
7517         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7518 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7520 $as_echo_n "checking for ECHO... " >&6; }
7521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7522 $as_echo "disabled" >&6; }
7523       else
7524         # Check if the provided tool contains a complete path.
7525         tool_specified="$ECHO"
7526         tool_basename="${tool_specified##*/}"
7527         if test "x$tool_basename" = "x$tool_specified"; then
7528           # A command without a complete path is provided, search $PATH.
7529           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7530 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7531           # Extract the first word of "$tool_basename", so it can be a program name with args.
7532 set dummy $tool_basename; ac_word=$2
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7534 $as_echo_n "checking for $ac_word... " >&6; }
7535 if ${ac_cv_path_ECHO+:} false; then :
7536   $as_echo_n "(cached) " >&6
7537 else
7538   case $ECHO in
7539   [\\/]* | ?:[\\/]*)
7540   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7541   ;;
7542   *)
7543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7544 for as_dir in $PATH
7545 do
7546   IFS=$as_save_IFS
7547   test -z "$as_dir" && as_dir=.
7548     for ac_exec_ext in '' $ac_executable_extensions; do
7549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7550     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7552     break 2
7553   fi
7554 done
7555   done
7556 IFS=$as_save_IFS
7557 
7558   ;;
7559 esac
7560 fi
7561 ECHO=$ac_cv_path_ECHO
7562 if test -n "$ECHO"; then
7563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7564 $as_echo "$ECHO" >&6; }
7565 else
7566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7567 $as_echo "no" >&6; }
7568 fi
7569 
7570 
7571           if test "x$ECHO" = x; then
7572             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7573           fi
7574         else
7575           # Otherwise we believe it is a complete path. Use it as it is.
7576           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7577 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7578           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7579 $as_echo_n "checking for ECHO... " >&6; }
7580           if test ! -x "$tool_specified"; then
7581             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7582 $as_echo "not found" >&6; }
7583             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7584           fi
7585           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7586 $as_echo "$tool_specified" >&6; }
7587         fi
7588       fi
7589     fi
7590 
7591   fi
7592 
7593 
7594 
7595   if test "x$ECHO" = x; then
7596     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7597   fi
7598 
7599 
7600 
7601 
7602 
7603   # Publish this variable in the help.
7604 
7605 
7606   if [ -z "${EXPR+x}" ]; then
7607     # The variable is not set by user, try to locate tool using the code snippet
7608     for ac_prog in expr
7609 do
7610   # Extract the first word of "$ac_prog", so it can be a program name with args.
7611 set dummy $ac_prog; ac_word=$2
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7613 $as_echo_n "checking for $ac_word... " >&6; }
7614 if ${ac_cv_path_EXPR+:} false; then :
7615   $as_echo_n "(cached) " >&6
7616 else
7617   case $EXPR in
7618   [\\/]* | ?:[\\/]*)
7619   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7620   ;;
7621   *)
7622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623 for as_dir in $PATH
7624 do
7625   IFS=$as_save_IFS
7626   test -z "$as_dir" && as_dir=.
7627     for ac_exec_ext in '' $ac_executable_extensions; do
7628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7629     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7631     break 2
7632   fi
7633 done
7634   done
7635 IFS=$as_save_IFS
7636 
7637   ;;
7638 esac
7639 fi
7640 EXPR=$ac_cv_path_EXPR
7641 if test -n "$EXPR"; then
7642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7643 $as_echo "$EXPR" >&6; }
7644 else
7645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646 $as_echo "no" >&6; }
7647 fi
7648 
7649 
7650   test -n "$EXPR" && break
7651 done
7652 
7653   else
7654     # The variable is set, but is it from the command line or the environment?
7655 
7656     # Try to remove the string !EXPR! from our list.
7657     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7658     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7659       # If it failed, the variable was not from the command line. Ignore it,
7660       # but warn the user (except for BASH, which is always set by the calling BASH).
7661       if test "xEXPR" != xBASH; then
7662         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7663 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7664       fi
7665       # Try to locate tool using the code snippet
7666       for ac_prog in expr
7667 do
7668   # Extract the first word of "$ac_prog", so it can be a program name with args.
7669 set dummy $ac_prog; ac_word=$2
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7671 $as_echo_n "checking for $ac_word... " >&6; }
7672 if ${ac_cv_path_EXPR+:} false; then :
7673   $as_echo_n "(cached) " >&6
7674 else
7675   case $EXPR in
7676   [\\/]* | ?:[\\/]*)
7677   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7678   ;;
7679   *)
7680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7681 for as_dir in $PATH
7682 do
7683   IFS=$as_save_IFS
7684   test -z "$as_dir" && as_dir=.
7685     for ac_exec_ext in '' $ac_executable_extensions; do
7686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7687     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7689     break 2
7690   fi
7691 done
7692   done
7693 IFS=$as_save_IFS
7694 
7695   ;;
7696 esac
7697 fi
7698 EXPR=$ac_cv_path_EXPR
7699 if test -n "$EXPR"; then
7700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7701 $as_echo "$EXPR" >&6; }
7702 else
7703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704 $as_echo "no" >&6; }
7705 fi
7706 
7707 
7708   test -n "$EXPR" && break
7709 done
7710 
7711     else
7712       # If it succeeded, then it was overridden by the user. We will use it
7713       # for the tool.
7714 
7715       # First remove it from the list of overridden variables, so we can test
7716       # for unknown variables in the end.
7717       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7718 
7719       # Check if we try to supply an empty value
7720       if test "x$EXPR" = x; then
7721         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7722 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7723         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7724 $as_echo_n "checking for EXPR... " >&6; }
7725         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7726 $as_echo "disabled" >&6; }
7727       else
7728         # Check if the provided tool contains a complete path.
7729         tool_specified="$EXPR"
7730         tool_basename="${tool_specified##*/}"
7731         if test "x$tool_basename" = "x$tool_specified"; then
7732           # A command without a complete path is provided, search $PATH.
7733           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7734 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7735           # Extract the first word of "$tool_basename", so it can be a program name with args.
7736 set dummy $tool_basename; ac_word=$2
7737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7738 $as_echo_n "checking for $ac_word... " >&6; }
7739 if ${ac_cv_path_EXPR+:} false; then :
7740   $as_echo_n "(cached) " >&6
7741 else
7742   case $EXPR in
7743   [\\/]* | ?:[\\/]*)
7744   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7745   ;;
7746   *)
7747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7748 for as_dir in $PATH
7749 do
7750   IFS=$as_save_IFS
7751   test -z "$as_dir" && as_dir=.
7752     for ac_exec_ext in '' $ac_executable_extensions; do
7753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7754     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7756     break 2
7757   fi
7758 done
7759   done
7760 IFS=$as_save_IFS
7761 
7762   ;;
7763 esac
7764 fi
7765 EXPR=$ac_cv_path_EXPR
7766 if test -n "$EXPR"; then
7767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7768 $as_echo "$EXPR" >&6; }
7769 else
7770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7771 $as_echo "no" >&6; }
7772 fi
7773 
7774 
7775           if test "x$EXPR" = x; then
7776             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7777           fi
7778         else
7779           # Otherwise we believe it is a complete path. Use it as it is.
7780           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7781 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7782           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7783 $as_echo_n "checking for EXPR... " >&6; }
7784           if test ! -x "$tool_specified"; then
7785             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7786 $as_echo "not found" >&6; }
7787             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7788           fi
7789           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7790 $as_echo "$tool_specified" >&6; }
7791         fi
7792       fi
7793     fi
7794 
7795   fi
7796 
7797 
7798 
7799   if test "x$EXPR" = x; then
7800     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7801   fi
7802 
7803 
7804 
7805 
7806 
7807   # Publish this variable in the help.
7808 
7809 
7810   if [ -z "${FILE+x}" ]; then
7811     # The variable is not set by user, try to locate tool using the code snippet
7812     for ac_prog in file
7813 do
7814   # Extract the first word of "$ac_prog", so it can be a program name with args.
7815 set dummy $ac_prog; ac_word=$2
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817 $as_echo_n "checking for $ac_word... " >&6; }
7818 if ${ac_cv_path_FILE+:} false; then :
7819   $as_echo_n "(cached) " >&6
7820 else
7821   case $FILE in
7822   [\\/]* | ?:[\\/]*)
7823   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7824   ;;
7825   *)
7826   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827 for as_dir in $PATH
7828 do
7829   IFS=$as_save_IFS
7830   test -z "$as_dir" && as_dir=.
7831     for ac_exec_ext in '' $ac_executable_extensions; do
7832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835     break 2
7836   fi
7837 done
7838   done
7839 IFS=$as_save_IFS
7840 
7841   ;;
7842 esac
7843 fi
7844 FILE=$ac_cv_path_FILE
7845 if test -n "$FILE"; then
7846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7847 $as_echo "$FILE" >&6; }
7848 else
7849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850 $as_echo "no" >&6; }
7851 fi
7852 
7853 
7854   test -n "$FILE" && break
7855 done
7856 
7857   else
7858     # The variable is set, but is it from the command line or the environment?
7859 
7860     # Try to remove the string !FILE! from our list.
7861     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7862     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7863       # If it failed, the variable was not from the command line. Ignore it,
7864       # but warn the user (except for BASH, which is always set by the calling BASH).
7865       if test "xFILE" != xBASH; then
7866         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7867 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7868       fi
7869       # Try to locate tool using the code snippet
7870       for ac_prog in file
7871 do
7872   # Extract the first word of "$ac_prog", so it can be a program name with args.
7873 set dummy $ac_prog; ac_word=$2
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875 $as_echo_n "checking for $ac_word... " >&6; }
7876 if ${ac_cv_path_FILE+:} false; then :
7877   $as_echo_n "(cached) " >&6
7878 else
7879   case $FILE in
7880   [\\/]* | ?:[\\/]*)
7881   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7882   ;;
7883   *)
7884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885 for as_dir in $PATH
7886 do
7887   IFS=$as_save_IFS
7888   test -z "$as_dir" && as_dir=.
7889     for ac_exec_ext in '' $ac_executable_extensions; do
7890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893     break 2
7894   fi
7895 done
7896   done
7897 IFS=$as_save_IFS
7898 
7899   ;;
7900 esac
7901 fi
7902 FILE=$ac_cv_path_FILE
7903 if test -n "$FILE"; then
7904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7905 $as_echo "$FILE" >&6; }
7906 else
7907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7908 $as_echo "no" >&6; }
7909 fi
7910 
7911 
7912   test -n "$FILE" && break
7913 done
7914 
7915     else
7916       # If it succeeded, then it was overridden by the user. We will use it
7917       # for the tool.
7918 
7919       # First remove it from the list of overridden variables, so we can test
7920       # for unknown variables in the end.
7921       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7922 
7923       # Check if we try to supply an empty value
7924       if test "x$FILE" = x; then
7925         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7926 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7927         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7928 $as_echo_n "checking for FILE... " >&6; }
7929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7930 $as_echo "disabled" >&6; }
7931       else
7932         # Check if the provided tool contains a complete path.
7933         tool_specified="$FILE"
7934         tool_basename="${tool_specified##*/}"
7935         if test "x$tool_basename" = "x$tool_specified"; then
7936           # A command without a complete path is provided, search $PATH.
7937           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7938 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7939           # Extract the first word of "$tool_basename", so it can be a program name with args.
7940 set dummy $tool_basename; ac_word=$2
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7942 $as_echo_n "checking for $ac_word... " >&6; }
7943 if ${ac_cv_path_FILE+:} false; then :
7944   $as_echo_n "(cached) " >&6
7945 else
7946   case $FILE in
7947   [\\/]* | ?:[\\/]*)
7948   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7949   ;;
7950   *)
7951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7952 for as_dir in $PATH
7953 do
7954   IFS=$as_save_IFS
7955   test -z "$as_dir" && as_dir=.
7956     for ac_exec_ext in '' $ac_executable_extensions; do
7957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7958     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7960     break 2
7961   fi
7962 done
7963   done
7964 IFS=$as_save_IFS
7965 
7966   ;;
7967 esac
7968 fi
7969 FILE=$ac_cv_path_FILE
7970 if test -n "$FILE"; then
7971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7972 $as_echo "$FILE" >&6; }
7973 else
7974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7975 $as_echo "no" >&6; }
7976 fi
7977 
7978 
7979           if test "x$FILE" = x; then
7980             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7981           fi
7982         else
7983           # Otherwise we believe it is a complete path. Use it as it is.
7984           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7985 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7986           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7987 $as_echo_n "checking for FILE... " >&6; }
7988           if test ! -x "$tool_specified"; then
7989             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7990 $as_echo "not found" >&6; }
7991             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7992           fi
7993           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7994 $as_echo "$tool_specified" >&6; }
7995         fi
7996       fi
7997     fi
7998 
7999   fi
8000 
8001 
8002 
8003   if test "x$FILE" = x; then
8004     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8005   fi
8006 
8007 
8008 
8009 
8010 
8011   # Publish this variable in the help.
8012 
8013 
8014   if [ -z "${FIND+x}" ]; then
8015     # The variable is not set by user, try to locate tool using the code snippet
8016     for ac_prog in find
8017 do
8018   # Extract the first word of "$ac_prog", so it can be a program name with args.
8019 set dummy $ac_prog; ac_word=$2
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021 $as_echo_n "checking for $ac_word... " >&6; }
8022 if ${ac_cv_path_FIND+:} false; then :
8023   $as_echo_n "(cached) " >&6
8024 else
8025   case $FIND in
8026   [\\/]* | ?:[\\/]*)
8027   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8028   ;;
8029   *)
8030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031 for as_dir in $PATH
8032 do
8033   IFS=$as_save_IFS
8034   test -z "$as_dir" && as_dir=.
8035     for ac_exec_ext in '' $ac_executable_extensions; do
8036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039     break 2
8040   fi
8041 done
8042   done
8043 IFS=$as_save_IFS
8044 
8045   ;;
8046 esac
8047 fi
8048 FIND=$ac_cv_path_FIND
8049 if test -n "$FIND"; then
8050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8051 $as_echo "$FIND" >&6; }
8052 else
8053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054 $as_echo "no" >&6; }
8055 fi
8056 
8057 
8058   test -n "$FIND" && break
8059 done
8060 
8061   else
8062     # The variable is set, but is it from the command line or the environment?
8063 
8064     # Try to remove the string !FIND! from our list.
8065     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8066     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8067       # If it failed, the variable was not from the command line. Ignore it,
8068       # but warn the user (except for BASH, which is always set by the calling BASH).
8069       if test "xFIND" != xBASH; then
8070         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8071 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8072       fi
8073       # Try to locate tool using the code snippet
8074       for ac_prog in find
8075 do
8076   # Extract the first word of "$ac_prog", so it can be a program name with args.
8077 set dummy $ac_prog; ac_word=$2
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8079 $as_echo_n "checking for $ac_word... " >&6; }
8080 if ${ac_cv_path_FIND+:} false; then :
8081   $as_echo_n "(cached) " >&6
8082 else
8083   case $FIND in
8084   [\\/]* | ?:[\\/]*)
8085   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8086   ;;
8087   *)
8088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8089 for as_dir in $PATH
8090 do
8091   IFS=$as_save_IFS
8092   test -z "$as_dir" && as_dir=.
8093     for ac_exec_ext in '' $ac_executable_extensions; do
8094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8095     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8097     break 2
8098   fi
8099 done
8100   done
8101 IFS=$as_save_IFS
8102 
8103   ;;
8104 esac
8105 fi
8106 FIND=$ac_cv_path_FIND
8107 if test -n "$FIND"; then
8108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8109 $as_echo "$FIND" >&6; }
8110 else
8111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8112 $as_echo "no" >&6; }
8113 fi
8114 
8115 
8116   test -n "$FIND" && break
8117 done
8118 
8119     else
8120       # If it succeeded, then it was overridden by the user. We will use it
8121       # for the tool.
8122 
8123       # First remove it from the list of overridden variables, so we can test
8124       # for unknown variables in the end.
8125       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8126 
8127       # Check if we try to supply an empty value
8128       if test "x$FIND" = x; then
8129         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8130 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8131         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8132 $as_echo_n "checking for FIND... " >&6; }
8133         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8134 $as_echo "disabled" >&6; }
8135       else
8136         # Check if the provided tool contains a complete path.
8137         tool_specified="$FIND"
8138         tool_basename="${tool_specified##*/}"
8139         if test "x$tool_basename" = "x$tool_specified"; then
8140           # A command without a complete path is provided, search $PATH.
8141           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8142 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8143           # Extract the first word of "$tool_basename", so it can be a program name with args.
8144 set dummy $tool_basename; ac_word=$2
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8146 $as_echo_n "checking for $ac_word... " >&6; }
8147 if ${ac_cv_path_FIND+:} false; then :
8148   $as_echo_n "(cached) " >&6
8149 else
8150   case $FIND in
8151   [\\/]* | ?:[\\/]*)
8152   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8153   ;;
8154   *)
8155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8156 for as_dir in $PATH
8157 do
8158   IFS=$as_save_IFS
8159   test -z "$as_dir" && as_dir=.
8160     for ac_exec_ext in '' $ac_executable_extensions; do
8161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8162     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8164     break 2
8165   fi
8166 done
8167   done
8168 IFS=$as_save_IFS
8169 
8170   ;;
8171 esac
8172 fi
8173 FIND=$ac_cv_path_FIND
8174 if test -n "$FIND"; then
8175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8176 $as_echo "$FIND" >&6; }
8177 else
8178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8179 $as_echo "no" >&6; }
8180 fi
8181 
8182 
8183           if test "x$FIND" = x; then
8184             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8185           fi
8186         else
8187           # Otherwise we believe it is a complete path. Use it as it is.
8188           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8189 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8190           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8191 $as_echo_n "checking for FIND... " >&6; }
8192           if test ! -x "$tool_specified"; then
8193             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8194 $as_echo "not found" >&6; }
8195             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8196           fi
8197           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8198 $as_echo "$tool_specified" >&6; }
8199         fi
8200       fi
8201     fi
8202 
8203   fi
8204 
8205 
8206 
8207   if test "x$FIND" = x; then
8208     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8209   fi
8210 
8211 
8212 
8213 
8214 
8215   # Publish this variable in the help.
8216 
8217 
8218   if [ -z "${HEAD+x}" ]; then
8219     # The variable is not set by user, try to locate tool using the code snippet
8220     for ac_prog in head
8221 do
8222   # Extract the first word of "$ac_prog", so it can be a program name with args.
8223 set dummy $ac_prog; ac_word=$2
8224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225 $as_echo_n "checking for $ac_word... " >&6; }
8226 if ${ac_cv_path_HEAD+:} false; then :
8227   $as_echo_n "(cached) " >&6
8228 else
8229   case $HEAD in
8230   [\\/]* | ?:[\\/]*)
8231   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8232   ;;
8233   *)
8234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235 for as_dir in $PATH
8236 do
8237   IFS=$as_save_IFS
8238   test -z "$as_dir" && as_dir=.
8239     for ac_exec_ext in '' $ac_executable_extensions; do
8240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243     break 2
8244   fi
8245 done
8246   done
8247 IFS=$as_save_IFS
8248 
8249   ;;
8250 esac
8251 fi
8252 HEAD=$ac_cv_path_HEAD
8253 if test -n "$HEAD"; then
8254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8255 $as_echo "$HEAD" >&6; }
8256 else
8257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258 $as_echo "no" >&6; }
8259 fi
8260 
8261 
8262   test -n "$HEAD" && break
8263 done
8264 
8265   else
8266     # The variable is set, but is it from the command line or the environment?
8267 
8268     # Try to remove the string !HEAD! from our list.
8269     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8270     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8271       # If it failed, the variable was not from the command line. Ignore it,
8272       # but warn the user (except for BASH, which is always set by the calling BASH).
8273       if test "xHEAD" != xBASH; then
8274         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8275 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8276       fi
8277       # Try to locate tool using the code snippet
8278       for ac_prog in head
8279 do
8280   # Extract the first word of "$ac_prog", so it can be a program name with args.
8281 set dummy $ac_prog; ac_word=$2
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8283 $as_echo_n "checking for $ac_word... " >&6; }
8284 if ${ac_cv_path_HEAD+:} false; then :
8285   $as_echo_n "(cached) " >&6
8286 else
8287   case $HEAD in
8288   [\\/]* | ?:[\\/]*)
8289   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8290   ;;
8291   *)
8292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293 for as_dir in $PATH
8294 do
8295   IFS=$as_save_IFS
8296   test -z "$as_dir" && as_dir=.
8297     for ac_exec_ext in '' $ac_executable_extensions; do
8298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8299     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8301     break 2
8302   fi
8303 done
8304   done
8305 IFS=$as_save_IFS
8306 
8307   ;;
8308 esac
8309 fi
8310 HEAD=$ac_cv_path_HEAD
8311 if test -n "$HEAD"; then
8312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8313 $as_echo "$HEAD" >&6; }
8314 else
8315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8316 $as_echo "no" >&6; }
8317 fi
8318 
8319 
8320   test -n "$HEAD" && break
8321 done
8322 
8323     else
8324       # If it succeeded, then it was overridden by the user. We will use it
8325       # for the tool.
8326 
8327       # First remove it from the list of overridden variables, so we can test
8328       # for unknown variables in the end.
8329       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8330 
8331       # Check if we try to supply an empty value
8332       if test "x$HEAD" = x; then
8333         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8334 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8335         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8336 $as_echo_n "checking for HEAD... " >&6; }
8337         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8338 $as_echo "disabled" >&6; }
8339       else
8340         # Check if the provided tool contains a complete path.
8341         tool_specified="$HEAD"
8342         tool_basename="${tool_specified##*/}"
8343         if test "x$tool_basename" = "x$tool_specified"; then
8344           # A command without a complete path is provided, search $PATH.
8345           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8346 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8347           # Extract the first word of "$tool_basename", so it can be a program name with args.
8348 set dummy $tool_basename; ac_word=$2
8349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8350 $as_echo_n "checking for $ac_word... " >&6; }
8351 if ${ac_cv_path_HEAD+:} false; then :
8352   $as_echo_n "(cached) " >&6
8353 else
8354   case $HEAD in
8355   [\\/]* | ?:[\\/]*)
8356   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8357   ;;
8358   *)
8359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8360 for as_dir in $PATH
8361 do
8362   IFS=$as_save_IFS
8363   test -z "$as_dir" && as_dir=.
8364     for ac_exec_ext in '' $ac_executable_extensions; do
8365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8366     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8368     break 2
8369   fi
8370 done
8371   done
8372 IFS=$as_save_IFS
8373 
8374   ;;
8375 esac
8376 fi
8377 HEAD=$ac_cv_path_HEAD
8378 if test -n "$HEAD"; then
8379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8380 $as_echo "$HEAD" >&6; }
8381 else
8382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383 $as_echo "no" >&6; }
8384 fi
8385 
8386 
8387           if test "x$HEAD" = x; then
8388             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8389           fi
8390         else
8391           # Otherwise we believe it is a complete path. Use it as it is.
8392           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8393 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8394           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8395 $as_echo_n "checking for HEAD... " >&6; }
8396           if test ! -x "$tool_specified"; then
8397             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8398 $as_echo "not found" >&6; }
8399             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8400           fi
8401           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8402 $as_echo "$tool_specified" >&6; }
8403         fi
8404       fi
8405     fi
8406 
8407   fi
8408 
8409 
8410 
8411   if test "x$HEAD" = x; then
8412     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8413   fi
8414 
8415 
8416 
8417 
8418 
8419   # Publish this variable in the help.
8420 
8421 
8422   if [ -z "${GUNZIP+x}" ]; then
8423     # The variable is not set by user, try to locate tool using the code snippet
8424     for ac_prog in gunzip
8425 do
8426   # Extract the first word of "$ac_prog", so it can be a program name with args.
8427 set dummy $ac_prog; ac_word=$2
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429 $as_echo_n "checking for $ac_word... " >&6; }
8430 if ${ac_cv_path_GUNZIP+:} false; then :
8431   $as_echo_n "(cached) " >&6
8432 else
8433   case $GUNZIP in
8434   [\\/]* | ?:[\\/]*)
8435   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8436   ;;
8437   *)
8438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8439 for as_dir in $PATH
8440 do
8441   IFS=$as_save_IFS
8442   test -z "$as_dir" && as_dir=.
8443     for ac_exec_ext in '' $ac_executable_extensions; do
8444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8445     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8447     break 2
8448   fi
8449 done
8450   done
8451 IFS=$as_save_IFS
8452 
8453   ;;
8454 esac
8455 fi
8456 GUNZIP=$ac_cv_path_GUNZIP
8457 if test -n "$GUNZIP"; then
8458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8459 $as_echo "$GUNZIP" >&6; }
8460 else
8461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462 $as_echo "no" >&6; }
8463 fi
8464 
8465 
8466   test -n "$GUNZIP" && break
8467 done
8468 
8469   else
8470     # The variable is set, but is it from the command line or the environment?
8471 
8472     # Try to remove the string !GUNZIP! from our list.
8473     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8474     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8475       # If it failed, the variable was not from the command line. Ignore it,
8476       # but warn the user (except for BASH, which is always set by the calling BASH).
8477       if test "xGUNZIP" != xBASH; then
8478         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8479 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8480       fi
8481       # Try to locate tool using the code snippet
8482       for ac_prog in gunzip
8483 do
8484   # Extract the first word of "$ac_prog", so it can be a program name with args.
8485 set dummy $ac_prog; ac_word=$2
8486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8487 $as_echo_n "checking for $ac_word... " >&6; }
8488 if ${ac_cv_path_GUNZIP+:} false; then :
8489   $as_echo_n "(cached) " >&6
8490 else
8491   case $GUNZIP in
8492   [\\/]* | ?:[\\/]*)
8493   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8494   ;;
8495   *)
8496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8497 for as_dir in $PATH
8498 do
8499   IFS=$as_save_IFS
8500   test -z "$as_dir" && as_dir=.
8501     for ac_exec_ext in '' $ac_executable_extensions; do
8502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8503     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8505     break 2
8506   fi
8507 done
8508   done
8509 IFS=$as_save_IFS
8510 
8511   ;;
8512 esac
8513 fi
8514 GUNZIP=$ac_cv_path_GUNZIP
8515 if test -n "$GUNZIP"; then
8516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8517 $as_echo "$GUNZIP" >&6; }
8518 else
8519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8520 $as_echo "no" >&6; }
8521 fi
8522 
8523 
8524   test -n "$GUNZIP" && break
8525 done
8526 
8527     else
8528       # If it succeeded, then it was overridden by the user. We will use it
8529       # for the tool.
8530 
8531       # First remove it from the list of overridden variables, so we can test
8532       # for unknown variables in the end.
8533       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8534 
8535       # Check if we try to supply an empty value
8536       if test "x$GUNZIP" = x; then
8537         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8538 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8539         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8540 $as_echo_n "checking for GUNZIP... " >&6; }
8541         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8542 $as_echo "disabled" >&6; }
8543       else
8544         # Check if the provided tool contains a complete path.
8545         tool_specified="$GUNZIP"
8546         tool_basename="${tool_specified##*/}"
8547         if test "x$tool_basename" = "x$tool_specified"; then
8548           # A command without a complete path is provided, search $PATH.
8549           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8550 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8551           # Extract the first word of "$tool_basename", so it can be a program name with args.
8552 set dummy $tool_basename; ac_word=$2
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8554 $as_echo_n "checking for $ac_word... " >&6; }
8555 if ${ac_cv_path_GUNZIP+:} false; then :
8556   $as_echo_n "(cached) " >&6
8557 else
8558   case $GUNZIP in
8559   [\\/]* | ?:[\\/]*)
8560   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8561   ;;
8562   *)
8563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8564 for as_dir in $PATH
8565 do
8566   IFS=$as_save_IFS
8567   test -z "$as_dir" && as_dir=.
8568     for ac_exec_ext in '' $ac_executable_extensions; do
8569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8570     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8572     break 2
8573   fi
8574 done
8575   done
8576 IFS=$as_save_IFS
8577 
8578   ;;
8579 esac
8580 fi
8581 GUNZIP=$ac_cv_path_GUNZIP
8582 if test -n "$GUNZIP"; then
8583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8584 $as_echo "$GUNZIP" >&6; }
8585 else
8586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8587 $as_echo "no" >&6; }
8588 fi
8589 
8590 
8591           if test "x$GUNZIP" = x; then
8592             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8593           fi
8594         else
8595           # Otherwise we believe it is a complete path. Use it as it is.
8596           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8597 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8598           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8599 $as_echo_n "checking for GUNZIP... " >&6; }
8600           if test ! -x "$tool_specified"; then
8601             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8602 $as_echo "not found" >&6; }
8603             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8604           fi
8605           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8606 $as_echo "$tool_specified" >&6; }
8607         fi
8608       fi
8609     fi
8610 
8611   fi
8612 
8613 
8614 
8615   if test "x$GUNZIP" = x; then
8616     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8617   fi
8618 
8619 
8620 
8621 
8622 
8623   # Publish this variable in the help.
8624 
8625 
8626   if [ -z "${GZIP+x}" ]; then
8627     # The variable is not set by user, try to locate tool using the code snippet
8628     for ac_prog in pigz gzip
8629 do
8630   # Extract the first word of "$ac_prog", so it can be a program name with args.
8631 set dummy $ac_prog; ac_word=$2
8632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633 $as_echo_n "checking for $ac_word... " >&6; }
8634 if ${ac_cv_path_GZIP+:} false; then :
8635   $as_echo_n "(cached) " >&6
8636 else
8637   case $GZIP in
8638   [\\/]* | ?:[\\/]*)
8639   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8640   ;;
8641   *)
8642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643 for as_dir in $PATH
8644 do
8645   IFS=$as_save_IFS
8646   test -z "$as_dir" && as_dir=.
8647     for ac_exec_ext in '' $ac_executable_extensions; do
8648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651     break 2
8652   fi
8653 done
8654   done
8655 IFS=$as_save_IFS
8656 
8657   ;;
8658 esac
8659 fi
8660 GZIP=$ac_cv_path_GZIP
8661 if test -n "$GZIP"; then
8662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8663 $as_echo "$GZIP" >&6; }
8664 else
8665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666 $as_echo "no" >&6; }
8667 fi
8668 
8669 
8670   test -n "$GZIP" && break
8671 done
8672 
8673   else
8674     # The variable is set, but is it from the command line or the environment?
8675 
8676     # Try to remove the string !GZIP! from our list.
8677     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8678     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8679       # If it failed, the variable was not from the command line. Ignore it,
8680       # but warn the user (except for BASH, which is always set by the calling BASH).
8681       if test "xGZIP" != xBASH; then
8682         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8683 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8684       fi
8685       # Try to locate tool using the code snippet
8686       for ac_prog in pigz gzip
8687 do
8688   # Extract the first word of "$ac_prog", so it can be a program name with args.
8689 set dummy $ac_prog; ac_word=$2
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8691 $as_echo_n "checking for $ac_word... " >&6; }
8692 if ${ac_cv_path_GZIP+:} false; then :
8693   $as_echo_n "(cached) " >&6
8694 else
8695   case $GZIP in
8696   [\\/]* | ?:[\\/]*)
8697   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8698   ;;
8699   *)
8700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8701 for as_dir in $PATH
8702 do
8703   IFS=$as_save_IFS
8704   test -z "$as_dir" && as_dir=.
8705     for ac_exec_ext in '' $ac_executable_extensions; do
8706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8707     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8709     break 2
8710   fi
8711 done
8712   done
8713 IFS=$as_save_IFS
8714 
8715   ;;
8716 esac
8717 fi
8718 GZIP=$ac_cv_path_GZIP
8719 if test -n "$GZIP"; then
8720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8721 $as_echo "$GZIP" >&6; }
8722 else
8723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8724 $as_echo "no" >&6; }
8725 fi
8726 
8727 
8728   test -n "$GZIP" && break
8729 done
8730 
8731     else
8732       # If it succeeded, then it was overridden by the user. We will use it
8733       # for the tool.
8734 
8735       # First remove it from the list of overridden variables, so we can test
8736       # for unknown variables in the end.
8737       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8738 
8739       # Check if we try to supply an empty value
8740       if test "x$GZIP" = x; then
8741         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8742 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8743         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8744 $as_echo_n "checking for GZIP... " >&6; }
8745         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8746 $as_echo "disabled" >&6; }
8747       else
8748         # Check if the provided tool contains a complete path.
8749         tool_specified="$GZIP"
8750         tool_basename="${tool_specified##*/}"
8751         if test "x$tool_basename" = "x$tool_specified"; then
8752           # A command without a complete path is provided, search $PATH.
8753           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8754 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8755           # Extract the first word of "$tool_basename", so it can be a program name with args.
8756 set dummy $tool_basename; ac_word=$2
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8758 $as_echo_n "checking for $ac_word... " >&6; }
8759 if ${ac_cv_path_GZIP+:} false; then :
8760   $as_echo_n "(cached) " >&6
8761 else
8762   case $GZIP in
8763   [\\/]* | ?:[\\/]*)
8764   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8765   ;;
8766   *)
8767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8768 for as_dir in $PATH
8769 do
8770   IFS=$as_save_IFS
8771   test -z "$as_dir" && as_dir=.
8772     for ac_exec_ext in '' $ac_executable_extensions; do
8773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8774     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8776     break 2
8777   fi
8778 done
8779   done
8780 IFS=$as_save_IFS
8781 
8782   ;;
8783 esac
8784 fi
8785 GZIP=$ac_cv_path_GZIP
8786 if test -n "$GZIP"; then
8787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8788 $as_echo "$GZIP" >&6; }
8789 else
8790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8791 $as_echo "no" >&6; }
8792 fi
8793 
8794 
8795           if test "x$GZIP" = x; then
8796             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8797           fi
8798         else
8799           # Otherwise we believe it is a complete path. Use it as it is.
8800           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8801 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8802           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8803 $as_echo_n "checking for GZIP... " >&6; }
8804           if test ! -x "$tool_specified"; then
8805             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8806 $as_echo "not found" >&6; }
8807             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8808           fi
8809           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8810 $as_echo "$tool_specified" >&6; }
8811         fi
8812       fi
8813     fi
8814 
8815   fi
8816 
8817 
8818 
8819   if test "x$GZIP" = x; then
8820     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8821   fi
8822 
8823 
8824 
8825 
8826 
8827   # Publish this variable in the help.
8828 
8829 
8830   if [ -z "${LN+x}" ]; then
8831     # The variable is not set by user, try to locate tool using the code snippet
8832     for ac_prog in ln
8833 do
8834   # Extract the first word of "$ac_prog", so it can be a program name with args.
8835 set dummy $ac_prog; ac_word=$2
8836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837 $as_echo_n "checking for $ac_word... " >&6; }
8838 if ${ac_cv_path_LN+:} false; then :
8839   $as_echo_n "(cached) " >&6
8840 else
8841   case $LN in
8842   [\\/]* | ?:[\\/]*)
8843   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8844   ;;
8845   *)
8846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847 for as_dir in $PATH
8848 do
8849   IFS=$as_save_IFS
8850   test -z "$as_dir" && as_dir=.
8851     for ac_exec_ext in '' $ac_executable_extensions; do
8852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855     break 2
8856   fi
8857 done
8858   done
8859 IFS=$as_save_IFS
8860 
8861   ;;
8862 esac
8863 fi
8864 LN=$ac_cv_path_LN
8865 if test -n "$LN"; then
8866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8867 $as_echo "$LN" >&6; }
8868 else
8869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870 $as_echo "no" >&6; }
8871 fi
8872 
8873 
8874   test -n "$LN" && break
8875 done
8876 
8877   else
8878     # The variable is set, but is it from the command line or the environment?
8879 
8880     # Try to remove the string !LN! from our list.
8881     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8882     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8883       # If it failed, the variable was not from the command line. Ignore it,
8884       # but warn the user (except for BASH, which is always set by the calling BASH).
8885       if test "xLN" != xBASH; then
8886         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8887 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8888       fi
8889       # Try to locate tool using the code snippet
8890       for ac_prog in ln
8891 do
8892   # Extract the first word of "$ac_prog", so it can be a program name with args.
8893 set dummy $ac_prog; ac_word=$2
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8895 $as_echo_n "checking for $ac_word... " >&6; }
8896 if ${ac_cv_path_LN+:} false; then :
8897   $as_echo_n "(cached) " >&6
8898 else
8899   case $LN in
8900   [\\/]* | ?:[\\/]*)
8901   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8902   ;;
8903   *)
8904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8905 for as_dir in $PATH
8906 do
8907   IFS=$as_save_IFS
8908   test -z "$as_dir" && as_dir=.
8909     for ac_exec_ext in '' $ac_executable_extensions; do
8910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8911     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8913     break 2
8914   fi
8915 done
8916   done
8917 IFS=$as_save_IFS
8918 
8919   ;;
8920 esac
8921 fi
8922 LN=$ac_cv_path_LN
8923 if test -n "$LN"; then
8924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8925 $as_echo "$LN" >&6; }
8926 else
8927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8928 $as_echo "no" >&6; }
8929 fi
8930 
8931 
8932   test -n "$LN" && break
8933 done
8934 
8935     else
8936       # If it succeeded, then it was overridden by the user. We will use it
8937       # for the tool.
8938 
8939       # First remove it from the list of overridden variables, so we can test
8940       # for unknown variables in the end.
8941       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8942 
8943       # Check if we try to supply an empty value
8944       if test "x$LN" = x; then
8945         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8946 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8947         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8948 $as_echo_n "checking for LN... " >&6; }
8949         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8950 $as_echo "disabled" >&6; }
8951       else
8952         # Check if the provided tool contains a complete path.
8953         tool_specified="$LN"
8954         tool_basename="${tool_specified##*/}"
8955         if test "x$tool_basename" = "x$tool_specified"; then
8956           # A command without a complete path is provided, search $PATH.
8957           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8958 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8959           # Extract the first word of "$tool_basename", so it can be a program name with args.
8960 set dummy $tool_basename; ac_word=$2
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8962 $as_echo_n "checking for $ac_word... " >&6; }
8963 if ${ac_cv_path_LN+:} false; then :
8964   $as_echo_n "(cached) " >&6
8965 else
8966   case $LN in
8967   [\\/]* | ?:[\\/]*)
8968   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8969   ;;
8970   *)
8971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8972 for as_dir in $PATH
8973 do
8974   IFS=$as_save_IFS
8975   test -z "$as_dir" && as_dir=.
8976     for ac_exec_ext in '' $ac_executable_extensions; do
8977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8978     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8980     break 2
8981   fi
8982 done
8983   done
8984 IFS=$as_save_IFS
8985 
8986   ;;
8987 esac
8988 fi
8989 LN=$ac_cv_path_LN
8990 if test -n "$LN"; then
8991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8992 $as_echo "$LN" >&6; }
8993 else
8994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8995 $as_echo "no" >&6; }
8996 fi
8997 
8998 
8999           if test "x$LN" = x; then
9000             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9001           fi
9002         else
9003           # Otherwise we believe it is a complete path. Use it as it is.
9004           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9005 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9006           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9007 $as_echo_n "checking for LN... " >&6; }
9008           if test ! -x "$tool_specified"; then
9009             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9010 $as_echo "not found" >&6; }
9011             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9012           fi
9013           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9014 $as_echo "$tool_specified" >&6; }
9015         fi
9016       fi
9017     fi
9018 
9019   fi
9020 
9021 
9022 
9023   if test "x$LN" = x; then
9024     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9025   fi
9026 
9027 
9028 
9029 
9030 
9031   # Publish this variable in the help.
9032 
9033 
9034   if [ -z "${LS+x}" ]; then
9035     # The variable is not set by user, try to locate tool using the code snippet
9036     for ac_prog in ls
9037 do
9038   # Extract the first word of "$ac_prog", so it can be a program name with args.
9039 set dummy $ac_prog; ac_word=$2
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041 $as_echo_n "checking for $ac_word... " >&6; }
9042 if ${ac_cv_path_LS+:} false; then :
9043   $as_echo_n "(cached) " >&6
9044 else
9045   case $LS in
9046   [\\/]* | ?:[\\/]*)
9047   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9048   ;;
9049   *)
9050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051 for as_dir in $PATH
9052 do
9053   IFS=$as_save_IFS
9054   test -z "$as_dir" && as_dir=.
9055     for ac_exec_ext in '' $ac_executable_extensions; do
9056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059     break 2
9060   fi
9061 done
9062   done
9063 IFS=$as_save_IFS
9064 
9065   ;;
9066 esac
9067 fi
9068 LS=$ac_cv_path_LS
9069 if test -n "$LS"; then
9070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9071 $as_echo "$LS" >&6; }
9072 else
9073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074 $as_echo "no" >&6; }
9075 fi
9076 
9077 
9078   test -n "$LS" && break
9079 done
9080 
9081   else
9082     # The variable is set, but is it from the command line or the environment?
9083 
9084     # Try to remove the string !LS! from our list.
9085     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9086     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9087       # If it failed, the variable was not from the command line. Ignore it,
9088       # but warn the user (except for BASH, which is always set by the calling BASH).
9089       if test "xLS" != xBASH; then
9090         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9091 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9092       fi
9093       # Try to locate tool using the code snippet
9094       for ac_prog in ls
9095 do
9096   # Extract the first word of "$ac_prog", so it can be a program name with args.
9097 set dummy $ac_prog; ac_word=$2
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9099 $as_echo_n "checking for $ac_word... " >&6; }
9100 if ${ac_cv_path_LS+:} false; then :
9101   $as_echo_n "(cached) " >&6
9102 else
9103   case $LS in
9104   [\\/]* | ?:[\\/]*)
9105   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9106   ;;
9107   *)
9108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9109 for as_dir in $PATH
9110 do
9111   IFS=$as_save_IFS
9112   test -z "$as_dir" && as_dir=.
9113     for ac_exec_ext in '' $ac_executable_extensions; do
9114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9115     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9117     break 2
9118   fi
9119 done
9120   done
9121 IFS=$as_save_IFS
9122 
9123   ;;
9124 esac
9125 fi
9126 LS=$ac_cv_path_LS
9127 if test -n "$LS"; then
9128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9129 $as_echo "$LS" >&6; }
9130 else
9131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132 $as_echo "no" >&6; }
9133 fi
9134 
9135 
9136   test -n "$LS" && break
9137 done
9138 
9139     else
9140       # If it succeeded, then it was overridden by the user. We will use it
9141       # for the tool.
9142 
9143       # First remove it from the list of overridden variables, so we can test
9144       # for unknown variables in the end.
9145       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9146 
9147       # Check if we try to supply an empty value
9148       if test "x$LS" = x; then
9149         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9150 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9151         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9152 $as_echo_n "checking for LS... " >&6; }
9153         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9154 $as_echo "disabled" >&6; }
9155       else
9156         # Check if the provided tool contains a complete path.
9157         tool_specified="$LS"
9158         tool_basename="${tool_specified##*/}"
9159         if test "x$tool_basename" = "x$tool_specified"; then
9160           # A command without a complete path is provided, search $PATH.
9161           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9162 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9163           # Extract the first word of "$tool_basename", so it can be a program name with args.
9164 set dummy $tool_basename; ac_word=$2
9165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9166 $as_echo_n "checking for $ac_word... " >&6; }
9167 if ${ac_cv_path_LS+:} false; then :
9168   $as_echo_n "(cached) " >&6
9169 else
9170   case $LS in
9171   [\\/]* | ?:[\\/]*)
9172   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9173   ;;
9174   *)
9175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9176 for as_dir in $PATH
9177 do
9178   IFS=$as_save_IFS
9179   test -z "$as_dir" && as_dir=.
9180     for ac_exec_ext in '' $ac_executable_extensions; do
9181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9182     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9184     break 2
9185   fi
9186 done
9187   done
9188 IFS=$as_save_IFS
9189 
9190   ;;
9191 esac
9192 fi
9193 LS=$ac_cv_path_LS
9194 if test -n "$LS"; then
9195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9196 $as_echo "$LS" >&6; }
9197 else
9198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9199 $as_echo "no" >&6; }
9200 fi
9201 
9202 
9203           if test "x$LS" = x; then
9204             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9205           fi
9206         else
9207           # Otherwise we believe it is a complete path. Use it as it is.
9208           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9209 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9210           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9211 $as_echo_n "checking for LS... " >&6; }
9212           if test ! -x "$tool_specified"; then
9213             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9214 $as_echo "not found" >&6; }
9215             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9216           fi
9217           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9218 $as_echo "$tool_specified" >&6; }
9219         fi
9220       fi
9221     fi
9222 
9223   fi
9224 
9225 
9226 
9227   if test "x$LS" = x; then
9228     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9229   fi
9230 
9231 
9232 
9233 
9234 
9235   # Publish this variable in the help.
9236 
9237 
9238   if [ -z "${MKDIR+x}" ]; then
9239     # The variable is not set by user, try to locate tool using the code snippet
9240     for ac_prog in mkdir
9241 do
9242   # Extract the first word of "$ac_prog", so it can be a program name with args.
9243 set dummy $ac_prog; ac_word=$2
9244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245 $as_echo_n "checking for $ac_word... " >&6; }
9246 if ${ac_cv_path_MKDIR+:} false; then :
9247   $as_echo_n "(cached) " >&6
9248 else
9249   case $MKDIR in
9250   [\\/]* | ?:[\\/]*)
9251   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9252   ;;
9253   *)
9254   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9255 for as_dir in $PATH
9256 do
9257   IFS=$as_save_IFS
9258   test -z "$as_dir" && as_dir=.
9259     for ac_exec_ext in '' $ac_executable_extensions; do
9260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9261     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9263     break 2
9264   fi
9265 done
9266   done
9267 IFS=$as_save_IFS
9268 
9269   ;;
9270 esac
9271 fi
9272 MKDIR=$ac_cv_path_MKDIR
9273 if test -n "$MKDIR"; then
9274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9275 $as_echo "$MKDIR" >&6; }
9276 else
9277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278 $as_echo "no" >&6; }
9279 fi
9280 
9281 
9282   test -n "$MKDIR" && break
9283 done
9284 
9285   else
9286     # The variable is set, but is it from the command line or the environment?
9287 
9288     # Try to remove the string !MKDIR! from our list.
9289     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9290     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9291       # If it failed, the variable was not from the command line. Ignore it,
9292       # but warn the user (except for BASH, which is always set by the calling BASH).
9293       if test "xMKDIR" != xBASH; then
9294         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9295 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9296       fi
9297       # Try to locate tool using the code snippet
9298       for ac_prog in mkdir
9299 do
9300   # Extract the first word of "$ac_prog", so it can be a program name with args.
9301 set dummy $ac_prog; ac_word=$2
9302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9303 $as_echo_n "checking for $ac_word... " >&6; }
9304 if ${ac_cv_path_MKDIR+:} false; then :
9305   $as_echo_n "(cached) " >&6
9306 else
9307   case $MKDIR in
9308   [\\/]* | ?:[\\/]*)
9309   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9310   ;;
9311   *)
9312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9313 for as_dir in $PATH
9314 do
9315   IFS=$as_save_IFS
9316   test -z "$as_dir" && as_dir=.
9317     for ac_exec_ext in '' $ac_executable_extensions; do
9318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9319     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9321     break 2
9322   fi
9323 done
9324   done
9325 IFS=$as_save_IFS
9326 
9327   ;;
9328 esac
9329 fi
9330 MKDIR=$ac_cv_path_MKDIR
9331 if test -n "$MKDIR"; then
9332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9333 $as_echo "$MKDIR" >&6; }
9334 else
9335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9336 $as_echo "no" >&6; }
9337 fi
9338 
9339 
9340   test -n "$MKDIR" && break
9341 done
9342 
9343     else
9344       # If it succeeded, then it was overridden by the user. We will use it
9345       # for the tool.
9346 
9347       # First remove it from the list of overridden variables, so we can test
9348       # for unknown variables in the end.
9349       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9350 
9351       # Check if we try to supply an empty value
9352       if test "x$MKDIR" = x; then
9353         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9354 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9355         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9356 $as_echo_n "checking for MKDIR... " >&6; }
9357         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9358 $as_echo "disabled" >&6; }
9359       else
9360         # Check if the provided tool contains a complete path.
9361         tool_specified="$MKDIR"
9362         tool_basename="${tool_specified##*/}"
9363         if test "x$tool_basename" = "x$tool_specified"; then
9364           # A command without a complete path is provided, search $PATH.
9365           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9366 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9367           # Extract the first word of "$tool_basename", so it can be a program name with args.
9368 set dummy $tool_basename; ac_word=$2
9369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9370 $as_echo_n "checking for $ac_word... " >&6; }
9371 if ${ac_cv_path_MKDIR+:} false; then :
9372   $as_echo_n "(cached) " >&6
9373 else
9374   case $MKDIR in
9375   [\\/]* | ?:[\\/]*)
9376   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9377   ;;
9378   *)
9379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9380 for as_dir in $PATH
9381 do
9382   IFS=$as_save_IFS
9383   test -z "$as_dir" && as_dir=.
9384     for ac_exec_ext in '' $ac_executable_extensions; do
9385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9386     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9388     break 2
9389   fi
9390 done
9391   done
9392 IFS=$as_save_IFS
9393 
9394   ;;
9395 esac
9396 fi
9397 MKDIR=$ac_cv_path_MKDIR
9398 if test -n "$MKDIR"; then
9399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9400 $as_echo "$MKDIR" >&6; }
9401 else
9402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403 $as_echo "no" >&6; }
9404 fi
9405 
9406 
9407           if test "x$MKDIR" = x; then
9408             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9409           fi
9410         else
9411           # Otherwise we believe it is a complete path. Use it as it is.
9412           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9413 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9414           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9415 $as_echo_n "checking for MKDIR... " >&6; }
9416           if test ! -x "$tool_specified"; then
9417             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9418 $as_echo "not found" >&6; }
9419             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9420           fi
9421           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9422 $as_echo "$tool_specified" >&6; }
9423         fi
9424       fi
9425     fi
9426 
9427   fi
9428 
9429 
9430 
9431   if test "x$MKDIR" = x; then
9432     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9433   fi
9434 
9435 
9436 
9437 
9438 
9439   # Publish this variable in the help.
9440 
9441 
9442   if [ -z "${MKTEMP+x}" ]; then
9443     # The variable is not set by user, try to locate tool using the code snippet
9444     for ac_prog in mktemp
9445 do
9446   # Extract the first word of "$ac_prog", so it can be a program name with args.
9447 set dummy $ac_prog; ac_word=$2
9448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449 $as_echo_n "checking for $ac_word... " >&6; }
9450 if ${ac_cv_path_MKTEMP+:} false; then :
9451   $as_echo_n "(cached) " >&6
9452 else
9453   case $MKTEMP in
9454   [\\/]* | ?:[\\/]*)
9455   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9456   ;;
9457   *)
9458   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459 for as_dir in $PATH
9460 do
9461   IFS=$as_save_IFS
9462   test -z "$as_dir" && as_dir=.
9463     for ac_exec_ext in '' $ac_executable_extensions; do
9464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467     break 2
9468   fi
9469 done
9470   done
9471 IFS=$as_save_IFS
9472 
9473   ;;
9474 esac
9475 fi
9476 MKTEMP=$ac_cv_path_MKTEMP
9477 if test -n "$MKTEMP"; then
9478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9479 $as_echo "$MKTEMP" >&6; }
9480 else
9481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482 $as_echo "no" >&6; }
9483 fi
9484 
9485 
9486   test -n "$MKTEMP" && break
9487 done
9488 
9489   else
9490     # The variable is set, but is it from the command line or the environment?
9491 
9492     # Try to remove the string !MKTEMP! from our list.
9493     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9494     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9495       # If it failed, the variable was not from the command line. Ignore it,
9496       # but warn the user (except for BASH, which is always set by the calling BASH).
9497       if test "xMKTEMP" != xBASH; then
9498         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9499 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9500       fi
9501       # Try to locate tool using the code snippet
9502       for ac_prog in mktemp
9503 do
9504   # Extract the first word of "$ac_prog", so it can be a program name with args.
9505 set dummy $ac_prog; ac_word=$2
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507 $as_echo_n "checking for $ac_word... " >&6; }
9508 if ${ac_cv_path_MKTEMP+:} false; then :
9509   $as_echo_n "(cached) " >&6
9510 else
9511   case $MKTEMP in
9512   [\\/]* | ?:[\\/]*)
9513   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9514   ;;
9515   *)
9516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9517 for as_dir in $PATH
9518 do
9519   IFS=$as_save_IFS
9520   test -z "$as_dir" && as_dir=.
9521     for ac_exec_ext in '' $ac_executable_extensions; do
9522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9523     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9525     break 2
9526   fi
9527 done
9528   done
9529 IFS=$as_save_IFS
9530 
9531   ;;
9532 esac
9533 fi
9534 MKTEMP=$ac_cv_path_MKTEMP
9535 if test -n "$MKTEMP"; then
9536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9537 $as_echo "$MKTEMP" >&6; }
9538 else
9539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540 $as_echo "no" >&6; }
9541 fi
9542 
9543 
9544   test -n "$MKTEMP" && break
9545 done
9546 
9547     else
9548       # If it succeeded, then it was overridden by the user. We will use it
9549       # for the tool.
9550 
9551       # First remove it from the list of overridden variables, so we can test
9552       # for unknown variables in the end.
9553       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9554 
9555       # Check if we try to supply an empty value
9556       if test "x$MKTEMP" = x; then
9557         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9558 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9559         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9560 $as_echo_n "checking for MKTEMP... " >&6; }
9561         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9562 $as_echo "disabled" >&6; }
9563       else
9564         # Check if the provided tool contains a complete path.
9565         tool_specified="$MKTEMP"
9566         tool_basename="${tool_specified##*/}"
9567         if test "x$tool_basename" = "x$tool_specified"; then
9568           # A command without a complete path is provided, search $PATH.
9569           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9570 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9571           # Extract the first word of "$tool_basename", so it can be a program name with args.
9572 set dummy $tool_basename; ac_word=$2
9573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9574 $as_echo_n "checking for $ac_word... " >&6; }
9575 if ${ac_cv_path_MKTEMP+:} false; then :
9576   $as_echo_n "(cached) " >&6
9577 else
9578   case $MKTEMP in
9579   [\\/]* | ?:[\\/]*)
9580   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9581   ;;
9582   *)
9583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9584 for as_dir in $PATH
9585 do
9586   IFS=$as_save_IFS
9587   test -z "$as_dir" && as_dir=.
9588     for ac_exec_ext in '' $ac_executable_extensions; do
9589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9590     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9592     break 2
9593   fi
9594 done
9595   done
9596 IFS=$as_save_IFS
9597 
9598   ;;
9599 esac
9600 fi
9601 MKTEMP=$ac_cv_path_MKTEMP
9602 if test -n "$MKTEMP"; then
9603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9604 $as_echo "$MKTEMP" >&6; }
9605 else
9606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607 $as_echo "no" >&6; }
9608 fi
9609 
9610 
9611           if test "x$MKTEMP" = x; then
9612             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9613           fi
9614         else
9615           # Otherwise we believe it is a complete path. Use it as it is.
9616           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9617 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9618           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9619 $as_echo_n "checking for MKTEMP... " >&6; }
9620           if test ! -x "$tool_specified"; then
9621             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9622 $as_echo "not found" >&6; }
9623             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9624           fi
9625           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9626 $as_echo "$tool_specified" >&6; }
9627         fi
9628       fi
9629     fi
9630 
9631   fi
9632 
9633 
9634 
9635   if test "x$MKTEMP" = x; then
9636     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9637   fi
9638 
9639 
9640 
9641 
9642 
9643   # Publish this variable in the help.
9644 
9645 
9646   if [ -z "${MV+x}" ]; then
9647     # The variable is not set by user, try to locate tool using the code snippet
9648     for ac_prog in mv
9649 do
9650   # Extract the first word of "$ac_prog", so it can be a program name with args.
9651 set dummy $ac_prog; ac_word=$2
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9653 $as_echo_n "checking for $ac_word... " >&6; }
9654 if ${ac_cv_path_MV+:} false; then :
9655   $as_echo_n "(cached) " >&6
9656 else
9657   case $MV in
9658   [\\/]* | ?:[\\/]*)
9659   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9660   ;;
9661   *)
9662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9663 for as_dir in $PATH
9664 do
9665   IFS=$as_save_IFS
9666   test -z "$as_dir" && as_dir=.
9667     for ac_exec_ext in '' $ac_executable_extensions; do
9668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9669     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9671     break 2
9672   fi
9673 done
9674   done
9675 IFS=$as_save_IFS
9676 
9677   ;;
9678 esac
9679 fi
9680 MV=$ac_cv_path_MV
9681 if test -n "$MV"; then
9682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9683 $as_echo "$MV" >&6; }
9684 else
9685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686 $as_echo "no" >&6; }
9687 fi
9688 
9689 
9690   test -n "$MV" && break
9691 done
9692 
9693   else
9694     # The variable is set, but is it from the command line or the environment?
9695 
9696     # Try to remove the string !MV! from our list.
9697     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9698     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9699       # If it failed, the variable was not from the command line. Ignore it,
9700       # but warn the user (except for BASH, which is always set by the calling BASH).
9701       if test "xMV" != xBASH; then
9702         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9703 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9704       fi
9705       # Try to locate tool using the code snippet
9706       for ac_prog in mv
9707 do
9708   # Extract the first word of "$ac_prog", so it can be a program name with args.
9709 set dummy $ac_prog; ac_word=$2
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9711 $as_echo_n "checking for $ac_word... " >&6; }
9712 if ${ac_cv_path_MV+:} false; then :
9713   $as_echo_n "(cached) " >&6
9714 else
9715   case $MV in
9716   [\\/]* | ?:[\\/]*)
9717   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9718   ;;
9719   *)
9720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9721 for as_dir in $PATH
9722 do
9723   IFS=$as_save_IFS
9724   test -z "$as_dir" && as_dir=.
9725     for ac_exec_ext in '' $ac_executable_extensions; do
9726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9727     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9729     break 2
9730   fi
9731 done
9732   done
9733 IFS=$as_save_IFS
9734 
9735   ;;
9736 esac
9737 fi
9738 MV=$ac_cv_path_MV
9739 if test -n "$MV"; then
9740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9741 $as_echo "$MV" >&6; }
9742 else
9743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744 $as_echo "no" >&6; }
9745 fi
9746 
9747 
9748   test -n "$MV" && break
9749 done
9750 
9751     else
9752       # If it succeeded, then it was overridden by the user. We will use it
9753       # for the tool.
9754 
9755       # First remove it from the list of overridden variables, so we can test
9756       # for unknown variables in the end.
9757       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9758 
9759       # Check if we try to supply an empty value
9760       if test "x$MV" = x; then
9761         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9762 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9763         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9764 $as_echo_n "checking for MV... " >&6; }
9765         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9766 $as_echo "disabled" >&6; }
9767       else
9768         # Check if the provided tool contains a complete path.
9769         tool_specified="$MV"
9770         tool_basename="${tool_specified##*/}"
9771         if test "x$tool_basename" = "x$tool_specified"; then
9772           # A command without a complete path is provided, search $PATH.
9773           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9774 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9775           # Extract the first word of "$tool_basename", so it can be a program name with args.
9776 set dummy $tool_basename; ac_word=$2
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9778 $as_echo_n "checking for $ac_word... " >&6; }
9779 if ${ac_cv_path_MV+:} false; then :
9780   $as_echo_n "(cached) " >&6
9781 else
9782   case $MV in
9783   [\\/]* | ?:[\\/]*)
9784   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9785   ;;
9786   *)
9787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9788 for as_dir in $PATH
9789 do
9790   IFS=$as_save_IFS
9791   test -z "$as_dir" && as_dir=.
9792     for ac_exec_ext in '' $ac_executable_extensions; do
9793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9794     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9796     break 2
9797   fi
9798 done
9799   done
9800 IFS=$as_save_IFS
9801 
9802   ;;
9803 esac
9804 fi
9805 MV=$ac_cv_path_MV
9806 if test -n "$MV"; then
9807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9808 $as_echo "$MV" >&6; }
9809 else
9810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811 $as_echo "no" >&6; }
9812 fi
9813 
9814 
9815           if test "x$MV" = x; then
9816             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9817           fi
9818         else
9819           # Otherwise we believe it is a complete path. Use it as it is.
9820           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9821 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9822           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9823 $as_echo_n "checking for MV... " >&6; }
9824           if test ! -x "$tool_specified"; then
9825             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9826 $as_echo "not found" >&6; }
9827             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9828           fi
9829           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9830 $as_echo "$tool_specified" >&6; }
9831         fi
9832       fi
9833     fi
9834 
9835   fi
9836 
9837 
9838 
9839   if test "x$MV" = x; then
9840     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9841   fi
9842 
9843 
9844 
9845 
9846 
9847   # Publish this variable in the help.
9848 
9849 
9850   if [ -z "${NAWK+x}" ]; then
9851     # The variable is not set by user, try to locate tool using the code snippet
9852     for ac_prog in nawk gawk awk
9853 do
9854   # Extract the first word of "$ac_prog", so it can be a program name with args.
9855 set dummy $ac_prog; ac_word=$2
9856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9857 $as_echo_n "checking for $ac_word... " >&6; }
9858 if ${ac_cv_path_NAWK+:} false; then :
9859   $as_echo_n "(cached) " >&6
9860 else
9861   case $NAWK in
9862   [\\/]* | ?:[\\/]*)
9863   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9864   ;;
9865   *)
9866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867 for as_dir in $PATH
9868 do
9869   IFS=$as_save_IFS
9870   test -z "$as_dir" && as_dir=.
9871     for ac_exec_ext in '' $ac_executable_extensions; do
9872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875     break 2
9876   fi
9877 done
9878   done
9879 IFS=$as_save_IFS
9880 
9881   ;;
9882 esac
9883 fi
9884 NAWK=$ac_cv_path_NAWK
9885 if test -n "$NAWK"; then
9886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9887 $as_echo "$NAWK" >&6; }
9888 else
9889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890 $as_echo "no" >&6; }
9891 fi
9892 
9893 
9894   test -n "$NAWK" && break
9895 done
9896 
9897   else
9898     # The variable is set, but is it from the command line or the environment?
9899 
9900     # Try to remove the string !NAWK! from our list.
9901     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9902     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9903       # If it failed, the variable was not from the command line. Ignore it,
9904       # but warn the user (except for BASH, which is always set by the calling BASH).
9905       if test "xNAWK" != xBASH; then
9906         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9907 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9908       fi
9909       # Try to locate tool using the code snippet
9910       for ac_prog in nawk gawk awk
9911 do
9912   # Extract the first word of "$ac_prog", so it can be a program name with args.
9913 set dummy $ac_prog; ac_word=$2
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9915 $as_echo_n "checking for $ac_word... " >&6; }
9916 if ${ac_cv_path_NAWK+:} false; then :
9917   $as_echo_n "(cached) " >&6
9918 else
9919   case $NAWK in
9920   [\\/]* | ?:[\\/]*)
9921   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9922   ;;
9923   *)
9924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9925 for as_dir in $PATH
9926 do
9927   IFS=$as_save_IFS
9928   test -z "$as_dir" && as_dir=.
9929     for ac_exec_ext in '' $ac_executable_extensions; do
9930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9931     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9933     break 2
9934   fi
9935 done
9936   done
9937 IFS=$as_save_IFS
9938 
9939   ;;
9940 esac
9941 fi
9942 NAWK=$ac_cv_path_NAWK
9943 if test -n "$NAWK"; then
9944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9945 $as_echo "$NAWK" >&6; }
9946 else
9947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9948 $as_echo "no" >&6; }
9949 fi
9950 
9951 
9952   test -n "$NAWK" && break
9953 done
9954 
9955     else
9956       # If it succeeded, then it was overridden by the user. We will use it
9957       # for the tool.
9958 
9959       # First remove it from the list of overridden variables, so we can test
9960       # for unknown variables in the end.
9961       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9962 
9963       # Check if we try to supply an empty value
9964       if test "x$NAWK" = x; then
9965         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9966 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9967         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9968 $as_echo_n "checking for NAWK... " >&6; }
9969         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9970 $as_echo "disabled" >&6; }
9971       else
9972         # Check if the provided tool contains a complete path.
9973         tool_specified="$NAWK"
9974         tool_basename="${tool_specified##*/}"
9975         if test "x$tool_basename" = "x$tool_specified"; then
9976           # A command without a complete path is provided, search $PATH.
9977           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9978 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9979           # Extract the first word of "$tool_basename", so it can be a program name with args.
9980 set dummy $tool_basename; ac_word=$2
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9982 $as_echo_n "checking for $ac_word... " >&6; }
9983 if ${ac_cv_path_NAWK+:} false; then :
9984   $as_echo_n "(cached) " >&6
9985 else
9986   case $NAWK in
9987   [\\/]* | ?:[\\/]*)
9988   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9989   ;;
9990   *)
9991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9992 for as_dir in $PATH
9993 do
9994   IFS=$as_save_IFS
9995   test -z "$as_dir" && as_dir=.
9996     for ac_exec_ext in '' $ac_executable_extensions; do
9997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9998     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10000     break 2
10001   fi
10002 done
10003   done
10004 IFS=$as_save_IFS
10005 
10006   ;;
10007 esac
10008 fi
10009 NAWK=$ac_cv_path_NAWK
10010 if test -n "$NAWK"; then
10011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10012 $as_echo "$NAWK" >&6; }
10013 else
10014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10015 $as_echo "no" >&6; }
10016 fi
10017 
10018 
10019           if test "x$NAWK" = x; then
10020             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10021           fi
10022         else
10023           # Otherwise we believe it is a complete path. Use it as it is.
10024           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10025 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10026           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10027 $as_echo_n "checking for NAWK... " >&6; }
10028           if test ! -x "$tool_specified"; then
10029             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10030 $as_echo "not found" >&6; }
10031             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10032           fi
10033           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10034 $as_echo "$tool_specified" >&6; }
10035         fi
10036       fi
10037     fi
10038 
10039   fi
10040 
10041 
10042 
10043   if test "x$NAWK" = x; then
10044     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10045   fi
10046 
10047 
10048 
10049 
10050 
10051   # Publish this variable in the help.
10052 
10053 
10054   if [ -z "${PRINTF+x}" ]; then
10055     # The variable is not set by user, try to locate tool using the code snippet
10056     for ac_prog in printf
10057 do
10058   # Extract the first word of "$ac_prog", so it can be a program name with args.
10059 set dummy $ac_prog; ac_word=$2
10060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061 $as_echo_n "checking for $ac_word... " >&6; }
10062 if ${ac_cv_path_PRINTF+:} false; then :
10063   $as_echo_n "(cached) " >&6
10064 else
10065   case $PRINTF in
10066   [\\/]* | ?:[\\/]*)
10067   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10068   ;;
10069   *)
10070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071 for as_dir in $PATH
10072 do
10073   IFS=$as_save_IFS
10074   test -z "$as_dir" && as_dir=.
10075     for ac_exec_ext in '' $ac_executable_extensions; do
10076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10077     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079     break 2
10080   fi
10081 done
10082   done
10083 IFS=$as_save_IFS
10084 
10085   ;;
10086 esac
10087 fi
10088 PRINTF=$ac_cv_path_PRINTF
10089 if test -n "$PRINTF"; then
10090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10091 $as_echo "$PRINTF" >&6; }
10092 else
10093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094 $as_echo "no" >&6; }
10095 fi
10096 
10097 
10098   test -n "$PRINTF" && break
10099 done
10100 
10101   else
10102     # The variable is set, but is it from the command line or the environment?
10103 
10104     # Try to remove the string !PRINTF! from our list.
10105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10107       # If it failed, the variable was not from the command line. Ignore it,
10108       # but warn the user (except for BASH, which is always set by the calling BASH).
10109       if test "xPRINTF" != xBASH; then
10110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10111 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10112       fi
10113       # Try to locate tool using the code snippet
10114       for ac_prog in printf
10115 do
10116   # Extract the first word of "$ac_prog", so it can be a program name with args.
10117 set dummy $ac_prog; ac_word=$2
10118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10119 $as_echo_n "checking for $ac_word... " >&6; }
10120 if ${ac_cv_path_PRINTF+:} false; then :
10121   $as_echo_n "(cached) " >&6
10122 else
10123   case $PRINTF in
10124   [\\/]* | ?:[\\/]*)
10125   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10126   ;;
10127   *)
10128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10129 for as_dir in $PATH
10130 do
10131   IFS=$as_save_IFS
10132   test -z "$as_dir" && as_dir=.
10133     for ac_exec_ext in '' $ac_executable_extensions; do
10134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10135     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10137     break 2
10138   fi
10139 done
10140   done
10141 IFS=$as_save_IFS
10142 
10143   ;;
10144 esac
10145 fi
10146 PRINTF=$ac_cv_path_PRINTF
10147 if test -n "$PRINTF"; then
10148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10149 $as_echo "$PRINTF" >&6; }
10150 else
10151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10152 $as_echo "no" >&6; }
10153 fi
10154 
10155 
10156   test -n "$PRINTF" && break
10157 done
10158 
10159     else
10160       # If it succeeded, then it was overridden by the user. We will use it
10161       # for the tool.
10162 
10163       # First remove it from the list of overridden variables, so we can test
10164       # for unknown variables in the end.
10165       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10166 
10167       # Check if we try to supply an empty value
10168       if test "x$PRINTF" = x; then
10169         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10170 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10171         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10172 $as_echo_n "checking for PRINTF... " >&6; }
10173         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10174 $as_echo "disabled" >&6; }
10175       else
10176         # Check if the provided tool contains a complete path.
10177         tool_specified="$PRINTF"
10178         tool_basename="${tool_specified##*/}"
10179         if test "x$tool_basename" = "x$tool_specified"; then
10180           # A command without a complete path is provided, search $PATH.
10181           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10182 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10183           # Extract the first word of "$tool_basename", so it can be a program name with args.
10184 set dummy $tool_basename; ac_word=$2
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10186 $as_echo_n "checking for $ac_word... " >&6; }
10187 if ${ac_cv_path_PRINTF+:} false; then :
10188   $as_echo_n "(cached) " >&6
10189 else
10190   case $PRINTF in
10191   [\\/]* | ?:[\\/]*)
10192   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10193   ;;
10194   *)
10195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10196 for as_dir in $PATH
10197 do
10198   IFS=$as_save_IFS
10199   test -z "$as_dir" && as_dir=.
10200     for ac_exec_ext in '' $ac_executable_extensions; do
10201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10202     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10204     break 2
10205   fi
10206 done
10207   done
10208 IFS=$as_save_IFS
10209 
10210   ;;
10211 esac
10212 fi
10213 PRINTF=$ac_cv_path_PRINTF
10214 if test -n "$PRINTF"; then
10215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10216 $as_echo "$PRINTF" >&6; }
10217 else
10218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10219 $as_echo "no" >&6; }
10220 fi
10221 
10222 
10223           if test "x$PRINTF" = x; then
10224             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10225           fi
10226         else
10227           # Otherwise we believe it is a complete path. Use it as it is.
10228           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10229 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10230           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10231 $as_echo_n "checking for PRINTF... " >&6; }
10232           if test ! -x "$tool_specified"; then
10233             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10234 $as_echo "not found" >&6; }
10235             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10236           fi
10237           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10238 $as_echo "$tool_specified" >&6; }
10239         fi
10240       fi
10241     fi
10242 
10243   fi
10244 
10245 
10246 
10247   if test "x$PRINTF" = x; then
10248     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10249   fi
10250 
10251 
10252 
10253 
10254 
10255   # Publish this variable in the help.
10256 
10257 
10258   if [ -z "${RM+x}" ]; then
10259     # The variable is not set by user, try to locate tool using the code snippet
10260     for ac_prog in rm
10261 do
10262   # Extract the first word of "$ac_prog", so it can be a program name with args.
10263 set dummy $ac_prog; ac_word=$2
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265 $as_echo_n "checking for $ac_word... " >&6; }
10266 if ${ac_cv_path_RM+:} false; then :
10267   $as_echo_n "(cached) " >&6
10268 else
10269   case $RM in
10270   [\\/]* | ?:[\\/]*)
10271   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10272   ;;
10273   *)
10274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275 for as_dir in $PATH
10276 do
10277   IFS=$as_save_IFS
10278   test -z "$as_dir" && as_dir=.
10279     for ac_exec_ext in '' $ac_executable_extensions; do
10280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283     break 2
10284   fi
10285 done
10286   done
10287 IFS=$as_save_IFS
10288 
10289   ;;
10290 esac
10291 fi
10292 RM=$ac_cv_path_RM
10293 if test -n "$RM"; then
10294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10295 $as_echo "$RM" >&6; }
10296 else
10297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298 $as_echo "no" >&6; }
10299 fi
10300 
10301 
10302   test -n "$RM" && break
10303 done
10304 
10305   else
10306     # The variable is set, but is it from the command line or the environment?
10307 
10308     # Try to remove the string !RM! from our list.
10309     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10310     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10311       # If it failed, the variable was not from the command line. Ignore it,
10312       # but warn the user (except for BASH, which is always set by the calling BASH).
10313       if test "xRM" != xBASH; then
10314         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10315 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10316       fi
10317       # Try to locate tool using the code snippet
10318       for ac_prog in rm
10319 do
10320   # Extract the first word of "$ac_prog", so it can be a program name with args.
10321 set dummy $ac_prog; ac_word=$2
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10323 $as_echo_n "checking for $ac_word... " >&6; }
10324 if ${ac_cv_path_RM+:} false; then :
10325   $as_echo_n "(cached) " >&6
10326 else
10327   case $RM in
10328   [\\/]* | ?:[\\/]*)
10329   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10330   ;;
10331   *)
10332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10333 for as_dir in $PATH
10334 do
10335   IFS=$as_save_IFS
10336   test -z "$as_dir" && as_dir=.
10337     for ac_exec_ext in '' $ac_executable_extensions; do
10338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10339     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10341     break 2
10342   fi
10343 done
10344   done
10345 IFS=$as_save_IFS
10346 
10347   ;;
10348 esac
10349 fi
10350 RM=$ac_cv_path_RM
10351 if test -n "$RM"; then
10352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10353 $as_echo "$RM" >&6; }
10354 else
10355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356 $as_echo "no" >&6; }
10357 fi
10358 
10359 
10360   test -n "$RM" && break
10361 done
10362 
10363     else
10364       # If it succeeded, then it was overridden by the user. We will use it
10365       # for the tool.
10366 
10367       # First remove it from the list of overridden variables, so we can test
10368       # for unknown variables in the end.
10369       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10370 
10371       # Check if we try to supply an empty value
10372       if test "x$RM" = x; then
10373         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10374 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10375         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10376 $as_echo_n "checking for RM... " >&6; }
10377         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10378 $as_echo "disabled" >&6; }
10379       else
10380         # Check if the provided tool contains a complete path.
10381         tool_specified="$RM"
10382         tool_basename="${tool_specified##*/}"
10383         if test "x$tool_basename" = "x$tool_specified"; then
10384           # A command without a complete path is provided, search $PATH.
10385           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10386 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10387           # Extract the first word of "$tool_basename", so it can be a program name with args.
10388 set dummy $tool_basename; ac_word=$2
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10390 $as_echo_n "checking for $ac_word... " >&6; }
10391 if ${ac_cv_path_RM+:} false; then :
10392   $as_echo_n "(cached) " >&6
10393 else
10394   case $RM in
10395   [\\/]* | ?:[\\/]*)
10396   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10397   ;;
10398   *)
10399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10400 for as_dir in $PATH
10401 do
10402   IFS=$as_save_IFS
10403   test -z "$as_dir" && as_dir=.
10404     for ac_exec_ext in '' $ac_executable_extensions; do
10405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10406     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10408     break 2
10409   fi
10410 done
10411   done
10412 IFS=$as_save_IFS
10413 
10414   ;;
10415 esac
10416 fi
10417 RM=$ac_cv_path_RM
10418 if test -n "$RM"; then
10419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10420 $as_echo "$RM" >&6; }
10421 else
10422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10423 $as_echo "no" >&6; }
10424 fi
10425 
10426 
10427           if test "x$RM" = x; then
10428             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10429           fi
10430         else
10431           # Otherwise we believe it is a complete path. Use it as it is.
10432           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10433 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10434           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10435 $as_echo_n "checking for RM... " >&6; }
10436           if test ! -x "$tool_specified"; then
10437             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10438 $as_echo "not found" >&6; }
10439             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10440           fi
10441           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10442 $as_echo "$tool_specified" >&6; }
10443         fi
10444       fi
10445     fi
10446 
10447   fi
10448 
10449 
10450 
10451   if test "x$RM" = x; then
10452     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10453   fi
10454 
10455 
10456 
10457 
10458 
10459   # Publish this variable in the help.
10460 
10461 
10462   if [ -z "${RMDIR+x}" ]; then
10463     # The variable is not set by user, try to locate tool using the code snippet
10464     for ac_prog in rmdir
10465 do
10466   # Extract the first word of "$ac_prog", so it can be a program name with args.
10467 set dummy $ac_prog; ac_word=$2
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10469 $as_echo_n "checking for $ac_word... " >&6; }
10470 if ${ac_cv_path_RMDIR+:} false; then :
10471   $as_echo_n "(cached) " >&6
10472 else
10473   case $RMDIR in
10474   [\\/]* | ?:[\\/]*)
10475   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10476   ;;
10477   *)
10478   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10479 for as_dir in $PATH
10480 do
10481   IFS=$as_save_IFS
10482   test -z "$as_dir" && as_dir=.
10483     for ac_exec_ext in '' $ac_executable_extensions; do
10484   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10485     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10486     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10487     break 2
10488   fi
10489 done
10490   done
10491 IFS=$as_save_IFS
10492 
10493   ;;
10494 esac
10495 fi
10496 RMDIR=$ac_cv_path_RMDIR
10497 if test -n "$RMDIR"; then
10498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10499 $as_echo "$RMDIR" >&6; }
10500 else
10501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502 $as_echo "no" >&6; }
10503 fi
10504 
10505 
10506   test -n "$RMDIR" && break
10507 done
10508 
10509   else
10510     # The variable is set, but is it from the command line or the environment?
10511 
10512     # Try to remove the string !RMDIR! from our list.
10513     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10514     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10515       # If it failed, the variable was not from the command line. Ignore it,
10516       # but warn the user (except for BASH, which is always set by the calling BASH).
10517       if test "xRMDIR" != xBASH; then
10518         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10519 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10520       fi
10521       # Try to locate tool using the code snippet
10522       for ac_prog in rmdir
10523 do
10524   # Extract the first word of "$ac_prog", so it can be a program name with args.
10525 set dummy $ac_prog; ac_word=$2
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10527 $as_echo_n "checking for $ac_word... " >&6; }
10528 if ${ac_cv_path_RMDIR+:} false; then :
10529   $as_echo_n "(cached) " >&6
10530 else
10531   case $RMDIR in
10532   [\\/]* | ?:[\\/]*)
10533   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10534   ;;
10535   *)
10536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10537 for as_dir in $PATH
10538 do
10539   IFS=$as_save_IFS
10540   test -z "$as_dir" && as_dir=.
10541     for ac_exec_ext in '' $ac_executable_extensions; do
10542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10543     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10545     break 2
10546   fi
10547 done
10548   done
10549 IFS=$as_save_IFS
10550 
10551   ;;
10552 esac
10553 fi
10554 RMDIR=$ac_cv_path_RMDIR
10555 if test -n "$RMDIR"; then
10556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10557 $as_echo "$RMDIR" >&6; }
10558 else
10559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560 $as_echo "no" >&6; }
10561 fi
10562 
10563 
10564   test -n "$RMDIR" && break
10565 done
10566 
10567     else
10568       # If it succeeded, then it was overridden by the user. We will use it
10569       # for the tool.
10570 
10571       # First remove it from the list of overridden variables, so we can test
10572       # for unknown variables in the end.
10573       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10574 
10575       # Check if we try to supply an empty value
10576       if test "x$RMDIR" = x; then
10577         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10578 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10579         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10580 $as_echo_n "checking for RMDIR... " >&6; }
10581         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10582 $as_echo "disabled" >&6; }
10583       else
10584         # Check if the provided tool contains a complete path.
10585         tool_specified="$RMDIR"
10586         tool_basename="${tool_specified##*/}"
10587         if test "x$tool_basename" = "x$tool_specified"; then
10588           # A command without a complete path is provided, search $PATH.
10589           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10590 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10591           # Extract the first word of "$tool_basename", so it can be a program name with args.
10592 set dummy $tool_basename; ac_word=$2
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594 $as_echo_n "checking for $ac_word... " >&6; }
10595 if ${ac_cv_path_RMDIR+:} false; then :
10596   $as_echo_n "(cached) " >&6
10597 else
10598   case $RMDIR in
10599   [\\/]* | ?:[\\/]*)
10600   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10601   ;;
10602   *)
10603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10604 for as_dir in $PATH
10605 do
10606   IFS=$as_save_IFS
10607   test -z "$as_dir" && as_dir=.
10608     for ac_exec_ext in '' $ac_executable_extensions; do
10609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10610     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10612     break 2
10613   fi
10614 done
10615   done
10616 IFS=$as_save_IFS
10617 
10618   ;;
10619 esac
10620 fi
10621 RMDIR=$ac_cv_path_RMDIR
10622 if test -n "$RMDIR"; then
10623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10624 $as_echo "$RMDIR" >&6; }
10625 else
10626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627 $as_echo "no" >&6; }
10628 fi
10629 
10630 
10631           if test "x$RMDIR" = x; then
10632             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10633           fi
10634         else
10635           # Otherwise we believe it is a complete path. Use it as it is.
10636           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10637 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10638           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10639 $as_echo_n "checking for RMDIR... " >&6; }
10640           if test ! -x "$tool_specified"; then
10641             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10642 $as_echo "not found" >&6; }
10643             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10644           fi
10645           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10646 $as_echo "$tool_specified" >&6; }
10647         fi
10648       fi
10649     fi
10650 
10651   fi
10652 
10653 
10654 
10655   if test "x$RMDIR" = x; then
10656     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10657   fi
10658 
10659 
10660 
10661 
10662 
10663   # Publish this variable in the help.
10664 
10665 
10666   if [ -z "${SH+x}" ]; then
10667     # The variable is not set by user, try to locate tool using the code snippet
10668     for ac_prog in sh
10669 do
10670   # Extract the first word of "$ac_prog", so it can be a program name with args.
10671 set dummy $ac_prog; ac_word=$2
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673 $as_echo_n "checking for $ac_word... " >&6; }
10674 if ${ac_cv_path_SH+:} false; then :
10675   $as_echo_n "(cached) " >&6
10676 else
10677   case $SH in
10678   [\\/]* | ?:[\\/]*)
10679   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10680   ;;
10681   *)
10682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10683 for as_dir in $PATH
10684 do
10685   IFS=$as_save_IFS
10686   test -z "$as_dir" && as_dir=.
10687     for ac_exec_ext in '' $ac_executable_extensions; do
10688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10689     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10691     break 2
10692   fi
10693 done
10694   done
10695 IFS=$as_save_IFS
10696 
10697   ;;
10698 esac
10699 fi
10700 SH=$ac_cv_path_SH
10701 if test -n "$SH"; then
10702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10703 $as_echo "$SH" >&6; }
10704 else
10705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706 $as_echo "no" >&6; }
10707 fi
10708 
10709 
10710   test -n "$SH" && break
10711 done
10712 
10713   else
10714     # The variable is set, but is it from the command line or the environment?
10715 
10716     # Try to remove the string !SH! from our list.
10717     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10718     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10719       # If it failed, the variable was not from the command line. Ignore it,
10720       # but warn the user (except for BASH, which is always set by the calling BASH).
10721       if test "xSH" != xBASH; then
10722         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10723 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10724       fi
10725       # Try to locate tool using the code snippet
10726       for ac_prog in sh
10727 do
10728   # Extract the first word of "$ac_prog", so it can be a program name with args.
10729 set dummy $ac_prog; ac_word=$2
10730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10731 $as_echo_n "checking for $ac_word... " >&6; }
10732 if ${ac_cv_path_SH+:} false; then :
10733   $as_echo_n "(cached) " >&6
10734 else
10735   case $SH in
10736   [\\/]* | ?:[\\/]*)
10737   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10738   ;;
10739   *)
10740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10741 for as_dir in $PATH
10742 do
10743   IFS=$as_save_IFS
10744   test -z "$as_dir" && as_dir=.
10745     for ac_exec_ext in '' $ac_executable_extensions; do
10746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10747     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10749     break 2
10750   fi
10751 done
10752   done
10753 IFS=$as_save_IFS
10754 
10755   ;;
10756 esac
10757 fi
10758 SH=$ac_cv_path_SH
10759 if test -n "$SH"; then
10760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10761 $as_echo "$SH" >&6; }
10762 else
10763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10764 $as_echo "no" >&6; }
10765 fi
10766 
10767 
10768   test -n "$SH" && break
10769 done
10770 
10771     else
10772       # If it succeeded, then it was overridden by the user. We will use it
10773       # for the tool.
10774 
10775       # First remove it from the list of overridden variables, so we can test
10776       # for unknown variables in the end.
10777       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10778 
10779       # Check if we try to supply an empty value
10780       if test "x$SH" = x; then
10781         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10782 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10783         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10784 $as_echo_n "checking for SH... " >&6; }
10785         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10786 $as_echo "disabled" >&6; }
10787       else
10788         # Check if the provided tool contains a complete path.
10789         tool_specified="$SH"
10790         tool_basename="${tool_specified##*/}"
10791         if test "x$tool_basename" = "x$tool_specified"; then
10792           # A command without a complete path is provided, search $PATH.
10793           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10794 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10795           # Extract the first word of "$tool_basename", so it can be a program name with args.
10796 set dummy $tool_basename; ac_word=$2
10797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10798 $as_echo_n "checking for $ac_word... " >&6; }
10799 if ${ac_cv_path_SH+:} false; then :
10800   $as_echo_n "(cached) " >&6
10801 else
10802   case $SH in
10803   [\\/]* | ?:[\\/]*)
10804   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10805   ;;
10806   *)
10807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10808 for as_dir in $PATH
10809 do
10810   IFS=$as_save_IFS
10811   test -z "$as_dir" && as_dir=.
10812     for ac_exec_ext in '' $ac_executable_extensions; do
10813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10814     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10816     break 2
10817   fi
10818 done
10819   done
10820 IFS=$as_save_IFS
10821 
10822   ;;
10823 esac
10824 fi
10825 SH=$ac_cv_path_SH
10826 if test -n "$SH"; then
10827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10828 $as_echo "$SH" >&6; }
10829 else
10830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10831 $as_echo "no" >&6; }
10832 fi
10833 
10834 
10835           if test "x$SH" = x; then
10836             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10837           fi
10838         else
10839           # Otherwise we believe it is a complete path. Use it as it is.
10840           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10841 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10842           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10843 $as_echo_n "checking for SH... " >&6; }
10844           if test ! -x "$tool_specified"; then
10845             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10846 $as_echo "not found" >&6; }
10847             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10848           fi
10849           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10850 $as_echo "$tool_specified" >&6; }
10851         fi
10852       fi
10853     fi
10854 
10855   fi
10856 
10857 
10858 
10859   if test "x$SH" = x; then
10860     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10861   fi
10862 
10863 
10864 
10865 
10866 
10867   # Publish this variable in the help.
10868 
10869 
10870   if [ -z "${SORT+x}" ]; then
10871     # The variable is not set by user, try to locate tool using the code snippet
10872     for ac_prog in sort
10873 do
10874   # Extract the first word of "$ac_prog", so it can be a program name with args.
10875 set dummy $ac_prog; ac_word=$2
10876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10877 $as_echo_n "checking for $ac_word... " >&6; }
10878 if ${ac_cv_path_SORT+:} false; then :
10879   $as_echo_n "(cached) " >&6
10880 else
10881   case $SORT in
10882   [\\/]* | ?:[\\/]*)
10883   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10884   ;;
10885   *)
10886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10887 for as_dir in $PATH
10888 do
10889   IFS=$as_save_IFS
10890   test -z "$as_dir" && as_dir=.
10891     for ac_exec_ext in '' $ac_executable_extensions; do
10892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10893     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10895     break 2
10896   fi
10897 done
10898   done
10899 IFS=$as_save_IFS
10900 
10901   ;;
10902 esac
10903 fi
10904 SORT=$ac_cv_path_SORT
10905 if test -n "$SORT"; then
10906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10907 $as_echo "$SORT" >&6; }
10908 else
10909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910 $as_echo "no" >&6; }
10911 fi
10912 
10913 
10914   test -n "$SORT" && break
10915 done
10916 
10917   else
10918     # The variable is set, but is it from the command line or the environment?
10919 
10920     # Try to remove the string !SORT! from our list.
10921     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10922     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10923       # If it failed, the variable was not from the command line. Ignore it,
10924       # but warn the user (except for BASH, which is always set by the calling BASH).
10925       if test "xSORT" != xBASH; then
10926         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10927 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10928       fi
10929       # Try to locate tool using the code snippet
10930       for ac_prog in sort
10931 do
10932   # Extract the first word of "$ac_prog", so it can be a program name with args.
10933 set dummy $ac_prog; ac_word=$2
10934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10935 $as_echo_n "checking for $ac_word... " >&6; }
10936 if ${ac_cv_path_SORT+:} false; then :
10937   $as_echo_n "(cached) " >&6
10938 else
10939   case $SORT in
10940   [\\/]* | ?:[\\/]*)
10941   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10942   ;;
10943   *)
10944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10945 for as_dir in $PATH
10946 do
10947   IFS=$as_save_IFS
10948   test -z "$as_dir" && as_dir=.
10949     for ac_exec_ext in '' $ac_executable_extensions; do
10950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10951     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10953     break 2
10954   fi
10955 done
10956   done
10957 IFS=$as_save_IFS
10958 
10959   ;;
10960 esac
10961 fi
10962 SORT=$ac_cv_path_SORT
10963 if test -n "$SORT"; then
10964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10965 $as_echo "$SORT" >&6; }
10966 else
10967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10968 $as_echo "no" >&6; }
10969 fi
10970 
10971 
10972   test -n "$SORT" && break
10973 done
10974 
10975     else
10976       # If it succeeded, then it was overridden by the user. We will use it
10977       # for the tool.
10978 
10979       # First remove it from the list of overridden variables, so we can test
10980       # for unknown variables in the end.
10981       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10982 
10983       # Check if we try to supply an empty value
10984       if test "x$SORT" = x; then
10985         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10986 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10987         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10988 $as_echo_n "checking for SORT... " >&6; }
10989         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10990 $as_echo "disabled" >&6; }
10991       else
10992         # Check if the provided tool contains a complete path.
10993         tool_specified="$SORT"
10994         tool_basename="${tool_specified##*/}"
10995         if test "x$tool_basename" = "x$tool_specified"; then
10996           # A command without a complete path is provided, search $PATH.
10997           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10998 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10999           # Extract the first word of "$tool_basename", so it can be a program name with args.
11000 set dummy $tool_basename; ac_word=$2
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11002 $as_echo_n "checking for $ac_word... " >&6; }
11003 if ${ac_cv_path_SORT+:} false; then :
11004   $as_echo_n "(cached) " >&6
11005 else
11006   case $SORT in
11007   [\\/]* | ?:[\\/]*)
11008   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11009   ;;
11010   *)
11011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11012 for as_dir in $PATH
11013 do
11014   IFS=$as_save_IFS
11015   test -z "$as_dir" && as_dir=.
11016     for ac_exec_ext in '' $ac_executable_extensions; do
11017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11018     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11020     break 2
11021   fi
11022 done
11023   done
11024 IFS=$as_save_IFS
11025 
11026   ;;
11027 esac
11028 fi
11029 SORT=$ac_cv_path_SORT
11030 if test -n "$SORT"; then
11031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11032 $as_echo "$SORT" >&6; }
11033 else
11034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11035 $as_echo "no" >&6; }
11036 fi
11037 
11038 
11039           if test "x$SORT" = x; then
11040             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11041           fi
11042         else
11043           # Otherwise we believe it is a complete path. Use it as it is.
11044           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11045 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11046           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11047 $as_echo_n "checking for SORT... " >&6; }
11048           if test ! -x "$tool_specified"; then
11049             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11050 $as_echo "not found" >&6; }
11051             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11052           fi
11053           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11054 $as_echo "$tool_specified" >&6; }
11055         fi
11056       fi
11057     fi
11058 
11059   fi
11060 
11061 
11062 
11063   if test "x$SORT" = x; then
11064     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11065   fi
11066 
11067 
11068 
11069 
11070 
11071   # Publish this variable in the help.
11072 
11073 
11074   if [ -z "${TAIL+x}" ]; then
11075     # The variable is not set by user, try to locate tool using the code snippet
11076     for ac_prog in tail
11077 do
11078   # Extract the first word of "$ac_prog", so it can be a program name with args.
11079 set dummy $ac_prog; ac_word=$2
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081 $as_echo_n "checking for $ac_word... " >&6; }
11082 if ${ac_cv_path_TAIL+:} false; then :
11083   $as_echo_n "(cached) " >&6
11084 else
11085   case $TAIL in
11086   [\\/]* | ?:[\\/]*)
11087   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11088   ;;
11089   *)
11090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11091 for as_dir in $PATH
11092 do
11093   IFS=$as_save_IFS
11094   test -z "$as_dir" && as_dir=.
11095     for ac_exec_ext in '' $ac_executable_extensions; do
11096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11097     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11099     break 2
11100   fi
11101 done
11102   done
11103 IFS=$as_save_IFS
11104 
11105   ;;
11106 esac
11107 fi
11108 TAIL=$ac_cv_path_TAIL
11109 if test -n "$TAIL"; then
11110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11111 $as_echo "$TAIL" >&6; }
11112 else
11113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114 $as_echo "no" >&6; }
11115 fi
11116 
11117 
11118   test -n "$TAIL" && break
11119 done
11120 
11121   else
11122     # The variable is set, but is it from the command line or the environment?
11123 
11124     # Try to remove the string !TAIL! from our list.
11125     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11126     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11127       # If it failed, the variable was not from the command line. Ignore it,
11128       # but warn the user (except for BASH, which is always set by the calling BASH).
11129       if test "xTAIL" != xBASH; then
11130         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11131 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11132       fi
11133       # Try to locate tool using the code snippet
11134       for ac_prog in tail
11135 do
11136   # Extract the first word of "$ac_prog", so it can be a program name with args.
11137 set dummy $ac_prog; ac_word=$2
11138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11139 $as_echo_n "checking for $ac_word... " >&6; }
11140 if ${ac_cv_path_TAIL+:} false; then :
11141   $as_echo_n "(cached) " >&6
11142 else
11143   case $TAIL in
11144   [\\/]* | ?:[\\/]*)
11145   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11146   ;;
11147   *)
11148   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11149 for as_dir in $PATH
11150 do
11151   IFS=$as_save_IFS
11152   test -z "$as_dir" && as_dir=.
11153     for ac_exec_ext in '' $ac_executable_extensions; do
11154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11155     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11157     break 2
11158   fi
11159 done
11160   done
11161 IFS=$as_save_IFS
11162 
11163   ;;
11164 esac
11165 fi
11166 TAIL=$ac_cv_path_TAIL
11167 if test -n "$TAIL"; then
11168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11169 $as_echo "$TAIL" >&6; }
11170 else
11171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11172 $as_echo "no" >&6; }
11173 fi
11174 
11175 
11176   test -n "$TAIL" && break
11177 done
11178 
11179     else
11180       # If it succeeded, then it was overridden by the user. We will use it
11181       # for the tool.
11182 
11183       # First remove it from the list of overridden variables, so we can test
11184       # for unknown variables in the end.
11185       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11186 
11187       # Check if we try to supply an empty value
11188       if test "x$TAIL" = x; then
11189         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11190 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11191         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11192 $as_echo_n "checking for TAIL... " >&6; }
11193         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11194 $as_echo "disabled" >&6; }
11195       else
11196         # Check if the provided tool contains a complete path.
11197         tool_specified="$TAIL"
11198         tool_basename="${tool_specified##*/}"
11199         if test "x$tool_basename" = "x$tool_specified"; then
11200           # A command without a complete path is provided, search $PATH.
11201           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11202 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11203           # Extract the first word of "$tool_basename", so it can be a program name with args.
11204 set dummy $tool_basename; ac_word=$2
11205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11206 $as_echo_n "checking for $ac_word... " >&6; }
11207 if ${ac_cv_path_TAIL+:} false; then :
11208   $as_echo_n "(cached) " >&6
11209 else
11210   case $TAIL in
11211   [\\/]* | ?:[\\/]*)
11212   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11213   ;;
11214   *)
11215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11216 for as_dir in $PATH
11217 do
11218   IFS=$as_save_IFS
11219   test -z "$as_dir" && as_dir=.
11220     for ac_exec_ext in '' $ac_executable_extensions; do
11221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11222     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11224     break 2
11225   fi
11226 done
11227   done
11228 IFS=$as_save_IFS
11229 
11230   ;;
11231 esac
11232 fi
11233 TAIL=$ac_cv_path_TAIL
11234 if test -n "$TAIL"; then
11235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11236 $as_echo "$TAIL" >&6; }
11237 else
11238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239 $as_echo "no" >&6; }
11240 fi
11241 
11242 
11243           if test "x$TAIL" = x; then
11244             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11245           fi
11246         else
11247           # Otherwise we believe it is a complete path. Use it as it is.
11248           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11249 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11250           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11251 $as_echo_n "checking for TAIL... " >&6; }
11252           if test ! -x "$tool_specified"; then
11253             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11254 $as_echo "not found" >&6; }
11255             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11256           fi
11257           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11258 $as_echo "$tool_specified" >&6; }
11259         fi
11260       fi
11261     fi
11262 
11263   fi
11264 
11265 
11266 
11267   if test "x$TAIL" = x; then
11268     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11269   fi
11270 
11271 
11272 
11273 
11274 
11275   # Publish this variable in the help.
11276 
11277 
11278   if [ -z "${TAR+x}" ]; then
11279     # The variable is not set by user, try to locate tool using the code snippet
11280     for ac_prog in gtar tar
11281 do
11282   # Extract the first word of "$ac_prog", so it can be a program name with args.
11283 set dummy $ac_prog; ac_word=$2
11284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11285 $as_echo_n "checking for $ac_word... " >&6; }
11286 if ${ac_cv_path_TAR+:} false; then :
11287   $as_echo_n "(cached) " >&6
11288 else
11289   case $TAR in
11290   [\\/]* | ?:[\\/]*)
11291   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11292   ;;
11293   *)
11294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11295 for as_dir in $PATH
11296 do
11297   IFS=$as_save_IFS
11298   test -z "$as_dir" && as_dir=.
11299     for ac_exec_ext in '' $ac_executable_extensions; do
11300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11301     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11303     break 2
11304   fi
11305 done
11306   done
11307 IFS=$as_save_IFS
11308 
11309   ;;
11310 esac
11311 fi
11312 TAR=$ac_cv_path_TAR
11313 if test -n "$TAR"; then
11314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11315 $as_echo "$TAR" >&6; }
11316 else
11317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318 $as_echo "no" >&6; }
11319 fi
11320 
11321 
11322   test -n "$TAR" && break
11323 done
11324 
11325   else
11326     # The variable is set, but is it from the command line or the environment?
11327 
11328     # Try to remove the string !TAR! from our list.
11329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11331       # If it failed, the variable was not from the command line. Ignore it,
11332       # but warn the user (except for BASH, which is always set by the calling BASH).
11333       if test "xTAR" != xBASH; then
11334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11335 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11336       fi
11337       # Try to locate tool using the code snippet
11338       for ac_prog in gtar tar
11339 do
11340   # Extract the first word of "$ac_prog", so it can be a program name with args.
11341 set dummy $ac_prog; ac_word=$2
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11343 $as_echo_n "checking for $ac_word... " >&6; }
11344 if ${ac_cv_path_TAR+:} false; then :
11345   $as_echo_n "(cached) " >&6
11346 else
11347   case $TAR in
11348   [\\/]* | ?:[\\/]*)
11349   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11350   ;;
11351   *)
11352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11353 for as_dir in $PATH
11354 do
11355   IFS=$as_save_IFS
11356   test -z "$as_dir" && as_dir=.
11357     for ac_exec_ext in '' $ac_executable_extensions; do
11358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11359     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11361     break 2
11362   fi
11363 done
11364   done
11365 IFS=$as_save_IFS
11366 
11367   ;;
11368 esac
11369 fi
11370 TAR=$ac_cv_path_TAR
11371 if test -n "$TAR"; then
11372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11373 $as_echo "$TAR" >&6; }
11374 else
11375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11376 $as_echo "no" >&6; }
11377 fi
11378 
11379 
11380   test -n "$TAR" && break
11381 done
11382 
11383     else
11384       # If it succeeded, then it was overridden by the user. We will use it
11385       # for the tool.
11386 
11387       # First remove it from the list of overridden variables, so we can test
11388       # for unknown variables in the end.
11389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11390 
11391       # Check if we try to supply an empty value
11392       if test "x$TAR" = x; then
11393         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11394 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11395         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11396 $as_echo_n "checking for TAR... " >&6; }
11397         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11398 $as_echo "disabled" >&6; }
11399       else
11400         # Check if the provided tool contains a complete path.
11401         tool_specified="$TAR"
11402         tool_basename="${tool_specified##*/}"
11403         if test "x$tool_basename" = "x$tool_specified"; then
11404           # A command without a complete path is provided, search $PATH.
11405           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11406 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11407           # Extract the first word of "$tool_basename", so it can be a program name with args.
11408 set dummy $tool_basename; ac_word=$2
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11410 $as_echo_n "checking for $ac_word... " >&6; }
11411 if ${ac_cv_path_TAR+:} false; then :
11412   $as_echo_n "(cached) " >&6
11413 else
11414   case $TAR in
11415   [\\/]* | ?:[\\/]*)
11416   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11417   ;;
11418   *)
11419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11420 for as_dir in $PATH
11421 do
11422   IFS=$as_save_IFS
11423   test -z "$as_dir" && as_dir=.
11424     for ac_exec_ext in '' $ac_executable_extensions; do
11425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11426     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11428     break 2
11429   fi
11430 done
11431   done
11432 IFS=$as_save_IFS
11433 
11434   ;;
11435 esac
11436 fi
11437 TAR=$ac_cv_path_TAR
11438 if test -n "$TAR"; then
11439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11440 $as_echo "$TAR" >&6; }
11441 else
11442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11443 $as_echo "no" >&6; }
11444 fi
11445 
11446 
11447           if test "x$TAR" = x; then
11448             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11449           fi
11450         else
11451           # Otherwise we believe it is a complete path. Use it as it is.
11452           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11453 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11454           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11455 $as_echo_n "checking for TAR... " >&6; }
11456           if test ! -x "$tool_specified"; then
11457             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11458 $as_echo "not found" >&6; }
11459             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11460           fi
11461           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11462 $as_echo "$tool_specified" >&6; }
11463         fi
11464       fi
11465     fi
11466 
11467   fi
11468 
11469 
11470 
11471   if test "x$TAR" = x; then
11472     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11473   fi
11474 
11475 
11476 
11477 
11478 
11479   # Publish this variable in the help.
11480 
11481 
11482   if [ -z "${TEE+x}" ]; then
11483     # The variable is not set by user, try to locate tool using the code snippet
11484     for ac_prog in tee
11485 do
11486   # Extract the first word of "$ac_prog", so it can be a program name with args.
11487 set dummy $ac_prog; ac_word=$2
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489 $as_echo_n "checking for $ac_word... " >&6; }
11490 if ${ac_cv_path_TEE+:} false; then :
11491   $as_echo_n "(cached) " >&6
11492 else
11493   case $TEE in
11494   [\\/]* | ?:[\\/]*)
11495   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11496   ;;
11497   *)
11498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499 for as_dir in $PATH
11500 do
11501   IFS=$as_save_IFS
11502   test -z "$as_dir" && as_dir=.
11503     for ac_exec_ext in '' $ac_executable_extensions; do
11504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507     break 2
11508   fi
11509 done
11510   done
11511 IFS=$as_save_IFS
11512 
11513   ;;
11514 esac
11515 fi
11516 TEE=$ac_cv_path_TEE
11517 if test -n "$TEE"; then
11518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11519 $as_echo "$TEE" >&6; }
11520 else
11521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522 $as_echo "no" >&6; }
11523 fi
11524 
11525 
11526   test -n "$TEE" && break
11527 done
11528 
11529   else
11530     # The variable is set, but is it from the command line or the environment?
11531 
11532     # Try to remove the string !TEE! from our list.
11533     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11534     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11535       # If it failed, the variable was not from the command line. Ignore it,
11536       # but warn the user (except for BASH, which is always set by the calling BASH).
11537       if test "xTEE" != xBASH; then
11538         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11539 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11540       fi
11541       # Try to locate tool using the code snippet
11542       for ac_prog in tee
11543 do
11544   # Extract the first word of "$ac_prog", so it can be a program name with args.
11545 set dummy $ac_prog; ac_word=$2
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11547 $as_echo_n "checking for $ac_word... " >&6; }
11548 if ${ac_cv_path_TEE+:} false; then :
11549   $as_echo_n "(cached) " >&6
11550 else
11551   case $TEE in
11552   [\\/]* | ?:[\\/]*)
11553   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11554   ;;
11555   *)
11556   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11557 for as_dir in $PATH
11558 do
11559   IFS=$as_save_IFS
11560   test -z "$as_dir" && as_dir=.
11561     for ac_exec_ext in '' $ac_executable_extensions; do
11562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11563     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11565     break 2
11566   fi
11567 done
11568   done
11569 IFS=$as_save_IFS
11570 
11571   ;;
11572 esac
11573 fi
11574 TEE=$ac_cv_path_TEE
11575 if test -n "$TEE"; then
11576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11577 $as_echo "$TEE" >&6; }
11578 else
11579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11580 $as_echo "no" >&6; }
11581 fi
11582 
11583 
11584   test -n "$TEE" && break
11585 done
11586 
11587     else
11588       # If it succeeded, then it was overridden by the user. We will use it
11589       # for the tool.
11590 
11591       # First remove it from the list of overridden variables, so we can test
11592       # for unknown variables in the end.
11593       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11594 
11595       # Check if we try to supply an empty value
11596       if test "x$TEE" = x; then
11597         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11598 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11599         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11600 $as_echo_n "checking for TEE... " >&6; }
11601         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11602 $as_echo "disabled" >&6; }
11603       else
11604         # Check if the provided tool contains a complete path.
11605         tool_specified="$TEE"
11606         tool_basename="${tool_specified##*/}"
11607         if test "x$tool_basename" = "x$tool_specified"; then
11608           # A command without a complete path is provided, search $PATH.
11609           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11610 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11611           # Extract the first word of "$tool_basename", so it can be a program name with args.
11612 set dummy $tool_basename; ac_word=$2
11613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11614 $as_echo_n "checking for $ac_word... " >&6; }
11615 if ${ac_cv_path_TEE+:} false; then :
11616   $as_echo_n "(cached) " >&6
11617 else
11618   case $TEE in
11619   [\\/]* | ?:[\\/]*)
11620   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11621   ;;
11622   *)
11623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11624 for as_dir in $PATH
11625 do
11626   IFS=$as_save_IFS
11627   test -z "$as_dir" && as_dir=.
11628     for ac_exec_ext in '' $ac_executable_extensions; do
11629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11630     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11632     break 2
11633   fi
11634 done
11635   done
11636 IFS=$as_save_IFS
11637 
11638   ;;
11639 esac
11640 fi
11641 TEE=$ac_cv_path_TEE
11642 if test -n "$TEE"; then
11643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11644 $as_echo "$TEE" >&6; }
11645 else
11646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11647 $as_echo "no" >&6; }
11648 fi
11649 
11650 
11651           if test "x$TEE" = x; then
11652             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11653           fi
11654         else
11655           # Otherwise we believe it is a complete path. Use it as it is.
11656           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11657 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11658           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11659 $as_echo_n "checking for TEE... " >&6; }
11660           if test ! -x "$tool_specified"; then
11661             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11662 $as_echo "not found" >&6; }
11663             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11664           fi
11665           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11666 $as_echo "$tool_specified" >&6; }
11667         fi
11668       fi
11669     fi
11670 
11671   fi
11672 
11673 
11674 
11675   if test "x$TEE" = x; then
11676     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11677   fi
11678 
11679 
11680 
11681 
11682 
11683   # Publish this variable in the help.
11684 
11685 
11686   if [ -z "${TOUCH+x}" ]; then
11687     # The variable is not set by user, try to locate tool using the code snippet
11688     for ac_prog in touch
11689 do
11690   # Extract the first word of "$ac_prog", so it can be a program name with args.
11691 set dummy $ac_prog; ac_word=$2
11692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11693 $as_echo_n "checking for $ac_word... " >&6; }
11694 if ${ac_cv_path_TOUCH+:} false; then :
11695   $as_echo_n "(cached) " >&6
11696 else
11697   case $TOUCH in
11698   [\\/]* | ?:[\\/]*)
11699   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11700   ;;
11701   *)
11702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703 for as_dir in $PATH
11704 do
11705   IFS=$as_save_IFS
11706   test -z "$as_dir" && as_dir=.
11707     for ac_exec_ext in '' $ac_executable_extensions; do
11708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11709     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11711     break 2
11712   fi
11713 done
11714   done
11715 IFS=$as_save_IFS
11716 
11717   ;;
11718 esac
11719 fi
11720 TOUCH=$ac_cv_path_TOUCH
11721 if test -n "$TOUCH"; then
11722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11723 $as_echo "$TOUCH" >&6; }
11724 else
11725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726 $as_echo "no" >&6; }
11727 fi
11728 
11729 
11730   test -n "$TOUCH" && break
11731 done
11732 
11733   else
11734     # The variable is set, but is it from the command line or the environment?
11735 
11736     # Try to remove the string !TOUCH! from our list.
11737     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11738     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11739       # If it failed, the variable was not from the command line. Ignore it,
11740       # but warn the user (except for BASH, which is always set by the calling BASH).
11741       if test "xTOUCH" != xBASH; then
11742         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11743 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11744       fi
11745       # Try to locate tool using the code snippet
11746       for ac_prog in touch
11747 do
11748   # Extract the first word of "$ac_prog", so it can be a program name with args.
11749 set dummy $ac_prog; ac_word=$2
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11751 $as_echo_n "checking for $ac_word... " >&6; }
11752 if ${ac_cv_path_TOUCH+:} false; then :
11753   $as_echo_n "(cached) " >&6
11754 else
11755   case $TOUCH in
11756   [\\/]* | ?:[\\/]*)
11757   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11758   ;;
11759   *)
11760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11761 for as_dir in $PATH
11762 do
11763   IFS=$as_save_IFS
11764   test -z "$as_dir" && as_dir=.
11765     for ac_exec_ext in '' $ac_executable_extensions; do
11766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11767     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11769     break 2
11770   fi
11771 done
11772   done
11773 IFS=$as_save_IFS
11774 
11775   ;;
11776 esac
11777 fi
11778 TOUCH=$ac_cv_path_TOUCH
11779 if test -n "$TOUCH"; then
11780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11781 $as_echo "$TOUCH" >&6; }
11782 else
11783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11784 $as_echo "no" >&6; }
11785 fi
11786 
11787 
11788   test -n "$TOUCH" && break
11789 done
11790 
11791     else
11792       # If it succeeded, then it was overridden by the user. We will use it
11793       # for the tool.
11794 
11795       # First remove it from the list of overridden variables, so we can test
11796       # for unknown variables in the end.
11797       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11798 
11799       # Check if we try to supply an empty value
11800       if test "x$TOUCH" = x; then
11801         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11802 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11803         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11804 $as_echo_n "checking for TOUCH... " >&6; }
11805         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11806 $as_echo "disabled" >&6; }
11807       else
11808         # Check if the provided tool contains a complete path.
11809         tool_specified="$TOUCH"
11810         tool_basename="${tool_specified##*/}"
11811         if test "x$tool_basename" = "x$tool_specified"; then
11812           # A command without a complete path is provided, search $PATH.
11813           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11814 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11815           # Extract the first word of "$tool_basename", so it can be a program name with args.
11816 set dummy $tool_basename; ac_word=$2
11817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11818 $as_echo_n "checking for $ac_word... " >&6; }
11819 if ${ac_cv_path_TOUCH+:} false; then :
11820   $as_echo_n "(cached) " >&6
11821 else
11822   case $TOUCH in
11823   [\\/]* | ?:[\\/]*)
11824   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11825   ;;
11826   *)
11827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11828 for as_dir in $PATH
11829 do
11830   IFS=$as_save_IFS
11831   test -z "$as_dir" && as_dir=.
11832     for ac_exec_ext in '' $ac_executable_extensions; do
11833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11834     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11836     break 2
11837   fi
11838 done
11839   done
11840 IFS=$as_save_IFS
11841 
11842   ;;
11843 esac
11844 fi
11845 TOUCH=$ac_cv_path_TOUCH
11846 if test -n "$TOUCH"; then
11847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11848 $as_echo "$TOUCH" >&6; }
11849 else
11850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11851 $as_echo "no" >&6; }
11852 fi
11853 
11854 
11855           if test "x$TOUCH" = x; then
11856             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11857           fi
11858         else
11859           # Otherwise we believe it is a complete path. Use it as it is.
11860           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11861 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11862           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11863 $as_echo_n "checking for TOUCH... " >&6; }
11864           if test ! -x "$tool_specified"; then
11865             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11866 $as_echo "not found" >&6; }
11867             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11868           fi
11869           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11870 $as_echo "$tool_specified" >&6; }
11871         fi
11872       fi
11873     fi
11874 
11875   fi
11876 
11877 
11878 
11879   if test "x$TOUCH" = x; then
11880     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11881   fi
11882 
11883 
11884 
11885 
11886 
11887   # Publish this variable in the help.
11888 
11889 
11890   if [ -z "${TR+x}" ]; then
11891     # The variable is not set by user, try to locate tool using the code snippet
11892     for ac_prog in tr
11893 do
11894   # Extract the first word of "$ac_prog", so it can be a program name with args.
11895 set dummy $ac_prog; ac_word=$2
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11897 $as_echo_n "checking for $ac_word... " >&6; }
11898 if ${ac_cv_path_TR+:} false; then :
11899   $as_echo_n "(cached) " >&6
11900 else
11901   case $TR in
11902   [\\/]* | ?:[\\/]*)
11903   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11904   ;;
11905   *)
11906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907 for as_dir in $PATH
11908 do
11909   IFS=$as_save_IFS
11910   test -z "$as_dir" && as_dir=.
11911     for ac_exec_ext in '' $ac_executable_extensions; do
11912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11913     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915     break 2
11916   fi
11917 done
11918   done
11919 IFS=$as_save_IFS
11920 
11921   ;;
11922 esac
11923 fi
11924 TR=$ac_cv_path_TR
11925 if test -n "$TR"; then
11926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11927 $as_echo "$TR" >&6; }
11928 else
11929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930 $as_echo "no" >&6; }
11931 fi
11932 
11933 
11934   test -n "$TR" && break
11935 done
11936 
11937   else
11938     # The variable is set, but is it from the command line or the environment?
11939 
11940     # Try to remove the string !TR! from our list.
11941     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11942     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11943       # If it failed, the variable was not from the command line. Ignore it,
11944       # but warn the user (except for BASH, which is always set by the calling BASH).
11945       if test "xTR" != xBASH; then
11946         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11947 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11948       fi
11949       # Try to locate tool using the code snippet
11950       for ac_prog in tr
11951 do
11952   # Extract the first word of "$ac_prog", so it can be a program name with args.
11953 set dummy $ac_prog; ac_word=$2
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11955 $as_echo_n "checking for $ac_word... " >&6; }
11956 if ${ac_cv_path_TR+:} false; then :
11957   $as_echo_n "(cached) " >&6
11958 else
11959   case $TR in
11960   [\\/]* | ?:[\\/]*)
11961   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11962   ;;
11963   *)
11964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11965 for as_dir in $PATH
11966 do
11967   IFS=$as_save_IFS
11968   test -z "$as_dir" && as_dir=.
11969     for ac_exec_ext in '' $ac_executable_extensions; do
11970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11971     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11973     break 2
11974   fi
11975 done
11976   done
11977 IFS=$as_save_IFS
11978 
11979   ;;
11980 esac
11981 fi
11982 TR=$ac_cv_path_TR
11983 if test -n "$TR"; then
11984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11985 $as_echo "$TR" >&6; }
11986 else
11987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11988 $as_echo "no" >&6; }
11989 fi
11990 
11991 
11992   test -n "$TR" && break
11993 done
11994 
11995     else
11996       # If it succeeded, then it was overridden by the user. We will use it
11997       # for the tool.
11998 
11999       # First remove it from the list of overridden variables, so we can test
12000       # for unknown variables in the end.
12001       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12002 
12003       # Check if we try to supply an empty value
12004       if test "x$TR" = x; then
12005         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12006 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12007         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12008 $as_echo_n "checking for TR... " >&6; }
12009         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12010 $as_echo "disabled" >&6; }
12011       else
12012         # Check if the provided tool contains a complete path.
12013         tool_specified="$TR"
12014         tool_basename="${tool_specified##*/}"
12015         if test "x$tool_basename" = "x$tool_specified"; then
12016           # A command without a complete path is provided, search $PATH.
12017           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12018 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12019           # Extract the first word of "$tool_basename", so it can be a program name with args.
12020 set dummy $tool_basename; ac_word=$2
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12022 $as_echo_n "checking for $ac_word... " >&6; }
12023 if ${ac_cv_path_TR+:} false; then :
12024   $as_echo_n "(cached) " >&6
12025 else
12026   case $TR in
12027   [\\/]* | ?:[\\/]*)
12028   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12029   ;;
12030   *)
12031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12032 for as_dir in $PATH
12033 do
12034   IFS=$as_save_IFS
12035   test -z "$as_dir" && as_dir=.
12036     for ac_exec_ext in '' $ac_executable_extensions; do
12037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12038     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12040     break 2
12041   fi
12042 done
12043   done
12044 IFS=$as_save_IFS
12045 
12046   ;;
12047 esac
12048 fi
12049 TR=$ac_cv_path_TR
12050 if test -n "$TR"; then
12051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12052 $as_echo "$TR" >&6; }
12053 else
12054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12055 $as_echo "no" >&6; }
12056 fi
12057 
12058 
12059           if test "x$TR" = x; then
12060             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12061           fi
12062         else
12063           # Otherwise we believe it is a complete path. Use it as it is.
12064           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12065 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12066           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12067 $as_echo_n "checking for TR... " >&6; }
12068           if test ! -x "$tool_specified"; then
12069             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12070 $as_echo "not found" >&6; }
12071             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12072           fi
12073           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12074 $as_echo "$tool_specified" >&6; }
12075         fi
12076       fi
12077     fi
12078 
12079   fi
12080 
12081 
12082 
12083   if test "x$TR" = x; then
12084     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12085   fi
12086 
12087 
12088 
12089 
12090 
12091   # Publish this variable in the help.
12092 
12093 
12094   if [ -z "${UNAME+x}" ]; then
12095     # The variable is not set by user, try to locate tool using the code snippet
12096     for ac_prog in uname
12097 do
12098   # Extract the first word of "$ac_prog", so it can be a program name with args.
12099 set dummy $ac_prog; ac_word=$2
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12101 $as_echo_n "checking for $ac_word... " >&6; }
12102 if ${ac_cv_path_UNAME+:} false; then :
12103   $as_echo_n "(cached) " >&6
12104 else
12105   case $UNAME in
12106   [\\/]* | ?:[\\/]*)
12107   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12108   ;;
12109   *)
12110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12111 for as_dir in $PATH
12112 do
12113   IFS=$as_save_IFS
12114   test -z "$as_dir" && as_dir=.
12115     for ac_exec_ext in '' $ac_executable_extensions; do
12116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12117     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12119     break 2
12120   fi
12121 done
12122   done
12123 IFS=$as_save_IFS
12124 
12125   ;;
12126 esac
12127 fi
12128 UNAME=$ac_cv_path_UNAME
12129 if test -n "$UNAME"; then
12130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12131 $as_echo "$UNAME" >&6; }
12132 else
12133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134 $as_echo "no" >&6; }
12135 fi
12136 
12137 
12138   test -n "$UNAME" && break
12139 done
12140 
12141   else
12142     # The variable is set, but is it from the command line or the environment?
12143 
12144     # Try to remove the string !UNAME! from our list.
12145     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12146     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12147       # If it failed, the variable was not from the command line. Ignore it,
12148       # but warn the user (except for BASH, which is always set by the calling BASH).
12149       if test "xUNAME" != xBASH; then
12150         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12151 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12152       fi
12153       # Try to locate tool using the code snippet
12154       for ac_prog in uname
12155 do
12156   # Extract the first word of "$ac_prog", so it can be a program name with args.
12157 set dummy $ac_prog; ac_word=$2
12158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12159 $as_echo_n "checking for $ac_word... " >&6; }
12160 if ${ac_cv_path_UNAME+:} false; then :
12161   $as_echo_n "(cached) " >&6
12162 else
12163   case $UNAME in
12164   [\\/]* | ?:[\\/]*)
12165   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12166   ;;
12167   *)
12168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12169 for as_dir in $PATH
12170 do
12171   IFS=$as_save_IFS
12172   test -z "$as_dir" && as_dir=.
12173     for ac_exec_ext in '' $ac_executable_extensions; do
12174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12175     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12177     break 2
12178   fi
12179 done
12180   done
12181 IFS=$as_save_IFS
12182 
12183   ;;
12184 esac
12185 fi
12186 UNAME=$ac_cv_path_UNAME
12187 if test -n "$UNAME"; then
12188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12189 $as_echo "$UNAME" >&6; }
12190 else
12191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12192 $as_echo "no" >&6; }
12193 fi
12194 
12195 
12196   test -n "$UNAME" && break
12197 done
12198 
12199     else
12200       # If it succeeded, then it was overridden by the user. We will use it
12201       # for the tool.
12202 
12203       # First remove it from the list of overridden variables, so we can test
12204       # for unknown variables in the end.
12205       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12206 
12207       # Check if we try to supply an empty value
12208       if test "x$UNAME" = x; then
12209         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12210 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12211         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12212 $as_echo_n "checking for UNAME... " >&6; }
12213         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12214 $as_echo "disabled" >&6; }
12215       else
12216         # Check if the provided tool contains a complete path.
12217         tool_specified="$UNAME"
12218         tool_basename="${tool_specified##*/}"
12219         if test "x$tool_basename" = "x$tool_specified"; then
12220           # A command without a complete path is provided, search $PATH.
12221           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12222 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12223           # Extract the first word of "$tool_basename", so it can be a program name with args.
12224 set dummy $tool_basename; ac_word=$2
12225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12226 $as_echo_n "checking for $ac_word... " >&6; }
12227 if ${ac_cv_path_UNAME+:} false; then :
12228   $as_echo_n "(cached) " >&6
12229 else
12230   case $UNAME in
12231   [\\/]* | ?:[\\/]*)
12232   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12233   ;;
12234   *)
12235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12236 for as_dir in $PATH
12237 do
12238   IFS=$as_save_IFS
12239   test -z "$as_dir" && as_dir=.
12240     for ac_exec_ext in '' $ac_executable_extensions; do
12241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12242     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12244     break 2
12245   fi
12246 done
12247   done
12248 IFS=$as_save_IFS
12249 
12250   ;;
12251 esac
12252 fi
12253 UNAME=$ac_cv_path_UNAME
12254 if test -n "$UNAME"; then
12255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12256 $as_echo "$UNAME" >&6; }
12257 else
12258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12259 $as_echo "no" >&6; }
12260 fi
12261 
12262 
12263           if test "x$UNAME" = x; then
12264             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12265           fi
12266         else
12267           # Otherwise we believe it is a complete path. Use it as it is.
12268           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12269 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12270           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12271 $as_echo_n "checking for UNAME... " >&6; }
12272           if test ! -x "$tool_specified"; then
12273             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12274 $as_echo "not found" >&6; }
12275             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12276           fi
12277           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12278 $as_echo "$tool_specified" >&6; }
12279         fi
12280       fi
12281     fi
12282 
12283   fi
12284 
12285 
12286 
12287   if test "x$UNAME" = x; then
12288     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12289   fi
12290 
12291 
12292 
12293 
12294 
12295   # Publish this variable in the help.
12296 
12297 
12298   if [ -z "${UNIQ+x}" ]; then
12299     # The variable is not set by user, try to locate tool using the code snippet
12300     for ac_prog in uniq
12301 do
12302   # Extract the first word of "$ac_prog", so it can be a program name with args.
12303 set dummy $ac_prog; ac_word=$2
12304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12305 $as_echo_n "checking for $ac_word... " >&6; }
12306 if ${ac_cv_path_UNIQ+:} false; then :
12307   $as_echo_n "(cached) " >&6
12308 else
12309   case $UNIQ in
12310   [\\/]* | ?:[\\/]*)
12311   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12312   ;;
12313   *)
12314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12315 for as_dir in $PATH
12316 do
12317   IFS=$as_save_IFS
12318   test -z "$as_dir" && as_dir=.
12319     for ac_exec_ext in '' $ac_executable_extensions; do
12320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12321     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12323     break 2
12324   fi
12325 done
12326   done
12327 IFS=$as_save_IFS
12328 
12329   ;;
12330 esac
12331 fi
12332 UNIQ=$ac_cv_path_UNIQ
12333 if test -n "$UNIQ"; then
12334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12335 $as_echo "$UNIQ" >&6; }
12336 else
12337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12338 $as_echo "no" >&6; }
12339 fi
12340 
12341 
12342   test -n "$UNIQ" && break
12343 done
12344 
12345   else
12346     # The variable is set, but is it from the command line or the environment?
12347 
12348     # Try to remove the string !UNIQ! from our list.
12349     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12350     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12351       # If it failed, the variable was not from the command line. Ignore it,
12352       # but warn the user (except for BASH, which is always set by the calling BASH).
12353       if test "xUNIQ" != xBASH; then
12354         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12355 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12356       fi
12357       # Try to locate tool using the code snippet
12358       for ac_prog in uniq
12359 do
12360   # Extract the first word of "$ac_prog", so it can be a program name with args.
12361 set dummy $ac_prog; ac_word=$2
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12363 $as_echo_n "checking for $ac_word... " >&6; }
12364 if ${ac_cv_path_UNIQ+:} false; then :
12365   $as_echo_n "(cached) " >&6
12366 else
12367   case $UNIQ in
12368   [\\/]* | ?:[\\/]*)
12369   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12370   ;;
12371   *)
12372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12373 for as_dir in $PATH
12374 do
12375   IFS=$as_save_IFS
12376   test -z "$as_dir" && as_dir=.
12377     for ac_exec_ext in '' $ac_executable_extensions; do
12378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12379     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12381     break 2
12382   fi
12383 done
12384   done
12385 IFS=$as_save_IFS
12386 
12387   ;;
12388 esac
12389 fi
12390 UNIQ=$ac_cv_path_UNIQ
12391 if test -n "$UNIQ"; then
12392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12393 $as_echo "$UNIQ" >&6; }
12394 else
12395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12396 $as_echo "no" >&6; }
12397 fi
12398 
12399 
12400   test -n "$UNIQ" && break
12401 done
12402 
12403     else
12404       # If it succeeded, then it was overridden by the user. We will use it
12405       # for the tool.
12406 
12407       # First remove it from the list of overridden variables, so we can test
12408       # for unknown variables in the end.
12409       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12410 
12411       # Check if we try to supply an empty value
12412       if test "x$UNIQ" = x; then
12413         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12414 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12416 $as_echo_n "checking for UNIQ... " >&6; }
12417         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12418 $as_echo "disabled" >&6; }
12419       else
12420         # Check if the provided tool contains a complete path.
12421         tool_specified="$UNIQ"
12422         tool_basename="${tool_specified##*/}"
12423         if test "x$tool_basename" = "x$tool_specified"; then
12424           # A command without a complete path is provided, search $PATH.
12425           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12426 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12427           # Extract the first word of "$tool_basename", so it can be a program name with args.
12428 set dummy $tool_basename; ac_word=$2
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12430 $as_echo_n "checking for $ac_word... " >&6; }
12431 if ${ac_cv_path_UNIQ+:} false; then :
12432   $as_echo_n "(cached) " >&6
12433 else
12434   case $UNIQ in
12435   [\\/]* | ?:[\\/]*)
12436   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12437   ;;
12438   *)
12439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12440 for as_dir in $PATH
12441 do
12442   IFS=$as_save_IFS
12443   test -z "$as_dir" && as_dir=.
12444     for ac_exec_ext in '' $ac_executable_extensions; do
12445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12446     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12448     break 2
12449   fi
12450 done
12451   done
12452 IFS=$as_save_IFS
12453 
12454   ;;
12455 esac
12456 fi
12457 UNIQ=$ac_cv_path_UNIQ
12458 if test -n "$UNIQ"; then
12459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12460 $as_echo "$UNIQ" >&6; }
12461 else
12462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12463 $as_echo "no" >&6; }
12464 fi
12465 
12466 
12467           if test "x$UNIQ" = x; then
12468             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12469           fi
12470         else
12471           # Otherwise we believe it is a complete path. Use it as it is.
12472           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12473 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12474           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12475 $as_echo_n "checking for UNIQ... " >&6; }
12476           if test ! -x "$tool_specified"; then
12477             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12478 $as_echo "not found" >&6; }
12479             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12480           fi
12481           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12482 $as_echo "$tool_specified" >&6; }
12483         fi
12484       fi
12485     fi
12486 
12487   fi
12488 
12489 
12490 
12491   if test "x$UNIQ" = x; then
12492     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12493   fi
12494 
12495 
12496 
12497 
12498 
12499   # Publish this variable in the help.
12500 
12501 
12502   if [ -z "${WC+x}" ]; then
12503     # The variable is not set by user, try to locate tool using the code snippet
12504     for ac_prog in wc
12505 do
12506   # Extract the first word of "$ac_prog", so it can be a program name with args.
12507 set dummy $ac_prog; ac_word=$2
12508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509 $as_echo_n "checking for $ac_word... " >&6; }
12510 if ${ac_cv_path_WC+:} false; then :
12511   $as_echo_n "(cached) " >&6
12512 else
12513   case $WC in
12514   [\\/]* | ?:[\\/]*)
12515   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12516   ;;
12517   *)
12518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519 for as_dir in $PATH
12520 do
12521   IFS=$as_save_IFS
12522   test -z "$as_dir" && as_dir=.
12523     for ac_exec_ext in '' $ac_executable_extensions; do
12524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527     break 2
12528   fi
12529 done
12530   done
12531 IFS=$as_save_IFS
12532 
12533   ;;
12534 esac
12535 fi
12536 WC=$ac_cv_path_WC
12537 if test -n "$WC"; then
12538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12539 $as_echo "$WC" >&6; }
12540 else
12541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542 $as_echo "no" >&6; }
12543 fi
12544 
12545 
12546   test -n "$WC" && break
12547 done
12548 
12549   else
12550     # The variable is set, but is it from the command line or the environment?
12551 
12552     # Try to remove the string !WC! from our list.
12553     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12554     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12555       # If it failed, the variable was not from the command line. Ignore it,
12556       # but warn the user (except for BASH, which is always set by the calling BASH).
12557       if test "xWC" != xBASH; then
12558         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12559 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12560       fi
12561       # Try to locate tool using the code snippet
12562       for ac_prog in wc
12563 do
12564   # Extract the first word of "$ac_prog", so it can be a program name with args.
12565 set dummy $ac_prog; ac_word=$2
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12567 $as_echo_n "checking for $ac_word... " >&6; }
12568 if ${ac_cv_path_WC+:} false; then :
12569   $as_echo_n "(cached) " >&6
12570 else
12571   case $WC in
12572   [\\/]* | ?:[\\/]*)
12573   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12574   ;;
12575   *)
12576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12577 for as_dir in $PATH
12578 do
12579   IFS=$as_save_IFS
12580   test -z "$as_dir" && as_dir=.
12581     for ac_exec_ext in '' $ac_executable_extensions; do
12582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12583     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12585     break 2
12586   fi
12587 done
12588   done
12589 IFS=$as_save_IFS
12590 
12591   ;;
12592 esac
12593 fi
12594 WC=$ac_cv_path_WC
12595 if test -n "$WC"; then
12596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12597 $as_echo "$WC" >&6; }
12598 else
12599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600 $as_echo "no" >&6; }
12601 fi
12602 
12603 
12604   test -n "$WC" && break
12605 done
12606 
12607     else
12608       # If it succeeded, then it was overridden by the user. We will use it
12609       # for the tool.
12610 
12611       # First remove it from the list of overridden variables, so we can test
12612       # for unknown variables in the end.
12613       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12614 
12615       # Check if we try to supply an empty value
12616       if test "x$WC" = x; then
12617         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12618 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12619         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12620 $as_echo_n "checking for WC... " >&6; }
12621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12622 $as_echo "disabled" >&6; }
12623       else
12624         # Check if the provided tool contains a complete path.
12625         tool_specified="$WC"
12626         tool_basename="${tool_specified##*/}"
12627         if test "x$tool_basename" = "x$tool_specified"; then
12628           # A command without a complete path is provided, search $PATH.
12629           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12630 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12631           # Extract the first word of "$tool_basename", so it can be a program name with args.
12632 set dummy $tool_basename; ac_word=$2
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12634 $as_echo_n "checking for $ac_word... " >&6; }
12635 if ${ac_cv_path_WC+:} false; then :
12636   $as_echo_n "(cached) " >&6
12637 else
12638   case $WC in
12639   [\\/]* | ?:[\\/]*)
12640   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12641   ;;
12642   *)
12643   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12644 for as_dir in $PATH
12645 do
12646   IFS=$as_save_IFS
12647   test -z "$as_dir" && as_dir=.
12648     for ac_exec_ext in '' $ac_executable_extensions; do
12649   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12650     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12651     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12652     break 2
12653   fi
12654 done
12655   done
12656 IFS=$as_save_IFS
12657 
12658   ;;
12659 esac
12660 fi
12661 WC=$ac_cv_path_WC
12662 if test -n "$WC"; then
12663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12664 $as_echo "$WC" >&6; }
12665 else
12666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12667 $as_echo "no" >&6; }
12668 fi
12669 
12670 
12671           if test "x$WC" = x; then
12672             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12673           fi
12674         else
12675           # Otherwise we believe it is a complete path. Use it as it is.
12676           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12677 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12678           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12679 $as_echo_n "checking for WC... " >&6; }
12680           if test ! -x "$tool_specified"; then
12681             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12682 $as_echo "not found" >&6; }
12683             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12684           fi
12685           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12686 $as_echo "$tool_specified" >&6; }
12687         fi
12688       fi
12689     fi
12690 
12691   fi
12692 
12693 
12694 
12695   if test "x$WC" = x; then
12696     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12697   fi
12698 
12699 
12700 
12701 
12702 
12703   # Publish this variable in the help.
12704 
12705 
12706   if [ -z "${WHICH+x}" ]; then
12707     # The variable is not set by user, try to locate tool using the code snippet
12708     for ac_prog in which
12709 do
12710   # Extract the first word of "$ac_prog", so it can be a program name with args.
12711 set dummy $ac_prog; ac_word=$2
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713 $as_echo_n "checking for $ac_word... " >&6; }
12714 if ${ac_cv_path_WHICH+:} false; then :
12715   $as_echo_n "(cached) " >&6
12716 else
12717   case $WHICH in
12718   [\\/]* | ?:[\\/]*)
12719   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12720   ;;
12721   *)
12722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723 for as_dir in $PATH
12724 do
12725   IFS=$as_save_IFS
12726   test -z "$as_dir" && as_dir=.
12727     for ac_exec_ext in '' $ac_executable_extensions; do
12728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731     break 2
12732   fi
12733 done
12734   done
12735 IFS=$as_save_IFS
12736 
12737   ;;
12738 esac
12739 fi
12740 WHICH=$ac_cv_path_WHICH
12741 if test -n "$WHICH"; then
12742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12743 $as_echo "$WHICH" >&6; }
12744 else
12745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746 $as_echo "no" >&6; }
12747 fi
12748 
12749 
12750   test -n "$WHICH" && break
12751 done
12752 
12753   else
12754     # The variable is set, but is it from the command line or the environment?
12755 
12756     # Try to remove the string !WHICH! from our list.
12757     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12758     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12759       # If it failed, the variable was not from the command line. Ignore it,
12760       # but warn the user (except for BASH, which is always set by the calling BASH).
12761       if test "xWHICH" != xBASH; then
12762         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12763 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12764       fi
12765       # Try to locate tool using the code snippet
12766       for ac_prog in which
12767 do
12768   # Extract the first word of "$ac_prog", so it can be a program name with args.
12769 set dummy $ac_prog; ac_word=$2
12770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12771 $as_echo_n "checking for $ac_word... " >&6; }
12772 if ${ac_cv_path_WHICH+:} false; then :
12773   $as_echo_n "(cached) " >&6
12774 else
12775   case $WHICH in
12776   [\\/]* | ?:[\\/]*)
12777   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12778   ;;
12779   *)
12780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12781 for as_dir in $PATH
12782 do
12783   IFS=$as_save_IFS
12784   test -z "$as_dir" && as_dir=.
12785     for ac_exec_ext in '' $ac_executable_extensions; do
12786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12787     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12789     break 2
12790   fi
12791 done
12792   done
12793 IFS=$as_save_IFS
12794 
12795   ;;
12796 esac
12797 fi
12798 WHICH=$ac_cv_path_WHICH
12799 if test -n "$WHICH"; then
12800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12801 $as_echo "$WHICH" >&6; }
12802 else
12803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12804 $as_echo "no" >&6; }
12805 fi
12806 
12807 
12808   test -n "$WHICH" && break
12809 done
12810 
12811     else
12812       # If it succeeded, then it was overridden by the user. We will use it
12813       # for the tool.
12814 
12815       # First remove it from the list of overridden variables, so we can test
12816       # for unknown variables in the end.
12817       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12818 
12819       # Check if we try to supply an empty value
12820       if test "x$WHICH" = x; then
12821         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12822 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12823         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12824 $as_echo_n "checking for WHICH... " >&6; }
12825         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12826 $as_echo "disabled" >&6; }
12827       else
12828         # Check if the provided tool contains a complete path.
12829         tool_specified="$WHICH"
12830         tool_basename="${tool_specified##*/}"
12831         if test "x$tool_basename" = "x$tool_specified"; then
12832           # A command without a complete path is provided, search $PATH.
12833           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12834 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12835           # Extract the first word of "$tool_basename", so it can be a program name with args.
12836 set dummy $tool_basename; ac_word=$2
12837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12838 $as_echo_n "checking for $ac_word... " >&6; }
12839 if ${ac_cv_path_WHICH+:} false; then :
12840   $as_echo_n "(cached) " >&6
12841 else
12842   case $WHICH in
12843   [\\/]* | ?:[\\/]*)
12844   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12845   ;;
12846   *)
12847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12848 for as_dir in $PATH
12849 do
12850   IFS=$as_save_IFS
12851   test -z "$as_dir" && as_dir=.
12852     for ac_exec_ext in '' $ac_executable_extensions; do
12853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12854     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12856     break 2
12857   fi
12858 done
12859   done
12860 IFS=$as_save_IFS
12861 
12862   ;;
12863 esac
12864 fi
12865 WHICH=$ac_cv_path_WHICH
12866 if test -n "$WHICH"; then
12867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12868 $as_echo "$WHICH" >&6; }
12869 else
12870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12871 $as_echo "no" >&6; }
12872 fi
12873 
12874 
12875           if test "x$WHICH" = x; then
12876             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12877           fi
12878         else
12879           # Otherwise we believe it is a complete path. Use it as it is.
12880           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12881 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12882           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12883 $as_echo_n "checking for WHICH... " >&6; }
12884           if test ! -x "$tool_specified"; then
12885             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12886 $as_echo "not found" >&6; }
12887             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12888           fi
12889           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12890 $as_echo "$tool_specified" >&6; }
12891         fi
12892       fi
12893     fi
12894 
12895   fi
12896 
12897 
12898 
12899   if test "x$WHICH" = x; then
12900     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12901   fi
12902 
12903 
12904 
12905 
12906 
12907   # Publish this variable in the help.
12908 
12909 
12910   if [ -z "${XARGS+x}" ]; then
12911     # The variable is not set by user, try to locate tool using the code snippet
12912     for ac_prog in xargs
12913 do
12914   # Extract the first word of "$ac_prog", so it can be a program name with args.
12915 set dummy $ac_prog; ac_word=$2
12916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12917 $as_echo_n "checking for $ac_word... " >&6; }
12918 if ${ac_cv_path_XARGS+:} false; then :
12919   $as_echo_n "(cached) " >&6
12920 else
12921   case $XARGS in
12922   [\\/]* | ?:[\\/]*)
12923   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12924   ;;
12925   *)
12926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12927 for as_dir in $PATH
12928 do
12929   IFS=$as_save_IFS
12930   test -z "$as_dir" && as_dir=.
12931     for ac_exec_ext in '' $ac_executable_extensions; do
12932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12933     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12935     break 2
12936   fi
12937 done
12938   done
12939 IFS=$as_save_IFS
12940 
12941   ;;
12942 esac
12943 fi
12944 XARGS=$ac_cv_path_XARGS
12945 if test -n "$XARGS"; then
12946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12947 $as_echo "$XARGS" >&6; }
12948 else
12949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12950 $as_echo "no" >&6; }
12951 fi
12952 
12953 
12954   test -n "$XARGS" && break
12955 done
12956 
12957   else
12958     # The variable is set, but is it from the command line or the environment?
12959 
12960     # Try to remove the string !XARGS! from our list.
12961     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12962     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12963       # If it failed, the variable was not from the command line. Ignore it,
12964       # but warn the user (except for BASH, which is always set by the calling BASH).
12965       if test "xXARGS" != xBASH; then
12966         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12967 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12968       fi
12969       # Try to locate tool using the code snippet
12970       for ac_prog in xargs
12971 do
12972   # Extract the first word of "$ac_prog", so it can be a program name with args.
12973 set dummy $ac_prog; ac_word=$2
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12975 $as_echo_n "checking for $ac_word... " >&6; }
12976 if ${ac_cv_path_XARGS+:} false; then :
12977   $as_echo_n "(cached) " >&6
12978 else
12979   case $XARGS in
12980   [\\/]* | ?:[\\/]*)
12981   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12982   ;;
12983   *)
12984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12985 for as_dir in $PATH
12986 do
12987   IFS=$as_save_IFS
12988   test -z "$as_dir" && as_dir=.
12989     for ac_exec_ext in '' $ac_executable_extensions; do
12990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12991     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12993     break 2
12994   fi
12995 done
12996   done
12997 IFS=$as_save_IFS
12998 
12999   ;;
13000 esac
13001 fi
13002 XARGS=$ac_cv_path_XARGS
13003 if test -n "$XARGS"; then
13004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13005 $as_echo "$XARGS" >&6; }
13006 else
13007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13008 $as_echo "no" >&6; }
13009 fi
13010 
13011 
13012   test -n "$XARGS" && break
13013 done
13014 
13015     else
13016       # If it succeeded, then it was overridden by the user. We will use it
13017       # for the tool.
13018 
13019       # First remove it from the list of overridden variables, so we can test
13020       # for unknown variables in the end.
13021       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13022 
13023       # Check if we try to supply an empty value
13024       if test "x$XARGS" = x; then
13025         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13026 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13027         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13028 $as_echo_n "checking for XARGS... " >&6; }
13029         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13030 $as_echo "disabled" >&6; }
13031       else
13032         # Check if the provided tool contains a complete path.
13033         tool_specified="$XARGS"
13034         tool_basename="${tool_specified##*/}"
13035         if test "x$tool_basename" = "x$tool_specified"; then
13036           # A command without a complete path is provided, search $PATH.
13037           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13038 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13039           # Extract the first word of "$tool_basename", so it can be a program name with args.
13040 set dummy $tool_basename; ac_word=$2
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13042 $as_echo_n "checking for $ac_word... " >&6; }
13043 if ${ac_cv_path_XARGS+:} false; then :
13044   $as_echo_n "(cached) " >&6
13045 else
13046   case $XARGS in
13047   [\\/]* | ?:[\\/]*)
13048   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13049   ;;
13050   *)
13051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13052 for as_dir in $PATH
13053 do
13054   IFS=$as_save_IFS
13055   test -z "$as_dir" && as_dir=.
13056     for ac_exec_ext in '' $ac_executable_extensions; do
13057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13058     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13060     break 2
13061   fi
13062 done
13063   done
13064 IFS=$as_save_IFS
13065 
13066   ;;
13067 esac
13068 fi
13069 XARGS=$ac_cv_path_XARGS
13070 if test -n "$XARGS"; then
13071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13072 $as_echo "$XARGS" >&6; }
13073 else
13074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13075 $as_echo "no" >&6; }
13076 fi
13077 
13078 
13079           if test "x$XARGS" = x; then
13080             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13081           fi
13082         else
13083           # Otherwise we believe it is a complete path. Use it as it is.
13084           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13085 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13086           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13087 $as_echo_n "checking for XARGS... " >&6; }
13088           if test ! -x "$tool_specified"; then
13089             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13090 $as_echo "not found" >&6; }
13091             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13092           fi
13093           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13094 $as_echo "$tool_specified" >&6; }
13095         fi
13096       fi
13097     fi
13098 
13099   fi
13100 
13101 
13102 
13103   if test "x$XARGS" = x; then
13104     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13105   fi
13106 
13107 
13108 
13109   # Then required tools that require some special treatment.
13110 
13111 
13112   # Publish this variable in the help.
13113 
13114 
13115   if [ -z "${AWK+x}" ]; then
13116     # The variable is not set by user, try to locate tool using the code snippet
13117     for ac_prog in gawk mawk nawk awk
13118 do
13119   # Extract the first word of "$ac_prog", so it can be a program name with args.
13120 set dummy $ac_prog; ac_word=$2
13121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13122 $as_echo_n "checking for $ac_word... " >&6; }
13123 if ${ac_cv_prog_AWK+:} false; then :
13124   $as_echo_n "(cached) " >&6
13125 else
13126   if test -n "$AWK"; then
13127   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13128 else
13129 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13130 for as_dir in $PATH
13131 do
13132   IFS=$as_save_IFS
13133   test -z "$as_dir" && as_dir=.
13134     for ac_exec_ext in '' $ac_executable_extensions; do
13135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13136     ac_cv_prog_AWK="$ac_prog"
13137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13138     break 2
13139   fi
13140 done
13141   done
13142 IFS=$as_save_IFS
13143 
13144 fi
13145 fi
13146 AWK=$ac_cv_prog_AWK
13147 if test -n "$AWK"; then
13148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13149 $as_echo "$AWK" >&6; }
13150 else
13151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13152 $as_echo "no" >&6; }
13153 fi
13154 
13155 
13156   test -n "$AWK" && break
13157 done
13158 
13159   else
13160     # The variable is set, but is it from the command line or the environment?
13161 
13162     # Try to remove the string !AWK! from our list.
13163     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13164     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13165       # If it failed, the variable was not from the command line. Ignore it,
13166       # but warn the user (except for BASH, which is always set by the calling BASH).
13167       if test "xAWK" != xBASH; then
13168         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13169 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13170       fi
13171       # Try to locate tool using the code snippet
13172       for ac_prog in gawk mawk nawk awk
13173 do
13174   # Extract the first word of "$ac_prog", so it can be a program name with args.
13175 set dummy $ac_prog; ac_word=$2
13176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13177 $as_echo_n "checking for $ac_word... " >&6; }
13178 if ${ac_cv_prog_AWK+:} false; then :
13179   $as_echo_n "(cached) " >&6
13180 else
13181   if test -n "$AWK"; then
13182   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13183 else
13184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13185 for as_dir in $PATH
13186 do
13187   IFS=$as_save_IFS
13188   test -z "$as_dir" && as_dir=.
13189     for ac_exec_ext in '' $ac_executable_extensions; do
13190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13191     ac_cv_prog_AWK="$ac_prog"
13192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13193     break 2
13194   fi
13195 done
13196   done
13197 IFS=$as_save_IFS
13198 
13199 fi
13200 fi
13201 AWK=$ac_cv_prog_AWK
13202 if test -n "$AWK"; then
13203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13204 $as_echo "$AWK" >&6; }
13205 else
13206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13207 $as_echo "no" >&6; }
13208 fi
13209 
13210 
13211   test -n "$AWK" && break
13212 done
13213 
13214     else
13215       # If it succeeded, then it was overridden by the user. We will use it
13216       # for the tool.
13217 
13218       # First remove it from the list of overridden variables, so we can test
13219       # for unknown variables in the end.
13220       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13221 
13222       # Check if we try to supply an empty value
13223       if test "x$AWK" = x; then
13224         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13225 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13226         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13227 $as_echo_n "checking for AWK... " >&6; }
13228         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13229 $as_echo "disabled" >&6; }
13230       else
13231         # Check if the provided tool contains a complete path.
13232         tool_specified="$AWK"
13233         tool_basename="${tool_specified##*/}"
13234         if test "x$tool_basename" = "x$tool_specified"; then
13235           # A command without a complete path is provided, search $PATH.
13236           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13237 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13238           # Extract the first word of "$tool_basename", so it can be a program name with args.
13239 set dummy $tool_basename; ac_word=$2
13240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13241 $as_echo_n "checking for $ac_word... " >&6; }
13242 if ${ac_cv_path_AWK+:} false; then :
13243   $as_echo_n "(cached) " >&6
13244 else
13245   case $AWK in
13246   [\\/]* | ?:[\\/]*)
13247   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13248   ;;
13249   *)
13250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13251 for as_dir in $PATH
13252 do
13253   IFS=$as_save_IFS
13254   test -z "$as_dir" && as_dir=.
13255     for ac_exec_ext in '' $ac_executable_extensions; do
13256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13257     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13259     break 2
13260   fi
13261 done
13262   done
13263 IFS=$as_save_IFS
13264 
13265   ;;
13266 esac
13267 fi
13268 AWK=$ac_cv_path_AWK
13269 if test -n "$AWK"; then
13270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13271 $as_echo "$AWK" >&6; }
13272 else
13273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13274 $as_echo "no" >&6; }
13275 fi
13276 
13277 
13278           if test "x$AWK" = x; then
13279             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13280           fi
13281         else
13282           # Otherwise we believe it is a complete path. Use it as it is.
13283           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13284 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13285           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13286 $as_echo_n "checking for AWK... " >&6; }
13287           if test ! -x "$tool_specified"; then
13288             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13289 $as_echo "not found" >&6; }
13290             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13291           fi
13292           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13293 $as_echo "$tool_specified" >&6; }
13294         fi
13295       fi
13296     fi
13297 
13298   fi
13299 
13300 
13301   if test "x$AWK" = x; then
13302     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13303   fi
13304 
13305 
13306 
13307 
13308   # Publish this variable in the help.
13309 
13310 
13311   if [ -z "${GREP+x}" ]; then
13312     # The variable is not set by user, try to locate tool using the code snippet
13313     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13314 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13315 if ${ac_cv_path_GREP+:} false; then :
13316   $as_echo_n "(cached) " >&6
13317 else
13318   if test -z "$GREP"; then
13319   ac_path_GREP_found=false
13320   # Loop through the user's path and test for each of PROGNAME-LIST
13321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13322 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13323 do
13324   IFS=$as_save_IFS
13325   test -z "$as_dir" && as_dir=.
13326     for ac_prog in grep ggrep; do
13327     for ac_exec_ext in '' $ac_executable_extensions; do
13328       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13329       as_fn_executable_p "$ac_path_GREP" || continue
13330 # Check for GNU ac_path_GREP and select it if it is found.
13331   # Check for GNU $ac_path_GREP
13332 case `"$ac_path_GREP" --version 2>&1` in
13333 *GNU*)
13334   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13335 *)
13336   ac_count=0
13337   $as_echo_n 0123456789 >"conftest.in"
13338   while :
13339   do
13340     cat "conftest.in" "conftest.in" >"conftest.tmp"
13341     mv "conftest.tmp" "conftest.in"
13342     cp "conftest.in" "conftest.nl"
13343     $as_echo 'GREP' >> "conftest.nl"
13344     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13345     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13346     as_fn_arith $ac_count + 1 && ac_count=$as_val
13347     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13348       # Best one so far, save it but keep looking for a better one
13349       ac_cv_path_GREP="$ac_path_GREP"
13350       ac_path_GREP_max=$ac_count
13351     fi
13352     # 10*(2^10) chars as input seems more than enough
13353     test $ac_count -gt 10 && break
13354   done
13355   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13356 esac
13357 
13358       $ac_path_GREP_found && break 3
13359     done
13360   done
13361   done
13362 IFS=$as_save_IFS
13363   if test -z "$ac_cv_path_GREP"; then
13364     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13365   fi
13366 else
13367   ac_cv_path_GREP=$GREP
13368 fi
13369 
13370 fi
13371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13372 $as_echo "$ac_cv_path_GREP" >&6; }
13373  GREP="$ac_cv_path_GREP"
13374 
13375 
13376   else
13377     # The variable is set, but is it from the command line or the environment?
13378 
13379     # Try to remove the string !GREP! from our list.
13380     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13381     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13382       # If it failed, the variable was not from the command line. Ignore it,
13383       # but warn the user (except for BASH, which is always set by the calling BASH).
13384       if test "xGREP" != xBASH; then
13385         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13386 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13387       fi
13388       # Try to locate tool using the code snippet
13389       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13390 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13391 if ${ac_cv_path_GREP+:} false; then :
13392   $as_echo_n "(cached) " >&6
13393 else
13394   if test -z "$GREP"; then
13395   ac_path_GREP_found=false
13396   # Loop through the user's path and test for each of PROGNAME-LIST
13397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13398 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13399 do
13400   IFS=$as_save_IFS
13401   test -z "$as_dir" && as_dir=.
13402     for ac_prog in grep ggrep; do
13403     for ac_exec_ext in '' $ac_executable_extensions; do
13404       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13405       as_fn_executable_p "$ac_path_GREP" || continue
13406 # Check for GNU ac_path_GREP and select it if it is found.
13407   # Check for GNU $ac_path_GREP
13408 case `"$ac_path_GREP" --version 2>&1` in
13409 *GNU*)
13410   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13411 *)
13412   ac_count=0
13413   $as_echo_n 0123456789 >"conftest.in"
13414   while :
13415   do
13416     cat "conftest.in" "conftest.in" >"conftest.tmp"
13417     mv "conftest.tmp" "conftest.in"
13418     cp "conftest.in" "conftest.nl"
13419     $as_echo 'GREP' >> "conftest.nl"
13420     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13421     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13422     as_fn_arith $ac_count + 1 && ac_count=$as_val
13423     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13424       # Best one so far, save it but keep looking for a better one
13425       ac_cv_path_GREP="$ac_path_GREP"
13426       ac_path_GREP_max=$ac_count
13427     fi
13428     # 10*(2^10) chars as input seems more than enough
13429     test $ac_count -gt 10 && break
13430   done
13431   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13432 esac
13433 
13434       $ac_path_GREP_found && break 3
13435     done
13436   done
13437   done
13438 IFS=$as_save_IFS
13439   if test -z "$ac_cv_path_GREP"; then
13440     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13441   fi
13442 else
13443   ac_cv_path_GREP=$GREP
13444 fi
13445 
13446 fi
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13448 $as_echo "$ac_cv_path_GREP" >&6; }
13449  GREP="$ac_cv_path_GREP"
13450 
13451 
13452     else
13453       # If it succeeded, then it was overridden by the user. We will use it
13454       # for the tool.
13455 
13456       # First remove it from the list of overridden variables, so we can test
13457       # for unknown variables in the end.
13458       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13459 
13460       # Check if we try to supply an empty value
13461       if test "x$GREP" = x; then
13462         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13463 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13464         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13465 $as_echo_n "checking for GREP... " >&6; }
13466         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13467 $as_echo "disabled" >&6; }
13468       else
13469         # Check if the provided tool contains a complete path.
13470         tool_specified="$GREP"
13471         tool_basename="${tool_specified##*/}"
13472         if test "x$tool_basename" = "x$tool_specified"; then
13473           # A command without a complete path is provided, search $PATH.
13474           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13475 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13476           # Extract the first word of "$tool_basename", so it can be a program name with args.
13477 set dummy $tool_basename; ac_word=$2
13478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13479 $as_echo_n "checking for $ac_word... " >&6; }
13480 if ${ac_cv_path_GREP+:} false; then :
13481   $as_echo_n "(cached) " >&6
13482 else
13483   case $GREP in
13484   [\\/]* | ?:[\\/]*)
13485   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13486   ;;
13487   *)
13488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13489 for as_dir in $PATH
13490 do
13491   IFS=$as_save_IFS
13492   test -z "$as_dir" && as_dir=.
13493     for ac_exec_ext in '' $ac_executable_extensions; do
13494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13495     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13497     break 2
13498   fi
13499 done
13500   done
13501 IFS=$as_save_IFS
13502 
13503   ;;
13504 esac
13505 fi
13506 GREP=$ac_cv_path_GREP
13507 if test -n "$GREP"; then
13508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13509 $as_echo "$GREP" >&6; }
13510 else
13511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512 $as_echo "no" >&6; }
13513 fi
13514 
13515 
13516           if test "x$GREP" = x; then
13517             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13518           fi
13519         else
13520           # Otherwise we believe it is a complete path. Use it as it is.
13521           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13522 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13523           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13524 $as_echo_n "checking for GREP... " >&6; }
13525           if test ! -x "$tool_specified"; then
13526             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13527 $as_echo "not found" >&6; }
13528             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13529           fi
13530           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13531 $as_echo "$tool_specified" >&6; }
13532         fi
13533       fi
13534     fi
13535 
13536   fi
13537 
13538 
13539   if test "x$GREP" = x; then
13540     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13541   fi
13542 
13543 
13544 
13545 
13546   # Publish this variable in the help.
13547 
13548 
13549   if [ -z "${EGREP+x}" ]; then
13550     # The variable is not set by user, try to locate tool using the code snippet
13551     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13552 $as_echo_n "checking for egrep... " >&6; }
13553 if ${ac_cv_path_EGREP+:} false; then :
13554   $as_echo_n "(cached) " >&6
13555 else
13556   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13557    then ac_cv_path_EGREP="$GREP -E"
13558    else
13559      if test -z "$EGREP"; then
13560   ac_path_EGREP_found=false
13561   # Loop through the user's path and test for each of PROGNAME-LIST
13562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13563 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13564 do
13565   IFS=$as_save_IFS
13566   test -z "$as_dir" && as_dir=.
13567     for ac_prog in egrep; do
13568     for ac_exec_ext in '' $ac_executable_extensions; do
13569       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13570       as_fn_executable_p "$ac_path_EGREP" || continue
13571 # Check for GNU ac_path_EGREP and select it if it is found.
13572   # Check for GNU $ac_path_EGREP
13573 case `"$ac_path_EGREP" --version 2>&1` in
13574 *GNU*)
13575   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13576 *)
13577   ac_count=0
13578   $as_echo_n 0123456789 >"conftest.in"
13579   while :
13580   do
13581     cat "conftest.in" "conftest.in" >"conftest.tmp"
13582     mv "conftest.tmp" "conftest.in"
13583     cp "conftest.in" "conftest.nl"
13584     $as_echo 'EGREP' >> "conftest.nl"
13585     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13586     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13587     as_fn_arith $ac_count + 1 && ac_count=$as_val
13588     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13589       # Best one so far, save it but keep looking for a better one
13590       ac_cv_path_EGREP="$ac_path_EGREP"
13591       ac_path_EGREP_max=$ac_count
13592     fi
13593     # 10*(2^10) chars as input seems more than enough
13594     test $ac_count -gt 10 && break
13595   done
13596   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13597 esac
13598 
13599       $ac_path_EGREP_found && break 3
13600     done
13601   done
13602   done
13603 IFS=$as_save_IFS
13604   if test -z "$ac_cv_path_EGREP"; then
13605     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13606   fi
13607 else
13608   ac_cv_path_EGREP=$EGREP
13609 fi
13610 
13611    fi
13612 fi
13613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13614 $as_echo "$ac_cv_path_EGREP" >&6; }
13615  EGREP="$ac_cv_path_EGREP"
13616 
13617 
13618   else
13619     # The variable is set, but is it from the command line or the environment?
13620 
13621     # Try to remove the string !EGREP! from our list.
13622     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13623     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13624       # If it failed, the variable was not from the command line. Ignore it,
13625       # but warn the user (except for BASH, which is always set by the calling BASH).
13626       if test "xEGREP" != xBASH; then
13627         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13628 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13629       fi
13630       # Try to locate tool using the code snippet
13631       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13632 $as_echo_n "checking for egrep... " >&6; }
13633 if ${ac_cv_path_EGREP+:} false; then :
13634   $as_echo_n "(cached) " >&6
13635 else
13636   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13637    then ac_cv_path_EGREP="$GREP -E"
13638    else
13639      if test -z "$EGREP"; then
13640   ac_path_EGREP_found=false
13641   # Loop through the user's path and test for each of PROGNAME-LIST
13642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13643 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13644 do
13645   IFS=$as_save_IFS
13646   test -z "$as_dir" && as_dir=.
13647     for ac_prog in egrep; do
13648     for ac_exec_ext in '' $ac_executable_extensions; do
13649       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13650       as_fn_executable_p "$ac_path_EGREP" || continue
13651 # Check for GNU ac_path_EGREP and select it if it is found.
13652   # Check for GNU $ac_path_EGREP
13653 case `"$ac_path_EGREP" --version 2>&1` in
13654 *GNU*)
13655   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13656 *)
13657   ac_count=0
13658   $as_echo_n 0123456789 >"conftest.in"
13659   while :
13660   do
13661     cat "conftest.in" "conftest.in" >"conftest.tmp"
13662     mv "conftest.tmp" "conftest.in"
13663     cp "conftest.in" "conftest.nl"
13664     $as_echo 'EGREP' >> "conftest.nl"
13665     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13666     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13667     as_fn_arith $ac_count + 1 && ac_count=$as_val
13668     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13669       # Best one so far, save it but keep looking for a better one
13670       ac_cv_path_EGREP="$ac_path_EGREP"
13671       ac_path_EGREP_max=$ac_count
13672     fi
13673     # 10*(2^10) chars as input seems more than enough
13674     test $ac_count -gt 10 && break
13675   done
13676   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13677 esac
13678 
13679       $ac_path_EGREP_found && break 3
13680     done
13681   done
13682   done
13683 IFS=$as_save_IFS
13684   if test -z "$ac_cv_path_EGREP"; then
13685     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13686   fi
13687 else
13688   ac_cv_path_EGREP=$EGREP
13689 fi
13690 
13691    fi
13692 fi
13693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13694 $as_echo "$ac_cv_path_EGREP" >&6; }
13695  EGREP="$ac_cv_path_EGREP"
13696 
13697 
13698     else
13699       # If it succeeded, then it was overridden by the user. We will use it
13700       # for the tool.
13701 
13702       # First remove it from the list of overridden variables, so we can test
13703       # for unknown variables in the end.
13704       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13705 
13706       # Check if we try to supply an empty value
13707       if test "x$EGREP" = x; then
13708         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13709 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13710         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13711 $as_echo_n "checking for EGREP... " >&6; }
13712         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13713 $as_echo "disabled" >&6; }
13714       else
13715         # Check if the provided tool contains a complete path.
13716         tool_specified="$EGREP"
13717         tool_basename="${tool_specified##*/}"
13718         if test "x$tool_basename" = "x$tool_specified"; then
13719           # A command without a complete path is provided, search $PATH.
13720           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13721 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13722           # Extract the first word of "$tool_basename", so it can be a program name with args.
13723 set dummy $tool_basename; ac_word=$2
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13725 $as_echo_n "checking for $ac_word... " >&6; }
13726 if ${ac_cv_path_EGREP+:} false; then :
13727   $as_echo_n "(cached) " >&6
13728 else
13729   case $EGREP in
13730   [\\/]* | ?:[\\/]*)
13731   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13732   ;;
13733   *)
13734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13735 for as_dir in $PATH
13736 do
13737   IFS=$as_save_IFS
13738   test -z "$as_dir" && as_dir=.
13739     for ac_exec_ext in '' $ac_executable_extensions; do
13740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13741     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13743     break 2
13744   fi
13745 done
13746   done
13747 IFS=$as_save_IFS
13748 
13749   ;;
13750 esac
13751 fi
13752 EGREP=$ac_cv_path_EGREP
13753 if test -n "$EGREP"; then
13754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13755 $as_echo "$EGREP" >&6; }
13756 else
13757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13758 $as_echo "no" >&6; }
13759 fi
13760 
13761 
13762           if test "x$EGREP" = x; then
13763             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13764           fi
13765         else
13766           # Otherwise we believe it is a complete path. Use it as it is.
13767           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13768 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13769           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13770 $as_echo_n "checking for EGREP... " >&6; }
13771           if test ! -x "$tool_specified"; then
13772             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13773 $as_echo "not found" >&6; }
13774             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13775           fi
13776           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13777 $as_echo "$tool_specified" >&6; }
13778         fi
13779       fi
13780     fi
13781 
13782   fi
13783 
13784 
13785   if test "x$EGREP" = x; then
13786     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13787   fi
13788 
13789 
13790 
13791 
13792   # Publish this variable in the help.
13793 
13794 
13795   if [ -z "${FGREP+x}" ]; then
13796     # The variable is not set by user, try to locate tool using the code snippet
13797     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13798 $as_echo_n "checking for fgrep... " >&6; }
13799 if ${ac_cv_path_FGREP+:} false; then :
13800   $as_echo_n "(cached) " >&6
13801 else
13802   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13803    then ac_cv_path_FGREP="$GREP -F"
13804    else
13805      if test -z "$FGREP"; then
13806   ac_path_FGREP_found=false
13807   # Loop through the user's path and test for each of PROGNAME-LIST
13808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13809 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13810 do
13811   IFS=$as_save_IFS
13812   test -z "$as_dir" && as_dir=.
13813     for ac_prog in fgrep; do
13814     for ac_exec_ext in '' $ac_executable_extensions; do
13815       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13816       as_fn_executable_p "$ac_path_FGREP" || continue
13817 # Check for GNU ac_path_FGREP and select it if it is found.
13818   # Check for GNU $ac_path_FGREP
13819 case `"$ac_path_FGREP" --version 2>&1` in
13820 *GNU*)
13821   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13822 *)
13823   ac_count=0
13824   $as_echo_n 0123456789 >"conftest.in"
13825   while :
13826   do
13827     cat "conftest.in" "conftest.in" >"conftest.tmp"
13828     mv "conftest.tmp" "conftest.in"
13829     cp "conftest.in" "conftest.nl"
13830     $as_echo 'FGREP' >> "conftest.nl"
13831     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13832     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13833     as_fn_arith $ac_count + 1 && ac_count=$as_val
13834     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13835       # Best one so far, save it but keep looking for a better one
13836       ac_cv_path_FGREP="$ac_path_FGREP"
13837       ac_path_FGREP_max=$ac_count
13838     fi
13839     # 10*(2^10) chars as input seems more than enough
13840     test $ac_count -gt 10 && break
13841   done
13842   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13843 esac
13844 
13845       $ac_path_FGREP_found && break 3
13846     done
13847   done
13848   done
13849 IFS=$as_save_IFS
13850   if test -z "$ac_cv_path_FGREP"; then
13851     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13852   fi
13853 else
13854   ac_cv_path_FGREP=$FGREP
13855 fi
13856 
13857    fi
13858 fi
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13860 $as_echo "$ac_cv_path_FGREP" >&6; }
13861  FGREP="$ac_cv_path_FGREP"
13862 
13863 
13864   else
13865     # The variable is set, but is it from the command line or the environment?
13866 
13867     # Try to remove the string !FGREP! from our list.
13868     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13869     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13870       # If it failed, the variable was not from the command line. Ignore it,
13871       # but warn the user (except for BASH, which is always set by the calling BASH).
13872       if test "xFGREP" != xBASH; then
13873         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13874 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13875       fi
13876       # Try to locate tool using the code snippet
13877       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13878 $as_echo_n "checking for fgrep... " >&6; }
13879 if ${ac_cv_path_FGREP+:} false; then :
13880   $as_echo_n "(cached) " >&6
13881 else
13882   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13883    then ac_cv_path_FGREP="$GREP -F"
13884    else
13885      if test -z "$FGREP"; then
13886   ac_path_FGREP_found=false
13887   # Loop through the user's path and test for each of PROGNAME-LIST
13888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13889 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13890 do
13891   IFS=$as_save_IFS
13892   test -z "$as_dir" && as_dir=.
13893     for ac_prog in fgrep; do
13894     for ac_exec_ext in '' $ac_executable_extensions; do
13895       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13896       as_fn_executable_p "$ac_path_FGREP" || continue
13897 # Check for GNU ac_path_FGREP and select it if it is found.
13898   # Check for GNU $ac_path_FGREP
13899 case `"$ac_path_FGREP" --version 2>&1` in
13900 *GNU*)
13901   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13902 *)
13903   ac_count=0
13904   $as_echo_n 0123456789 >"conftest.in"
13905   while :
13906   do
13907     cat "conftest.in" "conftest.in" >"conftest.tmp"
13908     mv "conftest.tmp" "conftest.in"
13909     cp "conftest.in" "conftest.nl"
13910     $as_echo 'FGREP' >> "conftest.nl"
13911     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13912     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13913     as_fn_arith $ac_count + 1 && ac_count=$as_val
13914     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13915       # Best one so far, save it but keep looking for a better one
13916       ac_cv_path_FGREP="$ac_path_FGREP"
13917       ac_path_FGREP_max=$ac_count
13918     fi
13919     # 10*(2^10) chars as input seems more than enough
13920     test $ac_count -gt 10 && break
13921   done
13922   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13923 esac
13924 
13925       $ac_path_FGREP_found && break 3
13926     done
13927   done
13928   done
13929 IFS=$as_save_IFS
13930   if test -z "$ac_cv_path_FGREP"; then
13931     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13932   fi
13933 else
13934   ac_cv_path_FGREP=$FGREP
13935 fi
13936 
13937    fi
13938 fi
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13940 $as_echo "$ac_cv_path_FGREP" >&6; }
13941  FGREP="$ac_cv_path_FGREP"
13942 
13943 
13944     else
13945       # If it succeeded, then it was overridden by the user. We will use it
13946       # for the tool.
13947 
13948       # First remove it from the list of overridden variables, so we can test
13949       # for unknown variables in the end.
13950       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13951 
13952       # Check if we try to supply an empty value
13953       if test "x$FGREP" = x; then
13954         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13955 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13956         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13957 $as_echo_n "checking for FGREP... " >&6; }
13958         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13959 $as_echo "disabled" >&6; }
13960       else
13961         # Check if the provided tool contains a complete path.
13962         tool_specified="$FGREP"
13963         tool_basename="${tool_specified##*/}"
13964         if test "x$tool_basename" = "x$tool_specified"; then
13965           # A command without a complete path is provided, search $PATH.
13966           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13967 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13968           # Extract the first word of "$tool_basename", so it can be a program name with args.
13969 set dummy $tool_basename; ac_word=$2
13970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13971 $as_echo_n "checking for $ac_word... " >&6; }
13972 if ${ac_cv_path_FGREP+:} false; then :
13973   $as_echo_n "(cached) " >&6
13974 else
13975   case $FGREP in
13976   [\\/]* | ?:[\\/]*)
13977   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13978   ;;
13979   *)
13980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13981 for as_dir in $PATH
13982 do
13983   IFS=$as_save_IFS
13984   test -z "$as_dir" && as_dir=.
13985     for ac_exec_ext in '' $ac_executable_extensions; do
13986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13987     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13989     break 2
13990   fi
13991 done
13992   done
13993 IFS=$as_save_IFS
13994 
13995   ;;
13996 esac
13997 fi
13998 FGREP=$ac_cv_path_FGREP
13999 if test -n "$FGREP"; then
14000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14001 $as_echo "$FGREP" >&6; }
14002 else
14003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14004 $as_echo "no" >&6; }
14005 fi
14006 
14007 
14008           if test "x$FGREP" = x; then
14009             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14010           fi
14011         else
14012           # Otherwise we believe it is a complete path. Use it as it is.
14013           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14014 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14015           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14016 $as_echo_n "checking for FGREP... " >&6; }
14017           if test ! -x "$tool_specified"; then
14018             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14019 $as_echo "not found" >&6; }
14020             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14021           fi
14022           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14023 $as_echo "$tool_specified" >&6; }
14024         fi
14025       fi
14026     fi
14027 
14028   fi
14029 
14030 
14031   if test "x$FGREP" = x; then
14032     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14033   fi
14034 
14035 
14036 
14037 
14038   # Publish this variable in the help.
14039 
14040 
14041   if [ -z "${SED+x}" ]; then
14042     # The variable is not set by user, try to locate tool using the code snippet
14043     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14044 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14045 if ${ac_cv_path_SED+:} false; then :
14046   $as_echo_n "(cached) " >&6
14047 else
14048             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14049      for ac_i in 1 2 3 4 5 6 7; do
14050        ac_script="$ac_script$as_nl$ac_script"
14051      done
14052      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14053      { ac_script=; unset ac_script;}
14054      if test -z "$SED"; then
14055   ac_path_SED_found=false
14056   # Loop through the user's path and test for each of PROGNAME-LIST
14057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14058 for as_dir in $PATH
14059 do
14060   IFS=$as_save_IFS
14061   test -z "$as_dir" && as_dir=.
14062     for ac_prog in sed gsed; do
14063     for ac_exec_ext in '' $ac_executable_extensions; do
14064       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14065       as_fn_executable_p "$ac_path_SED" || continue
14066 # Check for GNU ac_path_SED and select it if it is found.
14067   # Check for GNU $ac_path_SED
14068 case `"$ac_path_SED" --version 2>&1` in
14069 *GNU*)
14070   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14071 *)
14072   ac_count=0
14073   $as_echo_n 0123456789 >"conftest.in"
14074   while :
14075   do
14076     cat "conftest.in" "conftest.in" >"conftest.tmp"
14077     mv "conftest.tmp" "conftest.in"
14078     cp "conftest.in" "conftest.nl"
14079     $as_echo '' >> "conftest.nl"
14080     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14081     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14082     as_fn_arith $ac_count + 1 && ac_count=$as_val
14083     if test $ac_count -gt ${ac_path_SED_max-0}; then
14084       # Best one so far, save it but keep looking for a better one
14085       ac_cv_path_SED="$ac_path_SED"
14086       ac_path_SED_max=$ac_count
14087     fi
14088     # 10*(2^10) chars as input seems more than enough
14089     test $ac_count -gt 10 && break
14090   done
14091   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14092 esac
14093 
14094       $ac_path_SED_found && break 3
14095     done
14096   done
14097   done
14098 IFS=$as_save_IFS
14099   if test -z "$ac_cv_path_SED"; then
14100     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14101   fi
14102 else
14103   ac_cv_path_SED=$SED
14104 fi
14105 
14106 fi
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14108 $as_echo "$ac_cv_path_SED" >&6; }
14109  SED="$ac_cv_path_SED"
14110   rm -f conftest.sed
14111 
14112   else
14113     # The variable is set, but is it from the command line or the environment?
14114 
14115     # Try to remove the string !SED! from our list.
14116     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14117     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14118       # If it failed, the variable was not from the command line. Ignore it,
14119       # but warn the user (except for BASH, which is always set by the calling BASH).
14120       if test "xSED" != xBASH; then
14121         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14122 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14123       fi
14124       # Try to locate tool using the code snippet
14125       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14126 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14127 if ${ac_cv_path_SED+:} false; then :
14128   $as_echo_n "(cached) " >&6
14129 else
14130             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14131      for ac_i in 1 2 3 4 5 6 7; do
14132        ac_script="$ac_script$as_nl$ac_script"
14133      done
14134      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14135      { ac_script=; unset ac_script;}
14136      if test -z "$SED"; then
14137   ac_path_SED_found=false
14138   # Loop through the user's path and test for each of PROGNAME-LIST
14139   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14140 for as_dir in $PATH
14141 do
14142   IFS=$as_save_IFS
14143   test -z "$as_dir" && as_dir=.
14144     for ac_prog in sed gsed; do
14145     for ac_exec_ext in '' $ac_executable_extensions; do
14146       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14147       as_fn_executable_p "$ac_path_SED" || continue
14148 # Check for GNU ac_path_SED and select it if it is found.
14149   # Check for GNU $ac_path_SED
14150 case `"$ac_path_SED" --version 2>&1` in
14151 *GNU*)
14152   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14153 *)
14154   ac_count=0
14155   $as_echo_n 0123456789 >"conftest.in"
14156   while :
14157   do
14158     cat "conftest.in" "conftest.in" >"conftest.tmp"
14159     mv "conftest.tmp" "conftest.in"
14160     cp "conftest.in" "conftest.nl"
14161     $as_echo '' >> "conftest.nl"
14162     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14163     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14164     as_fn_arith $ac_count + 1 && ac_count=$as_val
14165     if test $ac_count -gt ${ac_path_SED_max-0}; then
14166       # Best one so far, save it but keep looking for a better one
14167       ac_cv_path_SED="$ac_path_SED"
14168       ac_path_SED_max=$ac_count
14169     fi
14170     # 10*(2^10) chars as input seems more than enough
14171     test $ac_count -gt 10 && break
14172   done
14173   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14174 esac
14175 
14176       $ac_path_SED_found && break 3
14177     done
14178   done
14179   done
14180 IFS=$as_save_IFS
14181   if test -z "$ac_cv_path_SED"; then
14182     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14183   fi
14184 else
14185   ac_cv_path_SED=$SED
14186 fi
14187 
14188 fi
14189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14190 $as_echo "$ac_cv_path_SED" >&6; }
14191  SED="$ac_cv_path_SED"
14192   rm -f conftest.sed
14193 
14194     else
14195       # If it succeeded, then it was overridden by the user. We will use it
14196       # for the tool.
14197 
14198       # First remove it from the list of overridden variables, so we can test
14199       # for unknown variables in the end.
14200       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14201 
14202       # Check if we try to supply an empty value
14203       if test "x$SED" = x; then
14204         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14205 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14206         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14207 $as_echo_n "checking for SED... " >&6; }
14208         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14209 $as_echo "disabled" >&6; }
14210       else
14211         # Check if the provided tool contains a complete path.
14212         tool_specified="$SED"
14213         tool_basename="${tool_specified##*/}"
14214         if test "x$tool_basename" = "x$tool_specified"; then
14215           # A command without a complete path is provided, search $PATH.
14216           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14217 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14218           # Extract the first word of "$tool_basename", so it can be a program name with args.
14219 set dummy $tool_basename; ac_word=$2
14220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14221 $as_echo_n "checking for $ac_word... " >&6; }
14222 if ${ac_cv_path_SED+:} false; then :
14223   $as_echo_n "(cached) " >&6
14224 else
14225   case $SED in
14226   [\\/]* | ?:[\\/]*)
14227   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14228   ;;
14229   *)
14230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14231 for as_dir in $PATH
14232 do
14233   IFS=$as_save_IFS
14234   test -z "$as_dir" && as_dir=.
14235     for ac_exec_ext in '' $ac_executable_extensions; do
14236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14237     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14239     break 2
14240   fi
14241 done
14242   done
14243 IFS=$as_save_IFS
14244 
14245   ;;
14246 esac
14247 fi
14248 SED=$ac_cv_path_SED
14249 if test -n "$SED"; then
14250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14251 $as_echo "$SED" >&6; }
14252 else
14253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14254 $as_echo "no" >&6; }
14255 fi
14256 
14257 
14258           if test "x$SED" = x; then
14259             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14260           fi
14261         else
14262           # Otherwise we believe it is a complete path. Use it as it is.
14263           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14264 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14265           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14266 $as_echo_n "checking for SED... " >&6; }
14267           if test ! -x "$tool_specified"; then
14268             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14269 $as_echo "not found" >&6; }
14270             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14271           fi
14272           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14273 $as_echo "$tool_specified" >&6; }
14274         fi
14275       fi
14276     fi
14277 
14278   fi
14279 
14280 
14281   if test "x$SED" = x; then
14282     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14283   fi
14284 
14285 
14286 
14287   # Always force rm.
14288   RM="$RM -f"
14289 
14290   # pwd behaves differently on various platforms and some don't support the -L flag.
14291   # Always use the bash builtin pwd to get uniform behavior.
14292   THEPWDCMD=pwd
14293 
14294   # These are not required on all platforms
14295 
14296 
14297   # Publish this variable in the help.
14298 
14299 
14300   if [ -z "${CYGPATH+x}" ]; then
14301     # The variable is not set by user, try to locate tool using the code snippet
14302     for ac_prog in cygpath
14303 do
14304   # Extract the first word of "$ac_prog", so it can be a program name with args.
14305 set dummy $ac_prog; ac_word=$2
14306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14307 $as_echo_n "checking for $ac_word... " >&6; }
14308 if ${ac_cv_path_CYGPATH+:} false; then :
14309   $as_echo_n "(cached) " >&6
14310 else
14311   case $CYGPATH in
14312   [\\/]* | ?:[\\/]*)
14313   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14314   ;;
14315   *)
14316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14317 for as_dir in $PATH
14318 do
14319   IFS=$as_save_IFS
14320   test -z "$as_dir" && as_dir=.
14321     for ac_exec_ext in '' $ac_executable_extensions; do
14322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14323     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14325     break 2
14326   fi
14327 done
14328   done
14329 IFS=$as_save_IFS
14330 
14331   ;;
14332 esac
14333 fi
14334 CYGPATH=$ac_cv_path_CYGPATH
14335 if test -n "$CYGPATH"; then
14336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14337 $as_echo "$CYGPATH" >&6; }
14338 else
14339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14340 $as_echo "no" >&6; }
14341 fi
14342 
14343 
14344   test -n "$CYGPATH" && break
14345 done
14346 
14347   else
14348     # The variable is set, but is it from the command line or the environment?
14349 
14350     # Try to remove the string !CYGPATH! from our list.
14351     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14352     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14353       # If it failed, the variable was not from the command line. Ignore it,
14354       # but warn the user (except for BASH, which is always set by the calling BASH).
14355       if test "xCYGPATH" != xBASH; then
14356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14357 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14358       fi
14359       # Try to locate tool using the code snippet
14360       for ac_prog in cygpath
14361 do
14362   # Extract the first word of "$ac_prog", so it can be a program name with args.
14363 set dummy $ac_prog; ac_word=$2
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14365 $as_echo_n "checking for $ac_word... " >&6; }
14366 if ${ac_cv_path_CYGPATH+:} false; then :
14367   $as_echo_n "(cached) " >&6
14368 else
14369   case $CYGPATH in
14370   [\\/]* | ?:[\\/]*)
14371   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14372   ;;
14373   *)
14374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14375 for as_dir in $PATH
14376 do
14377   IFS=$as_save_IFS
14378   test -z "$as_dir" && as_dir=.
14379     for ac_exec_ext in '' $ac_executable_extensions; do
14380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14381     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14383     break 2
14384   fi
14385 done
14386   done
14387 IFS=$as_save_IFS
14388 
14389   ;;
14390 esac
14391 fi
14392 CYGPATH=$ac_cv_path_CYGPATH
14393 if test -n "$CYGPATH"; then
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14395 $as_echo "$CYGPATH" >&6; }
14396 else
14397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14398 $as_echo "no" >&6; }
14399 fi
14400 
14401 
14402   test -n "$CYGPATH" && break
14403 done
14404 
14405     else
14406       # If it succeeded, then it was overridden by the user. We will use it
14407       # for the tool.
14408 
14409       # First remove it from the list of overridden variables, so we can test
14410       # for unknown variables in the end.
14411       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14412 
14413       # Check if we try to supply an empty value
14414       if test "x$CYGPATH" = x; then
14415         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14416 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14418 $as_echo_n "checking for CYGPATH... " >&6; }
14419         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14420 $as_echo "disabled" >&6; }
14421       else
14422         # Check if the provided tool contains a complete path.
14423         tool_specified="$CYGPATH"
14424         tool_basename="${tool_specified##*/}"
14425         if test "x$tool_basename" = "x$tool_specified"; then
14426           # A command without a complete path is provided, search $PATH.
14427           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14428 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14429           # Extract the first word of "$tool_basename", so it can be a program name with args.
14430 set dummy $tool_basename; ac_word=$2
14431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14432 $as_echo_n "checking for $ac_word... " >&6; }
14433 if ${ac_cv_path_CYGPATH+:} false; then :
14434   $as_echo_n "(cached) " >&6
14435 else
14436   case $CYGPATH in
14437   [\\/]* | ?:[\\/]*)
14438   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14439   ;;
14440   *)
14441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14442 for as_dir in $PATH
14443 do
14444   IFS=$as_save_IFS
14445   test -z "$as_dir" && as_dir=.
14446     for ac_exec_ext in '' $ac_executable_extensions; do
14447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14448     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14450     break 2
14451   fi
14452 done
14453   done
14454 IFS=$as_save_IFS
14455 
14456   ;;
14457 esac
14458 fi
14459 CYGPATH=$ac_cv_path_CYGPATH
14460 if test -n "$CYGPATH"; then
14461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14462 $as_echo "$CYGPATH" >&6; }
14463 else
14464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14465 $as_echo "no" >&6; }
14466 fi
14467 
14468 
14469           if test "x$CYGPATH" = x; then
14470             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14471           fi
14472         else
14473           # Otherwise we believe it is a complete path. Use it as it is.
14474           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14475 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14476           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14477 $as_echo_n "checking for CYGPATH... " >&6; }
14478           if test ! -x "$tool_specified"; then
14479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14480 $as_echo "not found" >&6; }
14481             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14482           fi
14483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14484 $as_echo "$tool_specified" >&6; }
14485         fi
14486       fi
14487     fi
14488 
14489   fi
14490 
14491 
14492 
14493 
14494   # Publish this variable in the help.
14495 
14496 
14497   if [ -z "${READLINK+x}" ]; then
14498     # The variable is not set by user, try to locate tool using the code snippet
14499     for ac_prog in greadlink readlink
14500 do
14501   # Extract the first word of "$ac_prog", so it can be a program name with args.
14502 set dummy $ac_prog; ac_word=$2
14503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14504 $as_echo_n "checking for $ac_word... " >&6; }
14505 if ${ac_cv_path_READLINK+:} false; then :
14506   $as_echo_n "(cached) " >&6
14507 else
14508   case $READLINK in
14509   [\\/]* | ?:[\\/]*)
14510   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14511   ;;
14512   *)
14513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14514 for as_dir in $PATH
14515 do
14516   IFS=$as_save_IFS
14517   test -z "$as_dir" && as_dir=.
14518     for ac_exec_ext in '' $ac_executable_extensions; do
14519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14520     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14522     break 2
14523   fi
14524 done
14525   done
14526 IFS=$as_save_IFS
14527 
14528   ;;
14529 esac
14530 fi
14531 READLINK=$ac_cv_path_READLINK
14532 if test -n "$READLINK"; then
14533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14534 $as_echo "$READLINK" >&6; }
14535 else
14536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14537 $as_echo "no" >&6; }
14538 fi
14539 
14540 
14541   test -n "$READLINK" && break
14542 done
14543 
14544   else
14545     # The variable is set, but is it from the command line or the environment?
14546 
14547     # Try to remove the string !READLINK! from our list.
14548     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14549     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14550       # If it failed, the variable was not from the command line. Ignore it,
14551       # but warn the user (except for BASH, which is always set by the calling BASH).
14552       if test "xREADLINK" != xBASH; then
14553         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14554 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14555       fi
14556       # Try to locate tool using the code snippet
14557       for ac_prog in greadlink readlink
14558 do
14559   # Extract the first word of "$ac_prog", so it can be a program name with args.
14560 set dummy $ac_prog; ac_word=$2
14561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14562 $as_echo_n "checking for $ac_word... " >&6; }
14563 if ${ac_cv_path_READLINK+:} false; then :
14564   $as_echo_n "(cached) " >&6
14565 else
14566   case $READLINK in
14567   [\\/]* | ?:[\\/]*)
14568   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14569   ;;
14570   *)
14571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14572 for as_dir in $PATH
14573 do
14574   IFS=$as_save_IFS
14575   test -z "$as_dir" && as_dir=.
14576     for ac_exec_ext in '' $ac_executable_extensions; do
14577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14578     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14580     break 2
14581   fi
14582 done
14583   done
14584 IFS=$as_save_IFS
14585 
14586   ;;
14587 esac
14588 fi
14589 READLINK=$ac_cv_path_READLINK
14590 if test -n "$READLINK"; then
14591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14592 $as_echo "$READLINK" >&6; }
14593 else
14594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14595 $as_echo "no" >&6; }
14596 fi
14597 
14598 
14599   test -n "$READLINK" && break
14600 done
14601 
14602     else
14603       # If it succeeded, then it was overridden by the user. We will use it
14604       # for the tool.
14605 
14606       # First remove it from the list of overridden variables, so we can test
14607       # for unknown variables in the end.
14608       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14609 
14610       # Check if we try to supply an empty value
14611       if test "x$READLINK" = x; then
14612         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14613 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14614         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14615 $as_echo_n "checking for READLINK... " >&6; }
14616         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14617 $as_echo "disabled" >&6; }
14618       else
14619         # Check if the provided tool contains a complete path.
14620         tool_specified="$READLINK"
14621         tool_basename="${tool_specified##*/}"
14622         if test "x$tool_basename" = "x$tool_specified"; then
14623           # A command without a complete path is provided, search $PATH.
14624           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14625 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14626           # Extract the first word of "$tool_basename", so it can be a program name with args.
14627 set dummy $tool_basename; ac_word=$2
14628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14629 $as_echo_n "checking for $ac_word... " >&6; }
14630 if ${ac_cv_path_READLINK+:} false; then :
14631   $as_echo_n "(cached) " >&6
14632 else
14633   case $READLINK in
14634   [\\/]* | ?:[\\/]*)
14635   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14636   ;;
14637   *)
14638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14639 for as_dir in $PATH
14640 do
14641   IFS=$as_save_IFS
14642   test -z "$as_dir" && as_dir=.
14643     for ac_exec_ext in '' $ac_executable_extensions; do
14644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14645     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14647     break 2
14648   fi
14649 done
14650   done
14651 IFS=$as_save_IFS
14652 
14653   ;;
14654 esac
14655 fi
14656 READLINK=$ac_cv_path_READLINK
14657 if test -n "$READLINK"; then
14658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14659 $as_echo "$READLINK" >&6; }
14660 else
14661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14662 $as_echo "no" >&6; }
14663 fi
14664 
14665 
14666           if test "x$READLINK" = x; then
14667             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14668           fi
14669         else
14670           # Otherwise we believe it is a complete path. Use it as it is.
14671           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14672 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14673           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14674 $as_echo_n "checking for READLINK... " >&6; }
14675           if test ! -x "$tool_specified"; then
14676             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14677 $as_echo "not found" >&6; }
14678             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14679           fi
14680           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14681 $as_echo "$tool_specified" >&6; }
14682         fi
14683       fi
14684     fi
14685 
14686   fi
14687 
14688 
14689 
14690 
14691   # Publish this variable in the help.
14692 
14693 
14694   if [ -z "${DF+x}" ]; then
14695     # The variable is not set by user, try to locate tool using the code snippet
14696     for ac_prog in df
14697 do
14698   # Extract the first word of "$ac_prog", so it can be a program name with args.
14699 set dummy $ac_prog; ac_word=$2
14700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14701 $as_echo_n "checking for $ac_word... " >&6; }
14702 if ${ac_cv_path_DF+:} false; then :
14703   $as_echo_n "(cached) " >&6
14704 else
14705   case $DF in
14706   [\\/]* | ?:[\\/]*)
14707   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14708   ;;
14709   *)
14710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14711 for as_dir in $PATH
14712 do
14713   IFS=$as_save_IFS
14714   test -z "$as_dir" && as_dir=.
14715     for ac_exec_ext in '' $ac_executable_extensions; do
14716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14717     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14719     break 2
14720   fi
14721 done
14722   done
14723 IFS=$as_save_IFS
14724 
14725   ;;
14726 esac
14727 fi
14728 DF=$ac_cv_path_DF
14729 if test -n "$DF"; then
14730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14731 $as_echo "$DF" >&6; }
14732 else
14733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14734 $as_echo "no" >&6; }
14735 fi
14736 
14737 
14738   test -n "$DF" && break
14739 done
14740 
14741   else
14742     # The variable is set, but is it from the command line or the environment?
14743 
14744     # Try to remove the string !DF! from our list.
14745     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14746     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14747       # If it failed, the variable was not from the command line. Ignore it,
14748       # but warn the user (except for BASH, which is always set by the calling BASH).
14749       if test "xDF" != xBASH; then
14750         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14751 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14752       fi
14753       # Try to locate tool using the code snippet
14754       for ac_prog in df
14755 do
14756   # Extract the first word of "$ac_prog", so it can be a program name with args.
14757 set dummy $ac_prog; ac_word=$2
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14759 $as_echo_n "checking for $ac_word... " >&6; }
14760 if ${ac_cv_path_DF+:} false; then :
14761   $as_echo_n "(cached) " >&6
14762 else
14763   case $DF in
14764   [\\/]* | ?:[\\/]*)
14765   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14766   ;;
14767   *)
14768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14769 for as_dir in $PATH
14770 do
14771   IFS=$as_save_IFS
14772   test -z "$as_dir" && as_dir=.
14773     for ac_exec_ext in '' $ac_executable_extensions; do
14774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14775     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14777     break 2
14778   fi
14779 done
14780   done
14781 IFS=$as_save_IFS
14782 
14783   ;;
14784 esac
14785 fi
14786 DF=$ac_cv_path_DF
14787 if test -n "$DF"; then
14788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14789 $as_echo "$DF" >&6; }
14790 else
14791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14792 $as_echo "no" >&6; }
14793 fi
14794 
14795 
14796   test -n "$DF" && break
14797 done
14798 
14799     else
14800       # If it succeeded, then it was overridden by the user. We will use it
14801       # for the tool.
14802 
14803       # First remove it from the list of overridden variables, so we can test
14804       # for unknown variables in the end.
14805       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14806 
14807       # Check if we try to supply an empty value
14808       if test "x$DF" = x; then
14809         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14810 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14811         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14812 $as_echo_n "checking for DF... " >&6; }
14813         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14814 $as_echo "disabled" >&6; }
14815       else
14816         # Check if the provided tool contains a complete path.
14817         tool_specified="$DF"
14818         tool_basename="${tool_specified##*/}"
14819         if test "x$tool_basename" = "x$tool_specified"; then
14820           # A command without a complete path is provided, search $PATH.
14821           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14822 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14823           # Extract the first word of "$tool_basename", so it can be a program name with args.
14824 set dummy $tool_basename; ac_word=$2
14825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14826 $as_echo_n "checking for $ac_word... " >&6; }
14827 if ${ac_cv_path_DF+:} false; then :
14828   $as_echo_n "(cached) " >&6
14829 else
14830   case $DF in
14831   [\\/]* | ?:[\\/]*)
14832   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14833   ;;
14834   *)
14835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14836 for as_dir in $PATH
14837 do
14838   IFS=$as_save_IFS
14839   test -z "$as_dir" && as_dir=.
14840     for ac_exec_ext in '' $ac_executable_extensions; do
14841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14842     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14844     break 2
14845   fi
14846 done
14847   done
14848 IFS=$as_save_IFS
14849 
14850   ;;
14851 esac
14852 fi
14853 DF=$ac_cv_path_DF
14854 if test -n "$DF"; then
14855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14856 $as_echo "$DF" >&6; }
14857 else
14858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14859 $as_echo "no" >&6; }
14860 fi
14861 
14862 
14863           if test "x$DF" = x; then
14864             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14865           fi
14866         else
14867           # Otherwise we believe it is a complete path. Use it as it is.
14868           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14869 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14870           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14871 $as_echo_n "checking for DF... " >&6; }
14872           if test ! -x "$tool_specified"; then
14873             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14874 $as_echo "not found" >&6; }
14875             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14876           fi
14877           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14878 $as_echo "$tool_specified" >&6; }
14879         fi
14880       fi
14881     fi
14882 
14883   fi
14884 
14885 
14886 
14887 
14888   # Publish this variable in the help.
14889 
14890 
14891   if [ -z "${CPIO+x}" ]; then
14892     # The variable is not set by user, try to locate tool using the code snippet
14893     for ac_prog in cpio bsdcpio
14894 do
14895   # Extract the first word of "$ac_prog", so it can be a program name with args.
14896 set dummy $ac_prog; ac_word=$2
14897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14898 $as_echo_n "checking for $ac_word... " >&6; }
14899 if ${ac_cv_path_CPIO+:} false; then :
14900   $as_echo_n "(cached) " >&6
14901 else
14902   case $CPIO in
14903   [\\/]* | ?:[\\/]*)
14904   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14905   ;;
14906   *)
14907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14908 for as_dir in $PATH
14909 do
14910   IFS=$as_save_IFS
14911   test -z "$as_dir" && as_dir=.
14912     for ac_exec_ext in '' $ac_executable_extensions; do
14913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14914     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14916     break 2
14917   fi
14918 done
14919   done
14920 IFS=$as_save_IFS
14921 
14922   ;;
14923 esac
14924 fi
14925 CPIO=$ac_cv_path_CPIO
14926 if test -n "$CPIO"; then
14927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14928 $as_echo "$CPIO" >&6; }
14929 else
14930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14931 $as_echo "no" >&6; }
14932 fi
14933 
14934 
14935   test -n "$CPIO" && break
14936 done
14937 
14938   else
14939     # The variable is set, but is it from the command line or the environment?
14940 
14941     # Try to remove the string !CPIO! from our list.
14942     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14943     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14944       # If it failed, the variable was not from the command line. Ignore it,
14945       # but warn the user (except for BASH, which is always set by the calling BASH).
14946       if test "xCPIO" != xBASH; then
14947         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14948 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14949       fi
14950       # Try to locate tool using the code snippet
14951       for ac_prog in cpio bsdcpio
14952 do
14953   # Extract the first word of "$ac_prog", so it can be a program name with args.
14954 set dummy $ac_prog; ac_word=$2
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14956 $as_echo_n "checking for $ac_word... " >&6; }
14957 if ${ac_cv_path_CPIO+:} false; then :
14958   $as_echo_n "(cached) " >&6
14959 else
14960   case $CPIO in
14961   [\\/]* | ?:[\\/]*)
14962   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14963   ;;
14964   *)
14965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14966 for as_dir in $PATH
14967 do
14968   IFS=$as_save_IFS
14969   test -z "$as_dir" && as_dir=.
14970     for ac_exec_ext in '' $ac_executable_extensions; do
14971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14972     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14974     break 2
14975   fi
14976 done
14977   done
14978 IFS=$as_save_IFS
14979 
14980   ;;
14981 esac
14982 fi
14983 CPIO=$ac_cv_path_CPIO
14984 if test -n "$CPIO"; then
14985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14986 $as_echo "$CPIO" >&6; }
14987 else
14988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14989 $as_echo "no" >&6; }
14990 fi
14991 
14992 
14993   test -n "$CPIO" && break
14994 done
14995 
14996     else
14997       # If it succeeded, then it was overridden by the user. We will use it
14998       # for the tool.
14999 
15000       # First remove it from the list of overridden variables, so we can test
15001       # for unknown variables in the end.
15002       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15003 
15004       # Check if we try to supply an empty value
15005       if test "x$CPIO" = x; then
15006         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15007 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15008         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15009 $as_echo_n "checking for CPIO... " >&6; }
15010         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15011 $as_echo "disabled" >&6; }
15012       else
15013         # Check if the provided tool contains a complete path.
15014         tool_specified="$CPIO"
15015         tool_basename="${tool_specified##*/}"
15016         if test "x$tool_basename" = "x$tool_specified"; then
15017           # A command without a complete path is provided, search $PATH.
15018           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15019 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15020           # Extract the first word of "$tool_basename", so it can be a program name with args.
15021 set dummy $tool_basename; ac_word=$2
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15023 $as_echo_n "checking for $ac_word... " >&6; }
15024 if ${ac_cv_path_CPIO+:} false; then :
15025   $as_echo_n "(cached) " >&6
15026 else
15027   case $CPIO in
15028   [\\/]* | ?:[\\/]*)
15029   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15030   ;;
15031   *)
15032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15033 for as_dir in $PATH
15034 do
15035   IFS=$as_save_IFS
15036   test -z "$as_dir" && as_dir=.
15037     for ac_exec_ext in '' $ac_executable_extensions; do
15038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15039     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15041     break 2
15042   fi
15043 done
15044   done
15045 IFS=$as_save_IFS
15046 
15047   ;;
15048 esac
15049 fi
15050 CPIO=$ac_cv_path_CPIO
15051 if test -n "$CPIO"; then
15052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15053 $as_echo "$CPIO" >&6; }
15054 else
15055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15056 $as_echo "no" >&6; }
15057 fi
15058 
15059 
15060           if test "x$CPIO" = x; then
15061             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15062           fi
15063         else
15064           # Otherwise we believe it is a complete path. Use it as it is.
15065           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15066 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15067           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15068 $as_echo_n "checking for CPIO... " >&6; }
15069           if test ! -x "$tool_specified"; then
15070             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15071 $as_echo "not found" >&6; }
15072             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15073           fi
15074           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15075 $as_echo "$tool_specified" >&6; }
15076         fi
15077       fi
15078     fi
15079 
15080   fi
15081 
15082 
15083 
15084 
15085   # Publish this variable in the help.
15086 
15087 
15088   if [ -z "${NICE+x}" ]; then
15089     # The variable is not set by user, try to locate tool using the code snippet
15090     for ac_prog in nice
15091 do
15092   # Extract the first word of "$ac_prog", so it can be a program name with args.
15093 set dummy $ac_prog; ac_word=$2
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15095 $as_echo_n "checking for $ac_word... " >&6; }
15096 if ${ac_cv_path_NICE+:} false; then :
15097   $as_echo_n "(cached) " >&6
15098 else
15099   case $NICE in
15100   [\\/]* | ?:[\\/]*)
15101   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15102   ;;
15103   *)
15104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15105 for as_dir in $PATH
15106 do
15107   IFS=$as_save_IFS
15108   test -z "$as_dir" && as_dir=.
15109     for ac_exec_ext in '' $ac_executable_extensions; do
15110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15111     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15113     break 2
15114   fi
15115 done
15116   done
15117 IFS=$as_save_IFS
15118 
15119   ;;
15120 esac
15121 fi
15122 NICE=$ac_cv_path_NICE
15123 if test -n "$NICE"; then
15124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15125 $as_echo "$NICE" >&6; }
15126 else
15127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15128 $as_echo "no" >&6; }
15129 fi
15130 
15131 
15132   test -n "$NICE" && break
15133 done
15134 
15135   else
15136     # The variable is set, but is it from the command line or the environment?
15137 
15138     # Try to remove the string !NICE! from our list.
15139     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15140     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15141       # If it failed, the variable was not from the command line. Ignore it,
15142       # but warn the user (except for BASH, which is always set by the calling BASH).
15143       if test "xNICE" != xBASH; then
15144         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15145 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15146       fi
15147       # Try to locate tool using the code snippet
15148       for ac_prog in nice
15149 do
15150   # Extract the first word of "$ac_prog", so it can be a program name with args.
15151 set dummy $ac_prog; ac_word=$2
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15153 $as_echo_n "checking for $ac_word... " >&6; }
15154 if ${ac_cv_path_NICE+:} false; then :
15155   $as_echo_n "(cached) " >&6
15156 else
15157   case $NICE in
15158   [\\/]* | ?:[\\/]*)
15159   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15160   ;;
15161   *)
15162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15163 for as_dir in $PATH
15164 do
15165   IFS=$as_save_IFS
15166   test -z "$as_dir" && as_dir=.
15167     for ac_exec_ext in '' $ac_executable_extensions; do
15168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15169     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15171     break 2
15172   fi
15173 done
15174   done
15175 IFS=$as_save_IFS
15176 
15177   ;;
15178 esac
15179 fi
15180 NICE=$ac_cv_path_NICE
15181 if test -n "$NICE"; then
15182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15183 $as_echo "$NICE" >&6; }
15184 else
15185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15186 $as_echo "no" >&6; }
15187 fi
15188 
15189 
15190   test -n "$NICE" && break
15191 done
15192 
15193     else
15194       # If it succeeded, then it was overridden by the user. We will use it
15195       # for the tool.
15196 
15197       # First remove it from the list of overridden variables, so we can test
15198       # for unknown variables in the end.
15199       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15200 
15201       # Check if we try to supply an empty value
15202       if test "x$NICE" = x; then
15203         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15204 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15206 $as_echo_n "checking for NICE... " >&6; }
15207         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15208 $as_echo "disabled" >&6; }
15209       else
15210         # Check if the provided tool contains a complete path.
15211         tool_specified="$NICE"
15212         tool_basename="${tool_specified##*/}"
15213         if test "x$tool_basename" = "x$tool_specified"; then
15214           # A command without a complete path is provided, search $PATH.
15215           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15216 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15217           # Extract the first word of "$tool_basename", so it can be a program name with args.
15218 set dummy $tool_basename; ac_word=$2
15219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15220 $as_echo_n "checking for $ac_word... " >&6; }
15221 if ${ac_cv_path_NICE+:} false; then :
15222   $as_echo_n "(cached) " >&6
15223 else
15224   case $NICE in
15225   [\\/]* | ?:[\\/]*)
15226   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15227   ;;
15228   *)
15229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15230 for as_dir in $PATH
15231 do
15232   IFS=$as_save_IFS
15233   test -z "$as_dir" && as_dir=.
15234     for ac_exec_ext in '' $ac_executable_extensions; do
15235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15236     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15238     break 2
15239   fi
15240 done
15241   done
15242 IFS=$as_save_IFS
15243 
15244   ;;
15245 esac
15246 fi
15247 NICE=$ac_cv_path_NICE
15248 if test -n "$NICE"; then
15249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15250 $as_echo "$NICE" >&6; }
15251 else
15252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15253 $as_echo "no" >&6; }
15254 fi
15255 
15256 
15257           if test "x$NICE" = x; then
15258             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15259           fi
15260         else
15261           # Otherwise we believe it is a complete path. Use it as it is.
15262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15263 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15264           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15265 $as_echo_n "checking for NICE... " >&6; }
15266           if test ! -x "$tool_specified"; then
15267             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15268 $as_echo "not found" >&6; }
15269             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15270           fi
15271           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15272 $as_echo "$tool_specified" >&6; }
15273         fi
15274       fi
15275     fi
15276 
15277   fi
15278 
15279 
15280 
15281 
15282 # Now we can determine OpenJDK build and target platforms. This is required to
15283 # have early on.
15284 # Make sure we can run config.sub.
15285 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15286   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15287 
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15289 $as_echo_n "checking build system type... " >&6; }
15290 if ${ac_cv_build+:} false; then :
15291   $as_echo_n "(cached) " >&6
15292 else
15293   ac_build_alias=$build_alias
15294 test "x$ac_build_alias" = x &&
15295   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15296 test "x$ac_build_alias" = x &&
15297   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15298 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15299   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15300 
15301 fi
15302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15303 $as_echo "$ac_cv_build" >&6; }
15304 case $ac_cv_build in
15305 *-*-*) ;;
15306 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15307 esac
15308 build=$ac_cv_build
15309 ac_save_IFS=$IFS; IFS='-'
15310 set x $ac_cv_build
15311 shift
15312 build_cpu=$1
15313 build_vendor=$2
15314 shift; shift
15315 # Remember, the first character of IFS is used to create $*,
15316 # except with old shells:
15317 build_os=$*
15318 IFS=$ac_save_IFS
15319 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15320 
15321 
15322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15323 $as_echo_n "checking host system type... " >&6; }
15324 if ${ac_cv_host+:} false; then :
15325   $as_echo_n "(cached) " >&6
15326 else
15327   if test "x$host_alias" = x; then
15328   ac_cv_host=$ac_cv_build
15329 else
15330   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15331     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15332 fi
15333 
15334 fi
15335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15336 $as_echo "$ac_cv_host" >&6; }
15337 case $ac_cv_host in
15338 *-*-*) ;;
15339 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15340 esac
15341 host=$ac_cv_host
15342 ac_save_IFS=$IFS; IFS='-'
15343 set x $ac_cv_host
15344 shift
15345 host_cpu=$1
15346 host_vendor=$2
15347 shift; shift
15348 # Remember, the first character of IFS is used to create $*,
15349 # except with old shells:
15350 host_os=$*
15351 IFS=$ac_save_IFS
15352 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15353 
15354 
15355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15356 $as_echo_n "checking target system type... " >&6; }
15357 if ${ac_cv_target+:} false; then :
15358   $as_echo_n "(cached) " >&6
15359 else
15360   if test "x$target_alias" = x; then
15361   ac_cv_target=$ac_cv_host
15362 else
15363   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15364     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15365 fi
15366 
15367 fi
15368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15369 $as_echo "$ac_cv_target" >&6; }
15370 case $ac_cv_target in
15371 *-*-*) ;;
15372 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15373 esac
15374 target=$ac_cv_target
15375 ac_save_IFS=$IFS; IFS='-'
15376 set x $ac_cv_target
15377 shift
15378 target_cpu=$1
15379 target_vendor=$2
15380 shift; shift
15381 # Remember, the first character of IFS is used to create $*,
15382 # except with old shells:
15383 target_os=$*
15384 IFS=$ac_save_IFS
15385 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15386 
15387 
15388 # The aliases save the names the user supplied, while $host etc.
15389 # will get canonicalized.
15390 test -n "$target_alias" &&
15391   test "$program_prefix$program_suffix$program_transform_name" = \
15392     NONENONEs,x,x, &&
15393   program_prefix=${target_alias}-
15394 
15395   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15396   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15397   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15398   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15399   # to use the configure naming style.
15400 
15401 
15402 
15403 
15404 
15405   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15406   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15407   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15408   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15409   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15410   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15411 
15412 
15413 
15414   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15415 
15416   case "$build_os" in
15417     *linux*)
15418       VAR_OS=linux
15419       VAR_OS_TYPE=unix
15420       ;;
15421     *solaris*)
15422       VAR_OS=solaris
15423       VAR_OS_TYPE=unix
15424       ;;
15425     *darwin*)
15426       VAR_OS=macosx
15427       VAR_OS_TYPE=unix
15428       ;;
15429     *bsd*)
15430       VAR_OS=bsd
15431       VAR_OS_TYPE=unix
15432       ;;
15433     *cygwin*)
15434       VAR_OS=windows
15435       VAR_OS_ENV=windows.cygwin
15436       ;;
15437     *mingw*)
15438       VAR_OS=windows
15439       VAR_OS_ENV=windows.msys
15440       ;;
15441     *aix*)
15442       VAR_OS=aix
15443       VAR_OS_TYPE=unix
15444       ;;
15445     *)
15446       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15447       ;;
15448   esac
15449 
15450 
15451   # First argument is the cpu name from the trip/quad
15452   case "$build_cpu" in
15453     x86_64)
15454       VAR_CPU=x86_64
15455       VAR_CPU_ARCH=x86
15456       VAR_CPU_BITS=64
15457       VAR_CPU_ENDIAN=little
15458       ;;
15459     i?86)
15460       VAR_CPU=x86
15461       VAR_CPU_ARCH=x86
15462       VAR_CPU_BITS=32
15463       VAR_CPU_ENDIAN=little
15464       ;;
15465     arm*)
15466       VAR_CPU=arm
15467       VAR_CPU_ARCH=arm
15468       VAR_CPU_BITS=32
15469       VAR_CPU_ENDIAN=little
15470       ;;
15471     aarch64)
15472       VAR_CPU=aarch64
15473       VAR_CPU_ARCH=aarch64
15474       VAR_CPU_BITS=64
15475       VAR_CPU_ENDIAN=little
15476       ;;
15477     powerpc)
15478       VAR_CPU=ppc
15479       VAR_CPU_ARCH=ppc
15480       VAR_CPU_BITS=32
15481       VAR_CPU_ENDIAN=big
15482       ;;
15483     powerpc64)
15484       VAR_CPU=ppc64
15485       VAR_CPU_ARCH=ppc
15486       VAR_CPU_BITS=64
15487       VAR_CPU_ENDIAN=big
15488       ;;
15489     powerpc64le)
15490       VAR_CPU=ppc64le
15491       VAR_CPU_ARCH=ppc
15492       VAR_CPU_BITS=64
15493       VAR_CPU_ENDIAN=little
15494       ;;
15495     s390)
15496       VAR_CPU=s390
15497       VAR_CPU_ARCH=s390
15498       VAR_CPU_BITS=32
15499       VAR_CPU_ENDIAN=big
15500       ;;
15501     s390x)
15502       VAR_CPU=s390x
15503       VAR_CPU_ARCH=s390
15504       VAR_CPU_BITS=64
15505       VAR_CPU_ENDIAN=big
15506       ;;
15507     sparc)
15508       VAR_CPU=sparc
15509       VAR_CPU_ARCH=sparc
15510       VAR_CPU_BITS=32
15511       VAR_CPU_ENDIAN=big
15512       ;;
15513     sparcv9|sparc64)
15514       VAR_CPU=sparcv9
15515       VAR_CPU_ARCH=sparc
15516       VAR_CPU_BITS=64
15517       VAR_CPU_ENDIAN=big
15518       ;;
15519     *)
15520       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15521       ;;
15522   esac
15523 
15524   # ..and setup our own variables. (Do this explicitely to facilitate searching)
15525   OPENJDK_BUILD_OS="$VAR_OS"
15526   if test "x$VAR_OS_TYPE" != x; then
15527     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15528   else
15529     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15530   fi
15531   if test "x$VAR_OS_ENV" != x; then
15532     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15533   else
15534     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15535   fi
15536   OPENJDK_BUILD_CPU="$VAR_CPU"
15537   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15538   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15539   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15540 
15541 
15542 
15543 
15544 
15545 
15546 
15547 
15548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15549 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15551 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15552 
15553   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15554 
15555   case "$host_os" in
15556     *linux*)
15557       VAR_OS=linux
15558       VAR_OS_TYPE=unix
15559       ;;
15560     *solaris*)
15561       VAR_OS=solaris
15562       VAR_OS_TYPE=unix
15563       ;;
15564     *darwin*)
15565       VAR_OS=macosx
15566       VAR_OS_TYPE=unix
15567       ;;
15568     *bsd*)
15569       VAR_OS=bsd
15570       VAR_OS_TYPE=unix
15571       ;;
15572     *cygwin*)
15573       VAR_OS=windows
15574       VAR_OS_ENV=windows.cygwin
15575       ;;
15576     *mingw*)
15577       VAR_OS=windows
15578       VAR_OS_ENV=windows.msys
15579       ;;
15580     *aix*)
15581       VAR_OS=aix
15582       VAR_OS_TYPE=unix
15583       ;;
15584     *)
15585       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15586       ;;
15587   esac
15588 
15589 
15590   # First argument is the cpu name from the trip/quad
15591   case "$host_cpu" in
15592     x86_64)
15593       VAR_CPU=x86_64
15594       VAR_CPU_ARCH=x86
15595       VAR_CPU_BITS=64
15596       VAR_CPU_ENDIAN=little
15597       ;;
15598     i?86)
15599       VAR_CPU=x86
15600       VAR_CPU_ARCH=x86
15601       VAR_CPU_BITS=32
15602       VAR_CPU_ENDIAN=little
15603       ;;
15604     arm*)
15605       VAR_CPU=arm
15606       VAR_CPU_ARCH=arm
15607       VAR_CPU_BITS=32
15608       VAR_CPU_ENDIAN=little
15609       ;;
15610     aarch64)
15611       VAR_CPU=aarch64
15612       VAR_CPU_ARCH=aarch64
15613       VAR_CPU_BITS=64
15614       VAR_CPU_ENDIAN=little
15615       ;;
15616     powerpc)
15617       VAR_CPU=ppc
15618       VAR_CPU_ARCH=ppc
15619       VAR_CPU_BITS=32
15620       VAR_CPU_ENDIAN=big
15621       ;;
15622     powerpc64)
15623       VAR_CPU=ppc64
15624       VAR_CPU_ARCH=ppc
15625       VAR_CPU_BITS=64
15626       VAR_CPU_ENDIAN=big
15627       ;;
15628     powerpc64le)
15629       VAR_CPU=ppc64le
15630       VAR_CPU_ARCH=ppc
15631       VAR_CPU_BITS=64
15632       VAR_CPU_ENDIAN=little
15633       ;;
15634     s390)
15635       VAR_CPU=s390
15636       VAR_CPU_ARCH=s390
15637       VAR_CPU_BITS=32
15638       VAR_CPU_ENDIAN=big
15639       ;;
15640     s390x)
15641       VAR_CPU=s390x
15642       VAR_CPU_ARCH=s390
15643       VAR_CPU_BITS=64
15644       VAR_CPU_ENDIAN=big
15645       ;;
15646     sparc)
15647       VAR_CPU=sparc
15648       VAR_CPU_ARCH=sparc
15649       VAR_CPU_BITS=32
15650       VAR_CPU_ENDIAN=big
15651       ;;
15652     sparcv9|sparc64)
15653       VAR_CPU=sparcv9
15654       VAR_CPU_ARCH=sparc
15655       VAR_CPU_BITS=64
15656       VAR_CPU_ENDIAN=big
15657       ;;
15658     *)
15659       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15660       ;;
15661   esac
15662 
15663   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15664   OPENJDK_TARGET_OS="$VAR_OS"
15665   if test "x$VAR_OS_TYPE" != x; then
15666     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15667   else
15668     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15669   fi
15670   if test "x$VAR_OS_ENV" != x; then
15671     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15672   else
15673     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15674   fi
15675   OPENJDK_TARGET_CPU="$VAR_CPU"
15676   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15677   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15678   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15679 
15680 
15681 
15682 
15683 
15684 
15685 
15686 
15687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15688 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15690 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15691 
15692 
15693 
15694 # Check whether --with-target-bits was given.
15695 if test "${with_target_bits+set}" = set; then :
15696   withval=$with_target_bits;
15697 fi
15698 
15699 
15700   # We have three types of compiles:
15701   # native  == normal compilation, target system == build system
15702   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15703   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15704   #
15705   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15706     # We're doing a proper cross-compilation
15707     COMPILE_TYPE="cross"
15708   else
15709     COMPILE_TYPE="native"
15710   fi
15711 
15712   if test "x$with_target_bits" != x; then
15713     if test "x$COMPILE_TYPE" = "xcross"; then
15714       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15715     fi
15716 
15717     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15718       # A reduced build is requested
15719       COMPILE_TYPE="reduced"
15720       OPENJDK_TARGET_CPU_BITS=32
15721       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15722         OPENJDK_TARGET_CPU=x86
15723       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15724         OPENJDK_TARGET_CPU=sparc
15725       else
15726         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15727       fi
15728     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15729       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
15730     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15731       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15732 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15733     else
15734       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15735     fi
15736   fi
15737 
15738 
15739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15740 $as_echo_n "checking compilation type... " >&6; }
15741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15742 $as_echo "$COMPILE_TYPE" >&6; }
15743 
15744 
15745   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15746     REQUIRED_OS_NAME=SunOS
15747     REQUIRED_OS_VERSION=5.10
15748   fi
15749   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15750     REQUIRED_OS_NAME=Linux
15751     REQUIRED_OS_VERSION=2.6
15752   fi
15753   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15754     REQUIRED_OS_NAME=Windows
15755     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15756       REQUIRED_OS_VERSION=5.2
15757     else
15758       REQUIRED_OS_VERSION=5.1
15759     fi
15760   fi
15761   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15762     REQUIRED_OS_NAME=Darwin
15763     REQUIRED_OS_VERSION=11.2
15764   fi
15765   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15766     REQUIRED_OS_NAME=AIX
15767     REQUIRED_OS_VERSION=7.1
15768   fi
15769 
15770 
15771 
15772 
15773 
15774 
15775   # Also store the legacy naming of the cpu.
15776   # Ie i586 and amd64 instead of x86 and x86_64
15777   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15778   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15779     OPENJDK_TARGET_CPU_LEGACY="i586"
15780   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15781     # On all platforms except MacOSX replace x86_64 with amd64.
15782     OPENJDK_TARGET_CPU_LEGACY="amd64"
15783   fi
15784 
15785 
15786   # And the second legacy naming of the cpu.
15787   # Ie i386 and amd64 instead of x86 and x86_64.
15788   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15789   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15790     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15791   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15792     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15793   fi
15794 
15795 
15796   # This is the name of the cpu (but using i386 and amd64 instead of
15797   # x86 and x86_64, respectively), preceeded by a /, to be used when
15798   # locating libraries. On macosx, it's empty, though.
15799   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15800   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15801     OPENJDK_TARGET_CPU_LIBDIR=""
15802   fi
15803 
15804 
15805   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15806   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15807   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15808   OPENJDK_TARGET_CPU_ISADIR=""
15809   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15810     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15811       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15812     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15813       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15814     fi
15815   fi
15816 
15817 
15818   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15819   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15820   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15821     # On linux only, we replace x86 with i386.
15822     OPENJDK_TARGET_CPU_OSARCH="i386"
15823   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15824     # On all platforms except macosx, we replace x86_64 with amd64.
15825     OPENJDK_TARGET_CPU_OSARCH="amd64"
15826   fi
15827 
15828 
15829   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15830   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15831     OPENJDK_TARGET_CPU_JLI="i386"
15832   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15833     # On all platforms except macosx, we replace x86_64 with amd64.
15834     OPENJDK_TARGET_CPU_JLI="amd64"
15835   fi
15836   # Now setup the -D flags for building libjli.
15837   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15838   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15839     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15840       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15841     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15842       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15843     fi
15844   fi
15845 
15846 
15847   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15848       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15849   else
15850       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15851   fi
15852 
15853 
15854   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15855   # Macosx is osx and x86_64 is x64
15856   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15857     OPENJDK_TARGET_OS_BUNDLE="osx"
15858   else
15859     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15860   fi
15861   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15862     OPENJDK_TARGET_CPU_BUNDLE="x64"
15863   else
15864     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15865   fi
15866   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15867 
15868 
15869 
15870 
15871   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15872     A_LP64="LP64:="
15873     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15874     # unpack200.exe
15875     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15876       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15877     fi
15878   fi
15879   LP64=$A_LP64
15880 
15881 
15882   if test "x$COMPILE_TYPE" = "xcross"; then
15883     # FIXME: ... or should this include reduced builds..?
15884     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15885   else
15886     DEFINE_CROSS_COMPILE_ARCH=""
15887   fi
15888 
15889 
15890   # Convert openjdk platform names to hotspot names
15891 
15892   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15893   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15894     HOTSPOT_TARGET_OS=bsd
15895   fi
15896 
15897 
15898   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15899   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15900     HOTSPOT_TARGET_OS_TYPE=posix
15901   fi
15902 
15903 
15904   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15905   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15906     HOTSPOT_TARGET_CPU=x86_32
15907   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15908     HOTSPOT_TARGET_CPU=sparc
15909   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15910     HOTSPOT_TARGET_CPU=ppc_64
15911   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15912     HOTSPOT_TARGET_CPU=ppc_64
15913   fi
15914 
15915 
15916   # This is identical with OPENJDK_*, but define anyway for consistency.
15917   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15918 
15919 
15920   # Setup HOTSPOT_TARGET_CPU_DEFINE
15921   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15922     HOTSPOT_TARGET_CPU_DEFINE=IA32
15923   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15924     HOTSPOT_TARGET_CPU_DEFINE=AMD64
15925   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15926     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15927   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15928     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15929   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15930     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15931   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15932     HOTSPOT_TARGET_CPU_DEFINE=PPC64
15933 
15934   # The cpu defines below are for zero, we don't support them directly.
15935   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15936     HOTSPOT_TARGET_CPU_DEFINE=SPARC
15937   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15938     HOTSPOT_TARGET_CPU_DEFINE=PPC32
15939   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15940     HOTSPOT_TARGET_CPU_DEFINE=S390
15941   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15942     HOTSPOT_TARGET_CPU_DEFINE=S390
15943   elif test "x$OPENJDK_TARGET_CPU" != x; then
15944     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15945   fi
15946 
15947 
15948 
15949 
15950   # Also store the legacy naming of the cpu.
15951   # Ie i586 and amd64 instead of x86 and x86_64
15952   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15953   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15954     OPENJDK_BUILD_CPU_LEGACY="i586"
15955   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15956     # On all platforms except MacOSX replace x86_64 with amd64.
15957     OPENJDK_BUILD_CPU_LEGACY="amd64"
15958   fi
15959 
15960 
15961   # And the second legacy naming of the cpu.
15962   # Ie i386 and amd64 instead of x86 and x86_64.
15963   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15964   if test "x$OPENJDK_BUILD_CPU" = xx86; then
15965     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15966   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15967     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15968   fi
15969 
15970 
15971   # This is the name of the cpu (but using i386 and amd64 instead of
15972   # x86 and x86_64, respectively), preceeded by a /, to be used when
15973   # locating libraries. On macosx, it's empty, though.
15974   OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15975   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15976     OPENJDK_BUILD_CPU_LIBDIR=""
15977   fi
15978 
15979 
15980   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15981   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15982   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15983   OPENJDK_BUILD_CPU_ISADIR=""
15984   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15985     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15986       OPENJDK_BUILD_CPU_ISADIR="/amd64"
15987     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15988       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15989     fi
15990   fi
15991 
15992 
15993   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15994   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15995   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15996     # On linux only, we replace x86 with i386.
15997     OPENJDK_BUILD_CPU_OSARCH="i386"
15998   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15999     # On all platforms except macosx, we replace x86_64 with amd64.
16000     OPENJDK_BUILD_CPU_OSARCH="amd64"
16001   fi
16002 
16003 
16004   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16005   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16006     OPENJDK_BUILD_CPU_JLI="i386"
16007   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16008     # On all platforms except macosx, we replace x86_64 with amd64.
16009     OPENJDK_BUILD_CPU_JLI="amd64"
16010   fi
16011   # Now setup the -D flags for building libjli.
16012   OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16013   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16014     if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16015       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16016     elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16017       OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16018     fi
16019   fi
16020 
16021 
16022   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16023       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16024   else
16025       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16026   fi
16027 
16028 
16029   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16030   # Macosx is osx and x86_64 is x64
16031   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16032     OPENJDK_BUILD_OS_BUNDLE="osx"
16033   else
16034     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16035   fi
16036   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16037     OPENJDK_BUILD_CPU_BUNDLE="x64"
16038   else
16039     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16040   fi
16041   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16042 
16043 
16044 
16045 
16046   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16047     A_LP64="LP64:="
16048     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16049     # unpack200.exe
16050     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16051       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16052     fi
16053   fi
16054   LP64=$A_LP64
16055 
16056 
16057   if test "x$COMPILE_TYPE" = "xcross"; then
16058     # FIXME: ... or should this include reduced builds..?
16059     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16060   else
16061     DEFINE_CROSS_COMPILE_ARCH=""
16062   fi
16063 
16064 
16065   # Convert openjdk platform names to hotspot names
16066 
16067   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16068   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16069     HOTSPOT_BUILD_OS=bsd
16070   fi
16071 
16072 
16073   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16074   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16075     HOTSPOT_BUILD_OS_TYPE=posix
16076   fi
16077 
16078 
16079   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16080   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16081     HOTSPOT_BUILD_CPU=x86_32
16082   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16083     HOTSPOT_BUILD_CPU=sparc
16084   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16085     HOTSPOT_BUILD_CPU=ppc_64
16086   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16087     HOTSPOT_BUILD_CPU=ppc_64
16088   fi
16089 
16090 
16091   # This is identical with OPENJDK_*, but define anyway for consistency.
16092   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16093 
16094 
16095   # Setup HOTSPOT_BUILD_CPU_DEFINE
16096   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16097     HOTSPOT_BUILD_CPU_DEFINE=IA32
16098   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16099     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16100   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16101     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16102   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16103     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16104   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16105     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16106   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16107     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108 
16109   # The cpu defines below are for zero, we don't support them directly.
16110   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16111     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16112   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16113     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16114   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16115     HOTSPOT_BUILD_CPU_DEFINE=S390
16116   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16117     HOTSPOT_BUILD_CPU_DEFINE=S390
16118   elif test "x$OPENJDK_BUILD_CPU" != x; then
16119     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16120   fi
16121 
16122 
16123 
16124 
16125   # ZERO_ARCHDEF is used to enable architecture-specific code.
16126   # This is used in legacy hotspot build.
16127   ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16128 
16129 
16130 
16131 
16132 
16133 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16134 
16135   # Save the current directory this script was started from
16136   CURDIR="$PWD"
16137 
16138   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16139   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16140   # was not available at that time.
16141   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16142   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16143     ORIGINAL_PATH="$REWRITTEN_PATH"
16144     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16145 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16146   fi
16147 
16148   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16149     PATH_SEP=";"
16150 
16151   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16152   if test $SRC_ROOT_LENGTH -gt 100; then
16153     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16154   fi
16155 
16156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16158 $as_echo_n "checking cygwin release... " >&6; }
16159     CYGWIN_VERSION=`$UNAME -r`
16160     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16161 $as_echo "$CYGWIN_VERSION" >&6; }
16162     WINDOWS_ENV_VENDOR='cygwin'
16163     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16164 
16165     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16166     if test "x$CYGWIN_VERSION_OLD" != x; then
16167       { $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
16168 $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;}
16169       as_fn_error $? "Cannot continue" "$LINENO" 5
16170     fi
16171     if test "x$CYGPATH" = x; then
16172       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16173     fi
16174     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16175 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16176     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16177     cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16178     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16179     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16181 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16182     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16183     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16184     if test "x$test_cygdrive_prefix" = x; then
16185       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16186     fi
16187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16188     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16189 $as_echo_n "checking msys release... " >&6; }
16190     MSYS_VERSION=`$UNAME -r`
16191     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16192 $as_echo "$MSYS_VERSION" >&6; }
16193 
16194     WINDOWS_ENV_VENDOR='msys'
16195     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16196 
16197     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16198 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16199     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16200     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16201 
16202   windows_path="$MSYS_ROOT_PATH"
16203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204     unix_path=`$CYGPATH -u "$windows_path"`
16205     MSYS_ROOT_PATH="$unix_path"
16206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16208     MSYS_ROOT_PATH="$unix_path"
16209   fi
16210 
16211     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16212 $as_echo "$MSYS_ROOT_PATH" >&6; }
16213     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16214   else
16215     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16216   fi
16217 
16218   # Test if windows or unix (cygwin/msys) find is first in path.
16219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16220 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16221   FIND_BINARY_OUTPUT=`find --version 2>&1`
16222   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16223     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16224 $as_echo "unix style" >&6; }
16225   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16227 $as_echo "Windows" >&6; }
16228     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16229 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16230     { $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
16231 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16232     as_fn_error $? "Cannot continue" "$LINENO" 5
16233   else
16234     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16235 $as_echo "unknown" >&6; }
16236     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16237 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16238   fi
16239 
16240   else
16241     PATH_SEP=":"
16242   fi
16243 
16244 
16245   # We get the top-level directory from the supporting wrappers.
16246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16247 $as_echo_n "checking for top-level directory... " >&6; }
16248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16249 $as_echo "$TOPDIR" >&6; }
16250 
16251 
16252   # Save the original version of TOPDIR for string comparisons
16253   ORIGINAL_TOPDIR="$TOPDIR"
16254 
16255 
16256   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16257 
16258   # Only process if variable expands to non-empty
16259 
16260   if test "x$CURDIR" != x; then
16261     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16262 
16263   # Input might be given as Windows format, start by converting to
16264   # unix format.
16265   path="$CURDIR"
16266   new_path=`$CYGPATH -u "$path"`
16267 
16268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16271   # "foo.exe" is OK but "foo" is an error.
16272   #
16273   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16274   # It is also a way to make sure we got the proper file name for the real test later on.
16275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16276   if test "x$test_shortpath" = x; then
16277     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16278 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16279     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16280   fi
16281 
16282   # Call helper function which possibly converts this using DOS-style short mode.
16283   # If so, the updated path is stored in $new_path.
16284 
16285   input_path="$new_path"
16286   # Check if we need to convert this using DOS-style short mode. If the path
16287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16288   # take no chances and rewrite it.
16289   # Note: m4 eats our [], so we need to use [ and ] instead.
16290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16291   if test "x$has_forbidden_chars" != x; then
16292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16296       # Going to short mode and back again did indeed matter. Since short mode is
16297       # case insensitive, let's make it lowercase to improve readability.
16298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16299       # Now convert it back to Unix-style (cygpath)
16300       input_path=`$CYGPATH -u "$shortmode_path"`
16301       new_path="$input_path"
16302     fi
16303   fi
16304 
16305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16306   if test "x$test_cygdrive_prefix" = x; then
16307     # As a simple fix, exclude /usr/bin since it's not a real path.
16308     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16310       # a path prefixed by /cygdrive for fixpath to work.
16311       new_path="$CYGWIN_ROOT_PATH$input_path"
16312     fi
16313   fi
16314 
16315 
16316   if test "x$path" != "x$new_path"; then
16317     CURDIR="$new_path"
16318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16319 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16320   fi
16321 
16322     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323 
16324   path="$CURDIR"
16325   has_colon=`$ECHO $path | $GREP ^.:`
16326   new_path="$path"
16327   if test "x$has_colon" = x; then
16328     # Not in mixed or Windows style, start by that.
16329     new_path=`cmd //c echo $path`
16330   fi
16331 
16332 
16333   input_path="$new_path"
16334   # Check if we need to convert this using DOS-style short mode. If the path
16335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16336   # take no chances and rewrite it.
16337   # Note: m4 eats our [], so we need to use [ and ] instead.
16338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16339   if test "x$has_forbidden_chars" != x; then
16340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16342   fi
16343 
16344 
16345   windows_path="$new_path"
16346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16347     unix_path=`$CYGPATH -u "$windows_path"`
16348     new_path="$unix_path"
16349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16351     new_path="$unix_path"
16352   fi
16353 
16354   if test "x$path" != "x$new_path"; then
16355     CURDIR="$new_path"
16356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16357 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16358   fi
16359 
16360   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16361   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16362 
16363     else
16364       # We're on a unix platform. Hooray! :)
16365       path="$CURDIR"
16366       has_space=`$ECHO "$path" | $GREP " "`
16367       if test "x$has_space" != x; then
16368         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16369 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16370         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16371       fi
16372 
16373       # Use eval to expand a potential ~
16374       eval path="$path"
16375       if test ! -f "$path" && test ! -d "$path"; then
16376         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16377       fi
16378 
16379       if test -d "$path"; then
16380         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16381       else
16382         dir="`$DIRNAME "$path"`"
16383         base="`$BASENAME "$path"`"
16384         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16385       fi
16386     fi
16387   fi
16388 
16389 
16390   # Only process if variable expands to non-empty
16391 
16392   if test "x$TOPDIR" != x; then
16393     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16394 
16395   # Input might be given as Windows format, start by converting to
16396   # unix format.
16397   path="$TOPDIR"
16398   new_path=`$CYGPATH -u "$path"`
16399 
16400   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16401   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16402   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16403   # "foo.exe" is OK but "foo" is an error.
16404   #
16405   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16406   # It is also a way to make sure we got the proper file name for the real test later on.
16407   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16408   if test "x$test_shortpath" = x; then
16409     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16410 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16411     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16412   fi
16413 
16414   # Call helper function which possibly converts this using DOS-style short mode.
16415   # If so, the updated path is stored in $new_path.
16416 
16417   input_path="$new_path"
16418   # Check if we need to convert this using DOS-style short mode. If the path
16419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16420   # take no chances and rewrite it.
16421   # Note: m4 eats our [], so we need to use [ and ] instead.
16422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16423   if test "x$has_forbidden_chars" != x; then
16424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16425     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16426     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16427     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16428       # Going to short mode and back again did indeed matter. Since short mode is
16429       # case insensitive, let's make it lowercase to improve readability.
16430       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16431       # Now convert it back to Unix-style (cygpath)
16432       input_path=`$CYGPATH -u "$shortmode_path"`
16433       new_path="$input_path"
16434     fi
16435   fi
16436 
16437   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16438   if test "x$test_cygdrive_prefix" = x; then
16439     # As a simple fix, exclude /usr/bin since it's not a real path.
16440     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16441       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16442       # a path prefixed by /cygdrive for fixpath to work.
16443       new_path="$CYGWIN_ROOT_PATH$input_path"
16444     fi
16445   fi
16446 
16447 
16448   if test "x$path" != "x$new_path"; then
16449     TOPDIR="$new_path"
16450     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16451 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16452   fi
16453 
16454     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16455 
16456   path="$TOPDIR"
16457   has_colon=`$ECHO $path | $GREP ^.:`
16458   new_path="$path"
16459   if test "x$has_colon" = x; then
16460     # Not in mixed or Windows style, start by that.
16461     new_path=`cmd //c echo $path`
16462   fi
16463 
16464 
16465   input_path="$new_path"
16466   # Check if we need to convert this using DOS-style short mode. If the path
16467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16468   # take no chances and rewrite it.
16469   # Note: m4 eats our [], so we need to use [ and ] instead.
16470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16471   if test "x$has_forbidden_chars" != x; then
16472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16473     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16474   fi
16475 
16476 
16477   windows_path="$new_path"
16478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16479     unix_path=`$CYGPATH -u "$windows_path"`
16480     new_path="$unix_path"
16481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16483     new_path="$unix_path"
16484   fi
16485 
16486   if test "x$path" != "x$new_path"; then
16487     TOPDIR="$new_path"
16488     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16489 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16490   fi
16491 
16492   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16493   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16494 
16495     else
16496       # We're on a unix platform. Hooray! :)
16497       path="$TOPDIR"
16498       has_space=`$ECHO "$path" | $GREP " "`
16499       if test "x$has_space" != x; then
16500         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16501 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16502         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16503       fi
16504 
16505       # Use eval to expand a potential ~
16506       eval path="$path"
16507       if test ! -f "$path" && test ! -d "$path"; then
16508         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16509       fi
16510 
16511       if test -d "$path"; then
16512         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16513       else
16514         dir="`$DIRNAME "$path"`"
16515         base="`$BASENAME "$path"`"
16516         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16517       fi
16518     fi
16519   fi
16520 
16521   # SRC_ROOT is a traditional alias for TOPDIR.
16522   SRC_ROOT=$TOPDIR
16523 
16524   # Calculate a canonical version of TOPDIR for string comparisons
16525   CANONICAL_TOPDIR=$TOPDIR
16526 
16527   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16528     # Follow a chain of symbolic links. Use readlink
16529     # where it exists, else fall back to horribly
16530     # complicated shell code.
16531     if test "x$READLINK_TESTED" != yes; then
16532       # On MacOSX there is a readlink tool with a different
16533       # purpose than the GNU readlink tool. Check the found readlink.
16534       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16535       if test "x$ISGNU" = x; then
16536         # A readlink that we do not know how to use.
16537         # Are there other non-GNU readlinks out there?
16538         READLINK_TESTED=yes
16539         READLINK=
16540       fi
16541     fi
16542 
16543     if test "x$READLINK" != x; then
16544       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16545     else
16546       # Save the current directory for restoring afterwards
16547       STARTDIR=$PWD
16548       COUNTER=0
16549       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16550       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16551       cd $sym_link_dir
16552       # Use -P flag to resolve symlinks in directories.
16553       cd `$THEPWDCMD -P`
16554       sym_link_dir=`$THEPWDCMD -P`
16555       # Resolve file symlinks
16556       while test $COUNTER -lt 20; do
16557         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16558         if test "x$ISLINK" == x; then
16559           # This is not a symbolic link! We are done!
16560           break
16561         fi
16562         # Again resolve directory symlinks since the target of the just found
16563         # link could be in a different directory
16564         cd `$DIRNAME $ISLINK`
16565         sym_link_dir=`$THEPWDCMD -P`
16566         sym_link_file=`$BASENAME $ISLINK`
16567         let COUNTER=COUNTER+1
16568       done
16569       cd $STARTDIR
16570       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16571     fi
16572   fi
16573 
16574 
16575 
16576   # Locate the directory of this script.
16577   AUTOCONF_DIR=$TOPDIR/common/autoconf
16578 
16579   # Setup username (for use in adhoc version strings etc)
16580   # Outer [ ] to quote m4.
16581    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16582 
16583 
16584 
16585 # Check if it's a pure open build or if custom sources are to be used.
16586 
16587   # Check whether --enable-openjdk-only was given.
16588 if test "${enable_openjdk_only+set}" = set; then :
16589   enableval=$enable_openjdk_only;
16590 else
16591   enable_openjdk_only="no"
16592 fi
16593 
16594 
16595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16596 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16598 $as_echo "$enable_openjdk_only" >&6; }
16599   if test "x$enable_openjdk_only" = "xyes"; then
16600     SUPPRESS_CUSTOM_EXTENSIONS="true"
16601   elif test "x$enable_openjdk_only" = "xno"; then
16602     SUPPRESS_CUSTOM_EXTENSIONS="false"
16603   else
16604     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16605   fi
16606 
16607   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16608   # the IncludeCustomExtension macro.
16609 
16610 
16611 # Check whether --with-custom-make-dir was given.
16612 if test "${with_custom_make_dir+set}" = set; then :
16613   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
16614 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16615 fi
16616 
16617 
16618 
16619 
16620 # These are needed to be able to create a configuration name (and thus the output directory)
16621 
16622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16623 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16624 
16625 # Check whether --with-jdk-variant was given.
16626 if test "${with_jdk_variant+set}" = set; then :
16627   withval=$with_jdk_variant;
16628 fi
16629 
16630 
16631   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16632     JDK_VARIANT="normal"
16633   else
16634     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16635   fi
16636 
16637 
16638 
16639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16640 $as_echo "$JDK_VARIANT" >&6; }
16641 
16642 
16643   DEBUG_LEVEL="release"
16644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16645 $as_echo_n "checking which debug level to use... " >&6; }
16646   # Check whether --enable-debug was given.
16647 if test "${enable_debug+set}" = set; then :
16648   enableval=$enable_debug;
16649         ENABLE_DEBUG="${enableval}"
16650         DEBUG_LEVEL="fastdebug"
16651 
16652 else
16653   ENABLE_DEBUG="no"
16654 fi
16655 
16656 
16657 
16658 # Check whether --with-debug-level was given.
16659 if test "${with_debug_level+set}" = set; then :
16660   withval=$with_debug_level;
16661         DEBUG_LEVEL="${withval}"
16662         if test "x$ENABLE_DEBUG" = xyes; then
16663           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16664         fi
16665 
16666 fi
16667 
16668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16669 $as_echo "$DEBUG_LEVEL" >&6; }
16670 
16671   if test "x$DEBUG_LEVEL" != xrelease && \
16672       test "x$DEBUG_LEVEL" != xoptimized && \
16673       test "x$DEBUG_LEVEL" != xfastdebug && \
16674       test "x$DEBUG_LEVEL" != xslowdebug; then
16675     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16676   fi
16677 
16678   # Translate DEBUG_LEVEL to debug level used by Hotspot
16679   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16680   if test "x$DEBUG_LEVEL" = xrelease; then
16681     HOTSPOT_DEBUG_LEVEL="product"
16682   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16683     HOTSPOT_DEBUG_LEVEL="debug"
16684   fi
16685 
16686   if test "x$DEBUG_LEVEL" = xoptimized; then
16687     # The debug level 'optimized' is a little special because it is currently only
16688     # applicable to the HotSpot build where it means to build a completely
16689     # optimized version of the VM without any debugging code (like for the
16690     # 'release' debug level which is called 'product' in the HotSpot build) but
16691     # with the exception that it can contain additional code which is otherwise
16692     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16693     # test new and/or experimental features which are not intended for customer
16694     # shipment. Because these new features need to be tested and benchmarked in
16695     # real world scenarios, we want to build the containing JDK at the 'release'
16696     # debug level.
16697     DEBUG_LEVEL="release"
16698   fi
16699 
16700 
16701 
16702 
16703 
16704 
16705 # Check whether --with-jvm-variants was given.
16706 if test "${with_jvm_variants+set}" = set; then :
16707   withval=$with_jvm_variants;
16708 fi
16709 
16710 
16711   if test "x$with_jvm_variants" = x; then
16712     with_jvm_variants="server"
16713   fi
16714   JVM_VARIANTS_OPT="$with_jvm_variants"
16715 
16716   # Has the user listed more than one variant?
16717   # Additional [] needed to keep m4 from mangling shell constructs.
16718   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16719     BUILDING_MULTIPLE_JVM_VARIANTS=true
16720   else
16721     BUILDING_MULTIPLE_JVM_VARIANTS=false
16722   fi
16723   # Replace the commas with AND for use in the build directory name.
16724   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16725 
16726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16727 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16728   # JVM_VARIANTS is a space-separated list.
16729   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16730   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16732 $as_echo "$JVM_VARIANTS" >&6; }
16733 
16734   # Check that the selected variants are valid
16735 
16736   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16737   # Notice that the original variant failes on SLES 10 and 11
16738   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16739   STACK=${JVM_VARIANTS// /$'\n'}
16740   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16741   if test "x$INVALID_VARIANTS" != x; then
16742     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16743 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16744     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16745   fi
16746 
16747   # All "special" variants share the same output directory ("server")
16748   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16749   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16750   STACK=${JVM_VARIANTS// /$'\n'}
16751   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16752   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16753     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16754   fi
16755 
16756   # The "main" variant is the one used by other libs to link against during the
16757   # build.
16758   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16759     MAIN_VARIANT_PRIO_ORDER="server client minimal"
16760     for variant in $MAIN_VARIANT_PRIO_ORDER; do
16761       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16762         JVM_VARIANT_MAIN="$variant"
16763         break
16764       fi
16765     done
16766   else
16767     JVM_VARIANT_MAIN="$JVM_VARIANTS"
16768   fi
16769 
16770 
16771 
16772 
16773 
16774   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16775     # zero behaves as a platform and rewrites these values. This is really weird. :(
16776     # We are guaranteed that we do not build any other variants when building zero.
16777     HOTSPOT_TARGET_CPU=zero
16778     HOTSPOT_TARGET_CPU_ARCH=zero
16779   fi
16780 
16781 
16782 # With basic setup done, call the custom early hook.
16783 
16784 
16785 # Check if we have devkits, extra paths or sysroot set.
16786 
16787 
16788 # Check whether --with-devkit was given.
16789 if test "${with_devkit+set}" = set; then :
16790   withval=$with_devkit;
16791 
16792   # Only process if variable expands to non-empty
16793 
16794   if test "x$with_devkit" != x; then
16795     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16796 
16797   # Input might be given as Windows format, start by converting to
16798   # unix format.
16799   path="$with_devkit"
16800   new_path=`$CYGPATH -u "$path"`
16801 
16802   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16803   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16804   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16805   # "foo.exe" is OK but "foo" is an error.
16806   #
16807   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16808   # It is also a way to make sure we got the proper file name for the real test later on.
16809   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16810   if test "x$test_shortpath" = x; then
16811     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16812 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16813     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16814   fi
16815 
16816   # Call helper function which possibly converts this using DOS-style short mode.
16817   # If so, the updated path is stored in $new_path.
16818 
16819   input_path="$new_path"
16820   # Check if we need to convert this using DOS-style short mode. If the path
16821   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16822   # take no chances and rewrite it.
16823   # Note: m4 eats our [], so we need to use [ and ] instead.
16824   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16825   if test "x$has_forbidden_chars" != x; then
16826     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16827     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16828     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16829     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16830       # Going to short mode and back again did indeed matter. Since short mode is
16831       # case insensitive, let's make it lowercase to improve readability.
16832       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16833       # Now convert it back to Unix-style (cygpath)
16834       input_path=`$CYGPATH -u "$shortmode_path"`
16835       new_path="$input_path"
16836     fi
16837   fi
16838 
16839   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16840   if test "x$test_cygdrive_prefix" = x; then
16841     # As a simple fix, exclude /usr/bin since it's not a real path.
16842     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16843       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16844       # a path prefixed by /cygdrive for fixpath to work.
16845       new_path="$CYGWIN_ROOT_PATH$input_path"
16846     fi
16847   fi
16848 
16849 
16850   if test "x$path" != "x$new_path"; then
16851     with_devkit="$new_path"
16852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16853 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16854   fi
16855 
16856     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16857 
16858   path="$with_devkit"
16859   has_colon=`$ECHO $path | $GREP ^.:`
16860   new_path="$path"
16861   if test "x$has_colon" = x; then
16862     # Not in mixed or Windows style, start by that.
16863     new_path=`cmd //c echo $path`
16864   fi
16865 
16866 
16867   input_path="$new_path"
16868   # Check if we need to convert this using DOS-style short mode. If the path
16869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16870   # take no chances and rewrite it.
16871   # Note: m4 eats our [], so we need to use [ and ] instead.
16872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16873   if test "x$has_forbidden_chars" != x; then
16874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16875     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16876   fi
16877 
16878 
16879   windows_path="$new_path"
16880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16881     unix_path=`$CYGPATH -u "$windows_path"`
16882     new_path="$unix_path"
16883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16885     new_path="$unix_path"
16886   fi
16887 
16888   if test "x$path" != "x$new_path"; then
16889     with_devkit="$new_path"
16890     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16891 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16892   fi
16893 
16894   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16895   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16896 
16897     else
16898       # We're on a unix platform. Hooray! :)
16899       path="$with_devkit"
16900       has_space=`$ECHO "$path" | $GREP " "`
16901       if test "x$has_space" != x; then
16902         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16903 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16904         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16905       fi
16906 
16907       # Use eval to expand a potential ~
16908       eval path="$path"
16909       if test ! -f "$path" && test ! -d "$path"; then
16910         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16911       fi
16912 
16913       if test -d "$path"; then
16914         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16915       else
16916         dir="`$DIRNAME "$path"`"
16917         base="`$BASENAME "$path"`"
16918         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16919       fi
16920     fi
16921   fi
16922 
16923         DEVKIT_ROOT="$with_devkit"
16924         # Check for a meta data info file in the root of the devkit
16925         if test -f "$DEVKIT_ROOT/devkit.info"; then
16926           . $DEVKIT_ROOT/devkit.info
16927           # This potentially sets the following:
16928           # A descriptive name of the devkit
16929 
16930   if test "x$DEVKIT_NAME" = x; then
16931     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16932   fi
16933 
16934           # Corresponds to --with-extra-path
16935 
16936   if test "x$DEVKIT_EXTRA_PATH" = x; then
16937     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16938   fi
16939 
16940           # Corresponds to --with-toolchain-path
16941 
16942   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16943     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16944   fi
16945 
16946           # Corresponds to --with-sysroot
16947 
16948   if test "x$DEVKIT_SYSROOT" = x; then
16949     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16950   fi
16951 
16952 
16953           # Identifies the Visual Studio version in the devkit
16954 
16955   if test "x$DEVKIT_VS_VERSION" = x; then
16956     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16957   fi
16958 
16959           # The Visual Studio include environment variable
16960 
16961   if test "x$DEVKIT_VS_INCLUDE" = x; then
16962     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16963   fi
16964 
16965           # The Visual Studio lib environment variable
16966 
16967   if test "x$DEVKIT_VS_LIB" = x; then
16968     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16969   fi
16970 
16971           # Corresponds to --with-msvcr-dll
16972 
16973   if test "x$DEVKIT_MSVCR_DLL" = x; then
16974     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16975   fi
16976 
16977           # Corresponds to --with-msvcp-dll
16978 
16979   if test "x$DEVKIT_MSVCP_DLL" = x; then
16980     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16981   fi
16982 
16983         fi
16984 
16985         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16986 $as_echo_n "checking for devkit... " >&6; }
16987         if test "x$DEVKIT_NAME" != x; then
16988           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16989 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16990         else
16991           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16992 $as_echo "$DEVKIT_ROOT" >&6; }
16993         fi
16994 
16995 
16996   if test "x$DEVKIT_EXTRA_PATH" != x; then
16997     if test "x$EXTRA_PATH" = x; then
16998       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16999     else
17000       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17001     fi
17002   fi
17003 
17004 
17005         # Fallback default of just /bin if DEVKIT_PATH is not defined
17006         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17007           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17008         fi
17009 
17010   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17011     if test "x$TOOLCHAIN_PATH" = x; then
17012       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17013     else
17014       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17015     fi
17016   fi
17017 
17018 
17019         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17020         # places for backwards compatiblity.
17021         if test "x$DEVKIT_SYSROOT" != x; then
17022           SYSROOT="$DEVKIT_SYSROOT"
17023         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17024           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17025         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17026           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17027         fi
17028 
17029 
17030 fi
17031 
17032 
17033   # You can force the sysroot if the sysroot encoded into the compiler tools
17034   # is not correct.
17035 
17036 # Check whether --with-sys-root was given.
17037 if test "${with_sys_root+set}" = set; then :
17038   withval=$with_sys_root; SYSROOT=$with_sys_root
17039 
17040 fi
17041 
17042 
17043 
17044 # Check whether --with-sysroot was given.
17045 if test "${with_sysroot+set}" = set; then :
17046   withval=$with_sysroot; SYSROOT=$with_sysroot
17047 
17048 fi
17049 
17050 
17051 
17052 # Check whether --with-tools-dir was given.
17053 if test "${with_tools_dir+set}" = set; then :
17054   withval=$with_tools_dir;
17055   if test "x$with_tools_dir" != x; then
17056     if test "x$TOOLCHAIN_PATH" = x; then
17057       TOOLCHAIN_PATH="$with_tools_dir"
17058     else
17059       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17060     fi
17061   fi
17062 
17063 
17064 fi
17065 
17066 
17067 
17068 # Check whether --with-toolchain-path was given.
17069 if test "${with_toolchain_path+set}" = set; then :
17070   withval=$with_toolchain_path;
17071   if test "x$with_toolchain_path" != x; then
17072     if test "x$TOOLCHAIN_PATH" = x; then
17073       TOOLCHAIN_PATH="$with_toolchain_path"
17074     else
17075       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17076     fi
17077   fi
17078 
17079 
17080 fi
17081 
17082 
17083 
17084 # Check whether --with-extra-path was given.
17085 if test "${with_extra_path+set}" = set; then :
17086   withval=$with_extra_path;
17087   if test "x$with_extra_path" != x; then
17088     if test "x$EXTRA_PATH" = x; then
17089       EXTRA_PATH="$with_extra_path"
17090     else
17091       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17092     fi
17093   fi
17094 
17095 
17096 fi
17097 
17098 
17099   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17100     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17101     # If not, detect if Xcode is installed by running xcodebuild -version
17102     # if no Xcode installed, xcodebuild exits with 1
17103     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17104     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17105       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17106       # fall back on the stub binary in /usr/bin/xcodebuild
17107       # Extract the first word of "xcodebuild", so it can be a program name with args.
17108 set dummy xcodebuild; ac_word=$2
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17110 $as_echo_n "checking for $ac_word... " >&6; }
17111 if ${ac_cv_path_XCODEBUILD+:} false; then :
17112   $as_echo_n "(cached) " >&6
17113 else
17114   case $XCODEBUILD in
17115   [\\/]* | ?:[\\/]*)
17116   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17117   ;;
17118   *)
17119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17120 for as_dir in $TOOLCHAIN_PATH
17121 do
17122   IFS=$as_save_IFS
17123   test -z "$as_dir" && as_dir=.
17124     for ac_exec_ext in '' $ac_executable_extensions; do
17125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17126     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17128     break 2
17129   fi
17130 done
17131   done
17132 IFS=$as_save_IFS
17133 
17134   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17135   ;;
17136 esac
17137 fi
17138 XCODEBUILD=$ac_cv_path_XCODEBUILD
17139 if test -n "$XCODEBUILD"; then
17140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17141 $as_echo "$XCODEBUILD" >&6; }
17142 else
17143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17144 $as_echo "no" >&6; }
17145 fi
17146 
17147 
17148     else
17149       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17150       # when only the command line tools are installed there are no SDKs, so headers
17151       # are copied into the system frameworks
17152       XCODEBUILD=
17153 
17154     fi
17155 
17156     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17157 $as_echo_n "checking for sdk name... " >&6; }
17158 
17159 # Check whether --with-sdk-name was given.
17160 if test "${with_sdk_name+set}" = set; then :
17161   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17162 
17163 fi
17164 
17165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17166 $as_echo "$SDKNAME" >&6; }
17167 
17168     # if toolchain path is specified then don't rely on system headers, they may not compile
17169     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17170     test -z "$TOOLCHAIN_PATH" && \
17171       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17172 
17173     if test -z "$SYSROOT"; then
17174       if test -n "$XCODEBUILD"; then
17175         # if we don't have system headers, use default SDK name (last resort)
17176         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17177           SDKNAME=${SDKNAME:-macosx}
17178         fi
17179 
17180         if test -n "$SDKNAME"; then
17181           # Call xcodebuild to determine SYSROOT
17182           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17183         fi
17184       else
17185         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17186           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
17187         fi
17188       fi
17189     else
17190       # warn user if --with-sdk-name was also set
17191       if test -n "$with_sdk_name"; then
17192         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17193 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17194       fi
17195     fi
17196 
17197     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17198       # If no system framework headers, then SYSROOT must be set, or we won't build
17199       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
17200     fi
17201 
17202     # Perform a basic sanity test
17203     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17204       if test -z "$SYSROOT"; then
17205         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
17206       else
17207         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17208       fi
17209     fi
17210 
17211     # set SDKROOT too, Xcode tools will pick it up
17212     SDKROOT=$SYSROOT
17213 
17214   fi
17215 
17216   # Prepend the extra path to the global path
17217 
17218   if test "x$EXTRA_PATH" != x; then
17219     if test "x$PATH" = x; then
17220       PATH="$EXTRA_PATH"
17221     else
17222       PATH="$EXTRA_PATH:$PATH"
17223     fi
17224   fi
17225 
17226 
17227   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17228 $as_echo_n "checking for sysroot... " >&6; }
17229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17230 $as_echo "$SYSROOT" >&6; }
17231   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17232 $as_echo_n "checking for toolchain path... " >&6; }
17233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17234 $as_echo "$TOOLCHAIN_PATH" >&6; }
17235   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17236 $as_echo_n "checking for extra path... " >&6; }
17237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17238 $as_echo "$EXTRA_PATH" >&6; }
17239 
17240 
17241 # To properly create a configuration name, we need to have the OpenJDK target
17242 # and options (variants and debug level) parsed.
17243 
17244 
17245 
17246 # Check whether --with-conf-name was given.
17247 if test "${with_conf_name+set}" = set; then :
17248   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17249 fi
17250 
17251 
17252   # Test from where we are running configure, in or outside of src root.
17253   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17254 $as_echo_n "checking where to store configuration... " >&6; }
17255   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17256       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17257       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17258     # We are running configure from the src root.
17259     # Create a default ./build/target-variant-debuglevel output root.
17260     if test "x${CONF_NAME}" = x; then
17261       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17262 $as_echo "in default location" >&6; }
17263       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17264     else
17265       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17266 $as_echo "in build directory with custom name" >&6; }
17267     fi
17268     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17269     $MKDIR -p "$OUTPUT_ROOT"
17270     if test ! -d "$OUTPUT_ROOT"; then
17271       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17272     fi
17273   else
17274     # We are running configure from outside of the src dir.
17275     # Then use the current directory as output dir!
17276     # If configuration is situated in normal build directory, just use the build
17277     # directory name as configuration name, otherwise use the complete path.
17278     if test "x${CONF_NAME}" = x; then
17279       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17280     fi
17281     OUTPUT_ROOT="$CURDIR"
17282     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17283 $as_echo "in current directory" >&6; }
17284 
17285     # WARNING: This might be a bad thing to do. You need to be sure you want to
17286     # have a configuration in this directory. Do some sanity checks!
17287 
17288     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17289       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17290       # other files
17291       files_present=`$LS $OUTPUT_ROOT`
17292       # Configure has already touched config.log and confdefs.h in the current dir when this check
17293       # is performed.
17294       filtered_files=`$ECHO "$files_present" \
17295           | $SED -e 's/config.log//g' \
17296               -e 's/configure.log//g' \
17297               -e 's/confdefs.h//g' \
17298               -e 's/ //g' \
17299           | $TR -d '\n'`
17300       if test "x$filtered_files" != x; then
17301         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17302 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17303         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17304 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17305         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17306 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17307         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17308 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17309         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17310 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17311         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17312 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17313         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17314 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17315         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17316       fi
17317     fi
17318   fi
17319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17320 $as_echo_n "checking what configuration name to use... " >&6; }
17321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17322 $as_echo "$CONF_NAME" >&6; }
17323 
17324 
17325   # Only process if variable expands to non-empty
17326 
17327   if test "x$OUTPUT_ROOT" != x; then
17328     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17329 
17330   # Input might be given as Windows format, start by converting to
17331   # unix format.
17332   path="$OUTPUT_ROOT"
17333   new_path=`$CYGPATH -u "$path"`
17334 
17335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17338   # "foo.exe" is OK but "foo" is an error.
17339   #
17340   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17341   # It is also a way to make sure we got the proper file name for the real test later on.
17342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17343   if test "x$test_shortpath" = x; then
17344     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17345 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17346     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17347   fi
17348 
17349   # Call helper function which possibly converts this using DOS-style short mode.
17350   # If so, the updated path is stored in $new_path.
17351 
17352   input_path="$new_path"
17353   # Check if we need to convert this using DOS-style short mode. If the path
17354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17355   # take no chances and rewrite it.
17356   # Note: m4 eats our [], so we need to use [ and ] instead.
17357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17358   if test "x$has_forbidden_chars" != x; then
17359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17360     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17361     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17362     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17363       # Going to short mode and back again did indeed matter. Since short mode is
17364       # case insensitive, let's make it lowercase to improve readability.
17365       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17366       # Now convert it back to Unix-style (cygpath)
17367       input_path=`$CYGPATH -u "$shortmode_path"`
17368       new_path="$input_path"
17369     fi
17370   fi
17371 
17372   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17373   if test "x$test_cygdrive_prefix" = x; then
17374     # As a simple fix, exclude /usr/bin since it's not a real path.
17375     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17376       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17377       # a path prefixed by /cygdrive for fixpath to work.
17378       new_path="$CYGWIN_ROOT_PATH$input_path"
17379     fi
17380   fi
17381 
17382 
17383   if test "x$path" != "x$new_path"; then
17384     OUTPUT_ROOT="$new_path"
17385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17386 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17387   fi
17388 
17389     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17390 
17391   path="$OUTPUT_ROOT"
17392   has_colon=`$ECHO $path | $GREP ^.:`
17393   new_path="$path"
17394   if test "x$has_colon" = x; then
17395     # Not in mixed or Windows style, start by that.
17396     new_path=`cmd //c echo $path`
17397   fi
17398 
17399 
17400   input_path="$new_path"
17401   # Check if we need to convert this using DOS-style short mode. If the path
17402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17403   # take no chances and rewrite it.
17404   # Note: m4 eats our [], so we need to use [ and ] instead.
17405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17406   if test "x$has_forbidden_chars" != x; then
17407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17408     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17409   fi
17410 
17411 
17412   windows_path="$new_path"
17413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17414     unix_path=`$CYGPATH -u "$windows_path"`
17415     new_path="$unix_path"
17416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17418     new_path="$unix_path"
17419   fi
17420 
17421   if test "x$path" != "x$new_path"; then
17422     OUTPUT_ROOT="$new_path"
17423     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17424 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17425   fi
17426 
17427   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17428   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17429 
17430     else
17431       # We're on a unix platform. Hooray! :)
17432       path="$OUTPUT_ROOT"
17433       has_space=`$ECHO "$path" | $GREP " "`
17434       if test "x$has_space" != x; then
17435         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17436 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17437         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17438       fi
17439 
17440       # Use eval to expand a potential ~
17441       eval path="$path"
17442       if test ! -f "$path" && test ! -d "$path"; then
17443         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17444       fi
17445 
17446       if test -d "$path"; then
17447         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17448       else
17449         dir="`$DIRNAME "$path"`"
17450         base="`$BASENAME "$path"`"
17451         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17452       fi
17453     fi
17454   fi
17455 
17456 
17457   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17458   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17459 
17460   SPEC=$OUTPUT_ROOT/spec.gmk
17461 
17462   CONF_NAME=$CONF_NAME
17463 
17464   OUTPUT_ROOT=$OUTPUT_ROOT
17465 
17466 
17467 
17468   # The spec.gmk file contains all variables for the make system.
17469   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17470 
17471   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17472   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17473 
17474   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17475   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17476 
17477   # The compare.sh is used to compare the build output to other builds.
17478   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17479 
17480   # The generated Makefile knows where the spec.gmk is and where the source is.
17481   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17482   # which will look for generated configurations
17483   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17484 
17485 
17486 
17487 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17488 
17489   for ac_prog in apt-get yum port pkgutil pkgadd
17490 do
17491   # Extract the first word of "$ac_prog", so it can be a program name with args.
17492 set dummy $ac_prog; ac_word=$2
17493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17494 $as_echo_n "checking for $ac_word... " >&6; }
17495 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17496   $as_echo_n "(cached) " >&6
17497 else
17498   if test -n "$PKGHANDLER"; then
17499   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17500 else
17501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17502 for as_dir in $PATH
17503 do
17504   IFS=$as_save_IFS
17505   test -z "$as_dir" && as_dir=.
17506     for ac_exec_ext in '' $ac_executable_extensions; do
17507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17508     ac_cv_prog_PKGHANDLER="$ac_prog"
17509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17510     break 2
17511   fi
17512 done
17513   done
17514 IFS=$as_save_IFS
17515 
17516 fi
17517 fi
17518 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17519 if test -n "$PKGHANDLER"; then
17520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17521 $as_echo "$PKGHANDLER" >&6; }
17522 else
17523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17524 $as_echo "no" >&6; }
17525 fi
17526 
17527 
17528   test -n "$PKGHANDLER" && break
17529 done
17530 
17531 
17532 
17533 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17534 
17535 
17536 
17537   # Publish this variable in the help.
17538 
17539 
17540   if [ -z "${MAKE+x}" ]; then
17541     # The variable is not set by user, try to locate tool using the code snippet
17542 
17543     # Try our hardest to locate a correct version of GNU make
17544     for ac_prog in gmake
17545 do
17546   # Extract the first word of "$ac_prog", so it can be a program name with args.
17547 set dummy $ac_prog; ac_word=$2
17548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17549 $as_echo_n "checking for $ac_word... " >&6; }
17550 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17551   $as_echo_n "(cached) " >&6
17552 else
17553   case $CHECK_GMAKE in
17554   [\\/]* | ?:[\\/]*)
17555   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17556   ;;
17557   *)
17558   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17559 for as_dir in $PATH
17560 do
17561   IFS=$as_save_IFS
17562   test -z "$as_dir" && as_dir=.
17563     for ac_exec_ext in '' $ac_executable_extensions; do
17564   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17565     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17566     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17567     break 2
17568   fi
17569 done
17570   done
17571 IFS=$as_save_IFS
17572 
17573   ;;
17574 esac
17575 fi
17576 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17577 if test -n "$CHECK_GMAKE"; then
17578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17579 $as_echo "$CHECK_GMAKE" >&6; }
17580 else
17581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17582 $as_echo "no" >&6; }
17583 fi
17584 
17585 
17586   test -n "$CHECK_GMAKE" && break
17587 done
17588 
17589 
17590   MAKE_CANDIDATE=""$CHECK_GMAKE""
17591   DESCRIPTION="gmake in PATH"
17592 
17593   # On Cygwin, we require a newer version of make than on other platforms
17594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17595     MAKE_VERSION_EXPR="-e 4\."
17596     MAKE_REQUIRED_VERSION="4.0"
17597    else
17598     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17599     MAKE_REQUIRED_VERSION="3.81"
17600   fi
17601 
17602   if test "x$MAKE_CANDIDATE" != x; then
17603     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17604 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17605     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17606     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17607     if test "x$IS_GNU_MAKE" = x; then
17608       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17609 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17610     else
17611       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17612       if test "x$IS_MODERN_MAKE" = x; then
17613         { $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
17614 $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;}
17615       else
17616         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17617           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17618             MAKE_EXPECTED_ENV='cygwin'
17619           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17620             MAKE_EXPECTED_ENV='msys'
17621           else
17622             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17623           fi
17624           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17625           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17626         else
17627           # Not relevant for non-Windows
17628           IS_MAKE_CORRECT_ENV=true
17629         fi
17630         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17631           { $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
17632 $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;}
17633         else
17634           FOUND_MAKE=$MAKE_CANDIDATE
17635 
17636   # Only process if variable expands to non-empty
17637 
17638   if test "x$FOUND_MAKE" != x; then
17639     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17640 
17641   # First separate the path from the arguments. This will split at the first
17642   # space.
17643   complete="$FOUND_MAKE"
17644   path="${complete%% *}"
17645   tmp="$complete EOL"
17646   arguments="${tmp#* }"
17647 
17648   # Input might be given as Windows format, start by converting to
17649   # unix format.
17650   new_path=`$CYGPATH -u "$path"`
17651 
17652   # Now try to locate executable using which
17653   new_path=`$WHICH "$new_path" 2> /dev/null`
17654   # bat and cmd files are not always considered executable in cygwin causing which
17655   # to not find them
17656   if test "x$new_path" = x \
17657       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17658       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17659     new_path=`$CYGPATH -u "$path"`
17660   fi
17661   if test "x$new_path" = x; then
17662     # Oops. Which didn't find the executable.
17663     # The splitting of arguments from the executable at a space might have been incorrect,
17664     # since paths with space are more likely in Windows. Give it another try with the whole
17665     # argument.
17666     path="$complete"
17667     arguments="EOL"
17668     new_path=`$CYGPATH -u "$path"`
17669     new_path=`$WHICH "$new_path" 2> /dev/null`
17670     # bat and cmd files are not always considered executable in cygwin causing which
17671     # to not find them
17672     if test "x$new_path" = x \
17673         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17674         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17675       new_path=`$CYGPATH -u "$path"`
17676     fi
17677     if test "x$new_path" = x; then
17678       # It's still not found. Now this is an unrecoverable error.
17679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17680 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17681       has_space=`$ECHO "$complete" | $GREP " "`
17682       if test "x$has_space" != x; then
17683         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17684 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17685       fi
17686       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17687     fi
17688   fi
17689 
17690   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17691   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17692   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17693   # "foo.exe" is OK but "foo" is an error.
17694   #
17695   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17696   # It is also a way to make sure we got the proper file name for the real test later on.
17697   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17698   if test "x$test_shortpath" = x; then
17699     # Short path failed, file does not exist as specified.
17700     # Try adding .exe or .cmd
17701     if test -f "${new_path}.exe"; then
17702       input_to_shortpath="${new_path}.exe"
17703     elif test -f "${new_path}.cmd"; then
17704       input_to_shortpath="${new_path}.cmd"
17705     else
17706       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17707 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17708       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17709 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17710       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17711     fi
17712   else
17713     input_to_shortpath="$new_path"
17714   fi
17715 
17716   # Call helper function which possibly converts this using DOS-style short mode.
17717   # If so, the updated path is stored in $new_path.
17718   new_path="$input_to_shortpath"
17719 
17720   input_path="$input_to_shortpath"
17721   # Check if we need to convert this using DOS-style short mode. If the path
17722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17723   # take no chances and rewrite it.
17724   # Note: m4 eats our [], so we need to use [ and ] instead.
17725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17726   if test "x$has_forbidden_chars" != x; then
17727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17728     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17729     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17730     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17731       # Going to short mode and back again did indeed matter. Since short mode is
17732       # case insensitive, let's make it lowercase to improve readability.
17733       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17734       # Now convert it back to Unix-style (cygpath)
17735       input_path=`$CYGPATH -u "$shortmode_path"`
17736       new_path="$input_path"
17737     fi
17738   fi
17739 
17740   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17741   if test "x$test_cygdrive_prefix" = x; then
17742     # As a simple fix, exclude /usr/bin since it's not a real path.
17743     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17744       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17745       # a path prefixed by /cygdrive for fixpath to work.
17746       new_path="$CYGWIN_ROOT_PATH$input_path"
17747     fi
17748   fi
17749 
17750   # remove trailing .exe if any
17751   new_path="${new_path/%.exe/}"
17752 
17753     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17754 
17755   # First separate the path from the arguments. This will split at the first
17756   # space.
17757   complete="$FOUND_MAKE"
17758   path="${complete%% *}"
17759   tmp="$complete EOL"
17760   arguments="${tmp#* }"
17761 
17762   # Input might be given as Windows format, start by converting to
17763   # unix format.
17764   new_path="$path"
17765 
17766   windows_path="$new_path"
17767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17768     unix_path=`$CYGPATH -u "$windows_path"`
17769     new_path="$unix_path"
17770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17772     new_path="$unix_path"
17773   fi
17774 
17775 
17776   # Now try to locate executable using which
17777   new_path=`$WHICH "$new_path" 2> /dev/null`
17778 
17779   if test "x$new_path" = x; then
17780     # Oops. Which didn't find the executable.
17781     # The splitting of arguments from the executable at a space might have been incorrect,
17782     # since paths with space are more likely in Windows. Give it another try with the whole
17783     # argument.
17784     path="$complete"
17785     arguments="EOL"
17786     new_path="$path"
17787 
17788   windows_path="$new_path"
17789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17790     unix_path=`$CYGPATH -u "$windows_path"`
17791     new_path="$unix_path"
17792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17794     new_path="$unix_path"
17795   fi
17796 
17797 
17798     new_path=`$WHICH "$new_path" 2> /dev/null`
17799     # bat and cmd files are not always considered executable in MSYS causing which
17800     # to not find them
17801     if test "x$new_path" = x \
17802         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17803         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17804       new_path="$path"
17805 
17806   windows_path="$new_path"
17807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17808     unix_path=`$CYGPATH -u "$windows_path"`
17809     new_path="$unix_path"
17810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17812     new_path="$unix_path"
17813   fi
17814 
17815     fi
17816 
17817     if test "x$new_path" = x; then
17818       # It's still not found. Now this is an unrecoverable error.
17819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17820 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17821       has_space=`$ECHO "$complete" | $GREP " "`
17822       if test "x$has_space" != x; then
17823         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17824 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17825       fi
17826       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17827     fi
17828   fi
17829 
17830   # Now new_path has a complete unix path to the binary
17831   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17832     # Keep paths in /bin as-is, but remove trailing .exe if any
17833     new_path="${new_path/%.exe/}"
17834     # Do not save /bin paths to all_fixpath_prefixes!
17835   else
17836     # Not in mixed or Windows style, start by that.
17837     new_path=`cmd //c echo $new_path`
17838 
17839   input_path="$new_path"
17840   # Check if we need to convert this using DOS-style short mode. If the path
17841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17842   # take no chances and rewrite it.
17843   # Note: m4 eats our [], so we need to use [ and ] instead.
17844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17845   if test "x$has_forbidden_chars" != x; then
17846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17848   fi
17849 
17850     # Output is in $new_path
17851 
17852   windows_path="$new_path"
17853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17854     unix_path=`$CYGPATH -u "$windows_path"`
17855     new_path="$unix_path"
17856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17858     new_path="$unix_path"
17859   fi
17860 
17861     # remove trailing .exe if any
17862     new_path="${new_path/%.exe/}"
17863 
17864     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17865     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17866   fi
17867 
17868     else
17869       # We're on a unix platform. Hooray! :)
17870       # First separate the path from the arguments. This will split at the first
17871       # space.
17872       complete="$FOUND_MAKE"
17873       path="${complete%% *}"
17874       tmp="$complete EOL"
17875       arguments="${tmp#* }"
17876 
17877       # Cannot rely on the command "which" here since it doesn't always work.
17878       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17879       if test -z "$is_absolute_path"; then
17880         # Path to executable is not absolute. Find it.
17881         IFS_save="$IFS"
17882         IFS=:
17883         for p in $PATH; do
17884           if test -f "$p/$path" && test -x "$p/$path"; then
17885             new_path="$p/$path"
17886             break
17887           fi
17888         done
17889         IFS="$IFS_save"
17890       else
17891         # This is an absolute path, we can use it without further modifications.
17892         new_path="$path"
17893       fi
17894 
17895       if test "x$new_path" = x; then
17896         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17897 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17898         has_space=`$ECHO "$complete" | $GREP " "`
17899         if test "x$has_space" != x; then
17900           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17901 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17902         fi
17903         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17904       fi
17905     fi
17906 
17907     # Now join together the path and the arguments once again
17908     if test "x$arguments" != xEOL; then
17909       new_complete="$new_path ${arguments% *}"
17910     else
17911       new_complete="$new_path"
17912     fi
17913 
17914     if test "x$complete" != "x$new_complete"; then
17915       FOUND_MAKE="$new_complete"
17916       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17917 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17918     fi
17919   fi
17920 
17921         fi
17922       fi
17923     fi
17924   fi
17925 
17926 
17927     if test "x$FOUND_MAKE" = x; then
17928       for ac_prog in make
17929 do
17930   # Extract the first word of "$ac_prog", so it can be a program name with args.
17931 set dummy $ac_prog; ac_word=$2
17932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17933 $as_echo_n "checking for $ac_word... " >&6; }
17934 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17935   $as_echo_n "(cached) " >&6
17936 else
17937   case $CHECK_MAKE in
17938   [\\/]* | ?:[\\/]*)
17939   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17940   ;;
17941   *)
17942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17943 for as_dir in $PATH
17944 do
17945   IFS=$as_save_IFS
17946   test -z "$as_dir" && as_dir=.
17947     for ac_exec_ext in '' $ac_executable_extensions; do
17948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17949     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17951     break 2
17952   fi
17953 done
17954   done
17955 IFS=$as_save_IFS
17956 
17957   ;;
17958 esac
17959 fi
17960 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17961 if test -n "$CHECK_MAKE"; then
17962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17963 $as_echo "$CHECK_MAKE" >&6; }
17964 else
17965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17966 $as_echo "no" >&6; }
17967 fi
17968 
17969 
17970   test -n "$CHECK_MAKE" && break
17971 done
17972 
17973 
17974   MAKE_CANDIDATE=""$CHECK_MAKE""
17975   DESCRIPTION="make in PATH"
17976 
17977   # On Cygwin, we require a newer version of make than on other platforms
17978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17979     MAKE_VERSION_EXPR="-e 4\."
17980     MAKE_REQUIRED_VERSION="4.0"
17981    else
17982     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17983     MAKE_REQUIRED_VERSION="3.81"
17984   fi
17985 
17986   if test "x$MAKE_CANDIDATE" != x; then
17987     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17988 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17989     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17990     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17991     if test "x$IS_GNU_MAKE" = x; then
17992       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17993 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17994     else
17995       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17996       if test "x$IS_MODERN_MAKE" = x; then
17997         { $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
17998 $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;}
17999       else
18000         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18001           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18002             MAKE_EXPECTED_ENV='cygwin'
18003           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18004             MAKE_EXPECTED_ENV='msys'
18005           else
18006             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18007           fi
18008           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18009           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18010         else
18011           # Not relevant for non-Windows
18012           IS_MAKE_CORRECT_ENV=true
18013         fi
18014         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18015           { $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
18016 $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;}
18017         else
18018           FOUND_MAKE=$MAKE_CANDIDATE
18019 
18020   # Only process if variable expands to non-empty
18021 
18022   if test "x$FOUND_MAKE" != x; then
18023     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18024 
18025   # First separate the path from the arguments. This will split at the first
18026   # space.
18027   complete="$FOUND_MAKE"
18028   path="${complete%% *}"
18029   tmp="$complete EOL"
18030   arguments="${tmp#* }"
18031 
18032   # Input might be given as Windows format, start by converting to
18033   # unix format.
18034   new_path=`$CYGPATH -u "$path"`
18035 
18036   # Now try to locate executable using which
18037   new_path=`$WHICH "$new_path" 2> /dev/null`
18038   # bat and cmd files are not always considered executable in cygwin causing which
18039   # to not find them
18040   if test "x$new_path" = x \
18041       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18042       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18043     new_path=`$CYGPATH -u "$path"`
18044   fi
18045   if test "x$new_path" = x; then
18046     # Oops. Which didn't find the executable.
18047     # The splitting of arguments from the executable at a space might have been incorrect,
18048     # since paths with space are more likely in Windows. Give it another try with the whole
18049     # argument.
18050     path="$complete"
18051     arguments="EOL"
18052     new_path=`$CYGPATH -u "$path"`
18053     new_path=`$WHICH "$new_path" 2> /dev/null`
18054     # bat and cmd files are not always considered executable in cygwin causing which
18055     # to not find them
18056     if test "x$new_path" = x \
18057         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18058         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18059       new_path=`$CYGPATH -u "$path"`
18060     fi
18061     if test "x$new_path" = x; then
18062       # It's still not found. Now this is an unrecoverable error.
18063       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18064 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18065       has_space=`$ECHO "$complete" | $GREP " "`
18066       if test "x$has_space" != x; then
18067         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18068 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18069       fi
18070       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18071     fi
18072   fi
18073 
18074   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18075   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18076   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18077   # "foo.exe" is OK but "foo" is an error.
18078   #
18079   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18080   # It is also a way to make sure we got the proper file name for the real test later on.
18081   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18082   if test "x$test_shortpath" = x; then
18083     # Short path failed, file does not exist as specified.
18084     # Try adding .exe or .cmd
18085     if test -f "${new_path}.exe"; then
18086       input_to_shortpath="${new_path}.exe"
18087     elif test -f "${new_path}.cmd"; then
18088       input_to_shortpath="${new_path}.cmd"
18089     else
18090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18091 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18092       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18093 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18094       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18095     fi
18096   else
18097     input_to_shortpath="$new_path"
18098   fi
18099 
18100   # Call helper function which possibly converts this using DOS-style short mode.
18101   # If so, the updated path is stored in $new_path.
18102   new_path="$input_to_shortpath"
18103 
18104   input_path="$input_to_shortpath"
18105   # Check if we need to convert this using DOS-style short mode. If the path
18106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18107   # take no chances and rewrite it.
18108   # Note: m4 eats our [], so we need to use [ and ] instead.
18109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18110   if test "x$has_forbidden_chars" != x; then
18111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18112     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18113     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18114     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18115       # Going to short mode and back again did indeed matter. Since short mode is
18116       # case insensitive, let's make it lowercase to improve readability.
18117       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18118       # Now convert it back to Unix-style (cygpath)
18119       input_path=`$CYGPATH -u "$shortmode_path"`
18120       new_path="$input_path"
18121     fi
18122   fi
18123 
18124   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18125   if test "x$test_cygdrive_prefix" = x; then
18126     # As a simple fix, exclude /usr/bin since it's not a real path.
18127     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18128       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18129       # a path prefixed by /cygdrive for fixpath to work.
18130       new_path="$CYGWIN_ROOT_PATH$input_path"
18131     fi
18132   fi
18133 
18134   # remove trailing .exe if any
18135   new_path="${new_path/%.exe/}"
18136 
18137     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18138 
18139   # First separate the path from the arguments. This will split at the first
18140   # space.
18141   complete="$FOUND_MAKE"
18142   path="${complete%% *}"
18143   tmp="$complete EOL"
18144   arguments="${tmp#* }"
18145 
18146   # Input might be given as Windows format, start by converting to
18147   # unix format.
18148   new_path="$path"
18149 
18150   windows_path="$new_path"
18151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18152     unix_path=`$CYGPATH -u "$windows_path"`
18153     new_path="$unix_path"
18154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18156     new_path="$unix_path"
18157   fi
18158 
18159 
18160   # Now try to locate executable using which
18161   new_path=`$WHICH "$new_path" 2> /dev/null`
18162 
18163   if test "x$new_path" = x; then
18164     # Oops. Which didn't find the executable.
18165     # The splitting of arguments from the executable at a space might have been incorrect,
18166     # since paths with space are more likely in Windows. Give it another try with the whole
18167     # argument.
18168     path="$complete"
18169     arguments="EOL"
18170     new_path="$path"
18171 
18172   windows_path="$new_path"
18173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18174     unix_path=`$CYGPATH -u "$windows_path"`
18175     new_path="$unix_path"
18176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18178     new_path="$unix_path"
18179   fi
18180 
18181 
18182     new_path=`$WHICH "$new_path" 2> /dev/null`
18183     # bat and cmd files are not always considered executable in MSYS causing which
18184     # to not find them
18185     if test "x$new_path" = x \
18186         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18187         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18188       new_path="$path"
18189 
18190   windows_path="$new_path"
18191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18192     unix_path=`$CYGPATH -u "$windows_path"`
18193     new_path="$unix_path"
18194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18196     new_path="$unix_path"
18197   fi
18198 
18199     fi
18200 
18201     if test "x$new_path" = x; then
18202       # It's still not found. Now this is an unrecoverable error.
18203       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18204 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18205       has_space=`$ECHO "$complete" | $GREP " "`
18206       if test "x$has_space" != x; then
18207         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18208 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18209       fi
18210       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18211     fi
18212   fi
18213 
18214   # Now new_path has a complete unix path to the binary
18215   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18216     # Keep paths in /bin as-is, but remove trailing .exe if any
18217     new_path="${new_path/%.exe/}"
18218     # Do not save /bin paths to all_fixpath_prefixes!
18219   else
18220     # Not in mixed or Windows style, start by that.
18221     new_path=`cmd //c echo $new_path`
18222 
18223   input_path="$new_path"
18224   # Check if we need to convert this using DOS-style short mode. If the path
18225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18226   # take no chances and rewrite it.
18227   # Note: m4 eats our [], so we need to use [ and ] instead.
18228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18229   if test "x$has_forbidden_chars" != x; then
18230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18232   fi
18233 
18234     # Output is in $new_path
18235 
18236   windows_path="$new_path"
18237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18238     unix_path=`$CYGPATH -u "$windows_path"`
18239     new_path="$unix_path"
18240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18242     new_path="$unix_path"
18243   fi
18244 
18245     # remove trailing .exe if any
18246     new_path="${new_path/%.exe/}"
18247 
18248     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18249     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18250   fi
18251 
18252     else
18253       # We're on a unix platform. Hooray! :)
18254       # First separate the path from the arguments. This will split at the first
18255       # space.
18256       complete="$FOUND_MAKE"
18257       path="${complete%% *}"
18258       tmp="$complete EOL"
18259       arguments="${tmp#* }"
18260 
18261       # Cannot rely on the command "which" here since it doesn't always work.
18262       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18263       if test -z "$is_absolute_path"; then
18264         # Path to executable is not absolute. Find it.
18265         IFS_save="$IFS"
18266         IFS=:
18267         for p in $PATH; do
18268           if test -f "$p/$path" && test -x "$p/$path"; then
18269             new_path="$p/$path"
18270             break
18271           fi
18272         done
18273         IFS="$IFS_save"
18274       else
18275         # This is an absolute path, we can use it without further modifications.
18276         new_path="$path"
18277       fi
18278 
18279       if test "x$new_path" = x; then
18280         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18281 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18282         has_space=`$ECHO "$complete" | $GREP " "`
18283         if test "x$has_space" != x; then
18284           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18285 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18286         fi
18287         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18288       fi
18289     fi
18290 
18291     # Now join together the path and the arguments once again
18292     if test "x$arguments" != xEOL; then
18293       new_complete="$new_path ${arguments% *}"
18294     else
18295       new_complete="$new_path"
18296     fi
18297 
18298     if test "x$complete" != "x$new_complete"; then
18299       FOUND_MAKE="$new_complete"
18300       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18301 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18302     fi
18303   fi
18304 
18305         fi
18306       fi
18307     fi
18308   fi
18309 
18310     fi
18311 
18312     if test "x$FOUND_MAKE" = x; then
18313       if test "x$TOOLCHAIN_PATH" != x; then
18314         # We have a toolchain path, check that as well before giving up.
18315         OLD_PATH=$PATH
18316         PATH=$TOOLCHAIN_PATH:$PATH
18317         for ac_prog in gmake
18318 do
18319   # Extract the first word of "$ac_prog", so it can be a program name with args.
18320 set dummy $ac_prog; ac_word=$2
18321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18322 $as_echo_n "checking for $ac_word... " >&6; }
18323 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18324   $as_echo_n "(cached) " >&6
18325 else
18326   case $CHECK_TOOLSDIR_GMAKE in
18327   [\\/]* | ?:[\\/]*)
18328   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18329   ;;
18330   *)
18331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18332 for as_dir in $PATH
18333 do
18334   IFS=$as_save_IFS
18335   test -z "$as_dir" && as_dir=.
18336     for ac_exec_ext in '' $ac_executable_extensions; do
18337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18338     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18340     break 2
18341   fi
18342 done
18343   done
18344 IFS=$as_save_IFS
18345 
18346   ;;
18347 esac
18348 fi
18349 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18350 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18352 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18353 else
18354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18355 $as_echo "no" >&6; }
18356 fi
18357 
18358 
18359   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18360 done
18361 
18362 
18363   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18364   DESCRIPTION="gmake in tools-dir"
18365 
18366   # On Cygwin, we require a newer version of make than on other platforms
18367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18368     MAKE_VERSION_EXPR="-e 4\."
18369     MAKE_REQUIRED_VERSION="4.0"
18370    else
18371     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18372     MAKE_REQUIRED_VERSION="3.81"
18373   fi
18374 
18375   if test "x$MAKE_CANDIDATE" != x; then
18376     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18377 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18378     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18379     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18380     if test "x$IS_GNU_MAKE" = x; then
18381       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18382 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18383     else
18384       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18385       if test "x$IS_MODERN_MAKE" = x; then
18386         { $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
18387 $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;}
18388       else
18389         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18390           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18391             MAKE_EXPECTED_ENV='cygwin'
18392           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18393             MAKE_EXPECTED_ENV='msys'
18394           else
18395             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18396           fi
18397           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18398           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18399         else
18400           # Not relevant for non-Windows
18401           IS_MAKE_CORRECT_ENV=true
18402         fi
18403         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18404           { $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
18405 $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;}
18406         else
18407           FOUND_MAKE=$MAKE_CANDIDATE
18408 
18409   # Only process if variable expands to non-empty
18410 
18411   if test "x$FOUND_MAKE" != x; then
18412     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18413 
18414   # First separate the path from the arguments. This will split at the first
18415   # space.
18416   complete="$FOUND_MAKE"
18417   path="${complete%% *}"
18418   tmp="$complete EOL"
18419   arguments="${tmp#* }"
18420 
18421   # Input might be given as Windows format, start by converting to
18422   # unix format.
18423   new_path=`$CYGPATH -u "$path"`
18424 
18425   # Now try to locate executable using which
18426   new_path=`$WHICH "$new_path" 2> /dev/null`
18427   # bat and cmd files are not always considered executable in cygwin causing which
18428   # to not find them
18429   if test "x$new_path" = x \
18430       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18431       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18432     new_path=`$CYGPATH -u "$path"`
18433   fi
18434   if test "x$new_path" = x; then
18435     # Oops. Which didn't find the executable.
18436     # The splitting of arguments from the executable at a space might have been incorrect,
18437     # since paths with space are more likely in Windows. Give it another try with the whole
18438     # argument.
18439     path="$complete"
18440     arguments="EOL"
18441     new_path=`$CYGPATH -u "$path"`
18442     new_path=`$WHICH "$new_path" 2> /dev/null`
18443     # bat and cmd files are not always considered executable in cygwin causing which
18444     # to not find them
18445     if test "x$new_path" = x \
18446         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18447         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18448       new_path=`$CYGPATH -u "$path"`
18449     fi
18450     if test "x$new_path" = x; then
18451       # It's still not found. Now this is an unrecoverable error.
18452       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18453 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18454       has_space=`$ECHO "$complete" | $GREP " "`
18455       if test "x$has_space" != x; then
18456         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18457 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18458       fi
18459       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18460     fi
18461   fi
18462 
18463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18466   # "foo.exe" is OK but "foo" is an error.
18467   #
18468   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18469   # It is also a way to make sure we got the proper file name for the real test later on.
18470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18471   if test "x$test_shortpath" = x; then
18472     # Short path failed, file does not exist as specified.
18473     # Try adding .exe or .cmd
18474     if test -f "${new_path}.exe"; then
18475       input_to_shortpath="${new_path}.exe"
18476     elif test -f "${new_path}.cmd"; then
18477       input_to_shortpath="${new_path}.cmd"
18478     else
18479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18480 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18481       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18482 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18483       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18484     fi
18485   else
18486     input_to_shortpath="$new_path"
18487   fi
18488 
18489   # Call helper function which possibly converts this using DOS-style short mode.
18490   # If so, the updated path is stored in $new_path.
18491   new_path="$input_to_shortpath"
18492 
18493   input_path="$input_to_shortpath"
18494   # Check if we need to convert this using DOS-style short mode. If the path
18495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18496   # take no chances and rewrite it.
18497   # Note: m4 eats our [], so we need to use [ and ] instead.
18498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18499   if test "x$has_forbidden_chars" != x; then
18500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18501     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18502     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18503     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18504       # Going to short mode and back again did indeed matter. Since short mode is
18505       # case insensitive, let's make it lowercase to improve readability.
18506       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18507       # Now convert it back to Unix-style (cygpath)
18508       input_path=`$CYGPATH -u "$shortmode_path"`
18509       new_path="$input_path"
18510     fi
18511   fi
18512 
18513   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18514   if test "x$test_cygdrive_prefix" = x; then
18515     # As a simple fix, exclude /usr/bin since it's not a real path.
18516     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18517       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18518       # a path prefixed by /cygdrive for fixpath to work.
18519       new_path="$CYGWIN_ROOT_PATH$input_path"
18520     fi
18521   fi
18522 
18523   # remove trailing .exe if any
18524   new_path="${new_path/%.exe/}"
18525 
18526     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18527 
18528   # First separate the path from the arguments. This will split at the first
18529   # space.
18530   complete="$FOUND_MAKE"
18531   path="${complete%% *}"
18532   tmp="$complete EOL"
18533   arguments="${tmp#* }"
18534 
18535   # Input might be given as Windows format, start by converting to
18536   # unix format.
18537   new_path="$path"
18538 
18539   windows_path="$new_path"
18540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18541     unix_path=`$CYGPATH -u "$windows_path"`
18542     new_path="$unix_path"
18543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18545     new_path="$unix_path"
18546   fi
18547 
18548 
18549   # Now try to locate executable using which
18550   new_path=`$WHICH "$new_path" 2> /dev/null`
18551 
18552   if test "x$new_path" = x; then
18553     # Oops. Which didn't find the executable.
18554     # The splitting of arguments from the executable at a space might have been incorrect,
18555     # since paths with space are more likely in Windows. Give it another try with the whole
18556     # argument.
18557     path="$complete"
18558     arguments="EOL"
18559     new_path="$path"
18560 
18561   windows_path="$new_path"
18562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18563     unix_path=`$CYGPATH -u "$windows_path"`
18564     new_path="$unix_path"
18565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18567     new_path="$unix_path"
18568   fi
18569 
18570 
18571     new_path=`$WHICH "$new_path" 2> /dev/null`
18572     # bat and cmd files are not always considered executable in MSYS causing which
18573     # to not find them
18574     if test "x$new_path" = x \
18575         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18576         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18577       new_path="$path"
18578 
18579   windows_path="$new_path"
18580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18581     unix_path=`$CYGPATH -u "$windows_path"`
18582     new_path="$unix_path"
18583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18585     new_path="$unix_path"
18586   fi
18587 
18588     fi
18589 
18590     if test "x$new_path" = x; then
18591       # It's still not found. Now this is an unrecoverable error.
18592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18593 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18594       has_space=`$ECHO "$complete" | $GREP " "`
18595       if test "x$has_space" != x; then
18596         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18597 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18598       fi
18599       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18600     fi
18601   fi
18602 
18603   # Now new_path has a complete unix path to the binary
18604   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18605     # Keep paths in /bin as-is, but remove trailing .exe if any
18606     new_path="${new_path/%.exe/}"
18607     # Do not save /bin paths to all_fixpath_prefixes!
18608   else
18609     # Not in mixed or Windows style, start by that.
18610     new_path=`cmd //c echo $new_path`
18611 
18612   input_path="$new_path"
18613   # Check if we need to convert this using DOS-style short mode. If the path
18614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18615   # take no chances and rewrite it.
18616   # Note: m4 eats our [], so we need to use [ and ] instead.
18617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18618   if test "x$has_forbidden_chars" != x; then
18619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18620     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18621   fi
18622 
18623     # Output is in $new_path
18624 
18625   windows_path="$new_path"
18626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18627     unix_path=`$CYGPATH -u "$windows_path"`
18628     new_path="$unix_path"
18629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18631     new_path="$unix_path"
18632   fi
18633 
18634     # remove trailing .exe if any
18635     new_path="${new_path/%.exe/}"
18636 
18637     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18638     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18639   fi
18640 
18641     else
18642       # We're on a unix platform. Hooray! :)
18643       # First separate the path from the arguments. This will split at the first
18644       # space.
18645       complete="$FOUND_MAKE"
18646       path="${complete%% *}"
18647       tmp="$complete EOL"
18648       arguments="${tmp#* }"
18649 
18650       # Cannot rely on the command "which" here since it doesn't always work.
18651       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18652       if test -z "$is_absolute_path"; then
18653         # Path to executable is not absolute. Find it.
18654         IFS_save="$IFS"
18655         IFS=:
18656         for p in $PATH; do
18657           if test -f "$p/$path" && test -x "$p/$path"; then
18658             new_path="$p/$path"
18659             break
18660           fi
18661         done
18662         IFS="$IFS_save"
18663       else
18664         # This is an absolute path, we can use it without further modifications.
18665         new_path="$path"
18666       fi
18667 
18668       if test "x$new_path" = x; then
18669         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18670 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18671         has_space=`$ECHO "$complete" | $GREP " "`
18672         if test "x$has_space" != x; then
18673           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18674 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18675         fi
18676         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18677       fi
18678     fi
18679 
18680     # Now join together the path and the arguments once again
18681     if test "x$arguments" != xEOL; then
18682       new_complete="$new_path ${arguments% *}"
18683     else
18684       new_complete="$new_path"
18685     fi
18686 
18687     if test "x$complete" != "x$new_complete"; then
18688       FOUND_MAKE="$new_complete"
18689       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18690 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18691     fi
18692   fi
18693 
18694         fi
18695       fi
18696     fi
18697   fi
18698 
18699         if test "x$FOUND_MAKE" = x; then
18700           for ac_prog in make
18701 do
18702   # Extract the first word of "$ac_prog", so it can be a program name with args.
18703 set dummy $ac_prog; ac_word=$2
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18705 $as_echo_n "checking for $ac_word... " >&6; }
18706 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18707   $as_echo_n "(cached) " >&6
18708 else
18709   case $CHECK_TOOLSDIR_MAKE in
18710   [\\/]* | ?:[\\/]*)
18711   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18712   ;;
18713   *)
18714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18715 for as_dir in $PATH
18716 do
18717   IFS=$as_save_IFS
18718   test -z "$as_dir" && as_dir=.
18719     for ac_exec_ext in '' $ac_executable_extensions; do
18720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18721     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18723     break 2
18724   fi
18725 done
18726   done
18727 IFS=$as_save_IFS
18728 
18729   ;;
18730 esac
18731 fi
18732 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18733 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18735 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18736 else
18737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18738 $as_echo "no" >&6; }
18739 fi
18740 
18741 
18742   test -n "$CHECK_TOOLSDIR_MAKE" && break
18743 done
18744 
18745 
18746   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18747   DESCRIPTION="make in tools-dir"
18748 
18749   # On Cygwin, we require a newer version of make than on other platforms
18750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18751     MAKE_VERSION_EXPR="-e 4\."
18752     MAKE_REQUIRED_VERSION="4.0"
18753    else
18754     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18755     MAKE_REQUIRED_VERSION="3.81"
18756   fi
18757 
18758   if test "x$MAKE_CANDIDATE" != x; then
18759     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18760 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18761     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18762     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18763     if test "x$IS_GNU_MAKE" = x; then
18764       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18765 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18766     else
18767       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18768       if test "x$IS_MODERN_MAKE" = x; then
18769         { $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
18770 $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;}
18771       else
18772         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18773           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18774             MAKE_EXPECTED_ENV='cygwin'
18775           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18776             MAKE_EXPECTED_ENV='msys'
18777           else
18778             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18779           fi
18780           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18781           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18782         else
18783           # Not relevant for non-Windows
18784           IS_MAKE_CORRECT_ENV=true
18785         fi
18786         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18787           { $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
18788 $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;}
18789         else
18790           FOUND_MAKE=$MAKE_CANDIDATE
18791 
18792   # Only process if variable expands to non-empty
18793 
18794   if test "x$FOUND_MAKE" != x; then
18795     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18796 
18797   # First separate the path from the arguments. This will split at the first
18798   # space.
18799   complete="$FOUND_MAKE"
18800   path="${complete%% *}"
18801   tmp="$complete EOL"
18802   arguments="${tmp#* }"
18803 
18804   # Input might be given as Windows format, start by converting to
18805   # unix format.
18806   new_path=`$CYGPATH -u "$path"`
18807 
18808   # Now try to locate executable using which
18809   new_path=`$WHICH "$new_path" 2> /dev/null`
18810   # bat and cmd files are not always considered executable in cygwin causing which
18811   # to not find them
18812   if test "x$new_path" = x \
18813       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18814       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18815     new_path=`$CYGPATH -u "$path"`
18816   fi
18817   if test "x$new_path" = x; then
18818     # Oops. Which didn't find the executable.
18819     # The splitting of arguments from the executable at a space might have been incorrect,
18820     # since paths with space are more likely in Windows. Give it another try with the whole
18821     # argument.
18822     path="$complete"
18823     arguments="EOL"
18824     new_path=`$CYGPATH -u "$path"`
18825     new_path=`$WHICH "$new_path" 2> /dev/null`
18826     # bat and cmd files are not always considered executable in cygwin causing which
18827     # to not find them
18828     if test "x$new_path" = x \
18829         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18830         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18831       new_path=`$CYGPATH -u "$path"`
18832     fi
18833     if test "x$new_path" = x; then
18834       # It's still not found. Now this is an unrecoverable error.
18835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18836 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18837       has_space=`$ECHO "$complete" | $GREP " "`
18838       if test "x$has_space" != x; then
18839         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18840 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18841       fi
18842       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18843     fi
18844   fi
18845 
18846   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18847   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18848   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18849   # "foo.exe" is OK but "foo" is an error.
18850   #
18851   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18852   # It is also a way to make sure we got the proper file name for the real test later on.
18853   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18854   if test "x$test_shortpath" = x; then
18855     # Short path failed, file does not exist as specified.
18856     # Try adding .exe or .cmd
18857     if test -f "${new_path}.exe"; then
18858       input_to_shortpath="${new_path}.exe"
18859     elif test -f "${new_path}.cmd"; then
18860       input_to_shortpath="${new_path}.cmd"
18861     else
18862       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18863 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18864       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18865 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18866       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18867     fi
18868   else
18869     input_to_shortpath="$new_path"
18870   fi
18871 
18872   # Call helper function which possibly converts this using DOS-style short mode.
18873   # If so, the updated path is stored in $new_path.
18874   new_path="$input_to_shortpath"
18875 
18876   input_path="$input_to_shortpath"
18877   # Check if we need to convert this using DOS-style short mode. If the path
18878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18879   # take no chances and rewrite it.
18880   # Note: m4 eats our [], so we need to use [ and ] instead.
18881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18882   if test "x$has_forbidden_chars" != x; then
18883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18884     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18885     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18886     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18887       # Going to short mode and back again did indeed matter. Since short mode is
18888       # case insensitive, let's make it lowercase to improve readability.
18889       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18890       # Now convert it back to Unix-style (cygpath)
18891       input_path=`$CYGPATH -u "$shortmode_path"`
18892       new_path="$input_path"
18893     fi
18894   fi
18895 
18896   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18897   if test "x$test_cygdrive_prefix" = x; then
18898     # As a simple fix, exclude /usr/bin since it's not a real path.
18899     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18900       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18901       # a path prefixed by /cygdrive for fixpath to work.
18902       new_path="$CYGWIN_ROOT_PATH$input_path"
18903     fi
18904   fi
18905 
18906   # remove trailing .exe if any
18907   new_path="${new_path/%.exe/}"
18908 
18909     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18910 
18911   # First separate the path from the arguments. This will split at the first
18912   # space.
18913   complete="$FOUND_MAKE"
18914   path="${complete%% *}"
18915   tmp="$complete EOL"
18916   arguments="${tmp#* }"
18917 
18918   # Input might be given as Windows format, start by converting to
18919   # unix format.
18920   new_path="$path"
18921 
18922   windows_path="$new_path"
18923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18924     unix_path=`$CYGPATH -u "$windows_path"`
18925     new_path="$unix_path"
18926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18928     new_path="$unix_path"
18929   fi
18930 
18931 
18932   # Now try to locate executable using which
18933   new_path=`$WHICH "$new_path" 2> /dev/null`
18934 
18935   if test "x$new_path" = x; then
18936     # Oops. Which didn't find the executable.
18937     # The splitting of arguments from the executable at a space might have been incorrect,
18938     # since paths with space are more likely in Windows. Give it another try with the whole
18939     # argument.
18940     path="$complete"
18941     arguments="EOL"
18942     new_path="$path"
18943 
18944   windows_path="$new_path"
18945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18946     unix_path=`$CYGPATH -u "$windows_path"`
18947     new_path="$unix_path"
18948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18950     new_path="$unix_path"
18951   fi
18952 
18953 
18954     new_path=`$WHICH "$new_path" 2> /dev/null`
18955     # bat and cmd files are not always considered executable in MSYS causing which
18956     # to not find them
18957     if test "x$new_path" = x \
18958         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18959         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18960       new_path="$path"
18961 
18962   windows_path="$new_path"
18963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18964     unix_path=`$CYGPATH -u "$windows_path"`
18965     new_path="$unix_path"
18966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18968     new_path="$unix_path"
18969   fi
18970 
18971     fi
18972 
18973     if test "x$new_path" = x; then
18974       # It's still not found. Now this is an unrecoverable error.
18975       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18976 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18977       has_space=`$ECHO "$complete" | $GREP " "`
18978       if test "x$has_space" != x; then
18979         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18980 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18981       fi
18982       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18983     fi
18984   fi
18985 
18986   # Now new_path has a complete unix path to the binary
18987   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18988     # Keep paths in /bin as-is, but remove trailing .exe if any
18989     new_path="${new_path/%.exe/}"
18990     # Do not save /bin paths to all_fixpath_prefixes!
18991   else
18992     # Not in mixed or Windows style, start by that.
18993     new_path=`cmd //c echo $new_path`
18994 
18995   input_path="$new_path"
18996   # Check if we need to convert this using DOS-style short mode. If the path
18997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18998   # take no chances and rewrite it.
18999   # Note: m4 eats our [], so we need to use [ and ] instead.
19000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19001   if test "x$has_forbidden_chars" != x; then
19002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19003     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19004   fi
19005 
19006     # Output is in $new_path
19007 
19008   windows_path="$new_path"
19009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19010     unix_path=`$CYGPATH -u "$windows_path"`
19011     new_path="$unix_path"
19012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19014     new_path="$unix_path"
19015   fi
19016 
19017     # remove trailing .exe if any
19018     new_path="${new_path/%.exe/}"
19019 
19020     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19021     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19022   fi
19023 
19024     else
19025       # We're on a unix platform. Hooray! :)
19026       # First separate the path from the arguments. This will split at the first
19027       # space.
19028       complete="$FOUND_MAKE"
19029       path="${complete%% *}"
19030       tmp="$complete EOL"
19031       arguments="${tmp#* }"
19032 
19033       # Cannot rely on the command "which" here since it doesn't always work.
19034       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19035       if test -z "$is_absolute_path"; then
19036         # Path to executable is not absolute. Find it.
19037         IFS_save="$IFS"
19038         IFS=:
19039         for p in $PATH; do
19040           if test -f "$p/$path" && test -x "$p/$path"; then
19041             new_path="$p/$path"
19042             break
19043           fi
19044         done
19045         IFS="$IFS_save"
19046       else
19047         # This is an absolute path, we can use it without further modifications.
19048         new_path="$path"
19049       fi
19050 
19051       if test "x$new_path" = x; then
19052         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19053 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19054         has_space=`$ECHO "$complete" | $GREP " "`
19055         if test "x$has_space" != x; then
19056           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19057 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19058         fi
19059         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19060       fi
19061     fi
19062 
19063     # Now join together the path and the arguments once again
19064     if test "x$arguments" != xEOL; then
19065       new_complete="$new_path ${arguments% *}"
19066     else
19067       new_complete="$new_path"
19068     fi
19069 
19070     if test "x$complete" != "x$new_complete"; then
19071       FOUND_MAKE="$new_complete"
19072       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19073 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19074     fi
19075   fi
19076 
19077         fi
19078       fi
19079     fi
19080   fi
19081 
19082         fi
19083         PATH=$OLD_PATH
19084       fi
19085     fi
19086 
19087     if test "x$FOUND_MAKE" = x; then
19088       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
19089     fi
19090 
19091   else
19092     # The variable is set, but is it from the command line or the environment?
19093 
19094     # Try to remove the string !MAKE! from our list.
19095     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19096     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19097       # If it failed, the variable was not from the command line. Ignore it,
19098       # but warn the user (except for BASH, which is always set by the calling BASH).
19099       if test "xMAKE" != xBASH; then
19100         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19101 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19102       fi
19103       # Try to locate tool using the code snippet
19104 
19105     # Try our hardest to locate a correct version of GNU make
19106     for ac_prog in gmake
19107 do
19108   # Extract the first word of "$ac_prog", so it can be a program name with args.
19109 set dummy $ac_prog; ac_word=$2
19110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19111 $as_echo_n "checking for $ac_word... " >&6; }
19112 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19113   $as_echo_n "(cached) " >&6
19114 else
19115   case $CHECK_GMAKE in
19116   [\\/]* | ?:[\\/]*)
19117   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19118   ;;
19119   *)
19120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19121 for as_dir in $PATH
19122 do
19123   IFS=$as_save_IFS
19124   test -z "$as_dir" && as_dir=.
19125     for ac_exec_ext in '' $ac_executable_extensions; do
19126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19127     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19129     break 2
19130   fi
19131 done
19132   done
19133 IFS=$as_save_IFS
19134 
19135   ;;
19136 esac
19137 fi
19138 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19139 if test -n "$CHECK_GMAKE"; then
19140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19141 $as_echo "$CHECK_GMAKE" >&6; }
19142 else
19143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19144 $as_echo "no" >&6; }
19145 fi
19146 
19147 
19148   test -n "$CHECK_GMAKE" && break
19149 done
19150 
19151 
19152   MAKE_CANDIDATE=""$CHECK_GMAKE""
19153   DESCRIPTION="gmake in PATH"
19154 
19155   # On Cygwin, we require a newer version of make than on other platforms
19156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19157     MAKE_VERSION_EXPR="-e 4\."
19158     MAKE_REQUIRED_VERSION="4.0"
19159    else
19160     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19161     MAKE_REQUIRED_VERSION="3.81"
19162   fi
19163 
19164   if test "x$MAKE_CANDIDATE" != x; then
19165     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19166 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19167     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19168     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19169     if test "x$IS_GNU_MAKE" = x; then
19170       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19171 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19172     else
19173       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19174       if test "x$IS_MODERN_MAKE" = x; then
19175         { $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
19176 $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;}
19177       else
19178         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19179           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19180             MAKE_EXPECTED_ENV='cygwin'
19181           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19182             MAKE_EXPECTED_ENV='msys'
19183           else
19184             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19185           fi
19186           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19187           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19188         else
19189           # Not relevant for non-Windows
19190           IS_MAKE_CORRECT_ENV=true
19191         fi
19192         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19193           { $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
19194 $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;}
19195         else
19196           FOUND_MAKE=$MAKE_CANDIDATE
19197 
19198   # Only process if variable expands to non-empty
19199 
19200   if test "x$FOUND_MAKE" != x; then
19201     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19202 
19203   # First separate the path from the arguments. This will split at the first
19204   # space.
19205   complete="$FOUND_MAKE"
19206   path="${complete%% *}"
19207   tmp="$complete EOL"
19208   arguments="${tmp#* }"
19209 
19210   # Input might be given as Windows format, start by converting to
19211   # unix format.
19212   new_path=`$CYGPATH -u "$path"`
19213 
19214   # Now try to locate executable using which
19215   new_path=`$WHICH "$new_path" 2> /dev/null`
19216   # bat and cmd files are not always considered executable in cygwin causing which
19217   # to not find them
19218   if test "x$new_path" = x \
19219       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19220       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19221     new_path=`$CYGPATH -u "$path"`
19222   fi
19223   if test "x$new_path" = x; then
19224     # Oops. Which didn't find the executable.
19225     # The splitting of arguments from the executable at a space might have been incorrect,
19226     # since paths with space are more likely in Windows. Give it another try with the whole
19227     # argument.
19228     path="$complete"
19229     arguments="EOL"
19230     new_path=`$CYGPATH -u "$path"`
19231     new_path=`$WHICH "$new_path" 2> /dev/null`
19232     # bat and cmd files are not always considered executable in cygwin causing which
19233     # to not find them
19234     if test "x$new_path" = x \
19235         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19236         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19237       new_path=`$CYGPATH -u "$path"`
19238     fi
19239     if test "x$new_path" = x; then
19240       # It's still not found. Now this is an unrecoverable error.
19241       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19242 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19243       has_space=`$ECHO "$complete" | $GREP " "`
19244       if test "x$has_space" != x; then
19245         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19246 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19247       fi
19248       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19249     fi
19250   fi
19251 
19252   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19253   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19254   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19255   # "foo.exe" is OK but "foo" is an error.
19256   #
19257   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19258   # It is also a way to make sure we got the proper file name for the real test later on.
19259   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19260   if test "x$test_shortpath" = x; then
19261     # Short path failed, file does not exist as specified.
19262     # Try adding .exe or .cmd
19263     if test -f "${new_path}.exe"; then
19264       input_to_shortpath="${new_path}.exe"
19265     elif test -f "${new_path}.cmd"; then
19266       input_to_shortpath="${new_path}.cmd"
19267     else
19268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19269 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19270       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19271 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19272       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19273     fi
19274   else
19275     input_to_shortpath="$new_path"
19276   fi
19277 
19278   # Call helper function which possibly converts this using DOS-style short mode.
19279   # If so, the updated path is stored in $new_path.
19280   new_path="$input_to_shortpath"
19281 
19282   input_path="$input_to_shortpath"
19283   # Check if we need to convert this using DOS-style short mode. If the path
19284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19285   # take no chances and rewrite it.
19286   # Note: m4 eats our [], so we need to use [ and ] instead.
19287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19288   if test "x$has_forbidden_chars" != x; then
19289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19290     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19291     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19292     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19293       # Going to short mode and back again did indeed matter. Since short mode is
19294       # case insensitive, let's make it lowercase to improve readability.
19295       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19296       # Now convert it back to Unix-style (cygpath)
19297       input_path=`$CYGPATH -u "$shortmode_path"`
19298       new_path="$input_path"
19299     fi
19300   fi
19301 
19302   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19303   if test "x$test_cygdrive_prefix" = x; then
19304     # As a simple fix, exclude /usr/bin since it's not a real path.
19305     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19306       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19307       # a path prefixed by /cygdrive for fixpath to work.
19308       new_path="$CYGWIN_ROOT_PATH$input_path"
19309     fi
19310   fi
19311 
19312   # remove trailing .exe if any
19313   new_path="${new_path/%.exe/}"
19314 
19315     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19316 
19317   # First separate the path from the arguments. This will split at the first
19318   # space.
19319   complete="$FOUND_MAKE"
19320   path="${complete%% *}"
19321   tmp="$complete EOL"
19322   arguments="${tmp#* }"
19323 
19324   # Input might be given as Windows format, start by converting to
19325   # unix format.
19326   new_path="$path"
19327 
19328   windows_path="$new_path"
19329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19330     unix_path=`$CYGPATH -u "$windows_path"`
19331     new_path="$unix_path"
19332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19334     new_path="$unix_path"
19335   fi
19336 
19337 
19338   # Now try to locate executable using which
19339   new_path=`$WHICH "$new_path" 2> /dev/null`
19340 
19341   if test "x$new_path" = x; then
19342     # Oops. Which didn't find the executable.
19343     # The splitting of arguments from the executable at a space might have been incorrect,
19344     # since paths with space are more likely in Windows. Give it another try with the whole
19345     # argument.
19346     path="$complete"
19347     arguments="EOL"
19348     new_path="$path"
19349 
19350   windows_path="$new_path"
19351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19352     unix_path=`$CYGPATH -u "$windows_path"`
19353     new_path="$unix_path"
19354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19356     new_path="$unix_path"
19357   fi
19358 
19359 
19360     new_path=`$WHICH "$new_path" 2> /dev/null`
19361     # bat and cmd files are not always considered executable in MSYS causing which
19362     # to not find them
19363     if test "x$new_path" = x \
19364         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19365         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19366       new_path="$path"
19367 
19368   windows_path="$new_path"
19369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19370     unix_path=`$CYGPATH -u "$windows_path"`
19371     new_path="$unix_path"
19372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19374     new_path="$unix_path"
19375   fi
19376 
19377     fi
19378 
19379     if test "x$new_path" = x; then
19380       # It's still not found. Now this is an unrecoverable error.
19381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19382 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19383       has_space=`$ECHO "$complete" | $GREP " "`
19384       if test "x$has_space" != x; then
19385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19387       fi
19388       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19389     fi
19390   fi
19391 
19392   # Now new_path has a complete unix path to the binary
19393   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19394     # Keep paths in /bin as-is, but remove trailing .exe if any
19395     new_path="${new_path/%.exe/}"
19396     # Do not save /bin paths to all_fixpath_prefixes!
19397   else
19398     # Not in mixed or Windows style, start by that.
19399     new_path=`cmd //c echo $new_path`
19400 
19401   input_path="$new_path"
19402   # Check if we need to convert this using DOS-style short mode. If the path
19403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19404   # take no chances and rewrite it.
19405   # Note: m4 eats our [], so we need to use [ and ] instead.
19406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19407   if test "x$has_forbidden_chars" != x; then
19408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19410   fi
19411 
19412     # Output is in $new_path
19413 
19414   windows_path="$new_path"
19415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19416     unix_path=`$CYGPATH -u "$windows_path"`
19417     new_path="$unix_path"
19418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19420     new_path="$unix_path"
19421   fi
19422 
19423     # remove trailing .exe if any
19424     new_path="${new_path/%.exe/}"
19425 
19426     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19427     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19428   fi
19429 
19430     else
19431       # We're on a unix platform. Hooray! :)
19432       # First separate the path from the arguments. This will split at the first
19433       # space.
19434       complete="$FOUND_MAKE"
19435       path="${complete%% *}"
19436       tmp="$complete EOL"
19437       arguments="${tmp#* }"
19438 
19439       # Cannot rely on the command "which" here since it doesn't always work.
19440       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19441       if test -z "$is_absolute_path"; then
19442         # Path to executable is not absolute. Find it.
19443         IFS_save="$IFS"
19444         IFS=:
19445         for p in $PATH; do
19446           if test -f "$p/$path" && test -x "$p/$path"; then
19447             new_path="$p/$path"
19448             break
19449           fi
19450         done
19451         IFS="$IFS_save"
19452       else
19453         # This is an absolute path, we can use it without further modifications.
19454         new_path="$path"
19455       fi
19456 
19457       if test "x$new_path" = x; then
19458         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19459 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19460         has_space=`$ECHO "$complete" | $GREP " "`
19461         if test "x$has_space" != x; then
19462           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19463 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19464         fi
19465         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19466       fi
19467     fi
19468 
19469     # Now join together the path and the arguments once again
19470     if test "x$arguments" != xEOL; then
19471       new_complete="$new_path ${arguments% *}"
19472     else
19473       new_complete="$new_path"
19474     fi
19475 
19476     if test "x$complete" != "x$new_complete"; then
19477       FOUND_MAKE="$new_complete"
19478       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19479 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19480     fi
19481   fi
19482 
19483         fi
19484       fi
19485     fi
19486   fi
19487 
19488 
19489     if test "x$FOUND_MAKE" = x; then
19490       for ac_prog in make
19491 do
19492   # Extract the first word of "$ac_prog", so it can be a program name with args.
19493 set dummy $ac_prog; ac_word=$2
19494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19495 $as_echo_n "checking for $ac_word... " >&6; }
19496 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19497   $as_echo_n "(cached) " >&6
19498 else
19499   case $CHECK_MAKE in
19500   [\\/]* | ?:[\\/]*)
19501   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19502   ;;
19503   *)
19504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19505 for as_dir in $PATH
19506 do
19507   IFS=$as_save_IFS
19508   test -z "$as_dir" && as_dir=.
19509     for ac_exec_ext in '' $ac_executable_extensions; do
19510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19511     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19513     break 2
19514   fi
19515 done
19516   done
19517 IFS=$as_save_IFS
19518 
19519   ;;
19520 esac
19521 fi
19522 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19523 if test -n "$CHECK_MAKE"; then
19524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19525 $as_echo "$CHECK_MAKE" >&6; }
19526 else
19527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19528 $as_echo "no" >&6; }
19529 fi
19530 
19531 
19532   test -n "$CHECK_MAKE" && break
19533 done
19534 
19535 
19536   MAKE_CANDIDATE=""$CHECK_MAKE""
19537   DESCRIPTION="make in PATH"
19538 
19539   # On Cygwin, we require a newer version of make than on other platforms
19540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19541     MAKE_VERSION_EXPR="-e 4\."
19542     MAKE_REQUIRED_VERSION="4.0"
19543    else
19544     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19545     MAKE_REQUIRED_VERSION="3.81"
19546   fi
19547 
19548   if test "x$MAKE_CANDIDATE" != x; then
19549     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19550 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19551     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19552     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19553     if test "x$IS_GNU_MAKE" = x; then
19554       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19555 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19556     else
19557       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19558       if test "x$IS_MODERN_MAKE" = x; then
19559         { $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
19560 $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;}
19561       else
19562         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19563           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19564             MAKE_EXPECTED_ENV='cygwin'
19565           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19566             MAKE_EXPECTED_ENV='msys'
19567           else
19568             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19569           fi
19570           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19571           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19572         else
19573           # Not relevant for non-Windows
19574           IS_MAKE_CORRECT_ENV=true
19575         fi
19576         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19577           { $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
19578 $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;}
19579         else
19580           FOUND_MAKE=$MAKE_CANDIDATE
19581 
19582   # Only process if variable expands to non-empty
19583 
19584   if test "x$FOUND_MAKE" != x; then
19585     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19586 
19587   # First separate the path from the arguments. This will split at the first
19588   # space.
19589   complete="$FOUND_MAKE"
19590   path="${complete%% *}"
19591   tmp="$complete EOL"
19592   arguments="${tmp#* }"
19593 
19594   # Input might be given as Windows format, start by converting to
19595   # unix format.
19596   new_path=`$CYGPATH -u "$path"`
19597 
19598   # Now try to locate executable using which
19599   new_path=`$WHICH "$new_path" 2> /dev/null`
19600   # bat and cmd files are not always considered executable in cygwin causing which
19601   # to not find them
19602   if test "x$new_path" = x \
19603       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19604       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19605     new_path=`$CYGPATH -u "$path"`
19606   fi
19607   if test "x$new_path" = x; then
19608     # Oops. Which didn't find the executable.
19609     # The splitting of arguments from the executable at a space might have been incorrect,
19610     # since paths with space are more likely in Windows. Give it another try with the whole
19611     # argument.
19612     path="$complete"
19613     arguments="EOL"
19614     new_path=`$CYGPATH -u "$path"`
19615     new_path=`$WHICH "$new_path" 2> /dev/null`
19616     # bat and cmd files are not always considered executable in cygwin causing which
19617     # to not find them
19618     if test "x$new_path" = x \
19619         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19620         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19621       new_path=`$CYGPATH -u "$path"`
19622     fi
19623     if test "x$new_path" = x; then
19624       # It's still not found. Now this is an unrecoverable error.
19625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19626 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19627       has_space=`$ECHO "$complete" | $GREP " "`
19628       if test "x$has_space" != x; then
19629         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19630 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19631       fi
19632       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19633     fi
19634   fi
19635 
19636   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19637   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19638   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19639   # "foo.exe" is OK but "foo" is an error.
19640   #
19641   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19642   # It is also a way to make sure we got the proper file name for the real test later on.
19643   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19644   if test "x$test_shortpath" = x; then
19645     # Short path failed, file does not exist as specified.
19646     # Try adding .exe or .cmd
19647     if test -f "${new_path}.exe"; then
19648       input_to_shortpath="${new_path}.exe"
19649     elif test -f "${new_path}.cmd"; then
19650       input_to_shortpath="${new_path}.cmd"
19651     else
19652       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19653 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19654       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19655 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19656       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19657     fi
19658   else
19659     input_to_shortpath="$new_path"
19660   fi
19661 
19662   # Call helper function which possibly converts this using DOS-style short mode.
19663   # If so, the updated path is stored in $new_path.
19664   new_path="$input_to_shortpath"
19665 
19666   input_path="$input_to_shortpath"
19667   # Check if we need to convert this using DOS-style short mode. If the path
19668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19669   # take no chances and rewrite it.
19670   # Note: m4 eats our [], so we need to use [ and ] instead.
19671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19672   if test "x$has_forbidden_chars" != x; then
19673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19674     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19675     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19676     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19677       # Going to short mode and back again did indeed matter. Since short mode is
19678       # case insensitive, let's make it lowercase to improve readability.
19679       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19680       # Now convert it back to Unix-style (cygpath)
19681       input_path=`$CYGPATH -u "$shortmode_path"`
19682       new_path="$input_path"
19683     fi
19684   fi
19685 
19686   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19687   if test "x$test_cygdrive_prefix" = x; then
19688     # As a simple fix, exclude /usr/bin since it's not a real path.
19689     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19690       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19691       # a path prefixed by /cygdrive for fixpath to work.
19692       new_path="$CYGWIN_ROOT_PATH$input_path"
19693     fi
19694   fi
19695 
19696   # remove trailing .exe if any
19697   new_path="${new_path/%.exe/}"
19698 
19699     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19700 
19701   # First separate the path from the arguments. This will split at the first
19702   # space.
19703   complete="$FOUND_MAKE"
19704   path="${complete%% *}"
19705   tmp="$complete EOL"
19706   arguments="${tmp#* }"
19707 
19708   # Input might be given as Windows format, start by converting to
19709   # unix format.
19710   new_path="$path"
19711 
19712   windows_path="$new_path"
19713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19714     unix_path=`$CYGPATH -u "$windows_path"`
19715     new_path="$unix_path"
19716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19718     new_path="$unix_path"
19719   fi
19720 
19721 
19722   # Now try to locate executable using which
19723   new_path=`$WHICH "$new_path" 2> /dev/null`
19724 
19725   if test "x$new_path" = x; then
19726     # Oops. Which didn't find the executable.
19727     # The splitting of arguments from the executable at a space might have been incorrect,
19728     # since paths with space are more likely in Windows. Give it another try with the whole
19729     # argument.
19730     path="$complete"
19731     arguments="EOL"
19732     new_path="$path"
19733 
19734   windows_path="$new_path"
19735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19736     unix_path=`$CYGPATH -u "$windows_path"`
19737     new_path="$unix_path"
19738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19740     new_path="$unix_path"
19741   fi
19742 
19743 
19744     new_path=`$WHICH "$new_path" 2> /dev/null`
19745     # bat and cmd files are not always considered executable in MSYS causing which
19746     # to not find them
19747     if test "x$new_path" = x \
19748         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19749         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19750       new_path="$path"
19751 
19752   windows_path="$new_path"
19753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19754     unix_path=`$CYGPATH -u "$windows_path"`
19755     new_path="$unix_path"
19756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19757     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19758     new_path="$unix_path"
19759   fi
19760 
19761     fi
19762 
19763     if test "x$new_path" = x; then
19764       # It's still not found. Now this is an unrecoverable error.
19765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19766 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19767       has_space=`$ECHO "$complete" | $GREP " "`
19768       if test "x$has_space" != x; then
19769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19771       fi
19772       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19773     fi
19774   fi
19775 
19776   # Now new_path has a complete unix path to the binary
19777   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19778     # Keep paths in /bin as-is, but remove trailing .exe if any
19779     new_path="${new_path/%.exe/}"
19780     # Do not save /bin paths to all_fixpath_prefixes!
19781   else
19782     # Not in mixed or Windows style, start by that.
19783     new_path=`cmd //c echo $new_path`
19784 
19785   input_path="$new_path"
19786   # Check if we need to convert this using DOS-style short mode. If the path
19787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19788   # take no chances and rewrite it.
19789   # Note: m4 eats our [], so we need to use [ and ] instead.
19790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19791   if test "x$has_forbidden_chars" != x; then
19792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19794   fi
19795 
19796     # Output is in $new_path
19797 
19798   windows_path="$new_path"
19799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19800     unix_path=`$CYGPATH -u "$windows_path"`
19801     new_path="$unix_path"
19802   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19803     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19804     new_path="$unix_path"
19805   fi
19806 
19807     # remove trailing .exe if any
19808     new_path="${new_path/%.exe/}"
19809 
19810     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19811     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19812   fi
19813 
19814     else
19815       # We're on a unix platform. Hooray! :)
19816       # First separate the path from the arguments. This will split at the first
19817       # space.
19818       complete="$FOUND_MAKE"
19819       path="${complete%% *}"
19820       tmp="$complete EOL"
19821       arguments="${tmp#* }"
19822 
19823       # Cannot rely on the command "which" here since it doesn't always work.
19824       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19825       if test -z "$is_absolute_path"; then
19826         # Path to executable is not absolute. Find it.
19827         IFS_save="$IFS"
19828         IFS=:
19829         for p in $PATH; do
19830           if test -f "$p/$path" && test -x "$p/$path"; then
19831             new_path="$p/$path"
19832             break
19833           fi
19834         done
19835         IFS="$IFS_save"
19836       else
19837         # This is an absolute path, we can use it without further modifications.
19838         new_path="$path"
19839       fi
19840 
19841       if test "x$new_path" = x; then
19842         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19843 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19844         has_space=`$ECHO "$complete" | $GREP " "`
19845         if test "x$has_space" != x; then
19846           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19847 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19848         fi
19849         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19850       fi
19851     fi
19852 
19853     # Now join together the path and the arguments once again
19854     if test "x$arguments" != xEOL; then
19855       new_complete="$new_path ${arguments% *}"
19856     else
19857       new_complete="$new_path"
19858     fi
19859 
19860     if test "x$complete" != "x$new_complete"; then
19861       FOUND_MAKE="$new_complete"
19862       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19863 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19864     fi
19865   fi
19866 
19867         fi
19868       fi
19869     fi
19870   fi
19871 
19872     fi
19873 
19874     if test "x$FOUND_MAKE" = x; then
19875       if test "x$TOOLCHAIN_PATH" != x; then
19876         # We have a toolchain path, check that as well before giving up.
19877         OLD_PATH=$PATH
19878         PATH=$TOOLCHAIN_PATH:$PATH
19879         for ac_prog in gmake
19880 do
19881   # Extract the first word of "$ac_prog", so it can be a program name with args.
19882 set dummy $ac_prog; ac_word=$2
19883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19884 $as_echo_n "checking for $ac_word... " >&6; }
19885 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19886   $as_echo_n "(cached) " >&6
19887 else
19888   case $CHECK_TOOLSDIR_GMAKE in
19889   [\\/]* | ?:[\\/]*)
19890   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19891   ;;
19892   *)
19893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19894 for as_dir in $PATH
19895 do
19896   IFS=$as_save_IFS
19897   test -z "$as_dir" && as_dir=.
19898     for ac_exec_ext in '' $ac_executable_extensions; do
19899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19900     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19902     break 2
19903   fi
19904 done
19905   done
19906 IFS=$as_save_IFS
19907 
19908   ;;
19909 esac
19910 fi
19911 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19912 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19914 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19915 else
19916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19917 $as_echo "no" >&6; }
19918 fi
19919 
19920 
19921   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19922 done
19923 
19924 
19925   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19926   DESCRIPTION="gmake in tools-dir"
19927 
19928   # On Cygwin, we require a newer version of make than on other platforms
19929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19930     MAKE_VERSION_EXPR="-e 4\."
19931     MAKE_REQUIRED_VERSION="4.0"
19932    else
19933     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19934     MAKE_REQUIRED_VERSION="3.81"
19935   fi
19936 
19937   if test "x$MAKE_CANDIDATE" != x; then
19938     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19939 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19940     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19941     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19942     if test "x$IS_GNU_MAKE" = x; then
19943       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19944 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19945     else
19946       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19947       if test "x$IS_MODERN_MAKE" = x; then
19948         { $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
19949 $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;}
19950       else
19951         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19952           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19953             MAKE_EXPECTED_ENV='cygwin'
19954           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19955             MAKE_EXPECTED_ENV='msys'
19956           else
19957             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19958           fi
19959           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19960           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19961         else
19962           # Not relevant for non-Windows
19963           IS_MAKE_CORRECT_ENV=true
19964         fi
19965         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19966           { $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
19967 $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;}
19968         else
19969           FOUND_MAKE=$MAKE_CANDIDATE
19970 
19971   # Only process if variable expands to non-empty
19972 
19973   if test "x$FOUND_MAKE" != x; then
19974     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975 
19976   # First separate the path from the arguments. This will split at the first
19977   # space.
19978   complete="$FOUND_MAKE"
19979   path="${complete%% *}"
19980   tmp="$complete EOL"
19981   arguments="${tmp#* }"
19982 
19983   # Input might be given as Windows format, start by converting to
19984   # unix format.
19985   new_path=`$CYGPATH -u "$path"`
19986 
19987   # Now try to locate executable using which
19988   new_path=`$WHICH "$new_path" 2> /dev/null`
19989   # bat and cmd files are not always considered executable in cygwin causing which
19990   # to not find them
19991   if test "x$new_path" = x \
19992       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19993       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19994     new_path=`$CYGPATH -u "$path"`
19995   fi
19996   if test "x$new_path" = x; then
19997     # Oops. Which didn't find the executable.
19998     # The splitting of arguments from the executable at a space might have been incorrect,
19999     # since paths with space are more likely in Windows. Give it another try with the whole
20000     # argument.
20001     path="$complete"
20002     arguments="EOL"
20003     new_path=`$CYGPATH -u "$path"`
20004     new_path=`$WHICH "$new_path" 2> /dev/null`
20005     # bat and cmd files are not always considered executable in cygwin causing which
20006     # to not find them
20007     if test "x$new_path" = x \
20008         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20009         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20010       new_path=`$CYGPATH -u "$path"`
20011     fi
20012     if test "x$new_path" = x; then
20013       # It's still not found. Now this is an unrecoverable error.
20014       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20015 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20016       has_space=`$ECHO "$complete" | $GREP " "`
20017       if test "x$has_space" != x; then
20018         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20019 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20020       fi
20021       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20022     fi
20023   fi
20024 
20025   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20026   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20027   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20028   # "foo.exe" is OK but "foo" is an error.
20029   #
20030   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20031   # It is also a way to make sure we got the proper file name for the real test later on.
20032   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20033   if test "x$test_shortpath" = x; then
20034     # Short path failed, file does not exist as specified.
20035     # Try adding .exe or .cmd
20036     if test -f "${new_path}.exe"; then
20037       input_to_shortpath="${new_path}.exe"
20038     elif test -f "${new_path}.cmd"; then
20039       input_to_shortpath="${new_path}.cmd"
20040     else
20041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20042 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20043       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20044 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20045       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20046     fi
20047   else
20048     input_to_shortpath="$new_path"
20049   fi
20050 
20051   # Call helper function which possibly converts this using DOS-style short mode.
20052   # If so, the updated path is stored in $new_path.
20053   new_path="$input_to_shortpath"
20054 
20055   input_path="$input_to_shortpath"
20056   # Check if we need to convert this using DOS-style short mode. If the path
20057   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20058   # take no chances and rewrite it.
20059   # Note: m4 eats our [], so we need to use [ and ] instead.
20060   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20061   if test "x$has_forbidden_chars" != x; then
20062     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20063     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20064     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20065     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20066       # Going to short mode and back again did indeed matter. Since short mode is
20067       # case insensitive, let's make it lowercase to improve readability.
20068       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20069       # Now convert it back to Unix-style (cygpath)
20070       input_path=`$CYGPATH -u "$shortmode_path"`
20071       new_path="$input_path"
20072     fi
20073   fi
20074 
20075   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20076   if test "x$test_cygdrive_prefix" = x; then
20077     # As a simple fix, exclude /usr/bin since it's not a real path.
20078     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20079       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20080       # a path prefixed by /cygdrive for fixpath to work.
20081       new_path="$CYGWIN_ROOT_PATH$input_path"
20082     fi
20083   fi
20084 
20085   # remove trailing .exe if any
20086   new_path="${new_path/%.exe/}"
20087 
20088     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20089 
20090   # First separate the path from the arguments. This will split at the first
20091   # space.
20092   complete="$FOUND_MAKE"
20093   path="${complete%% *}"
20094   tmp="$complete EOL"
20095   arguments="${tmp#* }"
20096 
20097   # Input might be given as Windows format, start by converting to
20098   # unix format.
20099   new_path="$path"
20100 
20101   windows_path="$new_path"
20102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20103     unix_path=`$CYGPATH -u "$windows_path"`
20104     new_path="$unix_path"
20105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20107     new_path="$unix_path"
20108   fi
20109 
20110 
20111   # Now try to locate executable using which
20112   new_path=`$WHICH "$new_path" 2> /dev/null`
20113 
20114   if test "x$new_path" = x; then
20115     # Oops. Which didn't find the executable.
20116     # The splitting of arguments from the executable at a space might have been incorrect,
20117     # since paths with space are more likely in Windows. Give it another try with the whole
20118     # argument.
20119     path="$complete"
20120     arguments="EOL"
20121     new_path="$path"
20122 
20123   windows_path="$new_path"
20124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20125     unix_path=`$CYGPATH -u "$windows_path"`
20126     new_path="$unix_path"
20127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20129     new_path="$unix_path"
20130   fi
20131 
20132 
20133     new_path=`$WHICH "$new_path" 2> /dev/null`
20134     # bat and cmd files are not always considered executable in MSYS causing which
20135     # to not find them
20136     if test "x$new_path" = x \
20137         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20138         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20139       new_path="$path"
20140 
20141   windows_path="$new_path"
20142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20143     unix_path=`$CYGPATH -u "$windows_path"`
20144     new_path="$unix_path"
20145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20147     new_path="$unix_path"
20148   fi
20149 
20150     fi
20151 
20152     if test "x$new_path" = x; then
20153       # It's still not found. Now this is an unrecoverable error.
20154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20155 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20156       has_space=`$ECHO "$complete" | $GREP " "`
20157       if test "x$has_space" != x; then
20158         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20159 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20160       fi
20161       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20162     fi
20163   fi
20164 
20165   # Now new_path has a complete unix path to the binary
20166   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20167     # Keep paths in /bin as-is, but remove trailing .exe if any
20168     new_path="${new_path/%.exe/}"
20169     # Do not save /bin paths to all_fixpath_prefixes!
20170   else
20171     # Not in mixed or Windows style, start by that.
20172     new_path=`cmd //c echo $new_path`
20173 
20174   input_path="$new_path"
20175   # Check if we need to convert this using DOS-style short mode. If the path
20176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20177   # take no chances and rewrite it.
20178   # Note: m4 eats our [], so we need to use [ and ] instead.
20179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20180   if test "x$has_forbidden_chars" != x; then
20181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20182     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20183   fi
20184 
20185     # Output is in $new_path
20186 
20187   windows_path="$new_path"
20188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20189     unix_path=`$CYGPATH -u "$windows_path"`
20190     new_path="$unix_path"
20191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20193     new_path="$unix_path"
20194   fi
20195 
20196     # remove trailing .exe if any
20197     new_path="${new_path/%.exe/}"
20198 
20199     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20200     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20201   fi
20202 
20203     else
20204       # We're on a unix platform. Hooray! :)
20205       # First separate the path from the arguments. This will split at the first
20206       # space.
20207       complete="$FOUND_MAKE"
20208       path="${complete%% *}"
20209       tmp="$complete EOL"
20210       arguments="${tmp#* }"
20211 
20212       # Cannot rely on the command "which" here since it doesn't always work.
20213       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20214       if test -z "$is_absolute_path"; then
20215         # Path to executable is not absolute. Find it.
20216         IFS_save="$IFS"
20217         IFS=:
20218         for p in $PATH; do
20219           if test -f "$p/$path" && test -x "$p/$path"; then
20220             new_path="$p/$path"
20221             break
20222           fi
20223         done
20224         IFS="$IFS_save"
20225       else
20226         # This is an absolute path, we can use it without further modifications.
20227         new_path="$path"
20228       fi
20229 
20230       if test "x$new_path" = x; then
20231         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20232 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20233         has_space=`$ECHO "$complete" | $GREP " "`
20234         if test "x$has_space" != x; then
20235           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20236 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20237         fi
20238         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20239       fi
20240     fi
20241 
20242     # Now join together the path and the arguments once again
20243     if test "x$arguments" != xEOL; then
20244       new_complete="$new_path ${arguments% *}"
20245     else
20246       new_complete="$new_path"
20247     fi
20248 
20249     if test "x$complete" != "x$new_complete"; then
20250       FOUND_MAKE="$new_complete"
20251       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20252 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20253     fi
20254   fi
20255 
20256         fi
20257       fi
20258     fi
20259   fi
20260 
20261         if test "x$FOUND_MAKE" = x; then
20262           for ac_prog in make
20263 do
20264   # Extract the first word of "$ac_prog", so it can be a program name with args.
20265 set dummy $ac_prog; ac_word=$2
20266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20267 $as_echo_n "checking for $ac_word... " >&6; }
20268 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20269   $as_echo_n "(cached) " >&6
20270 else
20271   case $CHECK_TOOLSDIR_MAKE in
20272   [\\/]* | ?:[\\/]*)
20273   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20274   ;;
20275   *)
20276   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20277 for as_dir in $PATH
20278 do
20279   IFS=$as_save_IFS
20280   test -z "$as_dir" && as_dir=.
20281     for ac_exec_ext in '' $ac_executable_extensions; do
20282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20283     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20285     break 2
20286   fi
20287 done
20288   done
20289 IFS=$as_save_IFS
20290 
20291   ;;
20292 esac
20293 fi
20294 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20295 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20297 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20298 else
20299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20300 $as_echo "no" >&6; }
20301 fi
20302 
20303 
20304   test -n "$CHECK_TOOLSDIR_MAKE" && break
20305 done
20306 
20307 
20308   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20309   DESCRIPTION="make in tools-dir"
20310 
20311   # On Cygwin, we require a newer version of make than on other platforms
20312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20313     MAKE_VERSION_EXPR="-e 4\."
20314     MAKE_REQUIRED_VERSION="4.0"
20315    else
20316     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20317     MAKE_REQUIRED_VERSION="3.81"
20318   fi
20319 
20320   if test "x$MAKE_CANDIDATE" != x; then
20321     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20322 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20323     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20324     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20325     if test "x$IS_GNU_MAKE" = x; then
20326       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20327 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20328     else
20329       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20330       if test "x$IS_MODERN_MAKE" = x; then
20331         { $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
20332 $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;}
20333       else
20334         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20335           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20336             MAKE_EXPECTED_ENV='cygwin'
20337           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20338             MAKE_EXPECTED_ENV='msys'
20339           else
20340             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20341           fi
20342           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20343           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20344         else
20345           # Not relevant for non-Windows
20346           IS_MAKE_CORRECT_ENV=true
20347         fi
20348         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20349           { $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
20350 $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;}
20351         else
20352           FOUND_MAKE=$MAKE_CANDIDATE
20353 
20354   # Only process if variable expands to non-empty
20355 
20356   if test "x$FOUND_MAKE" != x; then
20357     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20358 
20359   # First separate the path from the arguments. This will split at the first
20360   # space.
20361   complete="$FOUND_MAKE"
20362   path="${complete%% *}"
20363   tmp="$complete EOL"
20364   arguments="${tmp#* }"
20365 
20366   # Input might be given as Windows format, start by converting to
20367   # unix format.
20368   new_path=`$CYGPATH -u "$path"`
20369 
20370   # Now try to locate executable using which
20371   new_path=`$WHICH "$new_path" 2> /dev/null`
20372   # bat and cmd files are not always considered executable in cygwin causing which
20373   # to not find them
20374   if test "x$new_path" = x \
20375       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20376       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20377     new_path=`$CYGPATH -u "$path"`
20378   fi
20379   if test "x$new_path" = x; then
20380     # Oops. Which didn't find the executable.
20381     # The splitting of arguments from the executable at a space might have been incorrect,
20382     # since paths with space are more likely in Windows. Give it another try with the whole
20383     # argument.
20384     path="$complete"
20385     arguments="EOL"
20386     new_path=`$CYGPATH -u "$path"`
20387     new_path=`$WHICH "$new_path" 2> /dev/null`
20388     # bat and cmd files are not always considered executable in cygwin causing which
20389     # to not find them
20390     if test "x$new_path" = x \
20391         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20392         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20393       new_path=`$CYGPATH -u "$path"`
20394     fi
20395     if test "x$new_path" = x; then
20396       # It's still not found. Now this is an unrecoverable error.
20397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20398 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20399       has_space=`$ECHO "$complete" | $GREP " "`
20400       if test "x$has_space" != x; then
20401         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20402 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20403       fi
20404       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20405     fi
20406   fi
20407 
20408   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20409   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20410   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20411   # "foo.exe" is OK but "foo" is an error.
20412   #
20413   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20414   # It is also a way to make sure we got the proper file name for the real test later on.
20415   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20416   if test "x$test_shortpath" = x; then
20417     # Short path failed, file does not exist as specified.
20418     # Try adding .exe or .cmd
20419     if test -f "${new_path}.exe"; then
20420       input_to_shortpath="${new_path}.exe"
20421     elif test -f "${new_path}.cmd"; then
20422       input_to_shortpath="${new_path}.cmd"
20423     else
20424       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20425 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20426       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20427 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20428       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20429     fi
20430   else
20431     input_to_shortpath="$new_path"
20432   fi
20433 
20434   # Call helper function which possibly converts this using DOS-style short mode.
20435   # If so, the updated path is stored in $new_path.
20436   new_path="$input_to_shortpath"
20437 
20438   input_path="$input_to_shortpath"
20439   # Check if we need to convert this using DOS-style short mode. If the path
20440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20441   # take no chances and rewrite it.
20442   # Note: m4 eats our [], so we need to use [ and ] instead.
20443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20444   if test "x$has_forbidden_chars" != x; then
20445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20446     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20447     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20448     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20449       # Going to short mode and back again did indeed matter. Since short mode is
20450       # case insensitive, let's make it lowercase to improve readability.
20451       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20452       # Now convert it back to Unix-style (cygpath)
20453       input_path=`$CYGPATH -u "$shortmode_path"`
20454       new_path="$input_path"
20455     fi
20456   fi
20457 
20458   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20459   if test "x$test_cygdrive_prefix" = x; then
20460     # As a simple fix, exclude /usr/bin since it's not a real path.
20461     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20462       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20463       # a path prefixed by /cygdrive for fixpath to work.
20464       new_path="$CYGWIN_ROOT_PATH$input_path"
20465     fi
20466   fi
20467 
20468   # remove trailing .exe if any
20469   new_path="${new_path/%.exe/}"
20470 
20471     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20472 
20473   # First separate the path from the arguments. This will split at the first
20474   # space.
20475   complete="$FOUND_MAKE"
20476   path="${complete%% *}"
20477   tmp="$complete EOL"
20478   arguments="${tmp#* }"
20479 
20480   # Input might be given as Windows format, start by converting to
20481   # unix format.
20482   new_path="$path"
20483 
20484   windows_path="$new_path"
20485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20486     unix_path=`$CYGPATH -u "$windows_path"`
20487     new_path="$unix_path"
20488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20490     new_path="$unix_path"
20491   fi
20492 
20493 
20494   # Now try to locate executable using which
20495   new_path=`$WHICH "$new_path" 2> /dev/null`
20496 
20497   if test "x$new_path" = x; then
20498     # Oops. Which didn't find the executable.
20499     # The splitting of arguments from the executable at a space might have been incorrect,
20500     # since paths with space are more likely in Windows. Give it another try with the whole
20501     # argument.
20502     path="$complete"
20503     arguments="EOL"
20504     new_path="$path"
20505 
20506   windows_path="$new_path"
20507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20508     unix_path=`$CYGPATH -u "$windows_path"`
20509     new_path="$unix_path"
20510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20512     new_path="$unix_path"
20513   fi
20514 
20515 
20516     new_path=`$WHICH "$new_path" 2> /dev/null`
20517     # bat and cmd files are not always considered executable in MSYS causing which
20518     # to not find them
20519     if test "x$new_path" = x \
20520         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20521         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20522       new_path="$path"
20523 
20524   windows_path="$new_path"
20525   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20526     unix_path=`$CYGPATH -u "$windows_path"`
20527     new_path="$unix_path"
20528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20529     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20530     new_path="$unix_path"
20531   fi
20532 
20533     fi
20534 
20535     if test "x$new_path" = x; then
20536       # It's still not found. Now this is an unrecoverable error.
20537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20538 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20539       has_space=`$ECHO "$complete" | $GREP " "`
20540       if test "x$has_space" != x; then
20541         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20542 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20543       fi
20544       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20545     fi
20546   fi
20547 
20548   # Now new_path has a complete unix path to the binary
20549   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20550     # Keep paths in /bin as-is, but remove trailing .exe if any
20551     new_path="${new_path/%.exe/}"
20552     # Do not save /bin paths to all_fixpath_prefixes!
20553   else
20554     # Not in mixed or Windows style, start by that.
20555     new_path=`cmd //c echo $new_path`
20556 
20557   input_path="$new_path"
20558   # Check if we need to convert this using DOS-style short mode. If the path
20559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20560   # take no chances and rewrite it.
20561   # Note: m4 eats our [], so we need to use [ and ] instead.
20562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20563   if test "x$has_forbidden_chars" != x; then
20564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20565     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20566   fi
20567 
20568     # Output is in $new_path
20569 
20570   windows_path="$new_path"
20571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20572     unix_path=`$CYGPATH -u "$windows_path"`
20573     new_path="$unix_path"
20574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20576     new_path="$unix_path"
20577   fi
20578 
20579     # remove trailing .exe if any
20580     new_path="${new_path/%.exe/}"
20581 
20582     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20583     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20584   fi
20585 
20586     else
20587       # We're on a unix platform. Hooray! :)
20588       # First separate the path from the arguments. This will split at the first
20589       # space.
20590       complete="$FOUND_MAKE"
20591       path="${complete%% *}"
20592       tmp="$complete EOL"
20593       arguments="${tmp#* }"
20594 
20595       # Cannot rely on the command "which" here since it doesn't always work.
20596       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20597       if test -z "$is_absolute_path"; then
20598         # Path to executable is not absolute. Find it.
20599         IFS_save="$IFS"
20600         IFS=:
20601         for p in $PATH; do
20602           if test -f "$p/$path" && test -x "$p/$path"; then
20603             new_path="$p/$path"
20604             break
20605           fi
20606         done
20607         IFS="$IFS_save"
20608       else
20609         # This is an absolute path, we can use it without further modifications.
20610         new_path="$path"
20611       fi
20612 
20613       if test "x$new_path" = x; then
20614         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20615 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20616         has_space=`$ECHO "$complete" | $GREP " "`
20617         if test "x$has_space" != x; then
20618           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20619 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20620         fi
20621         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20622       fi
20623     fi
20624 
20625     # Now join together the path and the arguments once again
20626     if test "x$arguments" != xEOL; then
20627       new_complete="$new_path ${arguments% *}"
20628     else
20629       new_complete="$new_path"
20630     fi
20631 
20632     if test "x$complete" != "x$new_complete"; then
20633       FOUND_MAKE="$new_complete"
20634       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20635 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20636     fi
20637   fi
20638 
20639         fi
20640       fi
20641     fi
20642   fi
20643 
20644         fi
20645         PATH=$OLD_PATH
20646       fi
20647     fi
20648 
20649     if test "x$FOUND_MAKE" = x; then
20650       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
20651     fi
20652 
20653     else
20654       # If it succeeded, then it was overridden by the user. We will use it
20655       # for the tool.
20656 
20657       # First remove it from the list of overridden variables, so we can test
20658       # for unknown variables in the end.
20659       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20660 
20661       # Check if we try to supply an empty value
20662       if test "x$MAKE" = x; then
20663         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20664 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20666 $as_echo_n "checking for MAKE... " >&6; }
20667         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20668 $as_echo "disabled" >&6; }
20669       else
20670         # Check if the provided tool contains a complete path.
20671         tool_specified="$MAKE"
20672         tool_basename="${tool_specified##*/}"
20673         if test "x$tool_basename" = "x$tool_specified"; then
20674           # A command without a complete path is provided, search $PATH.
20675           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20676 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20677           # Extract the first word of "$tool_basename", so it can be a program name with args.
20678 set dummy $tool_basename; ac_word=$2
20679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20680 $as_echo_n "checking for $ac_word... " >&6; }
20681 if ${ac_cv_path_MAKE+:} false; then :
20682   $as_echo_n "(cached) " >&6
20683 else
20684   case $MAKE in
20685   [\\/]* | ?:[\\/]*)
20686   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20687   ;;
20688   *)
20689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20690 for as_dir in $PATH
20691 do
20692   IFS=$as_save_IFS
20693   test -z "$as_dir" && as_dir=.
20694     for ac_exec_ext in '' $ac_executable_extensions; do
20695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20696     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20698     break 2
20699   fi
20700 done
20701   done
20702 IFS=$as_save_IFS
20703 
20704   ;;
20705 esac
20706 fi
20707 MAKE=$ac_cv_path_MAKE
20708 if test -n "$MAKE"; then
20709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20710 $as_echo "$MAKE" >&6; }
20711 else
20712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20713 $as_echo "no" >&6; }
20714 fi
20715 
20716 
20717           if test "x$MAKE" = x; then
20718             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20719           fi
20720         else
20721           # Otherwise we believe it is a complete path. Use it as it is.
20722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20723 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20724           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20725 $as_echo_n "checking for MAKE... " >&6; }
20726           if test ! -x "$tool_specified"; then
20727             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20728 $as_echo "not found" >&6; }
20729             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20730           fi
20731           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20732 $as_echo "$tool_specified" >&6; }
20733         fi
20734       fi
20735     fi
20736 
20737     # If MAKE was set by user, verify the version
20738 
20739   MAKE_CANDIDATE=""$MAKE""
20740   DESCRIPTION="user supplied MAKE=$MAKE"
20741 
20742   # On Cygwin, we require a newer version of make than on other platforms
20743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20744     MAKE_VERSION_EXPR="-e 4\."
20745     MAKE_REQUIRED_VERSION="4.0"
20746    else
20747     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20748     MAKE_REQUIRED_VERSION="3.81"
20749   fi
20750 
20751   if test "x$MAKE_CANDIDATE" != x; then
20752     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20753 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20754     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20755     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20756     if test "x$IS_GNU_MAKE" = x; then
20757       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20758 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20759     else
20760       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20761       if test "x$IS_MODERN_MAKE" = x; then
20762         { $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
20763 $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;}
20764       else
20765         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20766           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20767             MAKE_EXPECTED_ENV='cygwin'
20768           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20769             MAKE_EXPECTED_ENV='msys'
20770           else
20771             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20772           fi
20773           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20774           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20775         else
20776           # Not relevant for non-Windows
20777           IS_MAKE_CORRECT_ENV=true
20778         fi
20779         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20780           { $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
20781 $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;}
20782         else
20783           FOUND_MAKE=$MAKE_CANDIDATE
20784 
20785   # Only process if variable expands to non-empty
20786 
20787   if test "x$FOUND_MAKE" != x; then
20788     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20789 
20790   # First separate the path from the arguments. This will split at the first
20791   # space.
20792   complete="$FOUND_MAKE"
20793   path="${complete%% *}"
20794   tmp="$complete EOL"
20795   arguments="${tmp#* }"
20796 
20797   # Input might be given as Windows format, start by converting to
20798   # unix format.
20799   new_path=`$CYGPATH -u "$path"`
20800 
20801   # Now try to locate executable using which
20802   new_path=`$WHICH "$new_path" 2> /dev/null`
20803   # bat and cmd files are not always considered executable in cygwin causing which
20804   # to not find them
20805   if test "x$new_path" = x \
20806       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20807       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20808     new_path=`$CYGPATH -u "$path"`
20809   fi
20810   if test "x$new_path" = x; then
20811     # Oops. Which didn't find the executable.
20812     # The splitting of arguments from the executable at a space might have been incorrect,
20813     # since paths with space are more likely in Windows. Give it another try with the whole
20814     # argument.
20815     path="$complete"
20816     arguments="EOL"
20817     new_path=`$CYGPATH -u "$path"`
20818     new_path=`$WHICH "$new_path" 2> /dev/null`
20819     # bat and cmd files are not always considered executable in cygwin causing which
20820     # to not find them
20821     if test "x$new_path" = x \
20822         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20823         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20824       new_path=`$CYGPATH -u "$path"`
20825     fi
20826     if test "x$new_path" = x; then
20827       # It's still not found. Now this is an unrecoverable error.
20828       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20829 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20830       has_space=`$ECHO "$complete" | $GREP " "`
20831       if test "x$has_space" != x; then
20832         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20833 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20834       fi
20835       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20836     fi
20837   fi
20838 
20839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20842   # "foo.exe" is OK but "foo" is an error.
20843   #
20844   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20845   # It is also a way to make sure we got the proper file name for the real test later on.
20846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20847   if test "x$test_shortpath" = x; then
20848     # Short path failed, file does not exist as specified.
20849     # Try adding .exe or .cmd
20850     if test -f "${new_path}.exe"; then
20851       input_to_shortpath="${new_path}.exe"
20852     elif test -f "${new_path}.cmd"; then
20853       input_to_shortpath="${new_path}.cmd"
20854     else
20855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20856 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20857       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20858 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20859       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20860     fi
20861   else
20862     input_to_shortpath="$new_path"
20863   fi
20864 
20865   # Call helper function which possibly converts this using DOS-style short mode.
20866   # If so, the updated path is stored in $new_path.
20867   new_path="$input_to_shortpath"
20868 
20869   input_path="$input_to_shortpath"
20870   # Check if we need to convert this using DOS-style short mode. If the path
20871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20872   # take no chances and rewrite it.
20873   # Note: m4 eats our [], so we need to use [ and ] instead.
20874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20875   if test "x$has_forbidden_chars" != x; then
20876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20880       # Going to short mode and back again did indeed matter. Since short mode is
20881       # case insensitive, let's make it lowercase to improve readability.
20882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20883       # Now convert it back to Unix-style (cygpath)
20884       input_path=`$CYGPATH -u "$shortmode_path"`
20885       new_path="$input_path"
20886     fi
20887   fi
20888 
20889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20890   if test "x$test_cygdrive_prefix" = x; then
20891     # As a simple fix, exclude /usr/bin since it's not a real path.
20892     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20894       # a path prefixed by /cygdrive for fixpath to work.
20895       new_path="$CYGWIN_ROOT_PATH$input_path"
20896     fi
20897   fi
20898 
20899   # remove trailing .exe if any
20900   new_path="${new_path/%.exe/}"
20901 
20902     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20903 
20904   # First separate the path from the arguments. This will split at the first
20905   # space.
20906   complete="$FOUND_MAKE"
20907   path="${complete%% *}"
20908   tmp="$complete EOL"
20909   arguments="${tmp#* }"
20910 
20911   # Input might be given as Windows format, start by converting to
20912   # unix format.
20913   new_path="$path"
20914 
20915   windows_path="$new_path"
20916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20917     unix_path=`$CYGPATH -u "$windows_path"`
20918     new_path="$unix_path"
20919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20921     new_path="$unix_path"
20922   fi
20923 
20924 
20925   # Now try to locate executable using which
20926   new_path=`$WHICH "$new_path" 2> /dev/null`
20927 
20928   if test "x$new_path" = x; then
20929     # Oops. Which didn't find the executable.
20930     # The splitting of arguments from the executable at a space might have been incorrect,
20931     # since paths with space are more likely in Windows. Give it another try with the whole
20932     # argument.
20933     path="$complete"
20934     arguments="EOL"
20935     new_path="$path"
20936 
20937   windows_path="$new_path"
20938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20939     unix_path=`$CYGPATH -u "$windows_path"`
20940     new_path="$unix_path"
20941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20943     new_path="$unix_path"
20944   fi
20945 
20946 
20947     new_path=`$WHICH "$new_path" 2> /dev/null`
20948     # bat and cmd files are not always considered executable in MSYS causing which
20949     # to not find them
20950     if test "x$new_path" = x \
20951         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20952         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20953       new_path="$path"
20954 
20955   windows_path="$new_path"
20956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20957     unix_path=`$CYGPATH -u "$windows_path"`
20958     new_path="$unix_path"
20959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20961     new_path="$unix_path"
20962   fi
20963 
20964     fi
20965 
20966     if test "x$new_path" = x; then
20967       # It's still not found. Now this is an unrecoverable error.
20968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20969 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20970       has_space=`$ECHO "$complete" | $GREP " "`
20971       if test "x$has_space" != x; then
20972         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20974       fi
20975       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20976     fi
20977   fi
20978 
20979   # Now new_path has a complete unix path to the binary
20980   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20981     # Keep paths in /bin as-is, but remove trailing .exe if any
20982     new_path="${new_path/%.exe/}"
20983     # Do not save /bin paths to all_fixpath_prefixes!
20984   else
20985     # Not in mixed or Windows style, start by that.
20986     new_path=`cmd //c echo $new_path`
20987 
20988   input_path="$new_path"
20989   # Check if we need to convert this using DOS-style short mode. If the path
20990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20991   # take no chances and rewrite it.
20992   # Note: m4 eats our [], so we need to use [ and ] instead.
20993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20994   if test "x$has_forbidden_chars" != x; then
20995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20997   fi
20998 
20999     # Output is in $new_path
21000 
21001   windows_path="$new_path"
21002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21003     unix_path=`$CYGPATH -u "$windows_path"`
21004     new_path="$unix_path"
21005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21007     new_path="$unix_path"
21008   fi
21009 
21010     # remove trailing .exe if any
21011     new_path="${new_path/%.exe/}"
21012 
21013     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21014     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21015   fi
21016 
21017     else
21018       # We're on a unix platform. Hooray! :)
21019       # First separate the path from the arguments. This will split at the first
21020       # space.
21021       complete="$FOUND_MAKE"
21022       path="${complete%% *}"
21023       tmp="$complete EOL"
21024       arguments="${tmp#* }"
21025 
21026       # Cannot rely on the command "which" here since it doesn't always work.
21027       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21028       if test -z "$is_absolute_path"; then
21029         # Path to executable is not absolute. Find it.
21030         IFS_save="$IFS"
21031         IFS=:
21032         for p in $PATH; do
21033           if test -f "$p/$path" && test -x "$p/$path"; then
21034             new_path="$p/$path"
21035             break
21036           fi
21037         done
21038         IFS="$IFS_save"
21039       else
21040         # This is an absolute path, we can use it without further modifications.
21041         new_path="$path"
21042       fi
21043 
21044       if test "x$new_path" = x; then
21045         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21046 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21047         has_space=`$ECHO "$complete" | $GREP " "`
21048         if test "x$has_space" != x; then
21049           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21050 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21051         fi
21052         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21053       fi
21054     fi
21055 
21056     # Now join together the path and the arguments once again
21057     if test "x$arguments" != xEOL; then
21058       new_complete="$new_path ${arguments% *}"
21059     else
21060       new_complete="$new_path"
21061     fi
21062 
21063     if test "x$complete" != "x$new_complete"; then
21064       FOUND_MAKE="$new_complete"
21065       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21066 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21067     fi
21068   fi
21069 
21070         fi
21071       fi
21072     fi
21073   fi
21074 
21075     if test "x$FOUND_MAKE" = x; then
21076       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21077     fi
21078 
21079   fi
21080 
21081 
21082   MAKE=$FOUND_MAKE
21083 
21084   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21085 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21086 
21087 
21088   # Check if make supports the output sync option and if so, setup using it.
21089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21090 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21091   if $MAKE --version -O > /dev/null 2>&1; then
21092     OUTPUT_SYNC_SUPPORTED=true
21093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21094 $as_echo "yes" >&6; }
21095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21096 $as_echo_n "checking for output-sync value... " >&6; }
21097 
21098 # Check whether --with-output-sync was given.
21099 if test "${with_output_sync+set}" = set; then :
21100   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21101 fi
21102 
21103     if test "x$OUTPUT_SYNC" = "x"; then
21104       OUTPUT_SYNC=none
21105     fi
21106     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21107 $as_echo "$OUTPUT_SYNC" >&6; }
21108     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21109       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21110     fi
21111   else
21112     OUTPUT_SYNC_SUPPORTED=false
21113     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21114 $as_echo "no" >&6; }
21115   fi
21116 
21117 
21118 
21119 
21120 
21121 
21122   # Test if find supports -delete
21123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21124 $as_echo_n "checking if find supports -delete... " >&6; }
21125   FIND_DELETE="-delete"
21126 
21127   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21128 
21129   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21130 
21131   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21132   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21133     # No, it does not.
21134     $RM $DELETEDIR/TestIfFindSupportsDelete
21135     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21136       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21137       FIND_DELETE="-print | $XARGS $RM"
21138     else
21139       FIND_DELETE="-exec $RM \{\} \+"
21140     fi
21141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21142 $as_echo "no" >&6; }
21143   else
21144     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21145 $as_echo "yes" >&6; }
21146   fi
21147   $RMDIR $DELETEDIR
21148 
21149 
21150 
21151   # Test which kind of tar was found
21152   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21153     TAR_TYPE="gnu"
21154   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21155     TAR_TYPE="bsd"
21156   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21157     TAR_TYPE="solaris"
21158   fi
21159   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21160 $as_echo_n "checking what type of tar was found... " >&6; }
21161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21162 $as_echo "$TAR_TYPE" >&6; }
21163 
21164   TAR_CREATE_FILE_PARAM=""
21165 
21166   if test "x$TAR_TYPE" = "xgnu"; then
21167     TAR_INCLUDE_PARAM="T"
21168     TAR_SUPPORTS_TRANSFORM="true"
21169     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21170       # When using gnu tar for Solaris targets, need to use compatibility mode
21171       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21172     fi
21173   else
21174     TAR_INCLUDE_PARAM="I"
21175     TAR_SUPPORTS_TRANSFORM="false"
21176   fi
21177 
21178 
21179 
21180 
21181 
21182 
21183   # These tools might not be installed by default,
21184   # need hint on how to install them.
21185 
21186 
21187 
21188   # Publish this variable in the help.
21189 
21190 
21191   if [ -z "${UNZIP+x}" ]; then
21192     # The variable is not set by user, try to locate tool using the code snippet
21193     for ac_prog in unzip
21194 do
21195   # Extract the first word of "$ac_prog", so it can be a program name with args.
21196 set dummy $ac_prog; ac_word=$2
21197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21198 $as_echo_n "checking for $ac_word... " >&6; }
21199 if ${ac_cv_path_UNZIP+:} false; then :
21200   $as_echo_n "(cached) " >&6
21201 else
21202   case $UNZIP in
21203   [\\/]* | ?:[\\/]*)
21204   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21205   ;;
21206   *)
21207   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21208 for as_dir in $PATH
21209 do
21210   IFS=$as_save_IFS
21211   test -z "$as_dir" && as_dir=.
21212     for ac_exec_ext in '' $ac_executable_extensions; do
21213   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21214     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21216     break 2
21217   fi
21218 done
21219   done
21220 IFS=$as_save_IFS
21221 
21222   ;;
21223 esac
21224 fi
21225 UNZIP=$ac_cv_path_UNZIP
21226 if test -n "$UNZIP"; then
21227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21228 $as_echo "$UNZIP" >&6; }
21229 else
21230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21231 $as_echo "no" >&6; }
21232 fi
21233 
21234 
21235   test -n "$UNZIP" && break
21236 done
21237 
21238   else
21239     # The variable is set, but is it from the command line or the environment?
21240 
21241     # Try to remove the string !UNZIP! from our list.
21242     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21243     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21244       # If it failed, the variable was not from the command line. Ignore it,
21245       # but warn the user (except for BASH, which is always set by the calling BASH).
21246       if test "xUNZIP" != xBASH; then
21247         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21248 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21249       fi
21250       # Try to locate tool using the code snippet
21251       for ac_prog in unzip
21252 do
21253   # Extract the first word of "$ac_prog", so it can be a program name with args.
21254 set dummy $ac_prog; ac_word=$2
21255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21256 $as_echo_n "checking for $ac_word... " >&6; }
21257 if ${ac_cv_path_UNZIP+:} false; then :
21258   $as_echo_n "(cached) " >&6
21259 else
21260   case $UNZIP in
21261   [\\/]* | ?:[\\/]*)
21262   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21263   ;;
21264   *)
21265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21266 for as_dir in $PATH
21267 do
21268   IFS=$as_save_IFS
21269   test -z "$as_dir" && as_dir=.
21270     for ac_exec_ext in '' $ac_executable_extensions; do
21271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21272     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21274     break 2
21275   fi
21276 done
21277   done
21278 IFS=$as_save_IFS
21279 
21280   ;;
21281 esac
21282 fi
21283 UNZIP=$ac_cv_path_UNZIP
21284 if test -n "$UNZIP"; then
21285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21286 $as_echo "$UNZIP" >&6; }
21287 else
21288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21289 $as_echo "no" >&6; }
21290 fi
21291 
21292 
21293   test -n "$UNZIP" && break
21294 done
21295 
21296     else
21297       # If it succeeded, then it was overridden by the user. We will use it
21298       # for the tool.
21299 
21300       # First remove it from the list of overridden variables, so we can test
21301       # for unknown variables in the end.
21302       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21303 
21304       # Check if we try to supply an empty value
21305       if test "x$UNZIP" = x; then
21306         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21307 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21308         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21309 $as_echo_n "checking for UNZIP... " >&6; }
21310         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21311 $as_echo "disabled" >&6; }
21312       else
21313         # Check if the provided tool contains a complete path.
21314         tool_specified="$UNZIP"
21315         tool_basename="${tool_specified##*/}"
21316         if test "x$tool_basename" = "x$tool_specified"; then
21317           # A command without a complete path is provided, search $PATH.
21318           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21319 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21320           # Extract the first word of "$tool_basename", so it can be a program name with args.
21321 set dummy $tool_basename; ac_word=$2
21322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21323 $as_echo_n "checking for $ac_word... " >&6; }
21324 if ${ac_cv_path_UNZIP+:} false; then :
21325   $as_echo_n "(cached) " >&6
21326 else
21327   case $UNZIP in
21328   [\\/]* | ?:[\\/]*)
21329   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21330   ;;
21331   *)
21332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21333 for as_dir in $PATH
21334 do
21335   IFS=$as_save_IFS
21336   test -z "$as_dir" && as_dir=.
21337     for ac_exec_ext in '' $ac_executable_extensions; do
21338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21339     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21341     break 2
21342   fi
21343 done
21344   done
21345 IFS=$as_save_IFS
21346 
21347   ;;
21348 esac
21349 fi
21350 UNZIP=$ac_cv_path_UNZIP
21351 if test -n "$UNZIP"; then
21352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21353 $as_echo "$UNZIP" >&6; }
21354 else
21355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21356 $as_echo "no" >&6; }
21357 fi
21358 
21359 
21360           if test "x$UNZIP" = x; then
21361             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21362           fi
21363         else
21364           # Otherwise we believe it is a complete path. Use it as it is.
21365           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21366 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21367           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21368 $as_echo_n "checking for UNZIP... " >&6; }
21369           if test ! -x "$tool_specified"; then
21370             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21371 $as_echo "not found" >&6; }
21372             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21373           fi
21374           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21375 $as_echo "$tool_specified" >&6; }
21376         fi
21377       fi
21378     fi
21379 
21380   fi
21381 
21382 
21383 
21384   if test "x$UNZIP" = x; then
21385     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21386   fi
21387 
21388 
21389 
21390 
21391 
21392   # Publish this variable in the help.
21393 
21394 
21395   if [ -z "${ZIP+x}" ]; then
21396     # The variable is not set by user, try to locate tool using the code snippet
21397     for ac_prog in zip
21398 do
21399   # Extract the first word of "$ac_prog", so it can be a program name with args.
21400 set dummy $ac_prog; ac_word=$2
21401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21402 $as_echo_n "checking for $ac_word... " >&6; }
21403 if ${ac_cv_path_ZIP+:} false; then :
21404   $as_echo_n "(cached) " >&6
21405 else
21406   case $ZIP in
21407   [\\/]* | ?:[\\/]*)
21408   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21409   ;;
21410   *)
21411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21412 for as_dir in $PATH
21413 do
21414   IFS=$as_save_IFS
21415   test -z "$as_dir" && as_dir=.
21416     for ac_exec_ext in '' $ac_executable_extensions; do
21417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21418     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21420     break 2
21421   fi
21422 done
21423   done
21424 IFS=$as_save_IFS
21425 
21426   ;;
21427 esac
21428 fi
21429 ZIP=$ac_cv_path_ZIP
21430 if test -n "$ZIP"; then
21431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21432 $as_echo "$ZIP" >&6; }
21433 else
21434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21435 $as_echo "no" >&6; }
21436 fi
21437 
21438 
21439   test -n "$ZIP" && break
21440 done
21441 
21442   else
21443     # The variable is set, but is it from the command line or the environment?
21444 
21445     # Try to remove the string !ZIP! from our list.
21446     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21447     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21448       # If it failed, the variable was not from the command line. Ignore it,
21449       # but warn the user (except for BASH, which is always set by the calling BASH).
21450       if test "xZIP" != xBASH; then
21451         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21452 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21453       fi
21454       # Try to locate tool using the code snippet
21455       for ac_prog in zip
21456 do
21457   # Extract the first word of "$ac_prog", so it can be a program name with args.
21458 set dummy $ac_prog; ac_word=$2
21459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21460 $as_echo_n "checking for $ac_word... " >&6; }
21461 if ${ac_cv_path_ZIP+:} false; then :
21462   $as_echo_n "(cached) " >&6
21463 else
21464   case $ZIP in
21465   [\\/]* | ?:[\\/]*)
21466   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21467   ;;
21468   *)
21469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21470 for as_dir in $PATH
21471 do
21472   IFS=$as_save_IFS
21473   test -z "$as_dir" && as_dir=.
21474     for ac_exec_ext in '' $ac_executable_extensions; do
21475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21476     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21478     break 2
21479   fi
21480 done
21481   done
21482 IFS=$as_save_IFS
21483 
21484   ;;
21485 esac
21486 fi
21487 ZIP=$ac_cv_path_ZIP
21488 if test -n "$ZIP"; then
21489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21490 $as_echo "$ZIP" >&6; }
21491 else
21492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21493 $as_echo "no" >&6; }
21494 fi
21495 
21496 
21497   test -n "$ZIP" && break
21498 done
21499 
21500     else
21501       # If it succeeded, then it was overridden by the user. We will use it
21502       # for the tool.
21503 
21504       # First remove it from the list of overridden variables, so we can test
21505       # for unknown variables in the end.
21506       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21507 
21508       # Check if we try to supply an empty value
21509       if test "x$ZIP" = x; then
21510         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21511 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21512         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21513 $as_echo_n "checking for ZIP... " >&6; }
21514         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21515 $as_echo "disabled" >&6; }
21516       else
21517         # Check if the provided tool contains a complete path.
21518         tool_specified="$ZIP"
21519         tool_basename="${tool_specified##*/}"
21520         if test "x$tool_basename" = "x$tool_specified"; then
21521           # A command without a complete path is provided, search $PATH.
21522           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21523 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21524           # Extract the first word of "$tool_basename", so it can be a program name with args.
21525 set dummy $tool_basename; ac_word=$2
21526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21527 $as_echo_n "checking for $ac_word... " >&6; }
21528 if ${ac_cv_path_ZIP+:} false; then :
21529   $as_echo_n "(cached) " >&6
21530 else
21531   case $ZIP in
21532   [\\/]* | ?:[\\/]*)
21533   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21534   ;;
21535   *)
21536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21537 for as_dir in $PATH
21538 do
21539   IFS=$as_save_IFS
21540   test -z "$as_dir" && as_dir=.
21541     for ac_exec_ext in '' $ac_executable_extensions; do
21542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21543     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21545     break 2
21546   fi
21547 done
21548   done
21549 IFS=$as_save_IFS
21550 
21551   ;;
21552 esac
21553 fi
21554 ZIP=$ac_cv_path_ZIP
21555 if test -n "$ZIP"; then
21556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21557 $as_echo "$ZIP" >&6; }
21558 else
21559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21560 $as_echo "no" >&6; }
21561 fi
21562 
21563 
21564           if test "x$ZIP" = x; then
21565             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21566           fi
21567         else
21568           # Otherwise we believe it is a complete path. Use it as it is.
21569           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21570 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21571           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21572 $as_echo_n "checking for ZIP... " >&6; }
21573           if test ! -x "$tool_specified"; then
21574             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21575 $as_echo "not found" >&6; }
21576             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21577           fi
21578           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21579 $as_echo "$tool_specified" >&6; }
21580         fi
21581       fi
21582     fi
21583 
21584   fi
21585 
21586 
21587 
21588   if test "x$ZIP" = x; then
21589     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21590   fi
21591 
21592 
21593 
21594   # Non-required basic tools
21595 
21596 
21597 
21598   # Publish this variable in the help.
21599 
21600 
21601   if [ -z "${LDD+x}" ]; then
21602     # The variable is not set by user, try to locate tool using the code snippet
21603     for ac_prog in ldd
21604 do
21605   # Extract the first word of "$ac_prog", so it can be a program name with args.
21606 set dummy $ac_prog; ac_word=$2
21607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21608 $as_echo_n "checking for $ac_word... " >&6; }
21609 if ${ac_cv_path_LDD+:} false; then :
21610   $as_echo_n "(cached) " >&6
21611 else
21612   case $LDD in
21613   [\\/]* | ?:[\\/]*)
21614   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21615   ;;
21616   *)
21617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21618 for as_dir in $PATH
21619 do
21620   IFS=$as_save_IFS
21621   test -z "$as_dir" && as_dir=.
21622     for ac_exec_ext in '' $ac_executable_extensions; do
21623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21624     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21626     break 2
21627   fi
21628 done
21629   done
21630 IFS=$as_save_IFS
21631 
21632   ;;
21633 esac
21634 fi
21635 LDD=$ac_cv_path_LDD
21636 if test -n "$LDD"; then
21637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21638 $as_echo "$LDD" >&6; }
21639 else
21640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21641 $as_echo "no" >&6; }
21642 fi
21643 
21644 
21645   test -n "$LDD" && break
21646 done
21647 
21648   else
21649     # The variable is set, but is it from the command line or the environment?
21650 
21651     # Try to remove the string !LDD! from our list.
21652     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21653     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21654       # If it failed, the variable was not from the command line. Ignore it,
21655       # but warn the user (except for BASH, which is always set by the calling BASH).
21656       if test "xLDD" != xBASH; then
21657         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21658 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21659       fi
21660       # Try to locate tool using the code snippet
21661       for ac_prog in ldd
21662 do
21663   # Extract the first word of "$ac_prog", so it can be a program name with args.
21664 set dummy $ac_prog; ac_word=$2
21665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21666 $as_echo_n "checking for $ac_word... " >&6; }
21667 if ${ac_cv_path_LDD+:} false; then :
21668   $as_echo_n "(cached) " >&6
21669 else
21670   case $LDD in
21671   [\\/]* | ?:[\\/]*)
21672   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21673   ;;
21674   *)
21675   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21676 for as_dir in $PATH
21677 do
21678   IFS=$as_save_IFS
21679   test -z "$as_dir" && as_dir=.
21680     for ac_exec_ext in '' $ac_executable_extensions; do
21681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21682     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21684     break 2
21685   fi
21686 done
21687   done
21688 IFS=$as_save_IFS
21689 
21690   ;;
21691 esac
21692 fi
21693 LDD=$ac_cv_path_LDD
21694 if test -n "$LDD"; then
21695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21696 $as_echo "$LDD" >&6; }
21697 else
21698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21699 $as_echo "no" >&6; }
21700 fi
21701 
21702 
21703   test -n "$LDD" && break
21704 done
21705 
21706     else
21707       # If it succeeded, then it was overridden by the user. We will use it
21708       # for the tool.
21709 
21710       # First remove it from the list of overridden variables, so we can test
21711       # for unknown variables in the end.
21712       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21713 
21714       # Check if we try to supply an empty value
21715       if test "x$LDD" = x; then
21716         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21717 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21718         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21719 $as_echo_n "checking for LDD... " >&6; }
21720         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21721 $as_echo "disabled" >&6; }
21722       else
21723         # Check if the provided tool contains a complete path.
21724         tool_specified="$LDD"
21725         tool_basename="${tool_specified##*/}"
21726         if test "x$tool_basename" = "x$tool_specified"; then
21727           # A command without a complete path is provided, search $PATH.
21728           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21729 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21730           # Extract the first word of "$tool_basename", so it can be a program name with args.
21731 set dummy $tool_basename; ac_word=$2
21732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21733 $as_echo_n "checking for $ac_word... " >&6; }
21734 if ${ac_cv_path_LDD+:} false; then :
21735   $as_echo_n "(cached) " >&6
21736 else
21737   case $LDD in
21738   [\\/]* | ?:[\\/]*)
21739   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21740   ;;
21741   *)
21742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21743 for as_dir in $PATH
21744 do
21745   IFS=$as_save_IFS
21746   test -z "$as_dir" && as_dir=.
21747     for ac_exec_ext in '' $ac_executable_extensions; do
21748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21749     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21751     break 2
21752   fi
21753 done
21754   done
21755 IFS=$as_save_IFS
21756 
21757   ;;
21758 esac
21759 fi
21760 LDD=$ac_cv_path_LDD
21761 if test -n "$LDD"; then
21762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21763 $as_echo "$LDD" >&6; }
21764 else
21765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21766 $as_echo "no" >&6; }
21767 fi
21768 
21769 
21770           if test "x$LDD" = x; then
21771             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21772           fi
21773         else
21774           # Otherwise we believe it is a complete path. Use it as it is.
21775           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21776 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21777           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21778 $as_echo_n "checking for LDD... " >&6; }
21779           if test ! -x "$tool_specified"; then
21780             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21781 $as_echo "not found" >&6; }
21782             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21783           fi
21784           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21785 $as_echo "$tool_specified" >&6; }
21786         fi
21787       fi
21788     fi
21789 
21790   fi
21791 
21792 
21793   if test "x$LDD" = "x"; then
21794     # List shared lib dependencies is used for
21795     # debug output and checking for forbidden dependencies.
21796     # We can build without it.
21797     LDD="true"
21798   fi
21799 
21800 
21801   # Publish this variable in the help.
21802 
21803 
21804   if [ -z "${OTOOL+x}" ]; then
21805     # The variable is not set by user, try to locate tool using the code snippet
21806     for ac_prog in otool
21807 do
21808   # Extract the first word of "$ac_prog", so it can be a program name with args.
21809 set dummy $ac_prog; ac_word=$2
21810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21811 $as_echo_n "checking for $ac_word... " >&6; }
21812 if ${ac_cv_path_OTOOL+:} false; then :
21813   $as_echo_n "(cached) " >&6
21814 else
21815   case $OTOOL in
21816   [\\/]* | ?:[\\/]*)
21817   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21818   ;;
21819   *)
21820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21821 for as_dir in $PATH
21822 do
21823   IFS=$as_save_IFS
21824   test -z "$as_dir" && as_dir=.
21825     for ac_exec_ext in '' $ac_executable_extensions; do
21826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21827     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21829     break 2
21830   fi
21831 done
21832   done
21833 IFS=$as_save_IFS
21834 
21835   ;;
21836 esac
21837 fi
21838 OTOOL=$ac_cv_path_OTOOL
21839 if test -n "$OTOOL"; then
21840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21841 $as_echo "$OTOOL" >&6; }
21842 else
21843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21844 $as_echo "no" >&6; }
21845 fi
21846 
21847 
21848   test -n "$OTOOL" && break
21849 done
21850 
21851   else
21852     # The variable is set, but is it from the command line or the environment?
21853 
21854     # Try to remove the string !OTOOL! from our list.
21855     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21856     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21857       # If it failed, the variable was not from the command line. Ignore it,
21858       # but warn the user (except for BASH, which is always set by the calling BASH).
21859       if test "xOTOOL" != xBASH; then
21860         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21861 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21862       fi
21863       # Try to locate tool using the code snippet
21864       for ac_prog in otool
21865 do
21866   # Extract the first word of "$ac_prog", so it can be a program name with args.
21867 set dummy $ac_prog; ac_word=$2
21868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21869 $as_echo_n "checking for $ac_word... " >&6; }
21870 if ${ac_cv_path_OTOOL+:} false; then :
21871   $as_echo_n "(cached) " >&6
21872 else
21873   case $OTOOL in
21874   [\\/]* | ?:[\\/]*)
21875   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21876   ;;
21877   *)
21878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21879 for as_dir in $PATH
21880 do
21881   IFS=$as_save_IFS
21882   test -z "$as_dir" && as_dir=.
21883     for ac_exec_ext in '' $ac_executable_extensions; do
21884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21885     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21887     break 2
21888   fi
21889 done
21890   done
21891 IFS=$as_save_IFS
21892 
21893   ;;
21894 esac
21895 fi
21896 OTOOL=$ac_cv_path_OTOOL
21897 if test -n "$OTOOL"; then
21898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21899 $as_echo "$OTOOL" >&6; }
21900 else
21901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21902 $as_echo "no" >&6; }
21903 fi
21904 
21905 
21906   test -n "$OTOOL" && break
21907 done
21908 
21909     else
21910       # If it succeeded, then it was overridden by the user. We will use it
21911       # for the tool.
21912 
21913       # First remove it from the list of overridden variables, so we can test
21914       # for unknown variables in the end.
21915       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21916 
21917       # Check if we try to supply an empty value
21918       if test "x$OTOOL" = x; then
21919         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21920 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21921         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21922 $as_echo_n "checking for OTOOL... " >&6; }
21923         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21924 $as_echo "disabled" >&6; }
21925       else
21926         # Check if the provided tool contains a complete path.
21927         tool_specified="$OTOOL"
21928         tool_basename="${tool_specified##*/}"
21929         if test "x$tool_basename" = "x$tool_specified"; then
21930           # A command without a complete path is provided, search $PATH.
21931           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21932 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21933           # Extract the first word of "$tool_basename", so it can be a program name with args.
21934 set dummy $tool_basename; ac_word=$2
21935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21936 $as_echo_n "checking for $ac_word... " >&6; }
21937 if ${ac_cv_path_OTOOL+:} false; then :
21938   $as_echo_n "(cached) " >&6
21939 else
21940   case $OTOOL in
21941   [\\/]* | ?:[\\/]*)
21942   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21943   ;;
21944   *)
21945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21946 for as_dir in $PATH
21947 do
21948   IFS=$as_save_IFS
21949   test -z "$as_dir" && as_dir=.
21950     for ac_exec_ext in '' $ac_executable_extensions; do
21951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21952     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21954     break 2
21955   fi
21956 done
21957   done
21958 IFS=$as_save_IFS
21959 
21960   ;;
21961 esac
21962 fi
21963 OTOOL=$ac_cv_path_OTOOL
21964 if test -n "$OTOOL"; then
21965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21966 $as_echo "$OTOOL" >&6; }
21967 else
21968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21969 $as_echo "no" >&6; }
21970 fi
21971 
21972 
21973           if test "x$OTOOL" = x; then
21974             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21975           fi
21976         else
21977           # Otherwise we believe it is a complete path. Use it as it is.
21978           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21979 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21980           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21981 $as_echo_n "checking for OTOOL... " >&6; }
21982           if test ! -x "$tool_specified"; then
21983             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21984 $as_echo "not found" >&6; }
21985             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21986           fi
21987           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21988 $as_echo "$tool_specified" >&6; }
21989         fi
21990       fi
21991     fi
21992 
21993   fi
21994 
21995 
21996   if test "x$OTOOL" = "x"; then
21997     OTOOL="true"
21998   fi
21999 
22000 
22001   # Publish this variable in the help.
22002 
22003 
22004   if [ -z "${READELF+x}" ]; then
22005     # The variable is not set by user, try to locate tool using the code snippet
22006     for ac_prog in greadelf readelf
22007 do
22008   # Extract the first word of "$ac_prog", so it can be a program name with args.
22009 set dummy $ac_prog; ac_word=$2
22010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22011 $as_echo_n "checking for $ac_word... " >&6; }
22012 if ${ac_cv_path_READELF+:} false; then :
22013   $as_echo_n "(cached) " >&6
22014 else
22015   case $READELF in
22016   [\\/]* | ?:[\\/]*)
22017   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22018   ;;
22019   *)
22020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22021 for as_dir in $PATH
22022 do
22023   IFS=$as_save_IFS
22024   test -z "$as_dir" && as_dir=.
22025     for ac_exec_ext in '' $ac_executable_extensions; do
22026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22027     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22029     break 2
22030   fi
22031 done
22032   done
22033 IFS=$as_save_IFS
22034 
22035   ;;
22036 esac
22037 fi
22038 READELF=$ac_cv_path_READELF
22039 if test -n "$READELF"; then
22040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22041 $as_echo "$READELF" >&6; }
22042 else
22043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22044 $as_echo "no" >&6; }
22045 fi
22046 
22047 
22048   test -n "$READELF" && break
22049 done
22050 
22051   else
22052     # The variable is set, but is it from the command line or the environment?
22053 
22054     # Try to remove the string !READELF! from our list.
22055     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22056     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22057       # If it failed, the variable was not from the command line. Ignore it,
22058       # but warn the user (except for BASH, which is always set by the calling BASH).
22059       if test "xREADELF" != xBASH; then
22060         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22061 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22062       fi
22063       # Try to locate tool using the code snippet
22064       for ac_prog in greadelf readelf
22065 do
22066   # Extract the first word of "$ac_prog", so it can be a program name with args.
22067 set dummy $ac_prog; ac_word=$2
22068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22069 $as_echo_n "checking for $ac_word... " >&6; }
22070 if ${ac_cv_path_READELF+:} false; then :
22071   $as_echo_n "(cached) " >&6
22072 else
22073   case $READELF in
22074   [\\/]* | ?:[\\/]*)
22075   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22076   ;;
22077   *)
22078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22079 for as_dir in $PATH
22080 do
22081   IFS=$as_save_IFS
22082   test -z "$as_dir" && as_dir=.
22083     for ac_exec_ext in '' $ac_executable_extensions; do
22084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22085     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22087     break 2
22088   fi
22089 done
22090   done
22091 IFS=$as_save_IFS
22092 
22093   ;;
22094 esac
22095 fi
22096 READELF=$ac_cv_path_READELF
22097 if test -n "$READELF"; then
22098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22099 $as_echo "$READELF" >&6; }
22100 else
22101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22102 $as_echo "no" >&6; }
22103 fi
22104 
22105 
22106   test -n "$READELF" && break
22107 done
22108 
22109     else
22110       # If it succeeded, then it was overridden by the user. We will use it
22111       # for the tool.
22112 
22113       # First remove it from the list of overridden variables, so we can test
22114       # for unknown variables in the end.
22115       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22116 
22117       # Check if we try to supply an empty value
22118       if test "x$READELF" = x; then
22119         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22120 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22121         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22122 $as_echo_n "checking for READELF... " >&6; }
22123         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22124 $as_echo "disabled" >&6; }
22125       else
22126         # Check if the provided tool contains a complete path.
22127         tool_specified="$READELF"
22128         tool_basename="${tool_specified##*/}"
22129         if test "x$tool_basename" = "x$tool_specified"; then
22130           # A command without a complete path is provided, search $PATH.
22131           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22132 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22133           # Extract the first word of "$tool_basename", so it can be a program name with args.
22134 set dummy $tool_basename; ac_word=$2
22135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22136 $as_echo_n "checking for $ac_word... " >&6; }
22137 if ${ac_cv_path_READELF+:} false; then :
22138   $as_echo_n "(cached) " >&6
22139 else
22140   case $READELF in
22141   [\\/]* | ?:[\\/]*)
22142   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22143   ;;
22144   *)
22145   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22146 for as_dir in $PATH
22147 do
22148   IFS=$as_save_IFS
22149   test -z "$as_dir" && as_dir=.
22150     for ac_exec_ext in '' $ac_executable_extensions; do
22151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22152     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22154     break 2
22155   fi
22156 done
22157   done
22158 IFS=$as_save_IFS
22159 
22160   ;;
22161 esac
22162 fi
22163 READELF=$ac_cv_path_READELF
22164 if test -n "$READELF"; then
22165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22166 $as_echo "$READELF" >&6; }
22167 else
22168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22169 $as_echo "no" >&6; }
22170 fi
22171 
22172 
22173           if test "x$READELF" = x; then
22174             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22175           fi
22176         else
22177           # Otherwise we believe it is a complete path. Use it as it is.
22178           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22179 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22180           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22181 $as_echo_n "checking for READELF... " >&6; }
22182           if test ! -x "$tool_specified"; then
22183             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22184 $as_echo "not found" >&6; }
22185             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22186           fi
22187           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22188 $as_echo "$tool_specified" >&6; }
22189         fi
22190       fi
22191     fi
22192 
22193   fi
22194 
22195 
22196 
22197 
22198   # Publish this variable in the help.
22199 
22200 
22201   if [ -z "${HG+x}" ]; then
22202     # The variable is not set by user, try to locate tool using the code snippet
22203     for ac_prog in hg
22204 do
22205   # Extract the first word of "$ac_prog", so it can be a program name with args.
22206 set dummy $ac_prog; ac_word=$2
22207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22208 $as_echo_n "checking for $ac_word... " >&6; }
22209 if ${ac_cv_path_HG+:} false; then :
22210   $as_echo_n "(cached) " >&6
22211 else
22212   case $HG in
22213   [\\/]* | ?:[\\/]*)
22214   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22215   ;;
22216   *)
22217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22218 for as_dir in $PATH
22219 do
22220   IFS=$as_save_IFS
22221   test -z "$as_dir" && as_dir=.
22222     for ac_exec_ext in '' $ac_executable_extensions; do
22223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22224     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22226     break 2
22227   fi
22228 done
22229   done
22230 IFS=$as_save_IFS
22231 
22232   ;;
22233 esac
22234 fi
22235 HG=$ac_cv_path_HG
22236 if test -n "$HG"; then
22237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22238 $as_echo "$HG" >&6; }
22239 else
22240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22241 $as_echo "no" >&6; }
22242 fi
22243 
22244 
22245   test -n "$HG" && break
22246 done
22247 
22248   else
22249     # The variable is set, but is it from the command line or the environment?
22250 
22251     # Try to remove the string !HG! from our list.
22252     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22253     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22254       # If it failed, the variable was not from the command line. Ignore it,
22255       # but warn the user (except for BASH, which is always set by the calling BASH).
22256       if test "xHG" != xBASH; then
22257         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22258 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22259       fi
22260       # Try to locate tool using the code snippet
22261       for ac_prog in hg
22262 do
22263   # Extract the first word of "$ac_prog", so it can be a program name with args.
22264 set dummy $ac_prog; ac_word=$2
22265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22266 $as_echo_n "checking for $ac_word... " >&6; }
22267 if ${ac_cv_path_HG+:} false; then :
22268   $as_echo_n "(cached) " >&6
22269 else
22270   case $HG in
22271   [\\/]* | ?:[\\/]*)
22272   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22273   ;;
22274   *)
22275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22276 for as_dir in $PATH
22277 do
22278   IFS=$as_save_IFS
22279   test -z "$as_dir" && as_dir=.
22280     for ac_exec_ext in '' $ac_executable_extensions; do
22281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22282     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22284     break 2
22285   fi
22286 done
22287   done
22288 IFS=$as_save_IFS
22289 
22290   ;;
22291 esac
22292 fi
22293 HG=$ac_cv_path_HG
22294 if test -n "$HG"; then
22295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22296 $as_echo "$HG" >&6; }
22297 else
22298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22299 $as_echo "no" >&6; }
22300 fi
22301 
22302 
22303   test -n "$HG" && break
22304 done
22305 
22306     else
22307       # If it succeeded, then it was overridden by the user. We will use it
22308       # for the tool.
22309 
22310       # First remove it from the list of overridden variables, so we can test
22311       # for unknown variables in the end.
22312       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22313 
22314       # Check if we try to supply an empty value
22315       if test "x$HG" = x; then
22316         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22317 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22318         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22319 $as_echo_n "checking for HG... " >&6; }
22320         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22321 $as_echo "disabled" >&6; }
22322       else
22323         # Check if the provided tool contains a complete path.
22324         tool_specified="$HG"
22325         tool_basename="${tool_specified##*/}"
22326         if test "x$tool_basename" = "x$tool_specified"; then
22327           # A command without a complete path is provided, search $PATH.
22328           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22329 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22330           # Extract the first word of "$tool_basename", so it can be a program name with args.
22331 set dummy $tool_basename; ac_word=$2
22332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22333 $as_echo_n "checking for $ac_word... " >&6; }
22334 if ${ac_cv_path_HG+:} false; then :
22335   $as_echo_n "(cached) " >&6
22336 else
22337   case $HG in
22338   [\\/]* | ?:[\\/]*)
22339   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22340   ;;
22341   *)
22342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22343 for as_dir in $PATH
22344 do
22345   IFS=$as_save_IFS
22346   test -z "$as_dir" && as_dir=.
22347     for ac_exec_ext in '' $ac_executable_extensions; do
22348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22349     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22351     break 2
22352   fi
22353 done
22354   done
22355 IFS=$as_save_IFS
22356 
22357   ;;
22358 esac
22359 fi
22360 HG=$ac_cv_path_HG
22361 if test -n "$HG"; then
22362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22363 $as_echo "$HG" >&6; }
22364 else
22365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22366 $as_echo "no" >&6; }
22367 fi
22368 
22369 
22370           if test "x$HG" = x; then
22371             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22372           fi
22373         else
22374           # Otherwise we believe it is a complete path. Use it as it is.
22375           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22376 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22377           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22378 $as_echo_n "checking for HG... " >&6; }
22379           if test ! -x "$tool_specified"; then
22380             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22381 $as_echo "not found" >&6; }
22382             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22383           fi
22384           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22385 $as_echo "$tool_specified" >&6; }
22386         fi
22387       fi
22388     fi
22389 
22390   fi
22391 
22392 
22393 
22394 
22395   # Publish this variable in the help.
22396 
22397 
22398   if [ -z "${STAT+x}" ]; then
22399     # The variable is not set by user, try to locate tool using the code snippet
22400     for ac_prog in stat
22401 do
22402   # Extract the first word of "$ac_prog", so it can be a program name with args.
22403 set dummy $ac_prog; ac_word=$2
22404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22405 $as_echo_n "checking for $ac_word... " >&6; }
22406 if ${ac_cv_path_STAT+:} false; then :
22407   $as_echo_n "(cached) " >&6
22408 else
22409   case $STAT in
22410   [\\/]* | ?:[\\/]*)
22411   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22412   ;;
22413   *)
22414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22415 for as_dir in $PATH
22416 do
22417   IFS=$as_save_IFS
22418   test -z "$as_dir" && as_dir=.
22419     for ac_exec_ext in '' $ac_executable_extensions; do
22420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22421     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22423     break 2
22424   fi
22425 done
22426   done
22427 IFS=$as_save_IFS
22428 
22429   ;;
22430 esac
22431 fi
22432 STAT=$ac_cv_path_STAT
22433 if test -n "$STAT"; then
22434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22435 $as_echo "$STAT" >&6; }
22436 else
22437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22438 $as_echo "no" >&6; }
22439 fi
22440 
22441 
22442   test -n "$STAT" && break
22443 done
22444 
22445   else
22446     # The variable is set, but is it from the command line or the environment?
22447 
22448     # Try to remove the string !STAT! from our list.
22449     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22450     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22451       # If it failed, the variable was not from the command line. Ignore it,
22452       # but warn the user (except for BASH, which is always set by the calling BASH).
22453       if test "xSTAT" != xBASH; then
22454         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22455 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22456       fi
22457       # Try to locate tool using the code snippet
22458       for ac_prog in stat
22459 do
22460   # Extract the first word of "$ac_prog", so it can be a program name with args.
22461 set dummy $ac_prog; ac_word=$2
22462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22463 $as_echo_n "checking for $ac_word... " >&6; }
22464 if ${ac_cv_path_STAT+:} false; then :
22465   $as_echo_n "(cached) " >&6
22466 else
22467   case $STAT in
22468   [\\/]* | ?:[\\/]*)
22469   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22470   ;;
22471   *)
22472   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22473 for as_dir in $PATH
22474 do
22475   IFS=$as_save_IFS
22476   test -z "$as_dir" && as_dir=.
22477     for ac_exec_ext in '' $ac_executable_extensions; do
22478   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22479     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22480     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22481     break 2
22482   fi
22483 done
22484   done
22485 IFS=$as_save_IFS
22486 
22487   ;;
22488 esac
22489 fi
22490 STAT=$ac_cv_path_STAT
22491 if test -n "$STAT"; then
22492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22493 $as_echo "$STAT" >&6; }
22494 else
22495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22496 $as_echo "no" >&6; }
22497 fi
22498 
22499 
22500   test -n "$STAT" && break
22501 done
22502 
22503     else
22504       # If it succeeded, then it was overridden by the user. We will use it
22505       # for the tool.
22506 
22507       # First remove it from the list of overridden variables, so we can test
22508       # for unknown variables in the end.
22509       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22510 
22511       # Check if we try to supply an empty value
22512       if test "x$STAT" = x; then
22513         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22514 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22516 $as_echo_n "checking for STAT... " >&6; }
22517         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22518 $as_echo "disabled" >&6; }
22519       else
22520         # Check if the provided tool contains a complete path.
22521         tool_specified="$STAT"
22522         tool_basename="${tool_specified##*/}"
22523         if test "x$tool_basename" = "x$tool_specified"; then
22524           # A command without a complete path is provided, search $PATH.
22525           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22526 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22527           # Extract the first word of "$tool_basename", so it can be a program name with args.
22528 set dummy $tool_basename; ac_word=$2
22529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22530 $as_echo_n "checking for $ac_word... " >&6; }
22531 if ${ac_cv_path_STAT+:} false; then :
22532   $as_echo_n "(cached) " >&6
22533 else
22534   case $STAT in
22535   [\\/]* | ?:[\\/]*)
22536   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22537   ;;
22538   *)
22539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22540 for as_dir in $PATH
22541 do
22542   IFS=$as_save_IFS
22543   test -z "$as_dir" && as_dir=.
22544     for ac_exec_ext in '' $ac_executable_extensions; do
22545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22546     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22548     break 2
22549   fi
22550 done
22551   done
22552 IFS=$as_save_IFS
22553 
22554   ;;
22555 esac
22556 fi
22557 STAT=$ac_cv_path_STAT
22558 if test -n "$STAT"; then
22559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22560 $as_echo "$STAT" >&6; }
22561 else
22562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22563 $as_echo "no" >&6; }
22564 fi
22565 
22566 
22567           if test "x$STAT" = x; then
22568             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22569           fi
22570         else
22571           # Otherwise we believe it is a complete path. Use it as it is.
22572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22573 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22574           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22575 $as_echo_n "checking for STAT... " >&6; }
22576           if test ! -x "$tool_specified"; then
22577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22578 $as_echo "not found" >&6; }
22579             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22580           fi
22581           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22582 $as_echo "$tool_specified" >&6; }
22583         fi
22584       fi
22585     fi
22586 
22587   fi
22588 
22589 
22590 
22591 
22592   # Publish this variable in the help.
22593 
22594 
22595   if [ -z "${TIME+x}" ]; then
22596     # The variable is not set by user, try to locate tool using the code snippet
22597     for ac_prog in time
22598 do
22599   # Extract the first word of "$ac_prog", so it can be a program name with args.
22600 set dummy $ac_prog; ac_word=$2
22601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22602 $as_echo_n "checking for $ac_word... " >&6; }
22603 if ${ac_cv_path_TIME+:} false; then :
22604   $as_echo_n "(cached) " >&6
22605 else
22606   case $TIME in
22607   [\\/]* | ?:[\\/]*)
22608   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22609   ;;
22610   *)
22611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22612 for as_dir in $PATH
22613 do
22614   IFS=$as_save_IFS
22615   test -z "$as_dir" && as_dir=.
22616     for ac_exec_ext in '' $ac_executable_extensions; do
22617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22618     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22620     break 2
22621   fi
22622 done
22623   done
22624 IFS=$as_save_IFS
22625 
22626   ;;
22627 esac
22628 fi
22629 TIME=$ac_cv_path_TIME
22630 if test -n "$TIME"; then
22631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22632 $as_echo "$TIME" >&6; }
22633 else
22634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22635 $as_echo "no" >&6; }
22636 fi
22637 
22638 
22639   test -n "$TIME" && break
22640 done
22641 
22642   else
22643     # The variable is set, but is it from the command line or the environment?
22644 
22645     # Try to remove the string !TIME! from our list.
22646     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22647     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22648       # If it failed, the variable was not from the command line. Ignore it,
22649       # but warn the user (except for BASH, which is always set by the calling BASH).
22650       if test "xTIME" != xBASH; then
22651         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22652 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22653       fi
22654       # Try to locate tool using the code snippet
22655       for ac_prog in time
22656 do
22657   # Extract the first word of "$ac_prog", so it can be a program name with args.
22658 set dummy $ac_prog; ac_word=$2
22659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22660 $as_echo_n "checking for $ac_word... " >&6; }
22661 if ${ac_cv_path_TIME+:} false; then :
22662   $as_echo_n "(cached) " >&6
22663 else
22664   case $TIME in
22665   [\\/]* | ?:[\\/]*)
22666   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22667   ;;
22668   *)
22669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22670 for as_dir in $PATH
22671 do
22672   IFS=$as_save_IFS
22673   test -z "$as_dir" && as_dir=.
22674     for ac_exec_ext in '' $ac_executable_extensions; do
22675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22676     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22678     break 2
22679   fi
22680 done
22681   done
22682 IFS=$as_save_IFS
22683 
22684   ;;
22685 esac
22686 fi
22687 TIME=$ac_cv_path_TIME
22688 if test -n "$TIME"; then
22689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22690 $as_echo "$TIME" >&6; }
22691 else
22692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22693 $as_echo "no" >&6; }
22694 fi
22695 
22696 
22697   test -n "$TIME" && break
22698 done
22699 
22700     else
22701       # If it succeeded, then it was overridden by the user. We will use it
22702       # for the tool.
22703 
22704       # First remove it from the list of overridden variables, so we can test
22705       # for unknown variables in the end.
22706       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22707 
22708       # Check if we try to supply an empty value
22709       if test "x$TIME" = x; then
22710         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22711 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22712         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22713 $as_echo_n "checking for TIME... " >&6; }
22714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22715 $as_echo "disabled" >&6; }
22716       else
22717         # Check if the provided tool contains a complete path.
22718         tool_specified="$TIME"
22719         tool_basename="${tool_specified##*/}"
22720         if test "x$tool_basename" = "x$tool_specified"; then
22721           # A command without a complete path is provided, search $PATH.
22722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22723 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22724           # Extract the first word of "$tool_basename", so it can be a program name with args.
22725 set dummy $tool_basename; ac_word=$2
22726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22727 $as_echo_n "checking for $ac_word... " >&6; }
22728 if ${ac_cv_path_TIME+:} false; then :
22729   $as_echo_n "(cached) " >&6
22730 else
22731   case $TIME in
22732   [\\/]* | ?:[\\/]*)
22733   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22734   ;;
22735   *)
22736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22737 for as_dir in $PATH
22738 do
22739   IFS=$as_save_IFS
22740   test -z "$as_dir" && as_dir=.
22741     for ac_exec_ext in '' $ac_executable_extensions; do
22742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22743     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22745     break 2
22746   fi
22747 done
22748   done
22749 IFS=$as_save_IFS
22750 
22751   ;;
22752 esac
22753 fi
22754 TIME=$ac_cv_path_TIME
22755 if test -n "$TIME"; then
22756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22757 $as_echo "$TIME" >&6; }
22758 else
22759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22760 $as_echo "no" >&6; }
22761 fi
22762 
22763 
22764           if test "x$TIME" = x; then
22765             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22766           fi
22767         else
22768           # Otherwise we believe it is a complete path. Use it as it is.
22769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22770 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22771           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22772 $as_echo_n "checking for TIME... " >&6; }
22773           if test ! -x "$tool_specified"; then
22774             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22775 $as_echo "not found" >&6; }
22776             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22777           fi
22778           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22779 $as_echo "$tool_specified" >&6; }
22780         fi
22781       fi
22782     fi
22783 
22784   fi
22785 
22786 
22787   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22788   # be in the user path.
22789 
22790 
22791   # Publish this variable in the help.
22792 
22793 
22794   if [ -z "${DTRACE+x}" ]; then
22795     # The variable is not set by user, try to locate tool using the code snippet
22796     for ac_prog in dtrace
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_DTRACE+:} false; then :
22803   $as_echo_n "(cached) " >&6
22804 else
22805   case $DTRACE in
22806   [\\/]* | ?:[\\/]*)
22807   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22808   ;;
22809   *)
22810   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22811 as_dummy="$PATH:/usr/sbin"
22812 for as_dir in $as_dummy
22813 do
22814   IFS=$as_save_IFS
22815   test -z "$as_dir" && as_dir=.
22816     for ac_exec_ext in '' $ac_executable_extensions; do
22817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22818     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22820     break 2
22821   fi
22822 done
22823   done
22824 IFS=$as_save_IFS
22825 
22826   ;;
22827 esac
22828 fi
22829 DTRACE=$ac_cv_path_DTRACE
22830 if test -n "$DTRACE"; then
22831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22832 $as_echo "$DTRACE" >&6; }
22833 else
22834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22835 $as_echo "no" >&6; }
22836 fi
22837 
22838 
22839   test -n "$DTRACE" && break
22840 done
22841 
22842   else
22843     # The variable is set, but is it from the command line or the environment?
22844 
22845     # Try to remove the string !DTRACE! from our list.
22846     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22847     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22848       # If it failed, the variable was not from the command line. Ignore it,
22849       # but warn the user (except for BASH, which is always set by the calling BASH).
22850       if test "xDTRACE" != xBASH; then
22851         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22852 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22853       fi
22854       # Try to locate tool using the code snippet
22855       for ac_prog in dtrace
22856 do
22857   # Extract the first word of "$ac_prog", so it can be a program name with args.
22858 set dummy $ac_prog; ac_word=$2
22859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860 $as_echo_n "checking for $ac_word... " >&6; }
22861 if ${ac_cv_path_DTRACE+:} false; then :
22862   $as_echo_n "(cached) " >&6
22863 else
22864   case $DTRACE in
22865   [\\/]* | ?:[\\/]*)
22866   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22867   ;;
22868   *)
22869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870 as_dummy="$PATH:/usr/sbin"
22871 for as_dir in $as_dummy
22872 do
22873   IFS=$as_save_IFS
22874   test -z "$as_dir" && as_dir=.
22875     for ac_exec_ext in '' $ac_executable_extensions; do
22876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22877     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22879     break 2
22880   fi
22881 done
22882   done
22883 IFS=$as_save_IFS
22884 
22885   ;;
22886 esac
22887 fi
22888 DTRACE=$ac_cv_path_DTRACE
22889 if test -n "$DTRACE"; then
22890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22891 $as_echo "$DTRACE" >&6; }
22892 else
22893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22894 $as_echo "no" >&6; }
22895 fi
22896 
22897 
22898   test -n "$DTRACE" && break
22899 done
22900 
22901     else
22902       # If it succeeded, then it was overridden by the user. We will use it
22903       # for the tool.
22904 
22905       # First remove it from the list of overridden variables, so we can test
22906       # for unknown variables in the end.
22907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22908 
22909       # Check if we try to supply an empty value
22910       if test "x$DTRACE" = x; then
22911         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22912 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22914 $as_echo_n "checking for DTRACE... " >&6; }
22915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22916 $as_echo "disabled" >&6; }
22917       else
22918         # Check if the provided tool contains a complete path.
22919         tool_specified="$DTRACE"
22920         tool_basename="${tool_specified##*/}"
22921         if test "x$tool_basename" = "x$tool_specified"; then
22922           # A command without a complete path is provided, search $PATH.
22923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22924 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22925           # Extract the first word of "$tool_basename", so it can be a program name with args.
22926 set dummy $tool_basename; ac_word=$2
22927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22928 $as_echo_n "checking for $ac_word... " >&6; }
22929 if ${ac_cv_path_DTRACE+:} false; then :
22930   $as_echo_n "(cached) " >&6
22931 else
22932   case $DTRACE in
22933   [\\/]* | ?:[\\/]*)
22934   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22935   ;;
22936   *)
22937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22938 for as_dir in $PATH
22939 do
22940   IFS=$as_save_IFS
22941   test -z "$as_dir" && as_dir=.
22942     for ac_exec_ext in '' $ac_executable_extensions; do
22943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22944     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22946     break 2
22947   fi
22948 done
22949   done
22950 IFS=$as_save_IFS
22951 
22952   ;;
22953 esac
22954 fi
22955 DTRACE=$ac_cv_path_DTRACE
22956 if test -n "$DTRACE"; then
22957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22958 $as_echo "$DTRACE" >&6; }
22959 else
22960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22961 $as_echo "no" >&6; }
22962 fi
22963 
22964 
22965           if test "x$DTRACE" = x; then
22966             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22967           fi
22968         else
22969           # Otherwise we believe it is a complete path. Use it as it is.
22970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22971 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22972           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22973 $as_echo_n "checking for DTRACE... " >&6; }
22974           if test ! -x "$tool_specified"; then
22975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22976 $as_echo "not found" >&6; }
22977             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22978           fi
22979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22980 $as_echo "$tool_specified" >&6; }
22981         fi
22982       fi
22983     fi
22984 
22985   fi
22986 
22987 
22988 
22989 
22990   # Publish this variable in the help.
22991 
22992 
22993   if [ -z "${PATCH+x}" ]; then
22994     # The variable is not set by user, try to locate tool using the code snippet
22995     for ac_prog in gpatch patch
22996 do
22997   # Extract the first word of "$ac_prog", so it can be a program name with args.
22998 set dummy $ac_prog; ac_word=$2
22999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23000 $as_echo_n "checking for $ac_word... " >&6; }
23001 if ${ac_cv_path_PATCH+:} false; then :
23002   $as_echo_n "(cached) " >&6
23003 else
23004   case $PATCH in
23005   [\\/]* | ?:[\\/]*)
23006   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23007   ;;
23008   *)
23009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23010 for as_dir in $PATH
23011 do
23012   IFS=$as_save_IFS
23013   test -z "$as_dir" && as_dir=.
23014     for ac_exec_ext in '' $ac_executable_extensions; do
23015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23016     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23018     break 2
23019   fi
23020 done
23021   done
23022 IFS=$as_save_IFS
23023 
23024   ;;
23025 esac
23026 fi
23027 PATCH=$ac_cv_path_PATCH
23028 if test -n "$PATCH"; then
23029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23030 $as_echo "$PATCH" >&6; }
23031 else
23032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23033 $as_echo "no" >&6; }
23034 fi
23035 
23036 
23037   test -n "$PATCH" && break
23038 done
23039 
23040   else
23041     # The variable is set, but is it from the command line or the environment?
23042 
23043     # Try to remove the string !PATCH! from our list.
23044     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23045     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23046       # If it failed, the variable was not from the command line. Ignore it,
23047       # but warn the user (except for BASH, which is always set by the calling BASH).
23048       if test "xPATCH" != xBASH; then
23049         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23050 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23051       fi
23052       # Try to locate tool using the code snippet
23053       for ac_prog in gpatch patch
23054 do
23055   # Extract the first word of "$ac_prog", so it can be a program name with args.
23056 set dummy $ac_prog; ac_word=$2
23057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23058 $as_echo_n "checking for $ac_word... " >&6; }
23059 if ${ac_cv_path_PATCH+:} false; then :
23060   $as_echo_n "(cached) " >&6
23061 else
23062   case $PATCH in
23063   [\\/]* | ?:[\\/]*)
23064   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23065   ;;
23066   *)
23067   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23068 for as_dir in $PATH
23069 do
23070   IFS=$as_save_IFS
23071   test -z "$as_dir" && as_dir=.
23072     for ac_exec_ext in '' $ac_executable_extensions; do
23073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23074     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23076     break 2
23077   fi
23078 done
23079   done
23080 IFS=$as_save_IFS
23081 
23082   ;;
23083 esac
23084 fi
23085 PATCH=$ac_cv_path_PATCH
23086 if test -n "$PATCH"; then
23087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23088 $as_echo "$PATCH" >&6; }
23089 else
23090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23091 $as_echo "no" >&6; }
23092 fi
23093 
23094 
23095   test -n "$PATCH" && break
23096 done
23097 
23098     else
23099       # If it succeeded, then it was overridden by the user. We will use it
23100       # for the tool.
23101 
23102       # First remove it from the list of overridden variables, so we can test
23103       # for unknown variables in the end.
23104       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23105 
23106       # Check if we try to supply an empty value
23107       if test "x$PATCH" = x; then
23108         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23109 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23110         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23111 $as_echo_n "checking for PATCH... " >&6; }
23112         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23113 $as_echo "disabled" >&6; }
23114       else
23115         # Check if the provided tool contains a complete path.
23116         tool_specified="$PATCH"
23117         tool_basename="${tool_specified##*/}"
23118         if test "x$tool_basename" = "x$tool_specified"; then
23119           # A command without a complete path is provided, search $PATH.
23120           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23121 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23122           # Extract the first word of "$tool_basename", so it can be a program name with args.
23123 set dummy $tool_basename; ac_word=$2
23124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23125 $as_echo_n "checking for $ac_word... " >&6; }
23126 if ${ac_cv_path_PATCH+:} false; then :
23127   $as_echo_n "(cached) " >&6
23128 else
23129   case $PATCH in
23130   [\\/]* | ?:[\\/]*)
23131   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23132   ;;
23133   *)
23134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23135 for as_dir in $PATH
23136 do
23137   IFS=$as_save_IFS
23138   test -z "$as_dir" && as_dir=.
23139     for ac_exec_ext in '' $ac_executable_extensions; do
23140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23141     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23143     break 2
23144   fi
23145 done
23146   done
23147 IFS=$as_save_IFS
23148 
23149   ;;
23150 esac
23151 fi
23152 PATCH=$ac_cv_path_PATCH
23153 if test -n "$PATCH"; then
23154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23155 $as_echo "$PATCH" >&6; }
23156 else
23157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23158 $as_echo "no" >&6; }
23159 fi
23160 
23161 
23162           if test "x$PATCH" = x; then
23163             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23164           fi
23165         else
23166           # Otherwise we believe it is a complete path. Use it as it is.
23167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23168 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23169           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23170 $as_echo_n "checking for PATCH... " >&6; }
23171           if test ! -x "$tool_specified"; then
23172             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23173 $as_echo "not found" >&6; }
23174             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23175           fi
23176           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23177 $as_echo "$tool_specified" >&6; }
23178         fi
23179       fi
23180     fi
23181 
23182   fi
23183 
23184 
23185   # Check if it's GNU time
23186   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23187   if test "x$IS_GNU_TIME" != x; then
23188     IS_GNU_TIME=yes
23189   else
23190     IS_GNU_TIME=no
23191   fi
23192 
23193 
23194   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23195 
23196 
23197 
23198   # Publish this variable in the help.
23199 
23200 
23201   if [ -z "${DSYMUTIL+x}" ]; then
23202     # The variable is not set by user, try to locate tool using the code snippet
23203     for ac_prog in dsymutil
23204 do
23205   # Extract the first word of "$ac_prog", so it can be a program name with args.
23206 set dummy $ac_prog; ac_word=$2
23207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23208 $as_echo_n "checking for $ac_word... " >&6; }
23209 if ${ac_cv_path_DSYMUTIL+:} false; then :
23210   $as_echo_n "(cached) " >&6
23211 else
23212   case $DSYMUTIL in
23213   [\\/]* | ?:[\\/]*)
23214   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23215   ;;
23216   *)
23217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23218 for as_dir in $PATH
23219 do
23220   IFS=$as_save_IFS
23221   test -z "$as_dir" && as_dir=.
23222     for ac_exec_ext in '' $ac_executable_extensions; do
23223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23224     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23226     break 2
23227   fi
23228 done
23229   done
23230 IFS=$as_save_IFS
23231 
23232   ;;
23233 esac
23234 fi
23235 DSYMUTIL=$ac_cv_path_DSYMUTIL
23236 if test -n "$DSYMUTIL"; then
23237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23238 $as_echo "$DSYMUTIL" >&6; }
23239 else
23240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23241 $as_echo "no" >&6; }
23242 fi
23243 
23244 
23245   test -n "$DSYMUTIL" && break
23246 done
23247 
23248   else
23249     # The variable is set, but is it from the command line or the environment?
23250 
23251     # Try to remove the string !DSYMUTIL! from our list.
23252     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23253     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23254       # If it failed, the variable was not from the command line. Ignore it,
23255       # but warn the user (except for BASH, which is always set by the calling BASH).
23256       if test "xDSYMUTIL" != xBASH; then
23257         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23258 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23259       fi
23260       # Try to locate tool using the code snippet
23261       for ac_prog in dsymutil
23262 do
23263   # Extract the first word of "$ac_prog", so it can be a program name with args.
23264 set dummy $ac_prog; ac_word=$2
23265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23266 $as_echo_n "checking for $ac_word... " >&6; }
23267 if ${ac_cv_path_DSYMUTIL+:} false; then :
23268   $as_echo_n "(cached) " >&6
23269 else
23270   case $DSYMUTIL in
23271   [\\/]* | ?:[\\/]*)
23272   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23273   ;;
23274   *)
23275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23276 for as_dir in $PATH
23277 do
23278   IFS=$as_save_IFS
23279   test -z "$as_dir" && as_dir=.
23280     for ac_exec_ext in '' $ac_executable_extensions; do
23281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23282     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23284     break 2
23285   fi
23286 done
23287   done
23288 IFS=$as_save_IFS
23289 
23290   ;;
23291 esac
23292 fi
23293 DSYMUTIL=$ac_cv_path_DSYMUTIL
23294 if test -n "$DSYMUTIL"; then
23295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23296 $as_echo "$DSYMUTIL" >&6; }
23297 else
23298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23299 $as_echo "no" >&6; }
23300 fi
23301 
23302 
23303   test -n "$DSYMUTIL" && break
23304 done
23305 
23306     else
23307       # If it succeeded, then it was overridden by the user. We will use it
23308       # for the tool.
23309 
23310       # First remove it from the list of overridden variables, so we can test
23311       # for unknown variables in the end.
23312       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23313 
23314       # Check if we try to supply an empty value
23315       if test "x$DSYMUTIL" = x; then
23316         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23317 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23318         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23319 $as_echo_n "checking for DSYMUTIL... " >&6; }
23320         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23321 $as_echo "disabled" >&6; }
23322       else
23323         # Check if the provided tool contains a complete path.
23324         tool_specified="$DSYMUTIL"
23325         tool_basename="${tool_specified##*/}"
23326         if test "x$tool_basename" = "x$tool_specified"; then
23327           # A command without a complete path is provided, search $PATH.
23328           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23329 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23330           # Extract the first word of "$tool_basename", so it can be a program name with args.
23331 set dummy $tool_basename; ac_word=$2
23332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23333 $as_echo_n "checking for $ac_word... " >&6; }
23334 if ${ac_cv_path_DSYMUTIL+:} false; then :
23335   $as_echo_n "(cached) " >&6
23336 else
23337   case $DSYMUTIL in
23338   [\\/]* | ?:[\\/]*)
23339   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23340   ;;
23341   *)
23342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23343 for as_dir in $PATH
23344 do
23345   IFS=$as_save_IFS
23346   test -z "$as_dir" && as_dir=.
23347     for ac_exec_ext in '' $ac_executable_extensions; do
23348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23349     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23351     break 2
23352   fi
23353 done
23354   done
23355 IFS=$as_save_IFS
23356 
23357   ;;
23358 esac
23359 fi
23360 DSYMUTIL=$ac_cv_path_DSYMUTIL
23361 if test -n "$DSYMUTIL"; then
23362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23363 $as_echo "$DSYMUTIL" >&6; }
23364 else
23365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23366 $as_echo "no" >&6; }
23367 fi
23368 
23369 
23370           if test "x$DSYMUTIL" = x; then
23371             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23372           fi
23373         else
23374           # Otherwise we believe it is a complete path. Use it as it is.
23375           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23376 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23377           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23378 $as_echo_n "checking for DSYMUTIL... " >&6; }
23379           if test ! -x "$tool_specified"; then
23380             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23381 $as_echo "not found" >&6; }
23382             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23383           fi
23384           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23385 $as_echo "$tool_specified" >&6; }
23386         fi
23387       fi
23388     fi
23389 
23390   fi
23391 
23392 
23393 
23394   if test "x$DSYMUTIL" = x; then
23395     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23396   fi
23397 
23398 
23399 
23400 
23401 
23402   # Publish this variable in the help.
23403 
23404 
23405   if [ -z "${XATTR+x}" ]; then
23406     # The variable is not set by user, try to locate tool using the code snippet
23407     for ac_prog in xattr
23408 do
23409   # Extract the first word of "$ac_prog", so it can be a program name with args.
23410 set dummy $ac_prog; ac_word=$2
23411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23412 $as_echo_n "checking for $ac_word... " >&6; }
23413 if ${ac_cv_path_XATTR+:} false; then :
23414   $as_echo_n "(cached) " >&6
23415 else
23416   case $XATTR in
23417   [\\/]* | ?:[\\/]*)
23418   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23419   ;;
23420   *)
23421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23422 for as_dir in $PATH
23423 do
23424   IFS=$as_save_IFS
23425   test -z "$as_dir" && as_dir=.
23426     for ac_exec_ext in '' $ac_executable_extensions; do
23427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23428     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23430     break 2
23431   fi
23432 done
23433   done
23434 IFS=$as_save_IFS
23435 
23436   ;;
23437 esac
23438 fi
23439 XATTR=$ac_cv_path_XATTR
23440 if test -n "$XATTR"; then
23441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23442 $as_echo "$XATTR" >&6; }
23443 else
23444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23445 $as_echo "no" >&6; }
23446 fi
23447 
23448 
23449   test -n "$XATTR" && break
23450 done
23451 
23452   else
23453     # The variable is set, but is it from the command line or the environment?
23454 
23455     # Try to remove the string !XATTR! from our list.
23456     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23457     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23458       # If it failed, the variable was not from the command line. Ignore it,
23459       # but warn the user (except for BASH, which is always set by the calling BASH).
23460       if test "xXATTR" != xBASH; then
23461         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23462 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23463       fi
23464       # Try to locate tool using the code snippet
23465       for ac_prog in xattr
23466 do
23467   # Extract the first word of "$ac_prog", so it can be a program name with args.
23468 set dummy $ac_prog; ac_word=$2
23469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23470 $as_echo_n "checking for $ac_word... " >&6; }
23471 if ${ac_cv_path_XATTR+:} false; then :
23472   $as_echo_n "(cached) " >&6
23473 else
23474   case $XATTR in
23475   [\\/]* | ?:[\\/]*)
23476   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23477   ;;
23478   *)
23479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23480 for as_dir in $PATH
23481 do
23482   IFS=$as_save_IFS
23483   test -z "$as_dir" && as_dir=.
23484     for ac_exec_ext in '' $ac_executable_extensions; do
23485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23486     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23488     break 2
23489   fi
23490 done
23491   done
23492 IFS=$as_save_IFS
23493 
23494   ;;
23495 esac
23496 fi
23497 XATTR=$ac_cv_path_XATTR
23498 if test -n "$XATTR"; then
23499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23500 $as_echo "$XATTR" >&6; }
23501 else
23502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23503 $as_echo "no" >&6; }
23504 fi
23505 
23506 
23507   test -n "$XATTR" && break
23508 done
23509 
23510     else
23511       # If it succeeded, then it was overridden by the user. We will use it
23512       # for the tool.
23513 
23514       # First remove it from the list of overridden variables, so we can test
23515       # for unknown variables in the end.
23516       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23517 
23518       # Check if we try to supply an empty value
23519       if test "x$XATTR" = x; then
23520         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23521 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23522         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23523 $as_echo_n "checking for XATTR... " >&6; }
23524         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23525 $as_echo "disabled" >&6; }
23526       else
23527         # Check if the provided tool contains a complete path.
23528         tool_specified="$XATTR"
23529         tool_basename="${tool_specified##*/}"
23530         if test "x$tool_basename" = "x$tool_specified"; then
23531           # A command without a complete path is provided, search $PATH.
23532           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23533 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23534           # Extract the first word of "$tool_basename", so it can be a program name with args.
23535 set dummy $tool_basename; ac_word=$2
23536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23537 $as_echo_n "checking for $ac_word... " >&6; }
23538 if ${ac_cv_path_XATTR+:} false; then :
23539   $as_echo_n "(cached) " >&6
23540 else
23541   case $XATTR in
23542   [\\/]* | ?:[\\/]*)
23543   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23544   ;;
23545   *)
23546   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23547 for as_dir in $PATH
23548 do
23549   IFS=$as_save_IFS
23550   test -z "$as_dir" && as_dir=.
23551     for ac_exec_ext in '' $ac_executable_extensions; do
23552   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23553     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23554     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23555     break 2
23556   fi
23557 done
23558   done
23559 IFS=$as_save_IFS
23560 
23561   ;;
23562 esac
23563 fi
23564 XATTR=$ac_cv_path_XATTR
23565 if test -n "$XATTR"; then
23566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23567 $as_echo "$XATTR" >&6; }
23568 else
23569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23570 $as_echo "no" >&6; }
23571 fi
23572 
23573 
23574           if test "x$XATTR" = x; then
23575             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23576           fi
23577         else
23578           # Otherwise we believe it is a complete path. Use it as it is.
23579           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23580 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23581           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23582 $as_echo_n "checking for XATTR... " >&6; }
23583           if test ! -x "$tool_specified"; then
23584             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23585 $as_echo "not found" >&6; }
23586             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23587           fi
23588           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23589 $as_echo "$tool_specified" >&6; }
23590         fi
23591       fi
23592     fi
23593 
23594   fi
23595 
23596 
23597 
23598   if test "x$XATTR" = x; then
23599     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23600   fi
23601 
23602 
23603 
23604 
23605   # Publish this variable in the help.
23606 
23607 
23608   if [ -z "${CODESIGN+x}" ]; then
23609     # The variable is not set by user, try to locate tool using the code snippet
23610     for ac_prog in codesign
23611 do
23612   # Extract the first word of "$ac_prog", so it can be a program name with args.
23613 set dummy $ac_prog; ac_word=$2
23614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23615 $as_echo_n "checking for $ac_word... " >&6; }
23616 if ${ac_cv_path_CODESIGN+:} false; then :
23617   $as_echo_n "(cached) " >&6
23618 else
23619   case $CODESIGN in
23620   [\\/]* | ?:[\\/]*)
23621   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23622   ;;
23623   *)
23624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23625 for as_dir in $PATH
23626 do
23627   IFS=$as_save_IFS
23628   test -z "$as_dir" && as_dir=.
23629     for ac_exec_ext in '' $ac_executable_extensions; do
23630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23631     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23633     break 2
23634   fi
23635 done
23636   done
23637 IFS=$as_save_IFS
23638 
23639   ;;
23640 esac
23641 fi
23642 CODESIGN=$ac_cv_path_CODESIGN
23643 if test -n "$CODESIGN"; then
23644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23645 $as_echo "$CODESIGN" >&6; }
23646 else
23647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23648 $as_echo "no" >&6; }
23649 fi
23650 
23651 
23652   test -n "$CODESIGN" && break
23653 done
23654 
23655   else
23656     # The variable is set, but is it from the command line or the environment?
23657 
23658     # Try to remove the string !CODESIGN! from our list.
23659     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23660     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23661       # If it failed, the variable was not from the command line. Ignore it,
23662       # but warn the user (except for BASH, which is always set by the calling BASH).
23663       if test "xCODESIGN" != xBASH; then
23664         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23665 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23666       fi
23667       # Try to locate tool using the code snippet
23668       for ac_prog in codesign
23669 do
23670   # Extract the first word of "$ac_prog", so it can be a program name with args.
23671 set dummy $ac_prog; ac_word=$2
23672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23673 $as_echo_n "checking for $ac_word... " >&6; }
23674 if ${ac_cv_path_CODESIGN+:} false; then :
23675   $as_echo_n "(cached) " >&6
23676 else
23677   case $CODESIGN in
23678   [\\/]* | ?:[\\/]*)
23679   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23680   ;;
23681   *)
23682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23683 for as_dir in $PATH
23684 do
23685   IFS=$as_save_IFS
23686   test -z "$as_dir" && as_dir=.
23687     for ac_exec_ext in '' $ac_executable_extensions; do
23688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23689     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23691     break 2
23692   fi
23693 done
23694   done
23695 IFS=$as_save_IFS
23696 
23697   ;;
23698 esac
23699 fi
23700 CODESIGN=$ac_cv_path_CODESIGN
23701 if test -n "$CODESIGN"; then
23702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23703 $as_echo "$CODESIGN" >&6; }
23704 else
23705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23706 $as_echo "no" >&6; }
23707 fi
23708 
23709 
23710   test -n "$CODESIGN" && break
23711 done
23712 
23713     else
23714       # If it succeeded, then it was overridden by the user. We will use it
23715       # for the tool.
23716 
23717       # First remove it from the list of overridden variables, so we can test
23718       # for unknown variables in the end.
23719       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23720 
23721       # Check if we try to supply an empty value
23722       if test "x$CODESIGN" = x; then
23723         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23724 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23726 $as_echo_n "checking for CODESIGN... " >&6; }
23727         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23728 $as_echo "disabled" >&6; }
23729       else
23730         # Check if the provided tool contains a complete path.
23731         tool_specified="$CODESIGN"
23732         tool_basename="${tool_specified##*/}"
23733         if test "x$tool_basename" = "x$tool_specified"; then
23734           # A command without a complete path is provided, search $PATH.
23735           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23736 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23737           # Extract the first word of "$tool_basename", so it can be a program name with args.
23738 set dummy $tool_basename; ac_word=$2
23739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23740 $as_echo_n "checking for $ac_word... " >&6; }
23741 if ${ac_cv_path_CODESIGN+:} false; then :
23742   $as_echo_n "(cached) " >&6
23743 else
23744   case $CODESIGN in
23745   [\\/]* | ?:[\\/]*)
23746   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23747   ;;
23748   *)
23749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23750 for as_dir in $PATH
23751 do
23752   IFS=$as_save_IFS
23753   test -z "$as_dir" && as_dir=.
23754     for ac_exec_ext in '' $ac_executable_extensions; do
23755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23756     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23758     break 2
23759   fi
23760 done
23761   done
23762 IFS=$as_save_IFS
23763 
23764   ;;
23765 esac
23766 fi
23767 CODESIGN=$ac_cv_path_CODESIGN
23768 if test -n "$CODESIGN"; then
23769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23770 $as_echo "$CODESIGN" >&6; }
23771 else
23772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23773 $as_echo "no" >&6; }
23774 fi
23775 
23776 
23777           if test "x$CODESIGN" = x; then
23778             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23779           fi
23780         else
23781           # Otherwise we believe it is a complete path. Use it as it is.
23782           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23783 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23784           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23785 $as_echo_n "checking for CODESIGN... " >&6; }
23786           if test ! -x "$tool_specified"; then
23787             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23788 $as_echo "not found" >&6; }
23789             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23790           fi
23791           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23792 $as_echo "$tool_specified" >&6; }
23793         fi
23794       fi
23795     fi
23796 
23797   fi
23798 
23799 
23800     if test "x$CODESIGN" != "x"; then
23801       # Verify that the openjdk_codesign certificate is present
23802       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23803 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23804       $RM codesign-testfile
23805       $TOUCH codesign-testfile
23806       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23807       $RM codesign-testfile
23808       if test "x$CODESIGN" = x; then
23809         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23810 $as_echo "no" >&6; }
23811       else
23812         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23813 $as_echo "yes" >&6; }
23814       fi
23815     fi
23816 
23817 
23818 
23819   # Publish this variable in the help.
23820 
23821 
23822   if [ -z "${SETFILE+x}" ]; then
23823     # The variable is not set by user, try to locate tool using the code snippet
23824     for ac_prog in SetFile
23825 do
23826   # Extract the first word of "$ac_prog", so it can be a program name with args.
23827 set dummy $ac_prog; ac_word=$2
23828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23829 $as_echo_n "checking for $ac_word... " >&6; }
23830 if ${ac_cv_path_SETFILE+:} false; then :
23831   $as_echo_n "(cached) " >&6
23832 else
23833   case $SETFILE in
23834   [\\/]* | ?:[\\/]*)
23835   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23836   ;;
23837   *)
23838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23839 for as_dir in $PATH
23840 do
23841   IFS=$as_save_IFS
23842   test -z "$as_dir" && as_dir=.
23843     for ac_exec_ext in '' $ac_executable_extensions; do
23844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23845     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23847     break 2
23848   fi
23849 done
23850   done
23851 IFS=$as_save_IFS
23852 
23853   ;;
23854 esac
23855 fi
23856 SETFILE=$ac_cv_path_SETFILE
23857 if test -n "$SETFILE"; then
23858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23859 $as_echo "$SETFILE" >&6; }
23860 else
23861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23862 $as_echo "no" >&6; }
23863 fi
23864 
23865 
23866   test -n "$SETFILE" && break
23867 done
23868 
23869   else
23870     # The variable is set, but is it from the command line or the environment?
23871 
23872     # Try to remove the string !SETFILE! from our list.
23873     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23874     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23875       # If it failed, the variable was not from the command line. Ignore it,
23876       # but warn the user (except for BASH, which is always set by the calling BASH).
23877       if test "xSETFILE" != xBASH; then
23878         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23879 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23880       fi
23881       # Try to locate tool using the code snippet
23882       for ac_prog in SetFile
23883 do
23884   # Extract the first word of "$ac_prog", so it can be a program name with args.
23885 set dummy $ac_prog; ac_word=$2
23886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23887 $as_echo_n "checking for $ac_word... " >&6; }
23888 if ${ac_cv_path_SETFILE+:} false; then :
23889   $as_echo_n "(cached) " >&6
23890 else
23891   case $SETFILE in
23892   [\\/]* | ?:[\\/]*)
23893   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23894   ;;
23895   *)
23896   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23897 for as_dir in $PATH
23898 do
23899   IFS=$as_save_IFS
23900   test -z "$as_dir" && as_dir=.
23901     for ac_exec_ext in '' $ac_executable_extensions; do
23902   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23903     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23904     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23905     break 2
23906   fi
23907 done
23908   done
23909 IFS=$as_save_IFS
23910 
23911   ;;
23912 esac
23913 fi
23914 SETFILE=$ac_cv_path_SETFILE
23915 if test -n "$SETFILE"; then
23916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23917 $as_echo "$SETFILE" >&6; }
23918 else
23919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23920 $as_echo "no" >&6; }
23921 fi
23922 
23923 
23924   test -n "$SETFILE" && break
23925 done
23926 
23927     else
23928       # If it succeeded, then it was overridden by the user. We will use it
23929       # for the tool.
23930 
23931       # First remove it from the list of overridden variables, so we can test
23932       # for unknown variables in the end.
23933       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23934 
23935       # Check if we try to supply an empty value
23936       if test "x$SETFILE" = x; then
23937         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23938 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23939         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23940 $as_echo_n "checking for SETFILE... " >&6; }
23941         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23942 $as_echo "disabled" >&6; }
23943       else
23944         # Check if the provided tool contains a complete path.
23945         tool_specified="$SETFILE"
23946         tool_basename="${tool_specified##*/}"
23947         if test "x$tool_basename" = "x$tool_specified"; then
23948           # A command without a complete path is provided, search $PATH.
23949           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23950 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23951           # Extract the first word of "$tool_basename", so it can be a program name with args.
23952 set dummy $tool_basename; ac_word=$2
23953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23954 $as_echo_n "checking for $ac_word... " >&6; }
23955 if ${ac_cv_path_SETFILE+:} false; then :
23956   $as_echo_n "(cached) " >&6
23957 else
23958   case $SETFILE in
23959   [\\/]* | ?:[\\/]*)
23960   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23961   ;;
23962   *)
23963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23964 for as_dir in $PATH
23965 do
23966   IFS=$as_save_IFS
23967   test -z "$as_dir" && as_dir=.
23968     for ac_exec_ext in '' $ac_executable_extensions; do
23969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23970     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23972     break 2
23973   fi
23974 done
23975   done
23976 IFS=$as_save_IFS
23977 
23978   ;;
23979 esac
23980 fi
23981 SETFILE=$ac_cv_path_SETFILE
23982 if test -n "$SETFILE"; then
23983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23984 $as_echo "$SETFILE" >&6; }
23985 else
23986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23987 $as_echo "no" >&6; }
23988 fi
23989 
23990 
23991           if test "x$SETFILE" = x; then
23992             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23993           fi
23994         else
23995           # Otherwise we believe it is a complete path. Use it as it is.
23996           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23997 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23998           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23999 $as_echo_n "checking for SETFILE... " >&6; }
24000           if test ! -x "$tool_specified"; then
24001             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24002 $as_echo "not found" >&6; }
24003             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24004           fi
24005           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24006 $as_echo "$tool_specified" >&6; }
24007         fi
24008       fi
24009     fi
24010 
24011   fi
24012 
24013 
24014 
24015   if test "x$SETFILE" = x; then
24016     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24017   fi
24018 
24019 
24020   fi
24021 
24022 
24023   # Test if bash supports pipefail.
24024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24025 $as_echo_n "checking if bash supports pipefail... " >&6; }
24026   if ${BASH} -c 'set -o pipefail'; then
24027     BASH_ARGS="$BASH_ARGS -o pipefail"
24028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24029 $as_echo "yes" >&6; }
24030   else
24031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24032 $as_echo "no" >&6; }
24033   fi
24034 
24035   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24036 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24037   if ${BASH} -e -c 'true'; then
24038     BASH_ARGS="$BASH_ARGS -e"
24039     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24040 $as_echo "yes" >&6; }
24041   else
24042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24043 $as_echo "no" >&6; }
24044   fi
24045 
24046 
24047 
24048 
24049 # Check if pkg-config is available.
24050 
24051 
24052 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24053         if test -n "$ac_tool_prefix"; then
24054   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24055 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24057 $as_echo_n "checking for $ac_word... " >&6; }
24058 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24059   $as_echo_n "(cached) " >&6
24060 else
24061   case $PKG_CONFIG in
24062   [\\/]* | ?:[\\/]*)
24063   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24064   ;;
24065   *)
24066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24067 for as_dir in $PATH
24068 do
24069   IFS=$as_save_IFS
24070   test -z "$as_dir" && as_dir=.
24071     for ac_exec_ext in '' $ac_executable_extensions; do
24072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24073     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24075     break 2
24076   fi
24077 done
24078   done
24079 IFS=$as_save_IFS
24080 
24081   ;;
24082 esac
24083 fi
24084 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24085 if test -n "$PKG_CONFIG"; then
24086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24087 $as_echo "$PKG_CONFIG" >&6; }
24088 else
24089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24090 $as_echo "no" >&6; }
24091 fi
24092 
24093 
24094 fi
24095 if test -z "$ac_cv_path_PKG_CONFIG"; then
24096   ac_pt_PKG_CONFIG=$PKG_CONFIG
24097   # Extract the first word of "pkg-config", so it can be a program name with args.
24098 set dummy pkg-config; ac_word=$2
24099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24100 $as_echo_n "checking for $ac_word... " >&6; }
24101 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24102   $as_echo_n "(cached) " >&6
24103 else
24104   case $ac_pt_PKG_CONFIG in
24105   [\\/]* | ?:[\\/]*)
24106   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24107   ;;
24108   *)
24109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24110 for as_dir in $PATH
24111 do
24112   IFS=$as_save_IFS
24113   test -z "$as_dir" && as_dir=.
24114     for ac_exec_ext in '' $ac_executable_extensions; do
24115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24116     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24118     break 2
24119   fi
24120 done
24121   done
24122 IFS=$as_save_IFS
24123 
24124   ;;
24125 esac
24126 fi
24127 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24128 if test -n "$ac_pt_PKG_CONFIG"; then
24129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24130 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24131 else
24132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24133 $as_echo "no" >&6; }
24134 fi
24135 
24136   if test "x$ac_pt_PKG_CONFIG" = x; then
24137     PKG_CONFIG=""
24138   else
24139     case $cross_compiling:$ac_tool_warned in
24140 yes:)
24141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24142 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24143 ac_tool_warned=yes ;;
24144 esac
24145     PKG_CONFIG=$ac_pt_PKG_CONFIG
24146   fi
24147 else
24148   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24149 fi
24150 
24151 fi
24152 if test -n "$PKG_CONFIG"; then
24153         _pkg_min_version=0.9.0
24154         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24155 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24156         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24157                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24158 $as_echo "yes" >&6; }
24159         else
24160                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24161 $as_echo "no" >&6; }
24162                 PKG_CONFIG=""
24163         fi
24164 
24165 fi
24166 
24167 # After basic tools have been setup, we can check build os specific details.
24168 
24169   ###############################################################################
24170 
24171   # Note that this is the build platform OS version!
24172 
24173   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24174   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24175   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24176   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24177 
24178 
24179 
24180 
24181 
24182 # Misc basic settings
24183 
24184 
24185 # Check whether --with-default-make-target was given.
24186 if test "${with_default_make_target+set}" = set; then :
24187   withval=$with_default_make_target;
24188 fi
24189 
24190   if test "x$with_default_make_target" = "x" \
24191       || test "x$with_default_make_target" = "xyes"; then
24192     DEFAULT_MAKE_TARGET="exploded-image"
24193   elif test "x$with_default_make_target" = "xno"; then
24194     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24195   else
24196     DEFAULT_MAKE_TARGET="$with_default_make_target"
24197   fi
24198 
24199 
24200 
24201 
24202 ###############################################################################
24203 #
24204 # Determine OpenJDK variants, options and version numbers.
24205 #
24206 ###############################################################################
24207 
24208 # We need build & target for this.
24209 
24210   # Should we build a JDK without a graphical UI?
24211   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24212 $as_echo_n "checking headless only... " >&6; }
24213   # Check whether --enable-headless-only was given.
24214 if test "${enable_headless_only+set}" = set; then :
24215   enableval=$enable_headless_only;
24216 fi
24217 
24218 
24219   if test "x$enable_headless_only" = "xyes"; then
24220     ENABLE_HEADLESS_ONLY="true"
24221     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24222 $as_echo "yes" >&6; }
24223   elif test "x$enable_headless_only" = "xno"; then
24224     ENABLE_HEADLESS_ONLY="false"
24225     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24226 $as_echo "no" >&6; }
24227   elif test "x$enable_headless_only" = "x"; then
24228     ENABLE_HEADLESS_ONLY="false"
24229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24230 $as_echo "no" >&6; }
24231   else
24232     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24233   fi
24234 
24235 
24236 
24237   # Choose cacerts source file
24238 
24239 # Check whether --with-cacerts-file was given.
24240 if test "${with_cacerts_file+set}" = set; then :
24241   withval=$with_cacerts_file;
24242 fi
24243 
24244   if test "x$with_cacerts_file" != x; then
24245     CACERTS_FILE=$with_cacerts_file
24246   fi
24247 
24248 
24249   # Enable or disable unlimited crypto
24250   # Check whether --enable-unlimited-crypto was given.
24251 if test "${enable_unlimited_crypto+set}" = set; then :
24252   enableval=$enable_unlimited_crypto;
24253 else
24254   enable_unlimited_crypto=no
24255 fi
24256 
24257   if test "x$enable_unlimited_crypto" = "xyes"; then
24258     UNLIMITED_CRYPTO=true
24259   else
24260     UNLIMITED_CRYPTO=false
24261   fi
24262 
24263 
24264   # Should we build the serviceability agent (SA)?
24265   INCLUDE_SA=true
24266   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24267     INCLUDE_SA=false
24268   fi
24269   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24270     INCLUDE_SA=false
24271   fi
24272 
24273 
24274   # Compress jars
24275   COMPRESS_JARS=false
24276 
24277 
24278 
24279   # Setup default copyright year. Mostly overridden when building close to a new year.
24280 
24281 # Check whether --with-copyright-year was given.
24282 if test "${with_copyright_year+set}" = set; then :
24283   withval=$with_copyright_year;
24284 fi
24285 
24286   if test "x$with_copyright_year" = xyes; then
24287     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24288   elif test "x$with_copyright_year" != x; then
24289     COPYRIGHT_YEAR="$with_copyright_year"
24290   else
24291     COPYRIGHT_YEAR=`$DATE +'%Y'`
24292   fi
24293 
24294 
24295 
24296   # Check whether --enable-keep-packaged-modules was given.
24297 if test "${enable_keep_packaged_modules+set}" = set; then :
24298   enableval=$enable_keep_packaged_modules;
24299 fi
24300 
24301 
24302   if test "x$enable_keep_packaged_modules" = "xyes"; then
24303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24304 $as_echo_n "checking if packaged modules are kept... " >&6; }
24305     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24306 $as_echo "yes" >&6; }
24307     JLINK_KEEP_PACKAGED_MODULES=true
24308   elif test "x$enable_keep_packaged_modules" = "xno"; then
24309     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24310 $as_echo_n "checking if packaged modules are kept... " >&6; }
24311     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24312 $as_echo "no" >&6; }
24313     JLINK_KEEP_PACKAGED_MODULES=false
24314   elif test "x$enable_keep_packaged_modules" = "x"; then
24315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24316 $as_echo "yes (default)" >&6; }
24317     JLINK_KEEP_PACKAGED_MODULES=true
24318   else
24319     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24320   fi
24321 
24322 
24323 
24324 
24325   # Warn user that old version arguments are deprecated.
24326 
24327 
24328 # Check whether --with-milestone was given.
24329 if test "${with_milestone+set}" = set; then :
24330   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24331 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24332 fi
24333 
24334 
24335 
24336 
24337 # Check whether --with-update-version was given.
24338 if test "${with_update_version+set}" = set; then :
24339   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24340 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24341 fi
24342 
24343 
24344 
24345 
24346 # Check whether --with-user-release-suffix was given.
24347 if test "${with_user_release_suffix+set}" = set; then :
24348   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
24349 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24350 fi
24351 
24352 
24353 
24354 
24355 # Check whether --with-build-number was given.
24356 if test "${with_build_number+set}" = set; then :
24357   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24358 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24359 fi
24360 
24361 
24362 
24363   # Source the version numbers file
24364   . $AUTOCONF_DIR/version-numbers
24365 
24366   # Some non-version number information is set in that file
24367 
24368 
24369 
24370 
24371 
24372 
24373 
24374 
24375 
24376   # Override version from arguments
24377 
24378   # If --with-version-string is set, process it first. It is possible to
24379   # override parts with more specific flags, since these are processed later.
24380 
24381 # Check whether --with-version-string was given.
24382 if test "${with_version_string+set}" = set; then :
24383   withval=$with_version_string;
24384 fi
24385 
24386   if test "x$with_version_string" = xyes; then
24387     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24388   elif test "x$with_version_string" != x; then
24389     # Additional [] needed to keep m4 from mangling shell constructs.
24390     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24391       VERSION_MAJOR=${BASH_REMATCH[1]}
24392       VERSION_MINOR=${BASH_REMATCH[3]}
24393       VERSION_SECURITY=${BASH_REMATCH[5]}
24394       VERSION_PATCH=${BASH_REMATCH[7]}
24395       VERSION_PRE=${BASH_REMATCH[9]}
24396       version_plus_separator=${BASH_REMATCH[11]}
24397       VERSION_BUILD=${BASH_REMATCH[12]}
24398       VERSION_OPT=${BASH_REMATCH[14]}
24399       # Unspecified numerical fields are interpreted as 0.
24400       if test "x$VERSION_MINOR" = x; then
24401         VERSION_MINOR=0
24402       fi
24403       if test "x$VERSION_SECURITY" = x; then
24404         VERSION_SECURITY=0
24405       fi
24406       if test "x$VERSION_PATCH" = x; then
24407         VERSION_PATCH=0
24408       fi
24409       if test "x$version_plus_separator" != x \
24410           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24411         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24412       fi
24413       # Stop the version part process from setting default values.
24414       # We still allow them to explicitely override though.
24415       NO_DEFAULT_VERSION_PARTS=true
24416     else
24417       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24418     fi
24419   fi
24420 
24421 
24422 # Check whether --with-version-pre was given.
24423 if test "${with_version_pre+set}" = set; then :
24424   withval=$with_version_pre; with_version_pre_present=true
24425 else
24426   with_version_pre_present=false
24427 fi
24428 
24429 
24430   if test "x$with_version_pre_present" = xtrue; then
24431     if test "x$with_version_pre" = xyes; then
24432       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24433     elif test "x$with_version_pre" = xno; then
24434       # Interpret --without-* as empty string instead of the literal "no"
24435       VERSION_PRE=
24436     else
24437       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24438        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24439       if test "x$VERSION_PRE" != "x$with_version_pre"; then
24440         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24441 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24442       fi
24443     fi
24444   else
24445     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24446       # Default is to use "internal" as pre
24447       VERSION_PRE="internal"
24448     fi
24449   fi
24450 
24451 
24452 # Check whether --with-version-opt was given.
24453 if test "${with_version_opt+set}" = set; then :
24454   withval=$with_version_opt; with_version_opt_present=true
24455 else
24456   with_version_opt_present=false
24457 fi
24458 
24459 
24460   if test "x$with_version_opt_present" = xtrue; then
24461     if test "x$with_version_opt" = xyes; then
24462       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24463     elif test "x$with_version_opt" = xno; then
24464       # Interpret --without-* as empty string instead of the literal "no"
24465       VERSION_OPT=
24466     else
24467       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24468        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24469       if test "x$VERSION_OPT" != "x$with_version_opt"; then
24470         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24471 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24472       fi
24473     fi
24474   else
24475     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24476       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24477       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24478       # Outer [ ] to quote m4.
24479        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24480       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24481     fi
24482   fi
24483 
24484 
24485 # Check whether --with-version-build was given.
24486 if test "${with_version_build+set}" = set; then :
24487   withval=$with_version_build; with_version_build_present=true
24488 else
24489   with_version_build_present=false
24490 fi
24491 
24492 
24493   if test "x$with_version_build_present" = xtrue; then
24494     if test "x$with_version_build" = xyes; then
24495       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24496     elif test "x$with_version_build" = xno; then
24497       # Interpret --without-* as empty string instead of the literal "no"
24498       VERSION_BUILD=
24499     elif test "x$with_version_build" = x; then
24500       VERSION_BUILD=
24501     else
24502 
24503   # Additional [] needed to keep m4 from mangling shell constructs.
24504   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24505     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24506   fi
24507   # Extract the version number without leading zeros.
24508   cleaned_value=${BASH_REMATCH[1]}
24509   if test "x$cleaned_value" = x; then
24510     # Special case for zero
24511     cleaned_value=${BASH_REMATCH[2]}
24512   fi
24513 
24514   if test $cleaned_value -gt 255; then
24515     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24516   fi
24517   if test "x$cleaned_value" != "x$with_version_build"; then
24518     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24519 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24520   fi
24521   VERSION_BUILD=$cleaned_value
24522 
24523     fi
24524   else
24525     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24526       # Default is to not have a build number.
24527       VERSION_BUILD=""
24528       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24529       VERSION_BUILD=0
24530     fi
24531   fi
24532 
24533 
24534 # Check whether --with-version-major was given.
24535 if test "${with_version_major+set}" = set; then :
24536   withval=$with_version_major; with_version_major_present=true
24537 else
24538   with_version_major_present=false
24539 fi
24540 
24541 
24542   if test "x$with_version_major_present" = xtrue; then
24543     if test "x$with_version_major" = xyes; then
24544       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24545     else
24546 
24547   # Additional [] needed to keep m4 from mangling shell constructs.
24548   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24549     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24550   fi
24551   # Extract the version number without leading zeros.
24552   cleaned_value=${BASH_REMATCH[1]}
24553   if test "x$cleaned_value" = x; then
24554     # Special case for zero
24555     cleaned_value=${BASH_REMATCH[2]}
24556   fi
24557 
24558   if test $cleaned_value -gt 255; then
24559     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24560   fi
24561   if test "x$cleaned_value" != "x$with_version_major"; then
24562     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24563 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24564   fi
24565   VERSION_MAJOR=$cleaned_value
24566 
24567     fi
24568   else
24569     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24570       # Default is to get value from version-numbers
24571       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24572     fi
24573   fi
24574 
24575 
24576 # Check whether --with-version-minor was given.
24577 if test "${with_version_minor+set}" = set; then :
24578   withval=$with_version_minor; with_version_minor_present=true
24579 else
24580   with_version_minor_present=false
24581 fi
24582 
24583 
24584   if test "x$with_version_minor_present" = xtrue; then
24585     if test "x$with_version_minor" = xyes; then
24586       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24587     elif test "x$with_version_minor" = xno; then
24588       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24589       VERSION_MINOR=0
24590     elif test "x$with_version_minor" = x; then
24591       VERSION_MINOR=0
24592     else
24593 
24594   # Additional [] needed to keep m4 from mangling shell constructs.
24595   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24596     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24597   fi
24598   # Extract the version number without leading zeros.
24599   cleaned_value=${BASH_REMATCH[1]}
24600   if test "x$cleaned_value" = x; then
24601     # Special case for zero
24602     cleaned_value=${BASH_REMATCH[2]}
24603   fi
24604 
24605   if test $cleaned_value -gt 255; then
24606     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24607   fi
24608   if test "x$cleaned_value" != "x$with_version_minor"; then
24609     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24610 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24611   fi
24612   VERSION_MINOR=$cleaned_value
24613 
24614     fi
24615   else
24616     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24617       # Default is 0, if unspecified
24618       VERSION_MINOR=0
24619     fi
24620   fi
24621 
24622 
24623 # Check whether --with-version-security was given.
24624 if test "${with_version_security+set}" = set; then :
24625   withval=$with_version_security; with_version_security_present=true
24626 else
24627   with_version_security_present=false
24628 fi
24629 
24630 
24631   if test "x$with_version_security_present" = xtrue; then
24632     if test "x$with_version_security" = xyes; then
24633       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24634     elif test "x$with_version_security" = xno; then
24635       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24636       VERSION_SECURITY=0
24637     elif test "x$with_version_security" = x; then
24638       VERSION_SECURITY=0
24639     else
24640 
24641   # Additional [] needed to keep m4 from mangling shell constructs.
24642   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24643     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24644   fi
24645   # Extract the version number without leading zeros.
24646   cleaned_value=${BASH_REMATCH[1]}
24647   if test "x$cleaned_value" = x; then
24648     # Special case for zero
24649     cleaned_value=${BASH_REMATCH[2]}
24650   fi
24651 
24652   if test $cleaned_value -gt 255; then
24653     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24654   fi
24655   if test "x$cleaned_value" != "x$with_version_security"; then
24656     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24657 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24658   fi
24659   VERSION_SECURITY=$cleaned_value
24660 
24661     fi
24662   else
24663     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24664       # Default is 0, if unspecified
24665       VERSION_SECURITY=0
24666     fi
24667   fi
24668 
24669 
24670 # Check whether --with-version-patch was given.
24671 if test "${with_version_patch+set}" = set; then :
24672   withval=$with_version_patch; with_version_patch_present=true
24673 else
24674   with_version_patch_present=false
24675 fi
24676 
24677 
24678   if test "x$with_version_patch_present" = xtrue; then
24679     if test "x$with_version_patch" = xyes; then
24680       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24681     elif test "x$with_version_patch" = xno; then
24682       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24683       VERSION_PATCH=0
24684     elif test "x$with_version_patch" = x; then
24685       VERSION_PATCH=0
24686     else
24687 
24688   # Additional [] needed to keep m4 from mangling shell constructs.
24689   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24690     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24691   fi
24692   # Extract the version number without leading zeros.
24693   cleaned_value=${BASH_REMATCH[1]}
24694   if test "x$cleaned_value" = x; then
24695     # Special case for zero
24696     cleaned_value=${BASH_REMATCH[2]}
24697   fi
24698 
24699   if test $cleaned_value -gt 255; then
24700     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24701   fi
24702   if test "x$cleaned_value" != "x$with_version_patch"; then
24703     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24704 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24705   fi
24706   VERSION_PATCH=$cleaned_value
24707 
24708     fi
24709   else
24710     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24711       # Default is 0, if unspecified
24712       VERSION_PATCH=0
24713     fi
24714   fi
24715 
24716   # Calculate derived version properties
24717 
24718   # Set VERSION_IS_GA based on if VERSION_PRE has a value
24719   if test "x$VERSION_PRE" = x; then
24720     VERSION_IS_GA=true
24721   else
24722     VERSION_IS_GA=false
24723   fi
24724 
24725   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24726   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24727 
24728   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24729   # Strip trailing zeroes from stripped_version_number
24730   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24731   VERSION_NUMBER=$stripped_version_number
24732 
24733   # The complete version string, with additional build information
24734   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24735     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24736   else
24737     # If either build or opt is set, we need a + separator
24738     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24739   fi
24740 
24741   # The short version string, just VERSION_NUMBER and PRE, if present.
24742   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24743 
24744   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24745 $as_echo_n "checking for version string... " >&6; }
24746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24747 $as_echo "$VERSION_STRING" >&6; }
24748 
24749 
24750 
24751 
24752 
24753 
24754 
24755 
24756 
24757 
24758 
24759 
24760 
24761 
24762 
24763 ###############################################################################
24764 #
24765 # Setup BootJDK, used to bootstrap the build.
24766 #
24767 ###############################################################################
24768 
24769 
24770   BOOT_JDK_FOUND=no
24771 
24772 # Check whether --with-boot-jdk was given.
24773 if test "${with_boot_jdk+set}" = set; then :
24774   withval=$with_boot_jdk;
24775 fi
24776 
24777 
24778   # We look for the Boot JDK through various means, going from more certain to
24779   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24780   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24781   # must check if this is indeed valid; otherwise we'll continue looking.
24782 
24783   # Test: Is bootjdk explicitely set by command line arguments?
24784 
24785   if test "x$BOOT_JDK_FOUND" = xno; then
24786     # Now execute the test
24787 
24788   if test "x$with_boot_jdk" != x; then
24789     BOOT_JDK=$with_boot_jdk
24790     BOOT_JDK_FOUND=maybe
24791     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24792 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24793   fi
24794 
24795 
24796     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24797     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24798       # Do we have a bin/java?
24799       if test ! -x "$BOOT_JDK/bin/java"; then
24800         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24802         BOOT_JDK_FOUND=no
24803       else
24804         # Do we have a bin/javac?
24805         if test ! -x "$BOOT_JDK/bin/javac"; then
24806           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24807 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24808           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24809 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24810           BOOT_JDK_FOUND=no
24811         else
24812           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24813           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24814 
24815           # Extra M4 quote needed to protect [] in grep expression.
24816           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24817           if test "x$FOUND_CORRECT_VERSION" = x; then
24818             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24820             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24821 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24822             BOOT_JDK_FOUND=no
24823           else
24824             # We're done! :-)
24825             BOOT_JDK_FOUND=yes
24826 
24827   # Only process if variable expands to non-empty
24828 
24829   if test "x$BOOT_JDK" != x; then
24830     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24831 
24832   # Input might be given as Windows format, start by converting to
24833   # unix format.
24834   path="$BOOT_JDK"
24835   new_path=`$CYGPATH -u "$path"`
24836 
24837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24840   # "foo.exe" is OK but "foo" is an error.
24841   #
24842   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24843   # It is also a way to make sure we got the proper file name for the real test later on.
24844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24845   if test "x$test_shortpath" = x; then
24846     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24847 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24848     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24849   fi
24850 
24851   # Call helper function which possibly converts this using DOS-style short mode.
24852   # If so, the updated path is stored in $new_path.
24853 
24854   input_path="$new_path"
24855   # Check if we need to convert this using DOS-style short mode. If the path
24856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24857   # take no chances and rewrite it.
24858   # Note: m4 eats our [], so we need to use [ and ] instead.
24859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24860   if test "x$has_forbidden_chars" != x; then
24861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24865       # Going to short mode and back again did indeed matter. Since short mode is
24866       # case insensitive, let's make it lowercase to improve readability.
24867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24868       # Now convert it back to Unix-style (cygpath)
24869       input_path=`$CYGPATH -u "$shortmode_path"`
24870       new_path="$input_path"
24871     fi
24872   fi
24873 
24874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24875   if test "x$test_cygdrive_prefix" = x; then
24876     # As a simple fix, exclude /usr/bin since it's not a real path.
24877     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24879       # a path prefixed by /cygdrive for fixpath to work.
24880       new_path="$CYGWIN_ROOT_PATH$input_path"
24881     fi
24882   fi
24883 
24884 
24885   if test "x$path" != "x$new_path"; then
24886     BOOT_JDK="$new_path"
24887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24888 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24889   fi
24890 
24891     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24892 
24893   path="$BOOT_JDK"
24894   has_colon=`$ECHO $path | $GREP ^.:`
24895   new_path="$path"
24896   if test "x$has_colon" = x; then
24897     # Not in mixed or Windows style, start by that.
24898     new_path=`cmd //c echo $path`
24899   fi
24900 
24901 
24902   input_path="$new_path"
24903   # Check if we need to convert this using DOS-style short mode. If the path
24904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24905   # take no chances and rewrite it.
24906   # Note: m4 eats our [], so we need to use [ and ] instead.
24907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24908   if test "x$has_forbidden_chars" != x; then
24909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24910     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24911   fi
24912 
24913 
24914   windows_path="$new_path"
24915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24916     unix_path=`$CYGPATH -u "$windows_path"`
24917     new_path="$unix_path"
24918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24920     new_path="$unix_path"
24921   fi
24922 
24923   if test "x$path" != "x$new_path"; then
24924     BOOT_JDK="$new_path"
24925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24926 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24927   fi
24928 
24929   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24930   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24931 
24932     else
24933       # We're on a unix platform. Hooray! :)
24934       path="$BOOT_JDK"
24935       has_space=`$ECHO "$path" | $GREP " "`
24936       if test "x$has_space" != x; then
24937         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24938 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24939         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24940       fi
24941 
24942       # Use eval to expand a potential ~
24943       eval path="$path"
24944       if test ! -f "$path" && test ! -d "$path"; then
24945         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24946       fi
24947 
24948       if test -d "$path"; then
24949         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24950       else
24951         dir="`$DIRNAME "$path"`"
24952         base="`$BASENAME "$path"`"
24953         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24954       fi
24955     fi
24956   fi
24957 
24958             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24959 $as_echo_n "checking for Boot JDK... " >&6; }
24960             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24961 $as_echo "$BOOT_JDK" >&6; }
24962             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24963 $as_echo_n "checking Boot JDK version... " >&6; }
24964             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24965             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24966 $as_echo "$BOOT_JDK_VERSION" >&6; }
24967           fi # end check jdk version
24968         fi # end check javac
24969       fi # end check java
24970     fi # end check boot jdk found
24971   fi
24972 
24973   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24974     # Having specified an argument which is incorrect will produce an instant failure;
24975     # we should not go on looking
24976     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24977   fi
24978 
24979   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24980 
24981   if test "x$BOOT_JDK_FOUND" = xno; then
24982     # Now execute the test
24983 
24984   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24985     # First check at user selected default
24986 
24987   if test "x$BOOT_JDK_FOUND" = xno; then
24988     # Now execute the test
24989 
24990   if test -x /usr/libexec/java_home; then
24991     BOOT_JDK=`/usr/libexec/java_home `
24992     BOOT_JDK_FOUND=maybe
24993     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24994 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24995   fi
24996 
24997 
24998     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24999     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25000       # Do we have a bin/java?
25001       if test ! -x "$BOOT_JDK/bin/java"; then
25002         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25004         BOOT_JDK_FOUND=no
25005       else
25006         # Do we have a bin/javac?
25007         if test ! -x "$BOOT_JDK/bin/javac"; then
25008           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25009 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25010           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25011 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25012           BOOT_JDK_FOUND=no
25013         else
25014           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25015           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25016 
25017           # Extra M4 quote needed to protect [] in grep expression.
25018           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25019           if test "x$FOUND_CORRECT_VERSION" = x; then
25020             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25021 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25022             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25023 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25024             BOOT_JDK_FOUND=no
25025           else
25026             # We're done! :-)
25027             BOOT_JDK_FOUND=yes
25028 
25029   # Only process if variable expands to non-empty
25030 
25031   if test "x$BOOT_JDK" != x; then
25032     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25033 
25034   # Input might be given as Windows format, start by converting to
25035   # unix format.
25036   path="$BOOT_JDK"
25037   new_path=`$CYGPATH -u "$path"`
25038 
25039   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25040   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25041   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25042   # "foo.exe" is OK but "foo" is an error.
25043   #
25044   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25045   # It is also a way to make sure we got the proper file name for the real test later on.
25046   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25047   if test "x$test_shortpath" = x; then
25048     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25049 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25050     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25051   fi
25052 
25053   # Call helper function which possibly converts this using DOS-style short mode.
25054   # If so, the updated path is stored in $new_path.
25055 
25056   input_path="$new_path"
25057   # Check if we need to convert this using DOS-style short mode. If the path
25058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25059   # take no chances and rewrite it.
25060   # Note: m4 eats our [], so we need to use [ and ] instead.
25061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25062   if test "x$has_forbidden_chars" != x; then
25063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25067       # Going to short mode and back again did indeed matter. Since short mode is
25068       # case insensitive, let's make it lowercase to improve readability.
25069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25070       # Now convert it back to Unix-style (cygpath)
25071       input_path=`$CYGPATH -u "$shortmode_path"`
25072       new_path="$input_path"
25073     fi
25074   fi
25075 
25076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25077   if test "x$test_cygdrive_prefix" = x; then
25078     # As a simple fix, exclude /usr/bin since it's not a real path.
25079     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25081       # a path prefixed by /cygdrive for fixpath to work.
25082       new_path="$CYGWIN_ROOT_PATH$input_path"
25083     fi
25084   fi
25085 
25086 
25087   if test "x$path" != "x$new_path"; then
25088     BOOT_JDK="$new_path"
25089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25090 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25091   fi
25092 
25093     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25094 
25095   path="$BOOT_JDK"
25096   has_colon=`$ECHO $path | $GREP ^.:`
25097   new_path="$path"
25098   if test "x$has_colon" = x; then
25099     # Not in mixed or Windows style, start by that.
25100     new_path=`cmd //c echo $path`
25101   fi
25102 
25103 
25104   input_path="$new_path"
25105   # Check if we need to convert this using DOS-style short mode. If the path
25106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25107   # take no chances and rewrite it.
25108   # Note: m4 eats our [], so we need to use [ and ] instead.
25109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25110   if test "x$has_forbidden_chars" != x; then
25111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25112     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25113   fi
25114 
25115 
25116   windows_path="$new_path"
25117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25118     unix_path=`$CYGPATH -u "$windows_path"`
25119     new_path="$unix_path"
25120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25122     new_path="$unix_path"
25123   fi
25124 
25125   if test "x$path" != "x$new_path"; then
25126     BOOT_JDK="$new_path"
25127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25128 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25129   fi
25130 
25131   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25132   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25133 
25134     else
25135       # We're on a unix platform. Hooray! :)
25136       path="$BOOT_JDK"
25137       has_space=`$ECHO "$path" | $GREP " "`
25138       if test "x$has_space" != x; then
25139         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25140 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25141         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25142       fi
25143 
25144       # Use eval to expand a potential ~
25145       eval path="$path"
25146       if test ! -f "$path" && test ! -d "$path"; then
25147         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25148       fi
25149 
25150       if test -d "$path"; then
25151         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25152       else
25153         dir="`$DIRNAME "$path"`"
25154         base="`$BASENAME "$path"`"
25155         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25156       fi
25157     fi
25158   fi
25159 
25160             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25161 $as_echo_n "checking for Boot JDK... " >&6; }
25162             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25163 $as_echo "$BOOT_JDK" >&6; }
25164             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25165 $as_echo_n "checking Boot JDK version... " >&6; }
25166             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25167             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25168 $as_echo "$BOOT_JDK_VERSION" >&6; }
25169           fi # end check jdk version
25170         fi # end check javac
25171       fi # end check java
25172     fi # end check boot jdk found
25173   fi
25174 
25175     # If that did not work out (e.g. too old), try explicit versions instead
25176 
25177   if test "x$BOOT_JDK_FOUND" = xno; then
25178     # Now execute the test
25179 
25180   if test -x /usr/libexec/java_home; then
25181     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25182     BOOT_JDK_FOUND=maybe
25183     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25184 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25185   fi
25186 
25187 
25188     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25189     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25190       # Do we have a bin/java?
25191       if test ! -x "$BOOT_JDK/bin/java"; then
25192         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25193 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25194         BOOT_JDK_FOUND=no
25195       else
25196         # Do we have a bin/javac?
25197         if test ! -x "$BOOT_JDK/bin/javac"; then
25198           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25199 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25200           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25201 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25202           BOOT_JDK_FOUND=no
25203         else
25204           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25205           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25206 
25207           # Extra M4 quote needed to protect [] in grep expression.
25208           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25209           if test "x$FOUND_CORRECT_VERSION" = x; then
25210             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25212             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25213 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25214             BOOT_JDK_FOUND=no
25215           else
25216             # We're done! :-)
25217             BOOT_JDK_FOUND=yes
25218 
25219   # Only process if variable expands to non-empty
25220 
25221   if test "x$BOOT_JDK" != x; then
25222     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25223 
25224   # Input might be given as Windows format, start by converting to
25225   # unix format.
25226   path="$BOOT_JDK"
25227   new_path=`$CYGPATH -u "$path"`
25228 
25229   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25230   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25231   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25232   # "foo.exe" is OK but "foo" is an error.
25233   #
25234   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25235   # It is also a way to make sure we got the proper file name for the real test later on.
25236   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25237   if test "x$test_shortpath" = x; then
25238     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25239 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25240     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25241   fi
25242 
25243   # Call helper function which possibly converts this using DOS-style short mode.
25244   # If so, the updated path is stored in $new_path.
25245 
25246   input_path="$new_path"
25247   # Check if we need to convert this using DOS-style short mode. If the path
25248   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25249   # take no chances and rewrite it.
25250   # Note: m4 eats our [], so we need to use [ and ] instead.
25251   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25252   if test "x$has_forbidden_chars" != x; then
25253     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25254     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25255     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25256     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25257       # Going to short mode and back again did indeed matter. Since short mode is
25258       # case insensitive, let's make it lowercase to improve readability.
25259       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25260       # Now convert it back to Unix-style (cygpath)
25261       input_path=`$CYGPATH -u "$shortmode_path"`
25262       new_path="$input_path"
25263     fi
25264   fi
25265 
25266   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25267   if test "x$test_cygdrive_prefix" = x; then
25268     # As a simple fix, exclude /usr/bin since it's not a real path.
25269     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25270       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25271       # a path prefixed by /cygdrive for fixpath to work.
25272       new_path="$CYGWIN_ROOT_PATH$input_path"
25273     fi
25274   fi
25275 
25276 
25277   if test "x$path" != "x$new_path"; then
25278     BOOT_JDK="$new_path"
25279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25280 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25281   fi
25282 
25283     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25284 
25285   path="$BOOT_JDK"
25286   has_colon=`$ECHO $path | $GREP ^.:`
25287   new_path="$path"
25288   if test "x$has_colon" = x; then
25289     # Not in mixed or Windows style, start by that.
25290     new_path=`cmd //c echo $path`
25291   fi
25292 
25293 
25294   input_path="$new_path"
25295   # Check if we need to convert this using DOS-style short mode. If the path
25296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25297   # take no chances and rewrite it.
25298   # Note: m4 eats our [], so we need to use [ and ] instead.
25299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25300   if test "x$has_forbidden_chars" != x; then
25301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25302     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25303   fi
25304 
25305 
25306   windows_path="$new_path"
25307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25308     unix_path=`$CYGPATH -u "$windows_path"`
25309     new_path="$unix_path"
25310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25312     new_path="$unix_path"
25313   fi
25314 
25315   if test "x$path" != "x$new_path"; then
25316     BOOT_JDK="$new_path"
25317     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25318 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25319   fi
25320 
25321   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25322   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25323 
25324     else
25325       # We're on a unix platform. Hooray! :)
25326       path="$BOOT_JDK"
25327       has_space=`$ECHO "$path" | $GREP " "`
25328       if test "x$has_space" != x; then
25329         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25330 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25331         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25332       fi
25333 
25334       # Use eval to expand a potential ~
25335       eval path="$path"
25336       if test ! -f "$path" && test ! -d "$path"; then
25337         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25338       fi
25339 
25340       if test -d "$path"; then
25341         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25342       else
25343         dir="`$DIRNAME "$path"`"
25344         base="`$BASENAME "$path"`"
25345         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25346       fi
25347     fi
25348   fi
25349 
25350             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25351 $as_echo_n "checking for Boot JDK... " >&6; }
25352             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25353 $as_echo "$BOOT_JDK" >&6; }
25354             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25355 $as_echo_n "checking Boot JDK version... " >&6; }
25356             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25358 $as_echo "$BOOT_JDK_VERSION" >&6; }
25359           fi # end check jdk version
25360         fi # end check javac
25361       fi # end check java
25362     fi # end check boot jdk found
25363   fi
25364 
25365 
25366   if test "x$BOOT_JDK_FOUND" = xno; then
25367     # Now execute the test
25368 
25369   if test -x /usr/libexec/java_home; then
25370     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25371     BOOT_JDK_FOUND=maybe
25372     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25373 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25374   fi
25375 
25376 
25377     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25378     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25379       # Do we have a bin/java?
25380       if test ! -x "$BOOT_JDK/bin/java"; then
25381         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25382 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25383         BOOT_JDK_FOUND=no
25384       else
25385         # Do we have a bin/javac?
25386         if test ! -x "$BOOT_JDK/bin/javac"; then
25387           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25389           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25390 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25391           BOOT_JDK_FOUND=no
25392         else
25393           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25394           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25395 
25396           # Extra M4 quote needed to protect [] in grep expression.
25397           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25398           if test "x$FOUND_CORRECT_VERSION" = x; then
25399             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25401             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25402 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25403             BOOT_JDK_FOUND=no
25404           else
25405             # We're done! :-)
25406             BOOT_JDK_FOUND=yes
25407 
25408   # Only process if variable expands to non-empty
25409 
25410   if test "x$BOOT_JDK" != x; then
25411     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25412 
25413   # Input might be given as Windows format, start by converting to
25414   # unix format.
25415   path="$BOOT_JDK"
25416   new_path=`$CYGPATH -u "$path"`
25417 
25418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25421   # "foo.exe" is OK but "foo" is an error.
25422   #
25423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25424   # It is also a way to make sure we got the proper file name for the real test later on.
25425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25426   if test "x$test_shortpath" = x; then
25427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25428 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25429     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25430   fi
25431 
25432   # Call helper function which possibly converts this using DOS-style short mode.
25433   # If so, the updated path is stored in $new_path.
25434 
25435   input_path="$new_path"
25436   # Check if we need to convert this using DOS-style short mode. If the path
25437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25438   # take no chances and rewrite it.
25439   # Note: m4 eats our [], so we need to use [ and ] instead.
25440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25441   if test "x$has_forbidden_chars" != x; then
25442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25446       # Going to short mode and back again did indeed matter. Since short mode is
25447       # case insensitive, let's make it lowercase to improve readability.
25448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25449       # Now convert it back to Unix-style (cygpath)
25450       input_path=`$CYGPATH -u "$shortmode_path"`
25451       new_path="$input_path"
25452     fi
25453   fi
25454 
25455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25456   if test "x$test_cygdrive_prefix" = x; then
25457     # As a simple fix, exclude /usr/bin since it's not a real path.
25458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25460       # a path prefixed by /cygdrive for fixpath to work.
25461       new_path="$CYGWIN_ROOT_PATH$input_path"
25462     fi
25463   fi
25464 
25465 
25466   if test "x$path" != "x$new_path"; then
25467     BOOT_JDK="$new_path"
25468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25469 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25470   fi
25471 
25472     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25473 
25474   path="$BOOT_JDK"
25475   has_colon=`$ECHO $path | $GREP ^.:`
25476   new_path="$path"
25477   if test "x$has_colon" = x; then
25478     # Not in mixed or Windows style, start by that.
25479     new_path=`cmd //c echo $path`
25480   fi
25481 
25482 
25483   input_path="$new_path"
25484   # Check if we need to convert this using DOS-style short mode. If the path
25485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25486   # take no chances and rewrite it.
25487   # Note: m4 eats our [], so we need to use [ and ] instead.
25488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25489   if test "x$has_forbidden_chars" != x; then
25490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25492   fi
25493 
25494 
25495   windows_path="$new_path"
25496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25497     unix_path=`$CYGPATH -u "$windows_path"`
25498     new_path="$unix_path"
25499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25501     new_path="$unix_path"
25502   fi
25503 
25504   if test "x$path" != "x$new_path"; then
25505     BOOT_JDK="$new_path"
25506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25507 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25508   fi
25509 
25510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25512 
25513     else
25514       # We're on a unix platform. Hooray! :)
25515       path="$BOOT_JDK"
25516       has_space=`$ECHO "$path" | $GREP " "`
25517       if test "x$has_space" != x; then
25518         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25519 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25520         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25521       fi
25522 
25523       # Use eval to expand a potential ~
25524       eval path="$path"
25525       if test ! -f "$path" && test ! -d "$path"; then
25526         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25527       fi
25528 
25529       if test -d "$path"; then
25530         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25531       else
25532         dir="`$DIRNAME "$path"`"
25533         base="`$BASENAME "$path"`"
25534         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25535       fi
25536     fi
25537   fi
25538 
25539             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25540 $as_echo_n "checking for Boot JDK... " >&6; }
25541             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25542 $as_echo "$BOOT_JDK" >&6; }
25543             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25544 $as_echo_n "checking Boot JDK version... " >&6; }
25545             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25546             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25547 $as_echo "$BOOT_JDK_VERSION" >&6; }
25548           fi # end check jdk version
25549         fi # end check javac
25550       fi # end check java
25551     fi # end check boot jdk found
25552   fi
25553 
25554 
25555   if test "x$BOOT_JDK_FOUND" = xno; then
25556     # Now execute the test
25557 
25558   if test -x /usr/libexec/java_home; then
25559     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25560     BOOT_JDK_FOUND=maybe
25561     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25562 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25563   fi
25564 
25565 
25566     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25567     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25568       # Do we have a bin/java?
25569       if test ! -x "$BOOT_JDK/bin/java"; then
25570         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25571 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25572         BOOT_JDK_FOUND=no
25573       else
25574         # Do we have a bin/javac?
25575         if test ! -x "$BOOT_JDK/bin/javac"; then
25576           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25577 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25578           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25579 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25580           BOOT_JDK_FOUND=no
25581         else
25582           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25583           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25584 
25585           # Extra M4 quote needed to protect [] in grep expression.
25586           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25587           if test "x$FOUND_CORRECT_VERSION" = x; then
25588             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25589 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25590             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25591 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25592             BOOT_JDK_FOUND=no
25593           else
25594             # We're done! :-)
25595             BOOT_JDK_FOUND=yes
25596 
25597   # Only process if variable expands to non-empty
25598 
25599   if test "x$BOOT_JDK" != x; then
25600     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25601 
25602   # Input might be given as Windows format, start by converting to
25603   # unix format.
25604   path="$BOOT_JDK"
25605   new_path=`$CYGPATH -u "$path"`
25606 
25607   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25608   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25609   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25610   # "foo.exe" is OK but "foo" is an error.
25611   #
25612   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25613   # It is also a way to make sure we got the proper file name for the real test later on.
25614   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25615   if test "x$test_shortpath" = x; then
25616     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25617 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25618     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25619   fi
25620 
25621   # Call helper function which possibly converts this using DOS-style short mode.
25622   # If so, the updated path is stored in $new_path.
25623 
25624   input_path="$new_path"
25625   # Check if we need to convert this using DOS-style short mode. If the path
25626   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25627   # take no chances and rewrite it.
25628   # Note: m4 eats our [], so we need to use [ and ] instead.
25629   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25630   if test "x$has_forbidden_chars" != x; then
25631     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25632     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25633     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25634     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25635       # Going to short mode and back again did indeed matter. Since short mode is
25636       # case insensitive, let's make it lowercase to improve readability.
25637       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25638       # Now convert it back to Unix-style (cygpath)
25639       input_path=`$CYGPATH -u "$shortmode_path"`
25640       new_path="$input_path"
25641     fi
25642   fi
25643 
25644   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25645   if test "x$test_cygdrive_prefix" = x; then
25646     # As a simple fix, exclude /usr/bin since it's not a real path.
25647     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25648       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25649       # a path prefixed by /cygdrive for fixpath to work.
25650       new_path="$CYGWIN_ROOT_PATH$input_path"
25651     fi
25652   fi
25653 
25654 
25655   if test "x$path" != "x$new_path"; then
25656     BOOT_JDK="$new_path"
25657     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25658 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25659   fi
25660 
25661     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25662 
25663   path="$BOOT_JDK"
25664   has_colon=`$ECHO $path | $GREP ^.:`
25665   new_path="$path"
25666   if test "x$has_colon" = x; then
25667     # Not in mixed or Windows style, start by that.
25668     new_path=`cmd //c echo $path`
25669   fi
25670 
25671 
25672   input_path="$new_path"
25673   # Check if we need to convert this using DOS-style short mode. If the path
25674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25675   # take no chances and rewrite it.
25676   # Note: m4 eats our [], so we need to use [ and ] instead.
25677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25678   if test "x$has_forbidden_chars" != x; then
25679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25680     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25681   fi
25682 
25683 
25684   windows_path="$new_path"
25685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25686     unix_path=`$CYGPATH -u "$windows_path"`
25687     new_path="$unix_path"
25688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25690     new_path="$unix_path"
25691   fi
25692 
25693   if test "x$path" != "x$new_path"; then
25694     BOOT_JDK="$new_path"
25695     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25696 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25697   fi
25698 
25699   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25700   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25701 
25702     else
25703       # We're on a unix platform. Hooray! :)
25704       path="$BOOT_JDK"
25705       has_space=`$ECHO "$path" | $GREP " "`
25706       if test "x$has_space" != x; then
25707         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25708 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25709         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25710       fi
25711 
25712       # Use eval to expand a potential ~
25713       eval path="$path"
25714       if test ! -f "$path" && test ! -d "$path"; then
25715         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25716       fi
25717 
25718       if test -d "$path"; then
25719         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25720       else
25721         dir="`$DIRNAME "$path"`"
25722         base="`$BASENAME "$path"`"
25723         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25724       fi
25725     fi
25726   fi
25727 
25728             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25729 $as_echo_n "checking for Boot JDK... " >&6; }
25730             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25731 $as_echo "$BOOT_JDK" >&6; }
25732             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25733 $as_echo_n "checking Boot JDK version... " >&6; }
25734             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25735             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25736 $as_echo "$BOOT_JDK_VERSION" >&6; }
25737           fi # end check jdk version
25738         fi # end check javac
25739       fi # end check java
25740     fi # end check boot jdk found
25741   fi
25742 
25743   fi
25744 
25745 
25746     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25747     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25748       # Do we have a bin/java?
25749       if test ! -x "$BOOT_JDK/bin/java"; then
25750         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25751 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25752         BOOT_JDK_FOUND=no
25753       else
25754         # Do we have a bin/javac?
25755         if test ! -x "$BOOT_JDK/bin/javac"; then
25756           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25757 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25758           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25759 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25760           BOOT_JDK_FOUND=no
25761         else
25762           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25763           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25764 
25765           # Extra M4 quote needed to protect [] in grep expression.
25766           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25767           if test "x$FOUND_CORRECT_VERSION" = x; then
25768             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25769 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25770             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25771 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25772             BOOT_JDK_FOUND=no
25773           else
25774             # We're done! :-)
25775             BOOT_JDK_FOUND=yes
25776 
25777   # Only process if variable expands to non-empty
25778 
25779   if test "x$BOOT_JDK" != x; then
25780     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25781 
25782   # Input might be given as Windows format, start by converting to
25783   # unix format.
25784   path="$BOOT_JDK"
25785   new_path=`$CYGPATH -u "$path"`
25786 
25787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25790   # "foo.exe" is OK but "foo" is an error.
25791   #
25792   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25793   # It is also a way to make sure we got the proper file name for the real test later on.
25794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25795   if test "x$test_shortpath" = x; then
25796     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25797 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25798     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25799   fi
25800 
25801   # Call helper function which possibly converts this using DOS-style short mode.
25802   # If so, the updated path is stored in $new_path.
25803 
25804   input_path="$new_path"
25805   # Check if we need to convert this using DOS-style short mode. If the path
25806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25807   # take no chances and rewrite it.
25808   # Note: m4 eats our [], so we need to use [ and ] instead.
25809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25810   if test "x$has_forbidden_chars" != x; then
25811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25815       # Going to short mode and back again did indeed matter. Since short mode is
25816       # case insensitive, let's make it lowercase to improve readability.
25817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25818       # Now convert it back to Unix-style (cygpath)
25819       input_path=`$CYGPATH -u "$shortmode_path"`
25820       new_path="$input_path"
25821     fi
25822   fi
25823 
25824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25825   if test "x$test_cygdrive_prefix" = x; then
25826     # As a simple fix, exclude /usr/bin since it's not a real path.
25827     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25829       # a path prefixed by /cygdrive for fixpath to work.
25830       new_path="$CYGWIN_ROOT_PATH$input_path"
25831     fi
25832   fi
25833 
25834 
25835   if test "x$path" != "x$new_path"; then
25836     BOOT_JDK="$new_path"
25837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25838 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25839   fi
25840 
25841     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25842 
25843   path="$BOOT_JDK"
25844   has_colon=`$ECHO $path | $GREP ^.:`
25845   new_path="$path"
25846   if test "x$has_colon" = x; then
25847     # Not in mixed or Windows style, start by that.
25848     new_path=`cmd //c echo $path`
25849   fi
25850 
25851 
25852   input_path="$new_path"
25853   # Check if we need to convert this using DOS-style short mode. If the path
25854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25855   # take no chances and rewrite it.
25856   # Note: m4 eats our [], so we need to use [ and ] instead.
25857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25858   if test "x$has_forbidden_chars" != x; then
25859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25861   fi
25862 
25863 
25864   windows_path="$new_path"
25865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25866     unix_path=`$CYGPATH -u "$windows_path"`
25867     new_path="$unix_path"
25868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25870     new_path="$unix_path"
25871   fi
25872 
25873   if test "x$path" != "x$new_path"; then
25874     BOOT_JDK="$new_path"
25875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25876 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25877   fi
25878 
25879   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25880   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25881 
25882     else
25883       # We're on a unix platform. Hooray! :)
25884       path="$BOOT_JDK"
25885       has_space=`$ECHO "$path" | $GREP " "`
25886       if test "x$has_space" != x; then
25887         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25888 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25889         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25890       fi
25891 
25892       # Use eval to expand a potential ~
25893       eval path="$path"
25894       if test ! -f "$path" && test ! -d "$path"; then
25895         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25896       fi
25897 
25898       if test -d "$path"; then
25899         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25900       else
25901         dir="`$DIRNAME "$path"`"
25902         base="`$BASENAME "$path"`"
25903         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25904       fi
25905     fi
25906   fi
25907 
25908             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25909 $as_echo_n "checking for Boot JDK... " >&6; }
25910             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25911 $as_echo "$BOOT_JDK" >&6; }
25912             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25913 $as_echo_n "checking Boot JDK version... " >&6; }
25914             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25915             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25916 $as_echo "$BOOT_JDK_VERSION" >&6; }
25917           fi # end check jdk version
25918         fi # end check javac
25919       fi # end check java
25920     fi # end check boot jdk found
25921   fi
25922 
25923 
25924   # Test: Is $JAVA_HOME set?
25925 
25926   if test "x$BOOT_JDK_FOUND" = xno; then
25927     # Now execute the test
25928 
25929   if test "x$JAVA_HOME" != x; then
25930     JAVA_HOME_PROCESSED="$JAVA_HOME"
25931 
25932   # Only process if variable expands to non-empty
25933 
25934   if test "x$JAVA_HOME_PROCESSED" != x; then
25935     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25936 
25937   # Input might be given as Windows format, start by converting to
25938   # unix format.
25939   path="$JAVA_HOME_PROCESSED"
25940   new_path=`$CYGPATH -u "$path"`
25941 
25942   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25943   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25944   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25945   # "foo.exe" is OK but "foo" is an error.
25946   #
25947   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25948   # It is also a way to make sure we got the proper file name for the real test later on.
25949   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25950   if test "x$test_shortpath" = x; then
25951     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25952 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25953     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25954   fi
25955 
25956   # Call helper function which possibly converts this using DOS-style short mode.
25957   # If so, the updated path is stored in $new_path.
25958 
25959   input_path="$new_path"
25960   # Check if we need to convert this using DOS-style short mode. If the path
25961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25962   # take no chances and rewrite it.
25963   # Note: m4 eats our [], so we need to use [ and ] instead.
25964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25965   if test "x$has_forbidden_chars" != x; then
25966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25967     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25968     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25969     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25970       # Going to short mode and back again did indeed matter. Since short mode is
25971       # case insensitive, let's make it lowercase to improve readability.
25972       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25973       # Now convert it back to Unix-style (cygpath)
25974       input_path=`$CYGPATH -u "$shortmode_path"`
25975       new_path="$input_path"
25976     fi
25977   fi
25978 
25979   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25980   if test "x$test_cygdrive_prefix" = x; then
25981     # As a simple fix, exclude /usr/bin since it's not a real path.
25982     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25983       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25984       # a path prefixed by /cygdrive for fixpath to work.
25985       new_path="$CYGWIN_ROOT_PATH$input_path"
25986     fi
25987   fi
25988 
25989 
25990   if test "x$path" != "x$new_path"; then
25991     JAVA_HOME_PROCESSED="$new_path"
25992     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25993 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25994   fi
25995 
25996     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25997 
25998   path="$JAVA_HOME_PROCESSED"
25999   has_colon=`$ECHO $path | $GREP ^.:`
26000   new_path="$path"
26001   if test "x$has_colon" = x; then
26002     # Not in mixed or Windows style, start by that.
26003     new_path=`cmd //c echo $path`
26004   fi
26005 
26006 
26007   input_path="$new_path"
26008   # Check if we need to convert this using DOS-style short mode. If the path
26009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26010   # take no chances and rewrite it.
26011   # Note: m4 eats our [], so we need to use [ and ] instead.
26012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26013   if test "x$has_forbidden_chars" != x; then
26014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26016   fi
26017 
26018 
26019   windows_path="$new_path"
26020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26021     unix_path=`$CYGPATH -u "$windows_path"`
26022     new_path="$unix_path"
26023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26025     new_path="$unix_path"
26026   fi
26027 
26028   if test "x$path" != "x$new_path"; then
26029     JAVA_HOME_PROCESSED="$new_path"
26030     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26031 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26032   fi
26033 
26034   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26035   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26036 
26037     else
26038       # We're on a unix platform. Hooray! :)
26039       path="$JAVA_HOME_PROCESSED"
26040       has_space=`$ECHO "$path" | $GREP " "`
26041       if test "x$has_space" != x; then
26042         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26043 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26044         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26045       fi
26046 
26047       # Use eval to expand a potential ~
26048       eval path="$path"
26049       if test ! -f "$path" && test ! -d "$path"; then
26050         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26051       fi
26052 
26053       if test -d "$path"; then
26054         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26055       else
26056         dir="`$DIRNAME "$path"`"
26057         base="`$BASENAME "$path"`"
26058         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26059       fi
26060     fi
26061   fi
26062 
26063     if test ! -d "$JAVA_HOME_PROCESSED"; then
26064       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26065 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26066     else
26067       # Aha, the user has set a JAVA_HOME
26068       # let us use that as the Boot JDK.
26069       BOOT_JDK="$JAVA_HOME_PROCESSED"
26070       BOOT_JDK_FOUND=maybe
26071       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26072 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26073     fi
26074   fi
26075 
26076 
26077     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26078     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26079       # Do we have a bin/java?
26080       if test ! -x "$BOOT_JDK/bin/java"; then
26081         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26082 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26083         BOOT_JDK_FOUND=no
26084       else
26085         # Do we have a bin/javac?
26086         if test ! -x "$BOOT_JDK/bin/javac"; then
26087           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26088 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26089           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26090 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26091           BOOT_JDK_FOUND=no
26092         else
26093           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26094           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26095 
26096           # Extra M4 quote needed to protect [] in grep expression.
26097           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26098           if test "x$FOUND_CORRECT_VERSION" = x; then
26099             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26101             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26102 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26103             BOOT_JDK_FOUND=no
26104           else
26105             # We're done! :-)
26106             BOOT_JDK_FOUND=yes
26107 
26108   # Only process if variable expands to non-empty
26109 
26110   if test "x$BOOT_JDK" != x; then
26111     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26112 
26113   # Input might be given as Windows format, start by converting to
26114   # unix format.
26115   path="$BOOT_JDK"
26116   new_path=`$CYGPATH -u "$path"`
26117 
26118   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26119   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26120   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26121   # "foo.exe" is OK but "foo" is an error.
26122   #
26123   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26124   # It is also a way to make sure we got the proper file name for the real test later on.
26125   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26126   if test "x$test_shortpath" = x; then
26127     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26128 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26129     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26130   fi
26131 
26132   # Call helper function which possibly converts this using DOS-style short mode.
26133   # If so, the updated path is stored in $new_path.
26134 
26135   input_path="$new_path"
26136   # Check if we need to convert this using DOS-style short mode. If the path
26137   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26138   # take no chances and rewrite it.
26139   # Note: m4 eats our [], so we need to use [ and ] instead.
26140   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26141   if test "x$has_forbidden_chars" != x; then
26142     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26143     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26144     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26145     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26146       # Going to short mode and back again did indeed matter. Since short mode is
26147       # case insensitive, let's make it lowercase to improve readability.
26148       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26149       # Now convert it back to Unix-style (cygpath)
26150       input_path=`$CYGPATH -u "$shortmode_path"`
26151       new_path="$input_path"
26152     fi
26153   fi
26154 
26155   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26156   if test "x$test_cygdrive_prefix" = x; then
26157     # As a simple fix, exclude /usr/bin since it's not a real path.
26158     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26159       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26160       # a path prefixed by /cygdrive for fixpath to work.
26161       new_path="$CYGWIN_ROOT_PATH$input_path"
26162     fi
26163   fi
26164 
26165 
26166   if test "x$path" != "x$new_path"; then
26167     BOOT_JDK="$new_path"
26168     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26169 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26170   fi
26171 
26172     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26173 
26174   path="$BOOT_JDK"
26175   has_colon=`$ECHO $path | $GREP ^.:`
26176   new_path="$path"
26177   if test "x$has_colon" = x; then
26178     # Not in mixed or Windows style, start by that.
26179     new_path=`cmd //c echo $path`
26180   fi
26181 
26182 
26183   input_path="$new_path"
26184   # Check if we need to convert this using DOS-style short mode. If the path
26185   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26186   # take no chances and rewrite it.
26187   # Note: m4 eats our [], so we need to use [ and ] instead.
26188   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26189   if test "x$has_forbidden_chars" != x; then
26190     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26191     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26192   fi
26193 
26194 
26195   windows_path="$new_path"
26196   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197     unix_path=`$CYGPATH -u "$windows_path"`
26198     new_path="$unix_path"
26199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26200     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26201     new_path="$unix_path"
26202   fi
26203 
26204   if test "x$path" != "x$new_path"; then
26205     BOOT_JDK="$new_path"
26206     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26207 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26208   fi
26209 
26210   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26211   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26212 
26213     else
26214       # We're on a unix platform. Hooray! :)
26215       path="$BOOT_JDK"
26216       has_space=`$ECHO "$path" | $GREP " "`
26217       if test "x$has_space" != x; then
26218         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26219 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26220         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26221       fi
26222 
26223       # Use eval to expand a potential ~
26224       eval path="$path"
26225       if test ! -f "$path" && test ! -d "$path"; then
26226         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26227       fi
26228 
26229       if test -d "$path"; then
26230         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26231       else
26232         dir="`$DIRNAME "$path"`"
26233         base="`$BASENAME "$path"`"
26234         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26235       fi
26236     fi
26237   fi
26238 
26239             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26240 $as_echo_n "checking for Boot JDK... " >&6; }
26241             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26242 $as_echo "$BOOT_JDK" >&6; }
26243             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26244 $as_echo_n "checking Boot JDK version... " >&6; }
26245             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26246             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26247 $as_echo "$BOOT_JDK_VERSION" >&6; }
26248           fi # end check jdk version
26249         fi # end check javac
26250       fi # end check java
26251     fi # end check boot jdk found
26252   fi
26253 
26254 
26255   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26256 
26257   if test "x$BOOT_JDK_FOUND" = xno; then
26258     # Now execute the test
26259 
26260   # Extract the first word of "javac", so it can be a program name with args.
26261 set dummy javac; ac_word=$2
26262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26263 $as_echo_n "checking for $ac_word... " >&6; }
26264 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26265   $as_echo_n "(cached) " >&6
26266 else
26267   case $JAVAC_CHECK in
26268   [\\/]* | ?:[\\/]*)
26269   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26270   ;;
26271   *)
26272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26273 for as_dir in $PATH
26274 do
26275   IFS=$as_save_IFS
26276   test -z "$as_dir" && as_dir=.
26277     for ac_exec_ext in '' $ac_executable_extensions; do
26278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26279     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26281     break 2
26282   fi
26283 done
26284   done
26285 IFS=$as_save_IFS
26286 
26287   ;;
26288 esac
26289 fi
26290 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26291 if test -n "$JAVAC_CHECK"; then
26292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26293 $as_echo "$JAVAC_CHECK" >&6; }
26294 else
26295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26296 $as_echo "no" >&6; }
26297 fi
26298 
26299 
26300   # Extract the first word of "java", so it can be a program name with args.
26301 set dummy java; ac_word=$2
26302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26303 $as_echo_n "checking for $ac_word... " >&6; }
26304 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26305   $as_echo_n "(cached) " >&6
26306 else
26307   case $JAVA_CHECK in
26308   [\\/]* | ?:[\\/]*)
26309   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26310   ;;
26311   *)
26312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26313 for as_dir in $PATH
26314 do
26315   IFS=$as_save_IFS
26316   test -z "$as_dir" && as_dir=.
26317     for ac_exec_ext in '' $ac_executable_extensions; do
26318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26319     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26321     break 2
26322   fi
26323 done
26324   done
26325 IFS=$as_save_IFS
26326 
26327   ;;
26328 esac
26329 fi
26330 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26331 if test -n "$JAVA_CHECK"; then
26332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26333 $as_echo "$JAVA_CHECK" >&6; }
26334 else
26335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26336 $as_echo "no" >&6; }
26337 fi
26338 
26339 
26340   BINARY="$JAVAC_CHECK"
26341   if test "x$JAVAC_CHECK" = x; then
26342     BINARY="$JAVA_CHECK"
26343   fi
26344   if test "x$BINARY" != x; then
26345     # So there is a java(c) binary, it might be part of a JDK.
26346     # Lets find the JDK/JRE directory by following symbolic links.
26347     # Linux/GNU systems often have links from /usr/bin/java to
26348     # /etc/alternatives/java to the real JDK binary.
26349 
26350   if test "x$OPENJDK_BUILD_OS" != xwindows; then
26351     # Follow a chain of symbolic links. Use readlink
26352     # where it exists, else fall back to horribly
26353     # complicated shell code.
26354     if test "x$READLINK_TESTED" != yes; then
26355       # On MacOSX there is a readlink tool with a different
26356       # purpose than the GNU readlink tool. Check the found readlink.
26357       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26358       if test "x$ISGNU" = x; then
26359         # A readlink that we do not know how to use.
26360         # Are there other non-GNU readlinks out there?
26361         READLINK_TESTED=yes
26362         READLINK=
26363       fi
26364     fi
26365 
26366     if test "x$READLINK" != x; then
26367       BINARY=`$READLINK -f $BINARY`
26368     else
26369       # Save the current directory for restoring afterwards
26370       STARTDIR=$PWD
26371       COUNTER=0
26372       sym_link_dir=`$DIRNAME $BINARY`
26373       sym_link_file=`$BASENAME $BINARY`
26374       cd $sym_link_dir
26375       # Use -P flag to resolve symlinks in directories.
26376       cd `$THEPWDCMD -P`
26377       sym_link_dir=`$THEPWDCMD -P`
26378       # Resolve file symlinks
26379       while test $COUNTER -lt 20; do
26380         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26381         if test "x$ISLINK" == x; then
26382           # This is not a symbolic link! We are done!
26383           break
26384         fi
26385         # Again resolve directory symlinks since the target of the just found
26386         # link could be in a different directory
26387         cd `$DIRNAME $ISLINK`
26388         sym_link_dir=`$THEPWDCMD -P`
26389         sym_link_file=`$BASENAME $ISLINK`
26390         let COUNTER=COUNTER+1
26391       done
26392       cd $STARTDIR
26393       BINARY=$sym_link_dir/$sym_link_file
26394     fi
26395   fi
26396 
26397     BOOT_JDK=`dirname "$BINARY"`
26398     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26399     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26400       # Looks like we found ourselves an JDK
26401       BOOT_JDK_FOUND=maybe
26402       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26403 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26404     fi
26405   fi
26406 
26407 
26408     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26409     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26410       # Do we have a bin/java?
26411       if test ! -x "$BOOT_JDK/bin/java"; then
26412         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26413 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26414         BOOT_JDK_FOUND=no
26415       else
26416         # Do we have a bin/javac?
26417         if test ! -x "$BOOT_JDK/bin/javac"; then
26418           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26419 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26420           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26421 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26422           BOOT_JDK_FOUND=no
26423         else
26424           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26425           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26426 
26427           # Extra M4 quote needed to protect [] in grep expression.
26428           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26429           if test "x$FOUND_CORRECT_VERSION" = x; then
26430             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26431 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26432             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26433 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26434             BOOT_JDK_FOUND=no
26435           else
26436             # We're done! :-)
26437             BOOT_JDK_FOUND=yes
26438 
26439   # Only process if variable expands to non-empty
26440 
26441   if test "x$BOOT_JDK" != x; then
26442     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26443 
26444   # Input might be given as Windows format, start by converting to
26445   # unix format.
26446   path="$BOOT_JDK"
26447   new_path=`$CYGPATH -u "$path"`
26448 
26449   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26450   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26451   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26452   # "foo.exe" is OK but "foo" is an error.
26453   #
26454   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26455   # It is also a way to make sure we got the proper file name for the real test later on.
26456   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26457   if test "x$test_shortpath" = x; then
26458     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26459 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26460     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26461   fi
26462 
26463   # Call helper function which possibly converts this using DOS-style short mode.
26464   # If so, the updated path is stored in $new_path.
26465 
26466   input_path="$new_path"
26467   # Check if we need to convert this using DOS-style short mode. If the path
26468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26469   # take no chances and rewrite it.
26470   # Note: m4 eats our [], so we need to use [ and ] instead.
26471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26472   if test "x$has_forbidden_chars" != x; then
26473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26474     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26475     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26476     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26477       # Going to short mode and back again did indeed matter. Since short mode is
26478       # case insensitive, let's make it lowercase to improve readability.
26479       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26480       # Now convert it back to Unix-style (cygpath)
26481       input_path=`$CYGPATH -u "$shortmode_path"`
26482       new_path="$input_path"
26483     fi
26484   fi
26485 
26486   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26487   if test "x$test_cygdrive_prefix" = x; then
26488     # As a simple fix, exclude /usr/bin since it's not a real path.
26489     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26490       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26491       # a path prefixed by /cygdrive for fixpath to work.
26492       new_path="$CYGWIN_ROOT_PATH$input_path"
26493     fi
26494   fi
26495 
26496 
26497   if test "x$path" != "x$new_path"; then
26498     BOOT_JDK="$new_path"
26499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26500 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26501   fi
26502 
26503     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26504 
26505   path="$BOOT_JDK"
26506   has_colon=`$ECHO $path | $GREP ^.:`
26507   new_path="$path"
26508   if test "x$has_colon" = x; then
26509     # Not in mixed or Windows style, start by that.
26510     new_path=`cmd //c echo $path`
26511   fi
26512 
26513 
26514   input_path="$new_path"
26515   # Check if we need to convert this using DOS-style short mode. If the path
26516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26517   # take no chances and rewrite it.
26518   # Note: m4 eats our [], so we need to use [ and ] instead.
26519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26520   if test "x$has_forbidden_chars" != x; then
26521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26522     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26523   fi
26524 
26525 
26526   windows_path="$new_path"
26527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26528     unix_path=`$CYGPATH -u "$windows_path"`
26529     new_path="$unix_path"
26530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26532     new_path="$unix_path"
26533   fi
26534 
26535   if test "x$path" != "x$new_path"; then
26536     BOOT_JDK="$new_path"
26537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26538 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26539   fi
26540 
26541   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26542   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26543 
26544     else
26545       # We're on a unix platform. Hooray! :)
26546       path="$BOOT_JDK"
26547       has_space=`$ECHO "$path" | $GREP " "`
26548       if test "x$has_space" != x; then
26549         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26550 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26551         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26552       fi
26553 
26554       # Use eval to expand a potential ~
26555       eval path="$path"
26556       if test ! -f "$path" && test ! -d "$path"; then
26557         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26558       fi
26559 
26560       if test -d "$path"; then
26561         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26562       else
26563         dir="`$DIRNAME "$path"`"
26564         base="`$BASENAME "$path"`"
26565         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26566       fi
26567     fi
26568   fi
26569 
26570             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26571 $as_echo_n "checking for Boot JDK... " >&6; }
26572             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26573 $as_echo "$BOOT_JDK" >&6; }
26574             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26575 $as_echo_n "checking Boot JDK version... " >&6; }
26576             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26578 $as_echo "$BOOT_JDK_VERSION" >&6; }
26579           fi # end check jdk version
26580         fi # end check javac
26581       fi # end check java
26582     fi # end check boot jdk found
26583   fi
26584 
26585 
26586   # Test: Is there a JDK installed in default, well-known locations?
26587 
26588   if test "x$BOOT_JDK_FOUND" = xno; then
26589     # Now execute the test
26590 
26591   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26592 
26593   if test "x$BOOT_JDK_FOUND" = xno; then
26594     # Now execute the test
26595 
26596   if test "x$ProgramW6432" != x; then
26597     VIRTUAL_DIR="$ProgramW6432/Java"
26598 
26599   windows_path="$VIRTUAL_DIR"
26600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26601     unix_path=`$CYGPATH -u "$windows_path"`
26602     VIRTUAL_DIR="$unix_path"
26603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26605     VIRTUAL_DIR="$unix_path"
26606   fi
26607 
26608 
26609   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26610   BOOT_JDK_SUFFIX=""
26611   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26612   if test "x$ALL_JDKS_FOUND" != x; then
26613     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26614 
26615   if test "x$BOOT_JDK_FOUND" = xno; then
26616     # Now execute the test
26617 
26618         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26619         if test -d "$BOOT_JDK"; then
26620           BOOT_JDK_FOUND=maybe
26621           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26622 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26623         fi
26624 
26625 
26626     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26627     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26628       # Do we have a bin/java?
26629       if test ! -x "$BOOT_JDK/bin/java"; then
26630         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26631 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26632         BOOT_JDK_FOUND=no
26633       else
26634         # Do we have a bin/javac?
26635         if test ! -x "$BOOT_JDK/bin/javac"; then
26636           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26637 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26638           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26639 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26640           BOOT_JDK_FOUND=no
26641         else
26642           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26643           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26644 
26645           # Extra M4 quote needed to protect [] in grep expression.
26646           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26647           if test "x$FOUND_CORRECT_VERSION" = x; then
26648             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26649 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26650             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26651 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26652             BOOT_JDK_FOUND=no
26653           else
26654             # We're done! :-)
26655             BOOT_JDK_FOUND=yes
26656 
26657   # Only process if variable expands to non-empty
26658 
26659   if test "x$BOOT_JDK" != x; then
26660     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26661 
26662   # Input might be given as Windows format, start by converting to
26663   # unix format.
26664   path="$BOOT_JDK"
26665   new_path=`$CYGPATH -u "$path"`
26666 
26667   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26668   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26669   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26670   # "foo.exe" is OK but "foo" is an error.
26671   #
26672   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26673   # It is also a way to make sure we got the proper file name for the real test later on.
26674   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26675   if test "x$test_shortpath" = x; then
26676     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26677 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26678     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26679   fi
26680 
26681   # Call helper function which possibly converts this using DOS-style short mode.
26682   # If so, the updated path is stored in $new_path.
26683 
26684   input_path="$new_path"
26685   # Check if we need to convert this using DOS-style short mode. If the path
26686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26687   # take no chances and rewrite it.
26688   # Note: m4 eats our [], so we need to use [ and ] instead.
26689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26690   if test "x$has_forbidden_chars" != x; then
26691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26692     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26693     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26694     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26695       # Going to short mode and back again did indeed matter. Since short mode is
26696       # case insensitive, let's make it lowercase to improve readability.
26697       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26698       # Now convert it back to Unix-style (cygpath)
26699       input_path=`$CYGPATH -u "$shortmode_path"`
26700       new_path="$input_path"
26701     fi
26702   fi
26703 
26704   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26705   if test "x$test_cygdrive_prefix" = x; then
26706     # As a simple fix, exclude /usr/bin since it's not a real path.
26707     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26708       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26709       # a path prefixed by /cygdrive for fixpath to work.
26710       new_path="$CYGWIN_ROOT_PATH$input_path"
26711     fi
26712   fi
26713 
26714 
26715   if test "x$path" != "x$new_path"; then
26716     BOOT_JDK="$new_path"
26717     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26718 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26719   fi
26720 
26721     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26722 
26723   path="$BOOT_JDK"
26724   has_colon=`$ECHO $path | $GREP ^.:`
26725   new_path="$path"
26726   if test "x$has_colon" = x; then
26727     # Not in mixed or Windows style, start by that.
26728     new_path=`cmd //c echo $path`
26729   fi
26730 
26731 
26732   input_path="$new_path"
26733   # Check if we need to convert this using DOS-style short mode. If the path
26734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26735   # take no chances and rewrite it.
26736   # Note: m4 eats our [], so we need to use [ and ] instead.
26737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26738   if test "x$has_forbidden_chars" != x; then
26739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26740     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26741   fi
26742 
26743 
26744   windows_path="$new_path"
26745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26746     unix_path=`$CYGPATH -u "$windows_path"`
26747     new_path="$unix_path"
26748   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26749     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26750     new_path="$unix_path"
26751   fi
26752 
26753   if test "x$path" != "x$new_path"; then
26754     BOOT_JDK="$new_path"
26755     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26756 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26757   fi
26758 
26759   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26760   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26761 
26762     else
26763       # We're on a unix platform. Hooray! :)
26764       path="$BOOT_JDK"
26765       has_space=`$ECHO "$path" | $GREP " "`
26766       if test "x$has_space" != x; then
26767         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26768 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26769         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26770       fi
26771 
26772       # Use eval to expand a potential ~
26773       eval path="$path"
26774       if test ! -f "$path" && test ! -d "$path"; then
26775         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26776       fi
26777 
26778       if test -d "$path"; then
26779         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26780       else
26781         dir="`$DIRNAME "$path"`"
26782         base="`$BASENAME "$path"`"
26783         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26784       fi
26785     fi
26786   fi
26787 
26788             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26789 $as_echo_n "checking for Boot JDK... " >&6; }
26790             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26791 $as_echo "$BOOT_JDK" >&6; }
26792             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26793 $as_echo_n "checking Boot JDK version... " >&6; }
26794             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26795             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26796 $as_echo "$BOOT_JDK_VERSION" >&6; }
26797           fi # end check jdk version
26798         fi # end check javac
26799       fi # end check java
26800     fi # end check boot jdk found
26801   fi
26802 
26803     done
26804   fi
26805 
26806   fi
26807 
26808 
26809     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26810     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26811       # Do we have a bin/java?
26812       if test ! -x "$BOOT_JDK/bin/java"; then
26813         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26814 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26815         BOOT_JDK_FOUND=no
26816       else
26817         # Do we have a bin/javac?
26818         if test ! -x "$BOOT_JDK/bin/javac"; then
26819           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26820 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26821           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26822 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26823           BOOT_JDK_FOUND=no
26824         else
26825           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26826           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26827 
26828           # Extra M4 quote needed to protect [] in grep expression.
26829           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26830           if test "x$FOUND_CORRECT_VERSION" = x; then
26831             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26832 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26833             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26834 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26835             BOOT_JDK_FOUND=no
26836           else
26837             # We're done! :-)
26838             BOOT_JDK_FOUND=yes
26839 
26840   # Only process if variable expands to non-empty
26841 
26842   if test "x$BOOT_JDK" != x; then
26843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26844 
26845   # Input might be given as Windows format, start by converting to
26846   # unix format.
26847   path="$BOOT_JDK"
26848   new_path=`$CYGPATH -u "$path"`
26849 
26850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26853   # "foo.exe" is OK but "foo" is an error.
26854   #
26855   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26856   # It is also a way to make sure we got the proper file name for the real test later on.
26857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26858   if test "x$test_shortpath" = x; then
26859     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26860 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26861     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26862   fi
26863 
26864   # Call helper function which possibly converts this using DOS-style short mode.
26865   # If so, the updated path is stored in $new_path.
26866 
26867   input_path="$new_path"
26868   # Check if we need to convert this using DOS-style short mode. If the path
26869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26870   # take no chances and rewrite it.
26871   # Note: m4 eats our [], so we need to use [ and ] instead.
26872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26873   if test "x$has_forbidden_chars" != x; then
26874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26878       # Going to short mode and back again did indeed matter. Since short mode is
26879       # case insensitive, let's make it lowercase to improve readability.
26880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26881       # Now convert it back to Unix-style (cygpath)
26882       input_path=`$CYGPATH -u "$shortmode_path"`
26883       new_path="$input_path"
26884     fi
26885   fi
26886 
26887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26888   if test "x$test_cygdrive_prefix" = x; then
26889     # As a simple fix, exclude /usr/bin since it's not a real path.
26890     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26892       # a path prefixed by /cygdrive for fixpath to work.
26893       new_path="$CYGWIN_ROOT_PATH$input_path"
26894     fi
26895   fi
26896 
26897 
26898   if test "x$path" != "x$new_path"; then
26899     BOOT_JDK="$new_path"
26900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26901 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26902   fi
26903 
26904     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26905 
26906   path="$BOOT_JDK"
26907   has_colon=`$ECHO $path | $GREP ^.:`
26908   new_path="$path"
26909   if test "x$has_colon" = x; then
26910     # Not in mixed or Windows style, start by that.
26911     new_path=`cmd //c echo $path`
26912   fi
26913 
26914 
26915   input_path="$new_path"
26916   # Check if we need to convert this using DOS-style short mode. If the path
26917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26918   # take no chances and rewrite it.
26919   # Note: m4 eats our [], so we need to use [ and ] instead.
26920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26921   if test "x$has_forbidden_chars" != x; then
26922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26924   fi
26925 
26926 
26927   windows_path="$new_path"
26928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26929     unix_path=`$CYGPATH -u "$windows_path"`
26930     new_path="$unix_path"
26931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26933     new_path="$unix_path"
26934   fi
26935 
26936   if test "x$path" != "x$new_path"; then
26937     BOOT_JDK="$new_path"
26938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26939 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26940   fi
26941 
26942   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26943   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26944 
26945     else
26946       # We're on a unix platform. Hooray! :)
26947       path="$BOOT_JDK"
26948       has_space=`$ECHO "$path" | $GREP " "`
26949       if test "x$has_space" != x; then
26950         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26951 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26952         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26953       fi
26954 
26955       # Use eval to expand a potential ~
26956       eval path="$path"
26957       if test ! -f "$path" && test ! -d "$path"; then
26958         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26959       fi
26960 
26961       if test -d "$path"; then
26962         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26963       else
26964         dir="`$DIRNAME "$path"`"
26965         base="`$BASENAME "$path"`"
26966         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26967       fi
26968     fi
26969   fi
26970 
26971             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26972 $as_echo_n "checking for Boot JDK... " >&6; }
26973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26974 $as_echo "$BOOT_JDK" >&6; }
26975             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26976 $as_echo_n "checking Boot JDK version... " >&6; }
26977             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26978             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26979 $as_echo "$BOOT_JDK_VERSION" >&6; }
26980           fi # end check jdk version
26981         fi # end check javac
26982       fi # end check java
26983     fi # end check boot jdk found
26984   fi
26985 
26986 
26987   if test "x$BOOT_JDK_FOUND" = xno; then
26988     # Now execute the test
26989 
26990   if test "x$PROGRAMW6432" != x; then
26991     VIRTUAL_DIR="$PROGRAMW6432/Java"
26992 
26993   windows_path="$VIRTUAL_DIR"
26994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26995     unix_path=`$CYGPATH -u "$windows_path"`
26996     VIRTUAL_DIR="$unix_path"
26997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26999     VIRTUAL_DIR="$unix_path"
27000   fi
27001 
27002 
27003   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27004   BOOT_JDK_SUFFIX=""
27005   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27006   if test "x$ALL_JDKS_FOUND" != x; then
27007     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27008 
27009   if test "x$BOOT_JDK_FOUND" = xno; then
27010     # Now execute the test
27011 
27012         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27013         if test -d "$BOOT_JDK"; then
27014           BOOT_JDK_FOUND=maybe
27015           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27016 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27017         fi
27018 
27019 
27020     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27021     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27022       # Do we have a bin/java?
27023       if test ! -x "$BOOT_JDK/bin/java"; then
27024         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27026         BOOT_JDK_FOUND=no
27027       else
27028         # Do we have a bin/javac?
27029         if test ! -x "$BOOT_JDK/bin/javac"; then
27030           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27031 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27032           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27033 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27034           BOOT_JDK_FOUND=no
27035         else
27036           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27037           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27038 
27039           # Extra M4 quote needed to protect [] in grep expression.
27040           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27041           if test "x$FOUND_CORRECT_VERSION" = x; then
27042             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27043 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27044             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27045 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27046             BOOT_JDK_FOUND=no
27047           else
27048             # We're done! :-)
27049             BOOT_JDK_FOUND=yes
27050 
27051   # Only process if variable expands to non-empty
27052 
27053   if test "x$BOOT_JDK" != x; then
27054     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27055 
27056   # Input might be given as Windows format, start by converting to
27057   # unix format.
27058   path="$BOOT_JDK"
27059   new_path=`$CYGPATH -u "$path"`
27060 
27061   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27062   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27063   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27064   # "foo.exe" is OK but "foo" is an error.
27065   #
27066   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27067   # It is also a way to make sure we got the proper file name for the real test later on.
27068   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27069   if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27073   fi
27074 
27075   # Call helper function which possibly converts this using DOS-style short mode.
27076   # If so, the updated path is stored in $new_path.
27077 
27078   input_path="$new_path"
27079   # Check if we need to convert this using DOS-style short mode. If the path
27080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27081   # take no chances and rewrite it.
27082   # Note: m4 eats our [], so we need to use [ and ] instead.
27083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27084   if test "x$has_forbidden_chars" != x; then
27085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27086     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27087     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27088     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27089       # Going to short mode and back again did indeed matter. Since short mode is
27090       # case insensitive, let's make it lowercase to improve readability.
27091       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27092       # Now convert it back to Unix-style (cygpath)
27093       input_path=`$CYGPATH -u "$shortmode_path"`
27094       new_path="$input_path"
27095     fi
27096   fi
27097 
27098   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27099   if test "x$test_cygdrive_prefix" = x; then
27100     # As a simple fix, exclude /usr/bin since it's not a real path.
27101     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27102       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27103       # a path prefixed by /cygdrive for fixpath to work.
27104       new_path="$CYGWIN_ROOT_PATH$input_path"
27105     fi
27106   fi
27107 
27108 
27109   if test "x$path" != "x$new_path"; then
27110     BOOT_JDK="$new_path"
27111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27112 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27113   fi
27114 
27115     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27116 
27117   path="$BOOT_JDK"
27118   has_colon=`$ECHO $path | $GREP ^.:`
27119   new_path="$path"
27120   if test "x$has_colon" = x; then
27121     # Not in mixed or Windows style, start by that.
27122     new_path=`cmd //c echo $path`
27123   fi
27124 
27125 
27126   input_path="$new_path"
27127   # Check if we need to convert this using DOS-style short mode. If the path
27128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27129   # take no chances and rewrite it.
27130   # Note: m4 eats our [], so we need to use [ and ] instead.
27131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27132   if test "x$has_forbidden_chars" != x; then
27133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27134     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27135   fi
27136 
27137 
27138   windows_path="$new_path"
27139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27140     unix_path=`$CYGPATH -u "$windows_path"`
27141     new_path="$unix_path"
27142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27144     new_path="$unix_path"
27145   fi
27146 
27147   if test "x$path" != "x$new_path"; then
27148     BOOT_JDK="$new_path"
27149     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27150 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27151   fi
27152 
27153   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27154   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27155 
27156     else
27157       # We're on a unix platform. Hooray! :)
27158       path="$BOOT_JDK"
27159       has_space=`$ECHO "$path" | $GREP " "`
27160       if test "x$has_space" != x; then
27161         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27162 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27163         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27164       fi
27165 
27166       # Use eval to expand a potential ~
27167       eval path="$path"
27168       if test ! -f "$path" && test ! -d "$path"; then
27169         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27170       fi
27171 
27172       if test -d "$path"; then
27173         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27174       else
27175         dir="`$DIRNAME "$path"`"
27176         base="`$BASENAME "$path"`"
27177         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27178       fi
27179     fi
27180   fi
27181 
27182             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27183 $as_echo_n "checking for Boot JDK... " >&6; }
27184             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27185 $as_echo "$BOOT_JDK" >&6; }
27186             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27187 $as_echo_n "checking Boot JDK version... " >&6; }
27188             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27189             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27190 $as_echo "$BOOT_JDK_VERSION" >&6; }
27191           fi # end check jdk version
27192         fi # end check javac
27193       fi # end check java
27194     fi # end check boot jdk found
27195   fi
27196 
27197     done
27198   fi
27199 
27200   fi
27201 
27202 
27203     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27204     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27205       # Do we have a bin/java?
27206       if test ! -x "$BOOT_JDK/bin/java"; then
27207         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27208 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27209         BOOT_JDK_FOUND=no
27210       else
27211         # Do we have a bin/javac?
27212         if test ! -x "$BOOT_JDK/bin/javac"; then
27213           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27214 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27215           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27216 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27217           BOOT_JDK_FOUND=no
27218         else
27219           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27220           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27221 
27222           # Extra M4 quote needed to protect [] in grep expression.
27223           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27224           if test "x$FOUND_CORRECT_VERSION" = x; then
27225             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27226 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27227             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27228 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27229             BOOT_JDK_FOUND=no
27230           else
27231             # We're done! :-)
27232             BOOT_JDK_FOUND=yes
27233 
27234   # Only process if variable expands to non-empty
27235 
27236   if test "x$BOOT_JDK" != x; then
27237     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27238 
27239   # Input might be given as Windows format, start by converting to
27240   # unix format.
27241   path="$BOOT_JDK"
27242   new_path=`$CYGPATH -u "$path"`
27243 
27244   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27245   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27246   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27247   # "foo.exe" is OK but "foo" is an error.
27248   #
27249   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27250   # It is also a way to make sure we got the proper file name for the real test later on.
27251   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27252   if test "x$test_shortpath" = x; then
27253     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27254 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27255     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27256   fi
27257 
27258   # Call helper function which possibly converts this using DOS-style short mode.
27259   # If so, the updated path is stored in $new_path.
27260 
27261   input_path="$new_path"
27262   # Check if we need to convert this using DOS-style short mode. If the path
27263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27264   # take no chances and rewrite it.
27265   # Note: m4 eats our [], so we need to use [ and ] instead.
27266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27267   if test "x$has_forbidden_chars" != x; then
27268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27272       # Going to short mode and back again did indeed matter. Since short mode is
27273       # case insensitive, let's make it lowercase to improve readability.
27274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27275       # Now convert it back to Unix-style (cygpath)
27276       input_path=`$CYGPATH -u "$shortmode_path"`
27277       new_path="$input_path"
27278     fi
27279   fi
27280 
27281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27282   if test "x$test_cygdrive_prefix" = x; then
27283     # As a simple fix, exclude /usr/bin since it's not a real path.
27284     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27286       # a path prefixed by /cygdrive for fixpath to work.
27287       new_path="$CYGWIN_ROOT_PATH$input_path"
27288     fi
27289   fi
27290 
27291 
27292   if test "x$path" != "x$new_path"; then
27293     BOOT_JDK="$new_path"
27294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27295 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27296   fi
27297 
27298     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27299 
27300   path="$BOOT_JDK"
27301   has_colon=`$ECHO $path | $GREP ^.:`
27302   new_path="$path"
27303   if test "x$has_colon" = x; then
27304     # Not in mixed or Windows style, start by that.
27305     new_path=`cmd //c echo $path`
27306   fi
27307 
27308 
27309   input_path="$new_path"
27310   # Check if we need to convert this using DOS-style short mode. If the path
27311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27312   # take no chances and rewrite it.
27313   # Note: m4 eats our [], so we need to use [ and ] instead.
27314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27315   if test "x$has_forbidden_chars" != x; then
27316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27317     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27318   fi
27319 
27320 
27321   windows_path="$new_path"
27322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27323     unix_path=`$CYGPATH -u "$windows_path"`
27324     new_path="$unix_path"
27325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27327     new_path="$unix_path"
27328   fi
27329 
27330   if test "x$path" != "x$new_path"; then
27331     BOOT_JDK="$new_path"
27332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27333 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27334   fi
27335 
27336   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27337   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27338 
27339     else
27340       # We're on a unix platform. Hooray! :)
27341       path="$BOOT_JDK"
27342       has_space=`$ECHO "$path" | $GREP " "`
27343       if test "x$has_space" != x; then
27344         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27345 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27346         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27347       fi
27348 
27349       # Use eval to expand a potential ~
27350       eval path="$path"
27351       if test ! -f "$path" && test ! -d "$path"; then
27352         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27353       fi
27354 
27355       if test -d "$path"; then
27356         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27357       else
27358         dir="`$DIRNAME "$path"`"
27359         base="`$BASENAME "$path"`"
27360         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27361       fi
27362     fi
27363   fi
27364 
27365             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27366 $as_echo_n "checking for Boot JDK... " >&6; }
27367             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27368 $as_echo "$BOOT_JDK" >&6; }
27369             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27370 $as_echo_n "checking Boot JDK version... " >&6; }
27371             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27372             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27373 $as_echo "$BOOT_JDK_VERSION" >&6; }
27374           fi # end check jdk version
27375         fi # end check javac
27376       fi # end check java
27377     fi # end check boot jdk found
27378   fi
27379 
27380 
27381   if test "x$BOOT_JDK_FOUND" = xno; then
27382     # Now execute the test
27383 
27384   if test "x$PROGRAMFILES" != x; then
27385     VIRTUAL_DIR="$PROGRAMFILES/Java"
27386 
27387   windows_path="$VIRTUAL_DIR"
27388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27389     unix_path=`$CYGPATH -u "$windows_path"`
27390     VIRTUAL_DIR="$unix_path"
27391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27393     VIRTUAL_DIR="$unix_path"
27394   fi
27395 
27396 
27397   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27398   BOOT_JDK_SUFFIX=""
27399   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27400   if test "x$ALL_JDKS_FOUND" != x; then
27401     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27402 
27403   if test "x$BOOT_JDK_FOUND" = xno; then
27404     # Now execute the test
27405 
27406         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27407         if test -d "$BOOT_JDK"; then
27408           BOOT_JDK_FOUND=maybe
27409           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27410 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27411         fi
27412 
27413 
27414     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27415     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27416       # Do we have a bin/java?
27417       if test ! -x "$BOOT_JDK/bin/java"; then
27418         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27419 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27420         BOOT_JDK_FOUND=no
27421       else
27422         # Do we have a bin/javac?
27423         if test ! -x "$BOOT_JDK/bin/javac"; then
27424           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27425 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27426           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27427 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27428           BOOT_JDK_FOUND=no
27429         else
27430           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27431           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27432 
27433           # Extra M4 quote needed to protect [] in grep expression.
27434           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27435           if test "x$FOUND_CORRECT_VERSION" = x; then
27436             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27437 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27438             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27439 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27440             BOOT_JDK_FOUND=no
27441           else
27442             # We're done! :-)
27443             BOOT_JDK_FOUND=yes
27444 
27445   # Only process if variable expands to non-empty
27446 
27447   if test "x$BOOT_JDK" != x; then
27448     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27449 
27450   # Input might be given as Windows format, start by converting to
27451   # unix format.
27452   path="$BOOT_JDK"
27453   new_path=`$CYGPATH -u "$path"`
27454 
27455   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27456   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27457   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27458   # "foo.exe" is OK but "foo" is an error.
27459   #
27460   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27461   # It is also a way to make sure we got the proper file name for the real test later on.
27462   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27463   if test "x$test_shortpath" = x; then
27464     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27465 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27466     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27467   fi
27468 
27469   # Call helper function which possibly converts this using DOS-style short mode.
27470   # If so, the updated path is stored in $new_path.
27471 
27472   input_path="$new_path"
27473   # Check if we need to convert this using DOS-style short mode. If the path
27474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27475   # take no chances and rewrite it.
27476   # Note: m4 eats our [], so we need to use [ and ] instead.
27477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27478   if test "x$has_forbidden_chars" != x; then
27479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27480     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27481     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27482     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27483       # Going to short mode and back again did indeed matter. Since short mode is
27484       # case insensitive, let's make it lowercase to improve readability.
27485       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27486       # Now convert it back to Unix-style (cygpath)
27487       input_path=`$CYGPATH -u "$shortmode_path"`
27488       new_path="$input_path"
27489     fi
27490   fi
27491 
27492   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27493   if test "x$test_cygdrive_prefix" = x; then
27494     # As a simple fix, exclude /usr/bin since it's not a real path.
27495     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27496       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27497       # a path prefixed by /cygdrive for fixpath to work.
27498       new_path="$CYGWIN_ROOT_PATH$input_path"
27499     fi
27500   fi
27501 
27502 
27503   if test "x$path" != "x$new_path"; then
27504     BOOT_JDK="$new_path"
27505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27506 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27507   fi
27508 
27509     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27510 
27511   path="$BOOT_JDK"
27512   has_colon=`$ECHO $path | $GREP ^.:`
27513   new_path="$path"
27514   if test "x$has_colon" = x; then
27515     # Not in mixed or Windows style, start by that.
27516     new_path=`cmd //c echo $path`
27517   fi
27518 
27519 
27520   input_path="$new_path"
27521   # Check if we need to convert this using DOS-style short mode. If the path
27522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27523   # take no chances and rewrite it.
27524   # Note: m4 eats our [], so we need to use [ and ] instead.
27525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27526   if test "x$has_forbidden_chars" != x; then
27527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27528     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27529   fi
27530 
27531 
27532   windows_path="$new_path"
27533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27534     unix_path=`$CYGPATH -u "$windows_path"`
27535     new_path="$unix_path"
27536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27538     new_path="$unix_path"
27539   fi
27540 
27541   if test "x$path" != "x$new_path"; then
27542     BOOT_JDK="$new_path"
27543     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27544 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27545   fi
27546 
27547   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27548   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27549 
27550     else
27551       # We're on a unix platform. Hooray! :)
27552       path="$BOOT_JDK"
27553       has_space=`$ECHO "$path" | $GREP " "`
27554       if test "x$has_space" != x; then
27555         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27556 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27557         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27558       fi
27559 
27560       # Use eval to expand a potential ~
27561       eval path="$path"
27562       if test ! -f "$path" && test ! -d "$path"; then
27563         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27564       fi
27565 
27566       if test -d "$path"; then
27567         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27568       else
27569         dir="`$DIRNAME "$path"`"
27570         base="`$BASENAME "$path"`"
27571         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27572       fi
27573     fi
27574   fi
27575 
27576             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27577 $as_echo_n "checking for Boot JDK... " >&6; }
27578             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27579 $as_echo "$BOOT_JDK" >&6; }
27580             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27581 $as_echo_n "checking Boot JDK version... " >&6; }
27582             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27583             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27584 $as_echo "$BOOT_JDK_VERSION" >&6; }
27585           fi # end check jdk version
27586         fi # end check javac
27587       fi # end check java
27588     fi # end check boot jdk found
27589   fi
27590 
27591     done
27592   fi
27593 
27594   fi
27595 
27596 
27597     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27598     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27599       # Do we have a bin/java?
27600       if test ! -x "$BOOT_JDK/bin/java"; then
27601         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27602 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27603         BOOT_JDK_FOUND=no
27604       else
27605         # Do we have a bin/javac?
27606         if test ! -x "$BOOT_JDK/bin/javac"; then
27607           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27608 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27609           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27610 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27611           BOOT_JDK_FOUND=no
27612         else
27613           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27614           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27615 
27616           # Extra M4 quote needed to protect [] in grep expression.
27617           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27618           if test "x$FOUND_CORRECT_VERSION" = x; then
27619             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27620 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27621             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27622 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27623             BOOT_JDK_FOUND=no
27624           else
27625             # We're done! :-)
27626             BOOT_JDK_FOUND=yes
27627 
27628   # Only process if variable expands to non-empty
27629 
27630   if test "x$BOOT_JDK" != x; then
27631     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27632 
27633   # Input might be given as Windows format, start by converting to
27634   # unix format.
27635   path="$BOOT_JDK"
27636   new_path=`$CYGPATH -u "$path"`
27637 
27638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27641   # "foo.exe" is OK but "foo" is an error.
27642   #
27643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27644   # It is also a way to make sure we got the proper file name for the real test later on.
27645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27646   if test "x$test_shortpath" = x; then
27647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27648 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27649     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27650   fi
27651 
27652   # Call helper function which possibly converts this using DOS-style short mode.
27653   # If so, the updated path is stored in $new_path.
27654 
27655   input_path="$new_path"
27656   # Check if we need to convert this using DOS-style short mode. If the path
27657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27658   # take no chances and rewrite it.
27659   # Note: m4 eats our [], so we need to use [ and ] instead.
27660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27661   if test "x$has_forbidden_chars" != x; then
27662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27666       # Going to short mode and back again did indeed matter. Since short mode is
27667       # case insensitive, let's make it lowercase to improve readability.
27668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27669       # Now convert it back to Unix-style (cygpath)
27670       input_path=`$CYGPATH -u "$shortmode_path"`
27671       new_path="$input_path"
27672     fi
27673   fi
27674 
27675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27676   if test "x$test_cygdrive_prefix" = x; then
27677     # As a simple fix, exclude /usr/bin since it's not a real path.
27678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27680       # a path prefixed by /cygdrive for fixpath to work.
27681       new_path="$CYGWIN_ROOT_PATH$input_path"
27682     fi
27683   fi
27684 
27685 
27686   if test "x$path" != "x$new_path"; then
27687     BOOT_JDK="$new_path"
27688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27689 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27690   fi
27691 
27692     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27693 
27694   path="$BOOT_JDK"
27695   has_colon=`$ECHO $path | $GREP ^.:`
27696   new_path="$path"
27697   if test "x$has_colon" = x; then
27698     # Not in mixed or Windows style, start by that.
27699     new_path=`cmd //c echo $path`
27700   fi
27701 
27702 
27703   input_path="$new_path"
27704   # Check if we need to convert this using DOS-style short mode. If the path
27705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27706   # take no chances and rewrite it.
27707   # Note: m4 eats our [], so we need to use [ and ] instead.
27708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27709   if test "x$has_forbidden_chars" != x; then
27710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27712   fi
27713 
27714 
27715   windows_path="$new_path"
27716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717     unix_path=`$CYGPATH -u "$windows_path"`
27718     new_path="$unix_path"
27719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27721     new_path="$unix_path"
27722   fi
27723 
27724   if test "x$path" != "x$new_path"; then
27725     BOOT_JDK="$new_path"
27726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27727 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27728   fi
27729 
27730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27732 
27733     else
27734       # We're on a unix platform. Hooray! :)
27735       path="$BOOT_JDK"
27736       has_space=`$ECHO "$path" | $GREP " "`
27737       if test "x$has_space" != x; then
27738         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27739 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27740         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27741       fi
27742 
27743       # Use eval to expand a potential ~
27744       eval path="$path"
27745       if test ! -f "$path" && test ! -d "$path"; then
27746         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27747       fi
27748 
27749       if test -d "$path"; then
27750         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27751       else
27752         dir="`$DIRNAME "$path"`"
27753         base="`$BASENAME "$path"`"
27754         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27755       fi
27756     fi
27757   fi
27758 
27759             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27760 $as_echo_n "checking for Boot JDK... " >&6; }
27761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27762 $as_echo "$BOOT_JDK" >&6; }
27763             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27764 $as_echo_n "checking Boot JDK version... " >&6; }
27765             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27767 $as_echo "$BOOT_JDK_VERSION" >&6; }
27768           fi # end check jdk version
27769         fi # end check javac
27770       fi # end check java
27771     fi # end check boot jdk found
27772   fi
27773 
27774 
27775   if test "x$BOOT_JDK_FOUND" = xno; then
27776     # Now execute the test
27777 
27778   if test "x$ProgramFiles" != x; then
27779     VIRTUAL_DIR="$ProgramFiles/Java"
27780 
27781   windows_path="$VIRTUAL_DIR"
27782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27783     unix_path=`$CYGPATH -u "$windows_path"`
27784     VIRTUAL_DIR="$unix_path"
27785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27787     VIRTUAL_DIR="$unix_path"
27788   fi
27789 
27790 
27791   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27792   BOOT_JDK_SUFFIX=""
27793   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27794   if test "x$ALL_JDKS_FOUND" != x; then
27795     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27796 
27797   if test "x$BOOT_JDK_FOUND" = xno; then
27798     # Now execute the test
27799 
27800         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27801         if test -d "$BOOT_JDK"; then
27802           BOOT_JDK_FOUND=maybe
27803           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27804 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27805         fi
27806 
27807 
27808     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27809     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27810       # Do we have a bin/java?
27811       if test ! -x "$BOOT_JDK/bin/java"; then
27812         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27813 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27814         BOOT_JDK_FOUND=no
27815       else
27816         # Do we have a bin/javac?
27817         if test ! -x "$BOOT_JDK/bin/javac"; then
27818           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27820           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27821 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27822           BOOT_JDK_FOUND=no
27823         else
27824           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27825           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27826 
27827           # Extra M4 quote needed to protect [] in grep expression.
27828           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27829           if test "x$FOUND_CORRECT_VERSION" = x; then
27830             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27831 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27832             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27833 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27834             BOOT_JDK_FOUND=no
27835           else
27836             # We're done! :-)
27837             BOOT_JDK_FOUND=yes
27838 
27839   # Only process if variable expands to non-empty
27840 
27841   if test "x$BOOT_JDK" != x; then
27842     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27843 
27844   # Input might be given as Windows format, start by converting to
27845   # unix format.
27846   path="$BOOT_JDK"
27847   new_path=`$CYGPATH -u "$path"`
27848 
27849   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27850   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27851   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27852   # "foo.exe" is OK but "foo" is an error.
27853   #
27854   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27855   # It is also a way to make sure we got the proper file name for the real test later on.
27856   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27857   if test "x$test_shortpath" = x; then
27858     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27859 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27860     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27861   fi
27862 
27863   # Call helper function which possibly converts this using DOS-style short mode.
27864   # If so, the updated path is stored in $new_path.
27865 
27866   input_path="$new_path"
27867   # Check if we need to convert this using DOS-style short mode. If the path
27868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27869   # take no chances and rewrite it.
27870   # Note: m4 eats our [], so we need to use [ and ] instead.
27871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27872   if test "x$has_forbidden_chars" != x; then
27873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27874     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27875     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27876     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27877       # Going to short mode and back again did indeed matter. Since short mode is
27878       # case insensitive, let's make it lowercase to improve readability.
27879       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27880       # Now convert it back to Unix-style (cygpath)
27881       input_path=`$CYGPATH -u "$shortmode_path"`
27882       new_path="$input_path"
27883     fi
27884   fi
27885 
27886   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27887   if test "x$test_cygdrive_prefix" = x; then
27888     # As a simple fix, exclude /usr/bin since it's not a real path.
27889     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27890       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27891       # a path prefixed by /cygdrive for fixpath to work.
27892       new_path="$CYGWIN_ROOT_PATH$input_path"
27893     fi
27894   fi
27895 
27896 
27897   if test "x$path" != "x$new_path"; then
27898     BOOT_JDK="$new_path"
27899     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27900 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27901   fi
27902 
27903     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27904 
27905   path="$BOOT_JDK"
27906   has_colon=`$ECHO $path | $GREP ^.:`
27907   new_path="$path"
27908   if test "x$has_colon" = x; then
27909     # Not in mixed or Windows style, start by that.
27910     new_path=`cmd //c echo $path`
27911   fi
27912 
27913 
27914   input_path="$new_path"
27915   # Check if we need to convert this using DOS-style short mode. If the path
27916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27917   # take no chances and rewrite it.
27918   # Note: m4 eats our [], so we need to use [ and ] instead.
27919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27920   if test "x$has_forbidden_chars" != x; then
27921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27922     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27923   fi
27924 
27925 
27926   windows_path="$new_path"
27927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928     unix_path=`$CYGPATH -u "$windows_path"`
27929     new_path="$unix_path"
27930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27932     new_path="$unix_path"
27933   fi
27934 
27935   if test "x$path" != "x$new_path"; then
27936     BOOT_JDK="$new_path"
27937     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27938 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27939   fi
27940 
27941   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27942   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27943 
27944     else
27945       # We're on a unix platform. Hooray! :)
27946       path="$BOOT_JDK"
27947       has_space=`$ECHO "$path" | $GREP " "`
27948       if test "x$has_space" != x; then
27949         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27950 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27951         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27952       fi
27953 
27954       # Use eval to expand a potential ~
27955       eval path="$path"
27956       if test ! -f "$path" && test ! -d "$path"; then
27957         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27958       fi
27959 
27960       if test -d "$path"; then
27961         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27962       else
27963         dir="`$DIRNAME "$path"`"
27964         base="`$BASENAME "$path"`"
27965         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27966       fi
27967     fi
27968   fi
27969 
27970             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27971 $as_echo_n "checking for Boot JDK... " >&6; }
27972             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27973 $as_echo "$BOOT_JDK" >&6; }
27974             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27975 $as_echo_n "checking Boot JDK version... " >&6; }
27976             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27977             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27978 $as_echo "$BOOT_JDK_VERSION" >&6; }
27979           fi # end check jdk version
27980         fi # end check javac
27981       fi # end check java
27982     fi # end check boot jdk found
27983   fi
27984 
27985     done
27986   fi
27987 
27988   fi
27989 
27990 
27991     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27992     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27993       # Do we have a bin/java?
27994       if test ! -x "$BOOT_JDK/bin/java"; then
27995         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27997         BOOT_JDK_FOUND=no
27998       else
27999         # Do we have a bin/javac?
28000         if test ! -x "$BOOT_JDK/bin/javac"; then
28001           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28002 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28003           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28004 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28005           BOOT_JDK_FOUND=no
28006         else
28007           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28008           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28009 
28010           # Extra M4 quote needed to protect [] in grep expression.
28011           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28012           if test "x$FOUND_CORRECT_VERSION" = x; then
28013             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28014 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28015             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28016 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28017             BOOT_JDK_FOUND=no
28018           else
28019             # We're done! :-)
28020             BOOT_JDK_FOUND=yes
28021 
28022   # Only process if variable expands to non-empty
28023 
28024   if test "x$BOOT_JDK" != x; then
28025     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28026 
28027   # Input might be given as Windows format, start by converting to
28028   # unix format.
28029   path="$BOOT_JDK"
28030   new_path=`$CYGPATH -u "$path"`
28031 
28032   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28033   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28034   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28035   # "foo.exe" is OK but "foo" is an error.
28036   #
28037   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28038   # It is also a way to make sure we got the proper file name for the real test later on.
28039   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28040   if test "x$test_shortpath" = x; then
28041     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28042 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28043     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28044   fi
28045 
28046   # Call helper function which possibly converts this using DOS-style short mode.
28047   # If so, the updated path is stored in $new_path.
28048 
28049   input_path="$new_path"
28050   # Check if we need to convert this using DOS-style short mode. If the path
28051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28052   # take no chances and rewrite it.
28053   # Note: m4 eats our [], so we need to use [ and ] instead.
28054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28055   if test "x$has_forbidden_chars" != x; then
28056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28057     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28058     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28059     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28060       # Going to short mode and back again did indeed matter. Since short mode is
28061       # case insensitive, let's make it lowercase to improve readability.
28062       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28063       # Now convert it back to Unix-style (cygpath)
28064       input_path=`$CYGPATH -u "$shortmode_path"`
28065       new_path="$input_path"
28066     fi
28067   fi
28068 
28069   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28070   if test "x$test_cygdrive_prefix" = x; then
28071     # As a simple fix, exclude /usr/bin since it's not a real path.
28072     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28073       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28074       # a path prefixed by /cygdrive for fixpath to work.
28075       new_path="$CYGWIN_ROOT_PATH$input_path"
28076     fi
28077   fi
28078 
28079 
28080   if test "x$path" != "x$new_path"; then
28081     BOOT_JDK="$new_path"
28082     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28083 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28084   fi
28085 
28086     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28087 
28088   path="$BOOT_JDK"
28089   has_colon=`$ECHO $path | $GREP ^.:`
28090   new_path="$path"
28091   if test "x$has_colon" = x; then
28092     # Not in mixed or Windows style, start by that.
28093     new_path=`cmd //c echo $path`
28094   fi
28095 
28096 
28097   input_path="$new_path"
28098   # Check if we need to convert this using DOS-style short mode. If the path
28099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28100   # take no chances and rewrite it.
28101   # Note: m4 eats our [], so we need to use [ and ] instead.
28102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28103   if test "x$has_forbidden_chars" != x; then
28104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28105     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28106   fi
28107 
28108 
28109   windows_path="$new_path"
28110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28111     unix_path=`$CYGPATH -u "$windows_path"`
28112     new_path="$unix_path"
28113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28115     new_path="$unix_path"
28116   fi
28117 
28118   if test "x$path" != "x$new_path"; then
28119     BOOT_JDK="$new_path"
28120     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28121 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28122   fi
28123 
28124   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28125   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28126 
28127     else
28128       # We're on a unix platform. Hooray! :)
28129       path="$BOOT_JDK"
28130       has_space=`$ECHO "$path" | $GREP " "`
28131       if test "x$has_space" != x; then
28132         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28133 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28134         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28135       fi
28136 
28137       # Use eval to expand a potential ~
28138       eval path="$path"
28139       if test ! -f "$path" && test ! -d "$path"; then
28140         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28141       fi
28142 
28143       if test -d "$path"; then
28144         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28145       else
28146         dir="`$DIRNAME "$path"`"
28147         base="`$BASENAME "$path"`"
28148         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28149       fi
28150     fi
28151   fi
28152 
28153             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28154 $as_echo_n "checking for Boot JDK... " >&6; }
28155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28156 $as_echo "$BOOT_JDK" >&6; }
28157             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28158 $as_echo_n "checking Boot JDK version... " >&6; }
28159             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28160             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28161 $as_echo "$BOOT_JDK_VERSION" >&6; }
28162           fi # end check jdk version
28163         fi # end check javac
28164       fi # end check java
28165     fi # end check boot jdk found
28166   fi
28167 
28168 
28169   if test "x$BOOT_JDK_FOUND" = xno; then
28170     # Now execute the test
28171 
28172   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28173   BOOT_JDK_SUFFIX=""
28174   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28175   if test "x$ALL_JDKS_FOUND" != x; then
28176     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28177 
28178   if test "x$BOOT_JDK_FOUND" = xno; then
28179     # Now execute the test
28180 
28181         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28182         if test -d "$BOOT_JDK"; then
28183           BOOT_JDK_FOUND=maybe
28184           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28185 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28186         fi
28187 
28188 
28189     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28190     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28191       # Do we have a bin/java?
28192       if test ! -x "$BOOT_JDK/bin/java"; then
28193         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28194 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28195         BOOT_JDK_FOUND=no
28196       else
28197         # Do we have a bin/javac?
28198         if test ! -x "$BOOT_JDK/bin/javac"; then
28199           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28201           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28202 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28203           BOOT_JDK_FOUND=no
28204         else
28205           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28206           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28207 
28208           # Extra M4 quote needed to protect [] in grep expression.
28209           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28210           if test "x$FOUND_CORRECT_VERSION" = x; then
28211             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28212 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28213             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28214 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28215             BOOT_JDK_FOUND=no
28216           else
28217             # We're done! :-)
28218             BOOT_JDK_FOUND=yes
28219 
28220   # Only process if variable expands to non-empty
28221 
28222   if test "x$BOOT_JDK" != x; then
28223     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28224 
28225   # Input might be given as Windows format, start by converting to
28226   # unix format.
28227   path="$BOOT_JDK"
28228   new_path=`$CYGPATH -u "$path"`
28229 
28230   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28231   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28232   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28233   # "foo.exe" is OK but "foo" is an error.
28234   #
28235   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28236   # It is also a way to make sure we got the proper file name for the real test later on.
28237   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28238   if test "x$test_shortpath" = x; then
28239     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28240 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28241     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28242   fi
28243 
28244   # Call helper function which possibly converts this using DOS-style short mode.
28245   # If so, the updated path is stored in $new_path.
28246 
28247   input_path="$new_path"
28248   # Check if we need to convert this using DOS-style short mode. If the path
28249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28250   # take no chances and rewrite it.
28251   # Note: m4 eats our [], so we need to use [ and ] instead.
28252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28253   if test "x$has_forbidden_chars" != x; then
28254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28255     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28256     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28257     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28258       # Going to short mode and back again did indeed matter. Since short mode is
28259       # case insensitive, let's make it lowercase to improve readability.
28260       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28261       # Now convert it back to Unix-style (cygpath)
28262       input_path=`$CYGPATH -u "$shortmode_path"`
28263       new_path="$input_path"
28264     fi
28265   fi
28266 
28267   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28268   if test "x$test_cygdrive_prefix" = x; then
28269     # As a simple fix, exclude /usr/bin since it's not a real path.
28270     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28271       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28272       # a path prefixed by /cygdrive for fixpath to work.
28273       new_path="$CYGWIN_ROOT_PATH$input_path"
28274     fi
28275   fi
28276 
28277 
28278   if test "x$path" != "x$new_path"; then
28279     BOOT_JDK="$new_path"
28280     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28281 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28282   fi
28283 
28284     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28285 
28286   path="$BOOT_JDK"
28287   has_colon=`$ECHO $path | $GREP ^.:`
28288   new_path="$path"
28289   if test "x$has_colon" = x; then
28290     # Not in mixed or Windows style, start by that.
28291     new_path=`cmd //c echo $path`
28292   fi
28293 
28294 
28295   input_path="$new_path"
28296   # Check if we need to convert this using DOS-style short mode. If the path
28297   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28298   # take no chances and rewrite it.
28299   # Note: m4 eats our [], so we need to use [ and ] instead.
28300   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28301   if test "x$has_forbidden_chars" != x; then
28302     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28303     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28304   fi
28305 
28306 
28307   windows_path="$new_path"
28308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28309     unix_path=`$CYGPATH -u "$windows_path"`
28310     new_path="$unix_path"
28311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28313     new_path="$unix_path"
28314   fi
28315 
28316   if test "x$path" != "x$new_path"; then
28317     BOOT_JDK="$new_path"
28318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28319 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28320   fi
28321 
28322   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28323   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28324 
28325     else
28326       # We're on a unix platform. Hooray! :)
28327       path="$BOOT_JDK"
28328       has_space=`$ECHO "$path" | $GREP " "`
28329       if test "x$has_space" != x; then
28330         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28331 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28332         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28333       fi
28334 
28335       # Use eval to expand a potential ~
28336       eval path="$path"
28337       if test ! -f "$path" && test ! -d "$path"; then
28338         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28339       fi
28340 
28341       if test -d "$path"; then
28342         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28343       else
28344         dir="`$DIRNAME "$path"`"
28345         base="`$BASENAME "$path"`"
28346         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28347       fi
28348     fi
28349   fi
28350 
28351             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28352 $as_echo_n "checking for Boot JDK... " >&6; }
28353             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28354 $as_echo "$BOOT_JDK" >&6; }
28355             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28356 $as_echo_n "checking Boot JDK version... " >&6; }
28357             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28359 $as_echo "$BOOT_JDK_VERSION" >&6; }
28360           fi # end check jdk version
28361         fi # end check javac
28362       fi # end check java
28363     fi # end check boot jdk found
28364   fi
28365 
28366     done
28367   fi
28368 
28369 
28370     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28371     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28372       # Do we have a bin/java?
28373       if test ! -x "$BOOT_JDK/bin/java"; then
28374         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28375 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28376         BOOT_JDK_FOUND=no
28377       else
28378         # Do we have a bin/javac?
28379         if test ! -x "$BOOT_JDK/bin/javac"; then
28380           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28381 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28382           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28383 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28384           BOOT_JDK_FOUND=no
28385         else
28386           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28387           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28388 
28389           # Extra M4 quote needed to protect [] in grep expression.
28390           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28391           if test "x$FOUND_CORRECT_VERSION" = x; then
28392             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28393 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28394             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28395 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28396             BOOT_JDK_FOUND=no
28397           else
28398             # We're done! :-)
28399             BOOT_JDK_FOUND=yes
28400 
28401   # Only process if variable expands to non-empty
28402 
28403   if test "x$BOOT_JDK" != x; then
28404     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28405 
28406   # Input might be given as Windows format, start by converting to
28407   # unix format.
28408   path="$BOOT_JDK"
28409   new_path=`$CYGPATH -u "$path"`
28410 
28411   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28412   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28413   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28414   # "foo.exe" is OK but "foo" is an error.
28415   #
28416   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28417   # It is also a way to make sure we got the proper file name for the real test later on.
28418   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28419   if test "x$test_shortpath" = x; then
28420     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28421 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28422     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28423   fi
28424 
28425   # Call helper function which possibly converts this using DOS-style short mode.
28426   # If so, the updated path is stored in $new_path.
28427 
28428   input_path="$new_path"
28429   # Check if we need to convert this using DOS-style short mode. If the path
28430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28431   # take no chances and rewrite it.
28432   # Note: m4 eats our [], so we need to use [ and ] instead.
28433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28434   if test "x$has_forbidden_chars" != x; then
28435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28436     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28437     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28438     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28439       # Going to short mode and back again did indeed matter. Since short mode is
28440       # case insensitive, let's make it lowercase to improve readability.
28441       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28442       # Now convert it back to Unix-style (cygpath)
28443       input_path=`$CYGPATH -u "$shortmode_path"`
28444       new_path="$input_path"
28445     fi
28446   fi
28447 
28448   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28449   if test "x$test_cygdrive_prefix" = x; then
28450     # As a simple fix, exclude /usr/bin since it's not a real path.
28451     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28452       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28453       # a path prefixed by /cygdrive for fixpath to work.
28454       new_path="$CYGWIN_ROOT_PATH$input_path"
28455     fi
28456   fi
28457 
28458 
28459   if test "x$path" != "x$new_path"; then
28460     BOOT_JDK="$new_path"
28461     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28462 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28463   fi
28464 
28465     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28466 
28467   path="$BOOT_JDK"
28468   has_colon=`$ECHO $path | $GREP ^.:`
28469   new_path="$path"
28470   if test "x$has_colon" = x; then
28471     # Not in mixed or Windows style, start by that.
28472     new_path=`cmd //c echo $path`
28473   fi
28474 
28475 
28476   input_path="$new_path"
28477   # Check if we need to convert this using DOS-style short mode. If the path
28478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28479   # take no chances and rewrite it.
28480   # Note: m4 eats our [], so we need to use [ and ] instead.
28481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28482   if test "x$has_forbidden_chars" != x; then
28483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28484     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28485   fi
28486 
28487 
28488   windows_path="$new_path"
28489   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28490     unix_path=`$CYGPATH -u "$windows_path"`
28491     new_path="$unix_path"
28492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28493     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28494     new_path="$unix_path"
28495   fi
28496 
28497   if test "x$path" != "x$new_path"; then
28498     BOOT_JDK="$new_path"
28499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28500 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28501   fi
28502 
28503   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28504   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28505 
28506     else
28507       # We're on a unix platform. Hooray! :)
28508       path="$BOOT_JDK"
28509       has_space=`$ECHO "$path" | $GREP " "`
28510       if test "x$has_space" != x; then
28511         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28512 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28513         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28514       fi
28515 
28516       # Use eval to expand a potential ~
28517       eval path="$path"
28518       if test ! -f "$path" && test ! -d "$path"; then
28519         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28520       fi
28521 
28522       if test -d "$path"; then
28523         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28524       else
28525         dir="`$DIRNAME "$path"`"
28526         base="`$BASENAME "$path"`"
28527         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28528       fi
28529     fi
28530   fi
28531 
28532             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28533 $as_echo_n "checking for Boot JDK... " >&6; }
28534             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28535 $as_echo "$BOOT_JDK" >&6; }
28536             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28537 $as_echo_n "checking Boot JDK version... " >&6; }
28538             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28539             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28540 $as_echo "$BOOT_JDK_VERSION" >&6; }
28541           fi # end check jdk version
28542         fi # end check javac
28543       fi # end check java
28544     fi # end check boot jdk found
28545   fi
28546 
28547   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28548 
28549   if test "x$BOOT_JDK_FOUND" = xno; then
28550     # Now execute the test
28551 
28552   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28553   BOOT_JDK_SUFFIX="/Contents/Home"
28554   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28555   if test "x$ALL_JDKS_FOUND" != x; then
28556     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28557 
28558   if test "x$BOOT_JDK_FOUND" = xno; then
28559     # Now execute the test
28560 
28561         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28562         if test -d "$BOOT_JDK"; then
28563           BOOT_JDK_FOUND=maybe
28564           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28565 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28566         fi
28567 
28568 
28569     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28570     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28571       # Do we have a bin/java?
28572       if test ! -x "$BOOT_JDK/bin/java"; then
28573         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28574 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28575         BOOT_JDK_FOUND=no
28576       else
28577         # Do we have a bin/javac?
28578         if test ! -x "$BOOT_JDK/bin/javac"; then
28579           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28580 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28581           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28582 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28583           BOOT_JDK_FOUND=no
28584         else
28585           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28586           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28587 
28588           # Extra M4 quote needed to protect [] in grep expression.
28589           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28590           if test "x$FOUND_CORRECT_VERSION" = x; then
28591             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28592 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28593             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28594 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28595             BOOT_JDK_FOUND=no
28596           else
28597             # We're done! :-)
28598             BOOT_JDK_FOUND=yes
28599 
28600   # Only process if variable expands to non-empty
28601 
28602   if test "x$BOOT_JDK" != x; then
28603     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28604 
28605   # Input might be given as Windows format, start by converting to
28606   # unix format.
28607   path="$BOOT_JDK"
28608   new_path=`$CYGPATH -u "$path"`
28609 
28610   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28611   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28612   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28613   # "foo.exe" is OK but "foo" is an error.
28614   #
28615   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28616   # It is also a way to make sure we got the proper file name for the real test later on.
28617   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28618   if test "x$test_shortpath" = x; then
28619     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28620 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28621     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28622   fi
28623 
28624   # Call helper function which possibly converts this using DOS-style short mode.
28625   # If so, the updated path is stored in $new_path.
28626 
28627   input_path="$new_path"
28628   # Check if we need to convert this using DOS-style short mode. If the path
28629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28630   # take no chances and rewrite it.
28631   # Note: m4 eats our [], so we need to use [ and ] instead.
28632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28633   if test "x$has_forbidden_chars" != x; then
28634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28635     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28636     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28637     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28638       # Going to short mode and back again did indeed matter. Since short mode is
28639       # case insensitive, let's make it lowercase to improve readability.
28640       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28641       # Now convert it back to Unix-style (cygpath)
28642       input_path=`$CYGPATH -u "$shortmode_path"`
28643       new_path="$input_path"
28644     fi
28645   fi
28646 
28647   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28648   if test "x$test_cygdrive_prefix" = x; then
28649     # As a simple fix, exclude /usr/bin since it's not a real path.
28650     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28651       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28652       # a path prefixed by /cygdrive for fixpath to work.
28653       new_path="$CYGWIN_ROOT_PATH$input_path"
28654     fi
28655   fi
28656 
28657 
28658   if test "x$path" != "x$new_path"; then
28659     BOOT_JDK="$new_path"
28660     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28661 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28662   fi
28663 
28664     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28665 
28666   path="$BOOT_JDK"
28667   has_colon=`$ECHO $path | $GREP ^.:`
28668   new_path="$path"
28669   if test "x$has_colon" = x; then
28670     # Not in mixed or Windows style, start by that.
28671     new_path=`cmd //c echo $path`
28672   fi
28673 
28674 
28675   input_path="$new_path"
28676   # Check if we need to convert this using DOS-style short mode. If the path
28677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28678   # take no chances and rewrite it.
28679   # Note: m4 eats our [], so we need to use [ and ] instead.
28680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28681   if test "x$has_forbidden_chars" != x; then
28682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28683     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28684   fi
28685 
28686 
28687   windows_path="$new_path"
28688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28689     unix_path=`$CYGPATH -u "$windows_path"`
28690     new_path="$unix_path"
28691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28693     new_path="$unix_path"
28694   fi
28695 
28696   if test "x$path" != "x$new_path"; then
28697     BOOT_JDK="$new_path"
28698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28699 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28700   fi
28701 
28702   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28703   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28704 
28705     else
28706       # We're on a unix platform. Hooray! :)
28707       path="$BOOT_JDK"
28708       has_space=`$ECHO "$path" | $GREP " "`
28709       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
28713       fi
28714 
28715       # Use eval to expand a potential ~
28716       eval path="$path"
28717       if test ! -f "$path" && test ! -d "$path"; then
28718         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28719       fi
28720 
28721       if test -d "$path"; then
28722         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28723       else
28724         dir="`$DIRNAME "$path"`"
28725         base="`$BASENAME "$path"`"
28726         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28727       fi
28728     fi
28729   fi
28730 
28731             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28732 $as_echo_n "checking for Boot JDK... " >&6; }
28733             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28734 $as_echo "$BOOT_JDK" >&6; }
28735             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28736 $as_echo_n "checking Boot JDK version... " >&6; }
28737             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28738             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28739 $as_echo "$BOOT_JDK_VERSION" >&6; }
28740           fi # end check jdk version
28741         fi # end check javac
28742       fi # end check java
28743     fi # end check boot jdk found
28744   fi
28745 
28746     done
28747   fi
28748 
28749 
28750     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28751     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28752       # Do we have a bin/java?
28753       if test ! -x "$BOOT_JDK/bin/java"; then
28754         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28755 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28756         BOOT_JDK_FOUND=no
28757       else
28758         # Do we have a bin/javac?
28759         if test ! -x "$BOOT_JDK/bin/javac"; then
28760           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28761 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28762           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28763 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28764           BOOT_JDK_FOUND=no
28765         else
28766           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28767           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28768 
28769           # Extra M4 quote needed to protect [] in grep expression.
28770           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28771           if test "x$FOUND_CORRECT_VERSION" = x; then
28772             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28773 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28774             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28775 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28776             BOOT_JDK_FOUND=no
28777           else
28778             # We're done! :-)
28779             BOOT_JDK_FOUND=yes
28780 
28781   # Only process if variable expands to non-empty
28782 
28783   if test "x$BOOT_JDK" != x; then
28784     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28785 
28786   # Input might be given as Windows format, start by converting to
28787   # unix format.
28788   path="$BOOT_JDK"
28789   new_path=`$CYGPATH -u "$path"`
28790 
28791   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28792   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28793   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28794   # "foo.exe" is OK but "foo" is an error.
28795   #
28796   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28797   # It is also a way to make sure we got the proper file name for the real test later on.
28798   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28799   if test "x$test_shortpath" = x; then
28800     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28801 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28802     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28803   fi
28804 
28805   # Call helper function which possibly converts this using DOS-style short mode.
28806   # If so, the updated path is stored in $new_path.
28807 
28808   input_path="$new_path"
28809   # Check if we need to convert this using DOS-style short mode. If the path
28810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28811   # take no chances and rewrite it.
28812   # Note: m4 eats our [], so we need to use [ and ] instead.
28813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28814   if test "x$has_forbidden_chars" != x; then
28815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28816     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28817     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28818     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28819       # Going to short mode and back again did indeed matter. Since short mode is
28820       # case insensitive, let's make it lowercase to improve readability.
28821       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28822       # Now convert it back to Unix-style (cygpath)
28823       input_path=`$CYGPATH -u "$shortmode_path"`
28824       new_path="$input_path"
28825     fi
28826   fi
28827 
28828   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28829   if test "x$test_cygdrive_prefix" = x; then
28830     # As a simple fix, exclude /usr/bin since it's not a real path.
28831     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28832       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28833       # a path prefixed by /cygdrive for fixpath to work.
28834       new_path="$CYGWIN_ROOT_PATH$input_path"
28835     fi
28836   fi
28837 
28838 
28839   if test "x$path" != "x$new_path"; then
28840     BOOT_JDK="$new_path"
28841     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28842 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28843   fi
28844 
28845     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28846 
28847   path="$BOOT_JDK"
28848   has_colon=`$ECHO $path | $GREP ^.:`
28849   new_path="$path"
28850   if test "x$has_colon" = x; then
28851     # Not in mixed or Windows style, start by that.
28852     new_path=`cmd //c echo $path`
28853   fi
28854 
28855 
28856   input_path="$new_path"
28857   # Check if we need to convert this using DOS-style short mode. If the path
28858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28859   # take no chances and rewrite it.
28860   # Note: m4 eats our [], so we need to use [ and ] instead.
28861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28862   if test "x$has_forbidden_chars" != x; then
28863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28864     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28865   fi
28866 
28867 
28868   windows_path="$new_path"
28869   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28870     unix_path=`$CYGPATH -u "$windows_path"`
28871     new_path="$unix_path"
28872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28873     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28874     new_path="$unix_path"
28875   fi
28876 
28877   if test "x$path" != "x$new_path"; then
28878     BOOT_JDK="$new_path"
28879     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28880 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28881   fi
28882 
28883   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28884   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28885 
28886     else
28887       # We're on a unix platform. Hooray! :)
28888       path="$BOOT_JDK"
28889       has_space=`$ECHO "$path" | $GREP " "`
28890       if test "x$has_space" != x; then
28891         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28892 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28893         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28894       fi
28895 
28896       # Use eval to expand a potential ~
28897       eval path="$path"
28898       if test ! -f "$path" && test ! -d "$path"; then
28899         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28900       fi
28901 
28902       if test -d "$path"; then
28903         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28904       else
28905         dir="`$DIRNAME "$path"`"
28906         base="`$BASENAME "$path"`"
28907         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28908       fi
28909     fi
28910   fi
28911 
28912             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28913 $as_echo_n "checking for Boot JDK... " >&6; }
28914             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28915 $as_echo "$BOOT_JDK" >&6; }
28916             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28917 $as_echo_n "checking Boot JDK version... " >&6; }
28918             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28919             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28920 $as_echo "$BOOT_JDK_VERSION" >&6; }
28921           fi # end check jdk version
28922         fi # end check javac
28923       fi # end check java
28924     fi # end check boot jdk found
28925   fi
28926 
28927 
28928   if test "x$BOOT_JDK_FOUND" = xno; then
28929     # Now execute the test
28930 
28931   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28932   BOOT_JDK_SUFFIX="/Contents/Home"
28933   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28934   if test "x$ALL_JDKS_FOUND" != x; then
28935     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28936 
28937   if test "x$BOOT_JDK_FOUND" = xno; then
28938     # Now execute the test
28939 
28940         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28941         if test -d "$BOOT_JDK"; then
28942           BOOT_JDK_FOUND=maybe
28943           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28944 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28945         fi
28946 
28947 
28948     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28949     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28950       # Do we have a bin/java?
28951       if test ! -x "$BOOT_JDK/bin/java"; then
28952         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28953 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28954         BOOT_JDK_FOUND=no
28955       else
28956         # Do we have a bin/javac?
28957         if test ! -x "$BOOT_JDK/bin/javac"; then
28958           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28959 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28960           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28961 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28962           BOOT_JDK_FOUND=no
28963         else
28964           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28965           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28966 
28967           # Extra M4 quote needed to protect [] in grep expression.
28968           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28969           if test "x$FOUND_CORRECT_VERSION" = x; then
28970             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28971 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28972             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28973 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28974             BOOT_JDK_FOUND=no
28975           else
28976             # We're done! :-)
28977             BOOT_JDK_FOUND=yes
28978 
28979   # Only process if variable expands to non-empty
28980 
28981   if test "x$BOOT_JDK" != x; then
28982     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28983 
28984   # Input might be given as Windows format, start by converting to
28985   # unix format.
28986   path="$BOOT_JDK"
28987   new_path=`$CYGPATH -u "$path"`
28988 
28989   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28990   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28991   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28992   # "foo.exe" is OK but "foo" is an error.
28993   #
28994   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28995   # It is also a way to make sure we got the proper file name for the real test later on.
28996   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28997   if test "x$test_shortpath" = x; then
28998     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28999 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29000     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29001   fi
29002 
29003   # Call helper function which possibly converts this using DOS-style short mode.
29004   # If so, the updated path is stored in $new_path.
29005 
29006   input_path="$new_path"
29007   # Check if we need to convert this using DOS-style short mode. If the path
29008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29009   # take no chances and rewrite it.
29010   # Note: m4 eats our [], so we need to use [ and ] instead.
29011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29012   if test "x$has_forbidden_chars" != x; then
29013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29014     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29015     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29016     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29017       # Going to short mode and back again did indeed matter. Since short mode is
29018       # case insensitive, let's make it lowercase to improve readability.
29019       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29020       # Now convert it back to Unix-style (cygpath)
29021       input_path=`$CYGPATH -u "$shortmode_path"`
29022       new_path="$input_path"
29023     fi
29024   fi
29025 
29026   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29027   if test "x$test_cygdrive_prefix" = x; then
29028     # As a simple fix, exclude /usr/bin since it's not a real path.
29029     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29030       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29031       # a path prefixed by /cygdrive for fixpath to work.
29032       new_path="$CYGWIN_ROOT_PATH$input_path"
29033     fi
29034   fi
29035 
29036 
29037   if test "x$path" != "x$new_path"; then
29038     BOOT_JDK="$new_path"
29039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29040 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29041   fi
29042 
29043     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29044 
29045   path="$BOOT_JDK"
29046   has_colon=`$ECHO $path | $GREP ^.:`
29047   new_path="$path"
29048   if test "x$has_colon" = x; then
29049     # Not in mixed or Windows style, start by that.
29050     new_path=`cmd //c echo $path`
29051   fi
29052 
29053 
29054   input_path="$new_path"
29055   # Check if we need to convert this using DOS-style short mode. If the path
29056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29057   # take no chances and rewrite it.
29058   # Note: m4 eats our [], so we need to use [ and ] instead.
29059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29060   if test "x$has_forbidden_chars" != x; then
29061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29063   fi
29064 
29065 
29066   windows_path="$new_path"
29067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29068     unix_path=`$CYGPATH -u "$windows_path"`
29069     new_path="$unix_path"
29070   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29071     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29072     new_path="$unix_path"
29073   fi
29074 
29075   if test "x$path" != "x$new_path"; then
29076     BOOT_JDK="$new_path"
29077     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29078 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29079   fi
29080 
29081   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29082   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29083 
29084     else
29085       # We're on a unix platform. Hooray! :)
29086       path="$BOOT_JDK"
29087       has_space=`$ECHO "$path" | $GREP " "`
29088       if test "x$has_space" != x; then
29089         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29090 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29091         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29092       fi
29093 
29094       # Use eval to expand a potential ~
29095       eval path="$path"
29096       if test ! -f "$path" && test ! -d "$path"; then
29097         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29098       fi
29099 
29100       if test -d "$path"; then
29101         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29102       else
29103         dir="`$DIRNAME "$path"`"
29104         base="`$BASENAME "$path"`"
29105         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29106       fi
29107     fi
29108   fi
29109 
29110             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29111 $as_echo_n "checking for Boot JDK... " >&6; }
29112             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29113 $as_echo "$BOOT_JDK" >&6; }
29114             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29115 $as_echo_n "checking Boot JDK version... " >&6; }
29116             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29117             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29118 $as_echo "$BOOT_JDK_VERSION" >&6; }
29119           fi # end check jdk version
29120         fi # end check javac
29121       fi # end check java
29122     fi # end check boot jdk found
29123   fi
29124 
29125     done
29126   fi
29127 
29128 
29129     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29130     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29131       # Do we have a bin/java?
29132       if test ! -x "$BOOT_JDK/bin/java"; then
29133         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29134 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29135         BOOT_JDK_FOUND=no
29136       else
29137         # Do we have a bin/javac?
29138         if test ! -x "$BOOT_JDK/bin/javac"; then
29139           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29141           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29142 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29143           BOOT_JDK_FOUND=no
29144         else
29145           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29146           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29147 
29148           # Extra M4 quote needed to protect [] in grep expression.
29149           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29150           if test "x$FOUND_CORRECT_VERSION" = x; then
29151             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29153             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29154 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29155             BOOT_JDK_FOUND=no
29156           else
29157             # We're done! :-)
29158             BOOT_JDK_FOUND=yes
29159 
29160   # Only process if variable expands to non-empty
29161 
29162   if test "x$BOOT_JDK" != x; then
29163     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29164 
29165   # Input might be given as Windows format, start by converting to
29166   # unix format.
29167   path="$BOOT_JDK"
29168   new_path=`$CYGPATH -u "$path"`
29169 
29170   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29171   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29172   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29173   # "foo.exe" is OK but "foo" is an error.
29174   #
29175   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29176   # It is also a way to make sure we got the proper file name for the real test later on.
29177   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29178   if test "x$test_shortpath" = x; then
29179     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29180 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29181     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29182   fi
29183 
29184   # Call helper function which possibly converts this using DOS-style short mode.
29185   # If so, the updated path is stored in $new_path.
29186 
29187   input_path="$new_path"
29188   # Check if we need to convert this using DOS-style short mode. If the path
29189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29190   # take no chances and rewrite it.
29191   # Note: m4 eats our [], so we need to use [ and ] instead.
29192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29193   if test "x$has_forbidden_chars" != x; then
29194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29198       # Going to short mode and back again did indeed matter. Since short mode is
29199       # case insensitive, let's make it lowercase to improve readability.
29200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29201       # Now convert it back to Unix-style (cygpath)
29202       input_path=`$CYGPATH -u "$shortmode_path"`
29203       new_path="$input_path"
29204     fi
29205   fi
29206 
29207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29208   if test "x$test_cygdrive_prefix" = x; then
29209     # As a simple fix, exclude /usr/bin since it's not a real path.
29210     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29212       # a path prefixed by /cygdrive for fixpath to work.
29213       new_path="$CYGWIN_ROOT_PATH$input_path"
29214     fi
29215   fi
29216 
29217 
29218   if test "x$path" != "x$new_path"; then
29219     BOOT_JDK="$new_path"
29220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29221 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29222   fi
29223 
29224     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29225 
29226   path="$BOOT_JDK"
29227   has_colon=`$ECHO $path | $GREP ^.:`
29228   new_path="$path"
29229   if test "x$has_colon" = x; then
29230     # Not in mixed or Windows style, start by that.
29231     new_path=`cmd //c echo $path`
29232   fi
29233 
29234 
29235   input_path="$new_path"
29236   # Check if we need to convert this using DOS-style short mode. If the path
29237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29238   # take no chances and rewrite it.
29239   # Note: m4 eats our [], so we need to use [ and ] instead.
29240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29241   if test "x$has_forbidden_chars" != x; then
29242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29243     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29244   fi
29245 
29246 
29247   windows_path="$new_path"
29248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29249     unix_path=`$CYGPATH -u "$windows_path"`
29250     new_path="$unix_path"
29251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29253     new_path="$unix_path"
29254   fi
29255 
29256   if test "x$path" != "x$new_path"; then
29257     BOOT_JDK="$new_path"
29258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29259 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29260   fi
29261 
29262   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29263   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29264 
29265     else
29266       # We're on a unix platform. Hooray! :)
29267       path="$BOOT_JDK"
29268       has_space=`$ECHO "$path" | $GREP " "`
29269       if test "x$has_space" != x; then
29270         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29271 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29272         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29273       fi
29274 
29275       # Use eval to expand a potential ~
29276       eval path="$path"
29277       if test ! -f "$path" && test ! -d "$path"; then
29278         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29279       fi
29280 
29281       if test -d "$path"; then
29282         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29283       else
29284         dir="`$DIRNAME "$path"`"
29285         base="`$BASENAME "$path"`"
29286         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29287       fi
29288     fi
29289   fi
29290 
29291             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29292 $as_echo_n "checking for Boot JDK... " >&6; }
29293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29294 $as_echo "$BOOT_JDK" >&6; }
29295             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29296 $as_echo_n "checking Boot JDK version... " >&6; }
29297             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29298             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29299 $as_echo "$BOOT_JDK_VERSION" >&6; }
29300           fi # end check jdk version
29301         fi # end check javac
29302       fi # end check java
29303     fi # end check boot jdk found
29304   fi
29305 
29306   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29307 
29308   if test "x$BOOT_JDK_FOUND" = xno; then
29309     # Now execute the test
29310 
29311   BOOT_JDK_PREFIX="/usr/lib/jvm"
29312   BOOT_JDK_SUFFIX=""
29313   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29314   if test "x$ALL_JDKS_FOUND" != x; then
29315     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29316 
29317   if test "x$BOOT_JDK_FOUND" = xno; then
29318     # Now execute the test
29319 
29320         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29321         if test -d "$BOOT_JDK"; then
29322           BOOT_JDK_FOUND=maybe
29323           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29324 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29325         fi
29326 
29327 
29328     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29329     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29330       # Do we have a bin/java?
29331       if test ! -x "$BOOT_JDK/bin/java"; then
29332         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29333 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29334         BOOT_JDK_FOUND=no
29335       else
29336         # Do we have a bin/javac?
29337         if test ! -x "$BOOT_JDK/bin/javac"; then
29338           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29339 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29340           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29341 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29342           BOOT_JDK_FOUND=no
29343         else
29344           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29345           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29346 
29347           # Extra M4 quote needed to protect [] in grep expression.
29348           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29349           if test "x$FOUND_CORRECT_VERSION" = x; then
29350             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29351 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29352             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29353 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29354             BOOT_JDK_FOUND=no
29355           else
29356             # We're done! :-)
29357             BOOT_JDK_FOUND=yes
29358 
29359   # Only process if variable expands to non-empty
29360 
29361   if test "x$BOOT_JDK" != x; then
29362     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29363 
29364   # Input might be given as Windows format, start by converting to
29365   # unix format.
29366   path="$BOOT_JDK"
29367   new_path=`$CYGPATH -u "$path"`
29368 
29369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29372   # "foo.exe" is OK but "foo" is an error.
29373   #
29374   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29375   # It is also a way to make sure we got the proper file name for the real test later on.
29376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29377   if test "x$test_shortpath" = x; then
29378     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29379 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29380     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29381   fi
29382 
29383   # Call helper function which possibly converts this using DOS-style short mode.
29384   # If so, the updated path is stored in $new_path.
29385 
29386   input_path="$new_path"
29387   # Check if we need to convert this using DOS-style short mode. If the path
29388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29389   # take no chances and rewrite it.
29390   # Note: m4 eats our [], so we need to use [ and ] instead.
29391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29392   if test "x$has_forbidden_chars" != x; then
29393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29394     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29395     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29396     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29397       # Going to short mode and back again did indeed matter. Since short mode is
29398       # case insensitive, let's make it lowercase to improve readability.
29399       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29400       # Now convert it back to Unix-style (cygpath)
29401       input_path=`$CYGPATH -u "$shortmode_path"`
29402       new_path="$input_path"
29403     fi
29404   fi
29405 
29406   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29407   if test "x$test_cygdrive_prefix" = x; then
29408     # As a simple fix, exclude /usr/bin since it's not a real path.
29409     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29410       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29411       # a path prefixed by /cygdrive for fixpath to work.
29412       new_path="$CYGWIN_ROOT_PATH$input_path"
29413     fi
29414   fi
29415 
29416 
29417   if test "x$path" != "x$new_path"; then
29418     BOOT_JDK="$new_path"
29419     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29420 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29421   fi
29422 
29423     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29424 
29425   path="$BOOT_JDK"
29426   has_colon=`$ECHO $path | $GREP ^.:`
29427   new_path="$path"
29428   if test "x$has_colon" = x; then
29429     # Not in mixed or Windows style, start by that.
29430     new_path=`cmd //c echo $path`
29431   fi
29432 
29433 
29434   input_path="$new_path"
29435   # Check if we need to convert this using DOS-style short mode. If the path
29436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29437   # take no chances and rewrite it.
29438   # Note: m4 eats our [], so we need to use [ and ] instead.
29439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29440   if test "x$has_forbidden_chars" != x; then
29441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29442     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29443   fi
29444 
29445 
29446   windows_path="$new_path"
29447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29448     unix_path=`$CYGPATH -u "$windows_path"`
29449     new_path="$unix_path"
29450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29452     new_path="$unix_path"
29453   fi
29454 
29455   if test "x$path" != "x$new_path"; then
29456     BOOT_JDK="$new_path"
29457     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29458 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29459   fi
29460 
29461   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29462   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29463 
29464     else
29465       # We're on a unix platform. Hooray! :)
29466       path="$BOOT_JDK"
29467       has_space=`$ECHO "$path" | $GREP " "`
29468       if test "x$has_space" != x; then
29469         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29470 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29471         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29472       fi
29473 
29474       # Use eval to expand a potential ~
29475       eval path="$path"
29476       if test ! -f "$path" && test ! -d "$path"; then
29477         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29478       fi
29479 
29480       if test -d "$path"; then
29481         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29482       else
29483         dir="`$DIRNAME "$path"`"
29484         base="`$BASENAME "$path"`"
29485         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29486       fi
29487     fi
29488   fi
29489 
29490             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29491 $as_echo_n "checking for Boot JDK... " >&6; }
29492             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29493 $as_echo "$BOOT_JDK" >&6; }
29494             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29495 $as_echo_n "checking Boot JDK version... " >&6; }
29496             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29497             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29498 $as_echo "$BOOT_JDK_VERSION" >&6; }
29499           fi # end check jdk version
29500         fi # end check javac
29501       fi # end check java
29502     fi # end check boot jdk found
29503   fi
29504 
29505     done
29506   fi
29507 
29508 
29509     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29510     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29511       # Do we have a bin/java?
29512       if test ! -x "$BOOT_JDK/bin/java"; then
29513         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29514 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29515         BOOT_JDK_FOUND=no
29516       else
29517         # Do we have a bin/javac?
29518         if test ! -x "$BOOT_JDK/bin/javac"; then
29519           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29520 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29521           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29522 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29523           BOOT_JDK_FOUND=no
29524         else
29525           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29526           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29527 
29528           # Extra M4 quote needed to protect [] in grep expression.
29529           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29530           if test "x$FOUND_CORRECT_VERSION" = x; then
29531             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29533             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29534 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29535             BOOT_JDK_FOUND=no
29536           else
29537             # We're done! :-)
29538             BOOT_JDK_FOUND=yes
29539 
29540   # Only process if variable expands to non-empty
29541 
29542   if test "x$BOOT_JDK" != x; then
29543     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29544 
29545   # Input might be given as Windows format, start by converting to
29546   # unix format.
29547   path="$BOOT_JDK"
29548   new_path=`$CYGPATH -u "$path"`
29549 
29550   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29551   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29552   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29553   # "foo.exe" is OK but "foo" is an error.
29554   #
29555   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29556   # It is also a way to make sure we got the proper file name for the real test later on.
29557   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29558   if test "x$test_shortpath" = x; then
29559     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29560 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29561     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29562   fi
29563 
29564   # Call helper function which possibly converts this using DOS-style short mode.
29565   # If so, the updated path is stored in $new_path.
29566 
29567   input_path="$new_path"
29568   # Check if we need to convert this using DOS-style short mode. If the path
29569   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29570   # take no chances and rewrite it.
29571   # Note: m4 eats our [], so we need to use [ and ] instead.
29572   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29573   if test "x$has_forbidden_chars" != x; then
29574     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29575     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29576     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29577     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29578       # Going to short mode and back again did indeed matter. Since short mode is
29579       # case insensitive, let's make it lowercase to improve readability.
29580       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29581       # Now convert it back to Unix-style (cygpath)
29582       input_path=`$CYGPATH -u "$shortmode_path"`
29583       new_path="$input_path"
29584     fi
29585   fi
29586 
29587   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29588   if test "x$test_cygdrive_prefix" = x; then
29589     # As a simple fix, exclude /usr/bin since it's not a real path.
29590     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29591       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29592       # a path prefixed by /cygdrive for fixpath to work.
29593       new_path="$CYGWIN_ROOT_PATH$input_path"
29594     fi
29595   fi
29596 
29597 
29598   if test "x$path" != "x$new_path"; then
29599     BOOT_JDK="$new_path"
29600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29601 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29602   fi
29603 
29604     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29605 
29606   path="$BOOT_JDK"
29607   has_colon=`$ECHO $path | $GREP ^.:`
29608   new_path="$path"
29609   if test "x$has_colon" = x; then
29610     # Not in mixed or Windows style, start by that.
29611     new_path=`cmd //c echo $path`
29612   fi
29613 
29614 
29615   input_path="$new_path"
29616   # Check if we need to convert this using DOS-style short mode. If the path
29617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29618   # take no chances and rewrite it.
29619   # Note: m4 eats our [], so we need to use [ and ] instead.
29620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29621   if test "x$has_forbidden_chars" != x; then
29622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29623     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29624   fi
29625 
29626 
29627   windows_path="$new_path"
29628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29629     unix_path=`$CYGPATH -u "$windows_path"`
29630     new_path="$unix_path"
29631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29633     new_path="$unix_path"
29634   fi
29635 
29636   if test "x$path" != "x$new_path"; then
29637     BOOT_JDK="$new_path"
29638     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29639 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29640   fi
29641 
29642   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29643   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29644 
29645     else
29646       # We're on a unix platform. Hooray! :)
29647       path="$BOOT_JDK"
29648       has_space=`$ECHO "$path" | $GREP " "`
29649       if test "x$has_space" != x; then
29650         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29651 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29652         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29653       fi
29654 
29655       # Use eval to expand a potential ~
29656       eval path="$path"
29657       if test ! -f "$path" && test ! -d "$path"; then
29658         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29659       fi
29660 
29661       if test -d "$path"; then
29662         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29663       else
29664         dir="`$DIRNAME "$path"`"
29665         base="`$BASENAME "$path"`"
29666         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29667       fi
29668     fi
29669   fi
29670 
29671             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29672 $as_echo_n "checking for Boot JDK... " >&6; }
29673             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29674 $as_echo "$BOOT_JDK" >&6; }
29675             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29676 $as_echo_n "checking Boot JDK version... " >&6; }
29677             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29678             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29679 $as_echo "$BOOT_JDK_VERSION" >&6; }
29680           fi # end check jdk version
29681         fi # end check javac
29682       fi # end check java
29683     fi # end check boot jdk found
29684   fi
29685 
29686   fi
29687 
29688 
29689     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29690     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29691       # Do we have a bin/java?
29692       if test ! -x "$BOOT_JDK/bin/java"; then
29693         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29695         BOOT_JDK_FOUND=no
29696       else
29697         # Do we have a bin/javac?
29698         if test ! -x "$BOOT_JDK/bin/javac"; then
29699           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29700 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29701           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29702 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29703           BOOT_JDK_FOUND=no
29704         else
29705           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29706           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29707 
29708           # Extra M4 quote needed to protect [] in grep expression.
29709           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29710           if test "x$FOUND_CORRECT_VERSION" = x; then
29711             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29712 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29713             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29714 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29715             BOOT_JDK_FOUND=no
29716           else
29717             # We're done! :-)
29718             BOOT_JDK_FOUND=yes
29719 
29720   # Only process if variable expands to non-empty
29721 
29722   if test "x$BOOT_JDK" != x; then
29723     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29724 
29725   # Input might be given as Windows format, start by converting to
29726   # unix format.
29727   path="$BOOT_JDK"
29728   new_path=`$CYGPATH -u "$path"`
29729 
29730   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29731   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29732   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29733   # "foo.exe" is OK but "foo" is an error.
29734   #
29735   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29736   # It is also a way to make sure we got the proper file name for the real test later on.
29737   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29738   if test "x$test_shortpath" = x; then
29739     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29740 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29741     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29742   fi
29743 
29744   # Call helper function which possibly converts this using DOS-style short mode.
29745   # If so, the updated path is stored in $new_path.
29746 
29747   input_path="$new_path"
29748   # Check if we need to convert this using DOS-style short mode. If the path
29749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29750   # take no chances and rewrite it.
29751   # Note: m4 eats our [], so we need to use [ and ] instead.
29752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29753   if test "x$has_forbidden_chars" != x; then
29754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29755     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29756     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29757     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29758       # Going to short mode and back again did indeed matter. Since short mode is
29759       # case insensitive, let's make it lowercase to improve readability.
29760       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29761       # Now convert it back to Unix-style (cygpath)
29762       input_path=`$CYGPATH -u "$shortmode_path"`
29763       new_path="$input_path"
29764     fi
29765   fi
29766 
29767   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29768   if test "x$test_cygdrive_prefix" = x; then
29769     # As a simple fix, exclude /usr/bin since it's not a real path.
29770     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29771       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29772       # a path prefixed by /cygdrive for fixpath to work.
29773       new_path="$CYGWIN_ROOT_PATH$input_path"
29774     fi
29775   fi
29776 
29777 
29778   if test "x$path" != "x$new_path"; then
29779     BOOT_JDK="$new_path"
29780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29781 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29782   fi
29783 
29784     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29785 
29786   path="$BOOT_JDK"
29787   has_colon=`$ECHO $path | $GREP ^.:`
29788   new_path="$path"
29789   if test "x$has_colon" = x; then
29790     # Not in mixed or Windows style, start by that.
29791     new_path=`cmd //c echo $path`
29792   fi
29793 
29794 
29795   input_path="$new_path"
29796   # Check if we need to convert this using DOS-style short mode. If the path
29797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29798   # take no chances and rewrite it.
29799   # Note: m4 eats our [], so we need to use [ and ] instead.
29800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29801   if test "x$has_forbidden_chars" != x; then
29802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29803     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29804   fi
29805 
29806 
29807   windows_path="$new_path"
29808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29809     unix_path=`$CYGPATH -u "$windows_path"`
29810     new_path="$unix_path"
29811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29813     new_path="$unix_path"
29814   fi
29815 
29816   if test "x$path" != "x$new_path"; then
29817     BOOT_JDK="$new_path"
29818     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29819 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29820   fi
29821 
29822   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29823   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29824 
29825     else
29826       # We're on a unix platform. Hooray! :)
29827       path="$BOOT_JDK"
29828       has_space=`$ECHO "$path" | $GREP " "`
29829       if test "x$has_space" != x; then
29830         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29831 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29832         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29833       fi
29834 
29835       # Use eval to expand a potential ~
29836       eval path="$path"
29837       if test ! -f "$path" && test ! -d "$path"; then
29838         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29839       fi
29840 
29841       if test -d "$path"; then
29842         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29843       else
29844         dir="`$DIRNAME "$path"`"
29845         base="`$BASENAME "$path"`"
29846         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29847       fi
29848     fi
29849   fi
29850 
29851             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29852 $as_echo_n "checking for Boot JDK... " >&6; }
29853             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29854 $as_echo "$BOOT_JDK" >&6; }
29855             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29856 $as_echo_n "checking Boot JDK version... " >&6; }
29857             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29858             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29859 $as_echo "$BOOT_JDK_VERSION" >&6; }
29860           fi # end check jdk version
29861         fi # end check javac
29862       fi # end check java
29863     fi # end check boot jdk found
29864   fi
29865 
29866 
29867   # If we haven't found anything yet, we've truly lost. Give up.
29868   if test "x$BOOT_JDK_FOUND" = xno; then
29869 
29870   # Print a helpful message on how to acquire the necessary build dependency.
29871   # openjdk is the help tag: freetype, cups, alsa etc
29872   MISSING_DEPENDENCY=openjdk
29873 
29874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29875     cygwin_help $MISSING_DEPENDENCY
29876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29877     msys_help $MISSING_DEPENDENCY
29878   else
29879     PKGHANDLER_COMMAND=
29880 
29881     case $PKGHANDLER in
29882       apt-get)
29883         apt_help     $MISSING_DEPENDENCY ;;
29884       yum)
29885         yum_help     $MISSING_DEPENDENCY ;;
29886       port)
29887         port_help    $MISSING_DEPENDENCY ;;
29888       pkgutil)
29889         pkgutil_help $MISSING_DEPENDENCY ;;
29890       pkgadd)
29891         pkgadd_help  $MISSING_DEPENDENCY ;;
29892     esac
29893 
29894     if test "x$PKGHANDLER_COMMAND" != x; then
29895       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29896     fi
29897   fi
29898 
29899     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29900 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29901     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29902 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29903     as_fn_error $? "Cannot continue" "$LINENO" 5
29904   fi
29905 
29906 
29907 
29908   # Setup tools from the Boot JDK.
29909 
29910   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29911 
29912   # Publish this variable in the help.
29913 
29914 
29915   if [ -z "${JAVA+x}" ]; then
29916     # The variable is not set by user, try to locate tool using the code snippet
29917 
29918       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29919 $as_echo_n "checking for java in Boot JDK... " >&6; }
29920       JAVA=$BOOT_JDK/bin/java
29921       if test ! -x $JAVA; then
29922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29923 $as_echo "not found" >&6; }
29924         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29925 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29926         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29927       fi
29928       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29929 $as_echo "ok" >&6; }
29930 
29931 
29932   else
29933     # The variable is set, but is it from the command line or the environment?
29934 
29935     # Try to remove the string !JAVA! from our list.
29936     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29937     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29938       # If it failed, the variable was not from the command line. Ignore it,
29939       # but warn the user (except for BASH, which is always set by the calling BASH).
29940       if test "xJAVA" != xBASH; then
29941         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29942 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29943       fi
29944       # Try to locate tool using the code snippet
29945 
29946       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29947 $as_echo_n "checking for java in Boot JDK... " >&6; }
29948       JAVA=$BOOT_JDK/bin/java
29949       if test ! -x $JAVA; then
29950         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29951 $as_echo "not found" >&6; }
29952         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29953 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29954         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29955       fi
29956       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29957 $as_echo "ok" >&6; }
29958 
29959 
29960     else
29961       # If it succeeded, then it was overridden by the user. We will use it
29962       # for the tool.
29963 
29964       # First remove it from the list of overridden variables, so we can test
29965       # for unknown variables in the end.
29966       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29967 
29968       # Check if we try to supply an empty value
29969       if test "x$JAVA" = x; then
29970         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29971 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29973 $as_echo_n "checking for JAVA... " >&6; }
29974         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29975 $as_echo "disabled" >&6; }
29976       else
29977         # Check if the provided tool contains a complete path.
29978         tool_specified="$JAVA"
29979         tool_basename="${tool_specified##*/}"
29980         if test "x$tool_basename" = "x$tool_specified"; then
29981           # A command without a complete path is provided, search $PATH.
29982           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29983 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29984           # Extract the first word of "$tool_basename", so it can be a program name with args.
29985 set dummy $tool_basename; ac_word=$2
29986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29987 $as_echo_n "checking for $ac_word... " >&6; }
29988 if ${ac_cv_path_JAVA+:} false; then :
29989   $as_echo_n "(cached) " >&6
29990 else
29991   case $JAVA in
29992   [\\/]* | ?:[\\/]*)
29993   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29994   ;;
29995   *)
29996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29997 for as_dir in $PATH
29998 do
29999   IFS=$as_save_IFS
30000   test -z "$as_dir" && as_dir=.
30001     for ac_exec_ext in '' $ac_executable_extensions; do
30002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30003     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30005     break 2
30006   fi
30007 done
30008   done
30009 IFS=$as_save_IFS
30010 
30011   ;;
30012 esac
30013 fi
30014 JAVA=$ac_cv_path_JAVA
30015 if test -n "$JAVA"; then
30016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30017 $as_echo "$JAVA" >&6; }
30018 else
30019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30020 $as_echo "no" >&6; }
30021 fi
30022 
30023 
30024           if test "x$JAVA" = x; then
30025             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30026           fi
30027         else
30028           # Otherwise we believe it is a complete path. Use it as it is.
30029           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30030 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30031           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30032 $as_echo_n "checking for JAVA... " >&6; }
30033           if test ! -x "$tool_specified"; then
30034             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30035 $as_echo "not found" >&6; }
30036             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30037           fi
30038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30039 $as_echo "$tool_specified" >&6; }
30040         fi
30041       fi
30042     fi
30043 
30044   fi
30045 
30046 
30047 
30048   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30049 
30050   # Publish this variable in the help.
30051 
30052 
30053   if [ -z "${JAVAC+x}" ]; then
30054     # The variable is not set by user, try to locate tool using the code snippet
30055 
30056       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30057 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30058       JAVAC=$BOOT_JDK/bin/javac
30059       if test ! -x $JAVAC; then
30060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30061 $as_echo "not found" >&6; }
30062         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30063 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30064         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30065       fi
30066       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30067 $as_echo "ok" >&6; }
30068 
30069 
30070   else
30071     # The variable is set, but is it from the command line or the environment?
30072 
30073     # Try to remove the string !JAVAC! from our list.
30074     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30075     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30076       # If it failed, the variable was not from the command line. Ignore it,
30077       # but warn the user (except for BASH, which is always set by the calling BASH).
30078       if test "xJAVAC" != xBASH; then
30079         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30080 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30081       fi
30082       # Try to locate tool using the code snippet
30083 
30084       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30085 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30086       JAVAC=$BOOT_JDK/bin/javac
30087       if test ! -x $JAVAC; then
30088         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30089 $as_echo "not found" >&6; }
30090         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30091 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30092         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30093       fi
30094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30095 $as_echo "ok" >&6; }
30096 
30097 
30098     else
30099       # If it succeeded, then it was overridden by the user. We will use it
30100       # for the tool.
30101 
30102       # First remove it from the list of overridden variables, so we can test
30103       # for unknown variables in the end.
30104       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30105 
30106       # Check if we try to supply an empty value
30107       if test "x$JAVAC" = x; then
30108         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30109 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30110         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30111 $as_echo_n "checking for JAVAC... " >&6; }
30112         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30113 $as_echo "disabled" >&6; }
30114       else
30115         # Check if the provided tool contains a complete path.
30116         tool_specified="$JAVAC"
30117         tool_basename="${tool_specified##*/}"
30118         if test "x$tool_basename" = "x$tool_specified"; then
30119           # A command without a complete path is provided, search $PATH.
30120           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30121 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30122           # Extract the first word of "$tool_basename", so it can be a program name with args.
30123 set dummy $tool_basename; ac_word=$2
30124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30125 $as_echo_n "checking for $ac_word... " >&6; }
30126 if ${ac_cv_path_JAVAC+:} false; then :
30127   $as_echo_n "(cached) " >&6
30128 else
30129   case $JAVAC in
30130   [\\/]* | ?:[\\/]*)
30131   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30132   ;;
30133   *)
30134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30135 for as_dir in $PATH
30136 do
30137   IFS=$as_save_IFS
30138   test -z "$as_dir" && as_dir=.
30139     for ac_exec_ext in '' $ac_executable_extensions; do
30140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30141     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30143     break 2
30144   fi
30145 done
30146   done
30147 IFS=$as_save_IFS
30148 
30149   ;;
30150 esac
30151 fi
30152 JAVAC=$ac_cv_path_JAVAC
30153 if test -n "$JAVAC"; then
30154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30155 $as_echo "$JAVAC" >&6; }
30156 else
30157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30158 $as_echo "no" >&6; }
30159 fi
30160 
30161 
30162           if test "x$JAVAC" = x; then
30163             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30164           fi
30165         else
30166           # Otherwise we believe it is a complete path. Use it as it is.
30167           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30168 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30169           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30170 $as_echo_n "checking for JAVAC... " >&6; }
30171           if test ! -x "$tool_specified"; then
30172             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30173 $as_echo "not found" >&6; }
30174             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30175           fi
30176           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30177 $as_echo "$tool_specified" >&6; }
30178         fi
30179       fi
30180     fi
30181 
30182   fi
30183 
30184 
30185 
30186   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30187 
30188   # Publish this variable in the help.
30189 
30190 
30191   if [ -z "${JAVAH+x}" ]; then
30192     # The variable is not set by user, try to locate tool using the code snippet
30193 
30194       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30195 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30196       JAVAH=$BOOT_JDK/bin/javah
30197       if test ! -x $JAVAH; then
30198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30199 $as_echo "not found" >&6; }
30200         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30201 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30202         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30203       fi
30204       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30205 $as_echo "ok" >&6; }
30206 
30207 
30208   else
30209     # The variable is set, but is it from the command line or the environment?
30210 
30211     # Try to remove the string !JAVAH! from our list.
30212     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30213     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30214       # If it failed, the variable was not from the command line. Ignore it,
30215       # but warn the user (except for BASH, which is always set by the calling BASH).
30216       if test "xJAVAH" != xBASH; then
30217         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30218 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30219       fi
30220       # Try to locate tool using the code snippet
30221 
30222       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30223 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30224       JAVAH=$BOOT_JDK/bin/javah
30225       if test ! -x $JAVAH; then
30226         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30227 $as_echo "not found" >&6; }
30228         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30229 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30230         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30231       fi
30232       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30233 $as_echo "ok" >&6; }
30234 
30235 
30236     else
30237       # If it succeeded, then it was overridden by the user. We will use it
30238       # for the tool.
30239 
30240       # First remove it from the list of overridden variables, so we can test
30241       # for unknown variables in the end.
30242       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30243 
30244       # Check if we try to supply an empty value
30245       if test "x$JAVAH" = x; then
30246         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30247 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30248         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30249 $as_echo_n "checking for JAVAH... " >&6; }
30250         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30251 $as_echo "disabled" >&6; }
30252       else
30253         # Check if the provided tool contains a complete path.
30254         tool_specified="$JAVAH"
30255         tool_basename="${tool_specified##*/}"
30256         if test "x$tool_basename" = "x$tool_specified"; then
30257           # A command without a complete path is provided, search $PATH.
30258           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30259 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30260           # Extract the first word of "$tool_basename", so it can be a program name with args.
30261 set dummy $tool_basename; ac_word=$2
30262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30263 $as_echo_n "checking for $ac_word... " >&6; }
30264 if ${ac_cv_path_JAVAH+:} false; then :
30265   $as_echo_n "(cached) " >&6
30266 else
30267   case $JAVAH in
30268   [\\/]* | ?:[\\/]*)
30269   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30270   ;;
30271   *)
30272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30273 for as_dir in $PATH
30274 do
30275   IFS=$as_save_IFS
30276   test -z "$as_dir" && as_dir=.
30277     for ac_exec_ext in '' $ac_executable_extensions; do
30278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30279     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30281     break 2
30282   fi
30283 done
30284   done
30285 IFS=$as_save_IFS
30286 
30287   ;;
30288 esac
30289 fi
30290 JAVAH=$ac_cv_path_JAVAH
30291 if test -n "$JAVAH"; then
30292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30293 $as_echo "$JAVAH" >&6; }
30294 else
30295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30296 $as_echo "no" >&6; }
30297 fi
30298 
30299 
30300           if test "x$JAVAH" = x; then
30301             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30302           fi
30303         else
30304           # Otherwise we believe it is a complete path. Use it as it is.
30305           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30306 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30307           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30308 $as_echo_n "checking for JAVAH... " >&6; }
30309           if test ! -x "$tool_specified"; then
30310             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30311 $as_echo "not found" >&6; }
30312             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30313           fi
30314           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30315 $as_echo "$tool_specified" >&6; }
30316         fi
30317       fi
30318     fi
30319 
30320   fi
30321 
30322 
30323 
30324   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30325 
30326   # Publish this variable in the help.
30327 
30328 
30329   if [ -z "${JAR+x}" ]; then
30330     # The variable is not set by user, try to locate tool using the code snippet
30331 
30332       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30333 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30334       JAR=$BOOT_JDK/bin/jar
30335       if test ! -x $JAR; then
30336         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30337 $as_echo "not found" >&6; }
30338         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30339 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30340         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30341       fi
30342       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30343 $as_echo "ok" >&6; }
30344 
30345 
30346   else
30347     # The variable is set, but is it from the command line or the environment?
30348 
30349     # Try to remove the string !JAR! from our list.
30350     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30351     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30352       # If it failed, the variable was not from the command line. Ignore it,
30353       # but warn the user (except for BASH, which is always set by the calling BASH).
30354       if test "xJAR" != xBASH; then
30355         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30356 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30357       fi
30358       # Try to locate tool using the code snippet
30359 
30360       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30361 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30362       JAR=$BOOT_JDK/bin/jar
30363       if test ! -x $JAR; then
30364         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30365 $as_echo "not found" >&6; }
30366         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30367 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30368         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30369       fi
30370       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30371 $as_echo "ok" >&6; }
30372 
30373 
30374     else
30375       # If it succeeded, then it was overridden by the user. We will use it
30376       # for the tool.
30377 
30378       # First remove it from the list of overridden variables, so we can test
30379       # for unknown variables in the end.
30380       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30381 
30382       # Check if we try to supply an empty value
30383       if test "x$JAR" = x; then
30384         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30385 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30386         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30387 $as_echo_n "checking for JAR... " >&6; }
30388         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30389 $as_echo "disabled" >&6; }
30390       else
30391         # Check if the provided tool contains a complete path.
30392         tool_specified="$JAR"
30393         tool_basename="${tool_specified##*/}"
30394         if test "x$tool_basename" = "x$tool_specified"; then
30395           # A command without a complete path is provided, search $PATH.
30396           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30397 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30398           # Extract the first word of "$tool_basename", so it can be a program name with args.
30399 set dummy $tool_basename; ac_word=$2
30400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30401 $as_echo_n "checking for $ac_word... " >&6; }
30402 if ${ac_cv_path_JAR+:} false; then :
30403   $as_echo_n "(cached) " >&6
30404 else
30405   case $JAR in
30406   [\\/]* | ?:[\\/]*)
30407   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30408   ;;
30409   *)
30410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30411 for as_dir in $PATH
30412 do
30413   IFS=$as_save_IFS
30414   test -z "$as_dir" && as_dir=.
30415     for ac_exec_ext in '' $ac_executable_extensions; do
30416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30417     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30419     break 2
30420   fi
30421 done
30422   done
30423 IFS=$as_save_IFS
30424 
30425   ;;
30426 esac
30427 fi
30428 JAR=$ac_cv_path_JAR
30429 if test -n "$JAR"; then
30430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30431 $as_echo "$JAR" >&6; }
30432 else
30433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30434 $as_echo "no" >&6; }
30435 fi
30436 
30437 
30438           if test "x$JAR" = x; then
30439             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30440           fi
30441         else
30442           # Otherwise we believe it is a complete path. Use it as it is.
30443           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30444 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30445           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30446 $as_echo_n "checking for JAR... " >&6; }
30447           if test ! -x "$tool_specified"; then
30448             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30449 $as_echo "not found" >&6; }
30450             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30451           fi
30452           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30453 $as_echo "$tool_specified" >&6; }
30454         fi
30455       fi
30456     fi
30457 
30458   fi
30459 
30460 
30461 
30462   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30463 
30464   # Publish this variable in the help.
30465 
30466 
30467   if [ -z "${JARSIGNER+x}" ]; then
30468     # The variable is not set by user, try to locate tool using the code snippet
30469 
30470       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30471 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30472       JARSIGNER=$BOOT_JDK/bin/jarsigner
30473       if test ! -x $JARSIGNER; then
30474         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30475 $as_echo "not found" >&6; }
30476         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30477 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30478         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30479       fi
30480       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30481 $as_echo "ok" >&6; }
30482 
30483 
30484   else
30485     # The variable is set, but is it from the command line or the environment?
30486 
30487     # Try to remove the string !JARSIGNER! from our list.
30488     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30489     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30490       # If it failed, the variable was not from the command line. Ignore it,
30491       # but warn the user (except for BASH, which is always set by the calling BASH).
30492       if test "xJARSIGNER" != xBASH; then
30493         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30494 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30495       fi
30496       # Try to locate tool using the code snippet
30497 
30498       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30499 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30500       JARSIGNER=$BOOT_JDK/bin/jarsigner
30501       if test ! -x $JARSIGNER; then
30502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30503 $as_echo "not found" >&6; }
30504         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30505 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30506         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30507       fi
30508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30509 $as_echo "ok" >&6; }
30510 
30511 
30512     else
30513       # If it succeeded, then it was overridden by the user. We will use it
30514       # for the tool.
30515 
30516       # First remove it from the list of overridden variables, so we can test
30517       # for unknown variables in the end.
30518       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30519 
30520       # Check if we try to supply an empty value
30521       if test "x$JARSIGNER" = x; then
30522         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30523 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30524         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30525 $as_echo_n "checking for JARSIGNER... " >&6; }
30526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30527 $as_echo "disabled" >&6; }
30528       else
30529         # Check if the provided tool contains a complete path.
30530         tool_specified="$JARSIGNER"
30531         tool_basename="${tool_specified##*/}"
30532         if test "x$tool_basename" = "x$tool_specified"; then
30533           # A command without a complete path is provided, search $PATH.
30534           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30535 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30536           # Extract the first word of "$tool_basename", so it can be a program name with args.
30537 set dummy $tool_basename; ac_word=$2
30538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30539 $as_echo_n "checking for $ac_word... " >&6; }
30540 if ${ac_cv_path_JARSIGNER+:} false; then :
30541   $as_echo_n "(cached) " >&6
30542 else
30543   case $JARSIGNER in
30544   [\\/]* | ?:[\\/]*)
30545   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30546   ;;
30547   *)
30548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30549 for as_dir in $PATH
30550 do
30551   IFS=$as_save_IFS
30552   test -z "$as_dir" && as_dir=.
30553     for ac_exec_ext in '' $ac_executable_extensions; do
30554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30555     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30557     break 2
30558   fi
30559 done
30560   done
30561 IFS=$as_save_IFS
30562 
30563   ;;
30564 esac
30565 fi
30566 JARSIGNER=$ac_cv_path_JARSIGNER
30567 if test -n "$JARSIGNER"; then
30568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30569 $as_echo "$JARSIGNER" >&6; }
30570 else
30571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30572 $as_echo "no" >&6; }
30573 fi
30574 
30575 
30576           if test "x$JARSIGNER" = x; then
30577             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30578           fi
30579         else
30580           # Otherwise we believe it is a complete path. Use it as it is.
30581           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30582 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30583           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30584 $as_echo_n "checking for JARSIGNER... " >&6; }
30585           if test ! -x "$tool_specified"; then
30586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30587 $as_echo "not found" >&6; }
30588             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30589           fi
30590           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30591 $as_echo "$tool_specified" >&6; }
30592         fi
30593       fi
30594     fi
30595 
30596   fi
30597 
30598 
30599 
30600   # Finally, set some other options...
30601 
30602   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30603   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30604 
30605 
30606 
30607   $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30608   $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30609   OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30610   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30611   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30612   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30613     dummy="$dummy --patch-module foo=bar"
30614     JVM_ARG_OK=true
30615   else
30616     $ECHO "Arg failed:" >&5
30617     $ECHO "$OUTPUT" >&5
30618     JVM_ARG_OK=false
30619   fi
30620 
30621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30622 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30623   if test "x$JVM_ARG_OK" = "xtrue"; then
30624     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30625 $as_echo "yes" >&6; }
30626     BOOT_JDK_MODULAR="true"
30627   else
30628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30629 $as_echo "no" >&6; }
30630     BOOT_JDK_MODULAR="false"
30631   fi
30632 
30633 
30634 
30635 
30636   # Check if the boot jdk is 32 or 64 bit
30637   if "$JAVA" -d64 -version > /dev/null 2>&1; then
30638     BOOT_JDK_BITS="64"
30639   else
30640     BOOT_JDK_BITS="32"
30641   fi
30642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30643 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30645 $as_echo "$BOOT_JDK_BITS" >&6; }
30646 
30647 
30648 
30649 
30650 # Check whether --with-build-jdk was given.
30651 if test "${with_build_jdk+set}" = set; then :
30652   withval=$with_build_jdk;
30653 fi
30654 
30655 
30656   CREATE_BUILDJDK=false
30657   EXTERNAL_BUILDJDK=false
30658   BUILD_JDK_FOUND="no"
30659   if test "x$with_build_jdk" != "x"; then
30660 
30661   if test "x$BUILD_JDK_FOUND" = xno; then
30662     # Execute the test
30663 
30664        if test "x$with_build_jdk" != x; then
30665          BUILD_JDK=$with_build_jdk
30666          BUILD_JDK_FOUND=maybe
30667          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30668 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30669        fi
30670 
30671     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30672     if test "x$BUILD_JDK_FOUND" = xmaybe; then
30673       # Do we have a bin/java?
30674       if test ! -x "$BUILD_JDK/bin/java"; then
30675         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30676 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30677         BUILD_JDK_FOUND=no
30678       elif test ! -x "$BUILD_JDK/bin/jlink"; then
30679         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30680 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30681         BUILD_JDK_FOUND=no
30682       elif test ! -x "$BUILD_JDK/bin/jmod"; then
30683         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30684 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30685         BUILD_JDK_FOUND=no
30686       elif test ! -x "$BUILD_JDK/bin/javac"; then
30687         # Do we have a bin/javac?
30688         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30689 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30690         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30691 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30692         BUILD_JDK_FOUND=no
30693       else
30694         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30695         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30696 
30697         # Extra M4 quote needed to protect [] in grep expression.
30698         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30699         if test "x$FOUND_CORRECT_VERSION" = x; then
30700           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30701 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30702           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30703 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30704           BUILD_JDK_FOUND=no
30705         else
30706           # We're done!
30707           BUILD_JDK_FOUND=yes
30708 
30709   # Only process if variable expands to non-empty
30710 
30711   if test "x$BUILD_JDK" != x; then
30712     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30713 
30714   # Input might be given as Windows format, start by converting to
30715   # unix format.
30716   path="$BUILD_JDK"
30717   new_path=`$CYGPATH -u "$path"`
30718 
30719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30722   # "foo.exe" is OK but "foo" is an error.
30723   #
30724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30725   # It is also a way to make sure we got the proper file name for the real test later on.
30726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30727   if test "x$test_shortpath" = x; then
30728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30729 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30730     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30731   fi
30732 
30733   # Call helper function which possibly converts this using DOS-style short mode.
30734   # If so, the updated path is stored in $new_path.
30735 
30736   input_path="$new_path"
30737   # Check if we need to convert this using DOS-style short mode. If the path
30738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30739   # take no chances and rewrite it.
30740   # Note: m4 eats our [], so we need to use [ and ] instead.
30741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30742   if test "x$has_forbidden_chars" != x; then
30743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30747       # Going to short mode and back again did indeed matter. Since short mode is
30748       # case insensitive, let's make it lowercase to improve readability.
30749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30750       # Now convert it back to Unix-style (cygpath)
30751       input_path=`$CYGPATH -u "$shortmode_path"`
30752       new_path="$input_path"
30753     fi
30754   fi
30755 
30756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30757   if test "x$test_cygdrive_prefix" = x; then
30758     # As a simple fix, exclude /usr/bin since it's not a real path.
30759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30761       # a path prefixed by /cygdrive for fixpath to work.
30762       new_path="$CYGWIN_ROOT_PATH$input_path"
30763     fi
30764   fi
30765 
30766 
30767   if test "x$path" != "x$new_path"; then
30768     BUILD_JDK="$new_path"
30769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30770 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30771   fi
30772 
30773     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30774 
30775   path="$BUILD_JDK"
30776   has_colon=`$ECHO $path | $GREP ^.:`
30777   new_path="$path"
30778   if test "x$has_colon" = x; then
30779     # Not in mixed or Windows style, start by that.
30780     new_path=`cmd //c echo $path`
30781   fi
30782 
30783 
30784   input_path="$new_path"
30785   # Check if we need to convert this using DOS-style short mode. If the path
30786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30787   # take no chances and rewrite it.
30788   # Note: m4 eats our [], so we need to use [ and ] instead.
30789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30790   if test "x$has_forbidden_chars" != x; then
30791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30793   fi
30794 
30795 
30796   windows_path="$new_path"
30797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30798     unix_path=`$CYGPATH -u "$windows_path"`
30799     new_path="$unix_path"
30800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30802     new_path="$unix_path"
30803   fi
30804 
30805   if test "x$path" != "x$new_path"; then
30806     BUILD_JDK="$new_path"
30807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30808 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30809   fi
30810 
30811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30813 
30814     else
30815       # We're on a unix platform. Hooray! :)
30816       path="$BUILD_JDK"
30817       has_space=`$ECHO "$path" | $GREP " "`
30818       if test "x$has_space" != x; then
30819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30820 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30821         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30822       fi
30823 
30824       # Use eval to expand a potential ~
30825       eval path="$path"
30826       if test ! -f "$path" && test ! -d "$path"; then
30827         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30828       fi
30829 
30830       if test -d "$path"; then
30831         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30832       else
30833         dir="`$DIRNAME "$path"`"
30834         base="`$BASENAME "$path"`"
30835         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30836       fi
30837     fi
30838   fi
30839 
30840           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30841 $as_echo_n "checking for Build JDK... " >&6; }
30842           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30843 $as_echo "$BUILD_JDK" >&6; }
30844           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30845 $as_echo_n "checking Build JDK version... " >&6; }
30846           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30847           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30848 $as_echo "$BUILD_JDK_VERSION" >&6; }
30849         fi # end check jdk version
30850       fi # end check java
30851     fi # end check build jdk found
30852   fi
30853 
30854     EXTERNAL_BUILDJDK=true
30855   else
30856     if test "x$COMPILE_TYPE" = "xcross"; then
30857       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30858       BUILD_JDK_FOUND=yes
30859       CREATE_BUILDJDK=true
30860       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30861 $as_echo_n "checking for Build JDK... " >&6; }
30862       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30863 $as_echo "yes, will build it for the host platform" >&6; }
30864     else
30865       BUILD_JDK="\$(JDK_OUTPUTDIR)"
30866       BUILD_JDK_FOUND=yes
30867       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30868 $as_echo_n "checking for Build JDK... " >&6; }
30869       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30870 $as_echo "yes, will use output dir" >&6; }
30871     fi
30872   fi
30873 
30874   JMOD="$BUILD_JDK/bin/jmod"
30875   JLINK="$BUILD_JDK/bin/jlink"
30876 
30877 
30878 
30879   if test "x$BUILD_JDK_FOUND" != "xyes"; then
30880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30881 $as_echo_n "checking for Build JDK... " >&6; }
30882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30883 $as_echo "no" >&6; }
30884     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30885   fi
30886 
30887 
30888 
30889 
30890 
30891 
30892 ###############################################################################
30893 #
30894 # Configure the sources to use. We can add or override individual directories.
30895 #
30896 ###############################################################################
30897 
30898 
30899   # Where are the sources.
30900   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30901   CORBA_TOPDIR="$SRC_ROOT/corba"
30902   JAXP_TOPDIR="$SRC_ROOT/jaxp"
30903   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30904   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30905   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30906   JDK_TOPDIR="$SRC_ROOT/jdk"
30907 
30908 
30909 
30910 
30911 
30912 
30913 
30914 
30915 
30916   # This feature is no longer supported.
30917 
30918 
30919 
30920 # Check whether --with-add-source-root was given.
30921 if test "${with_add_source_root+set}" = set; then :
30922   withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
30923 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30924 fi
30925 
30926 
30927 
30928 
30929 # Check whether --with-override-source-root was given.
30930 if test "${with_override_source_root+set}" = set; then :
30931   withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
30932 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30933 fi
30934 
30935 
30936 
30937 
30938 # Check whether --with-adds-and-overrides was given.
30939 if test "${with_adds_and_overrides+set}" = set; then :
30940   withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
30941 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30942 fi
30943 
30944 
30945 
30946 
30947 # Check whether --with-override-langtools was given.
30948 if test "${with_override_langtools+set}" = set; then :
30949   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30950 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30951 fi
30952 
30953 
30954 
30955 
30956 # Check whether --with-override-corba was given.
30957 if test "${with_override_corba+set}" = set; then :
30958   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30959 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30960 fi
30961 
30962 
30963 
30964 
30965 # Check whether --with-override-jaxp was given.
30966 if test "${with_override_jaxp+set}" = set; then :
30967   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30968 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30969 fi
30970 
30971 
30972 
30973 
30974 # Check whether --with-override-jaxws was given.
30975 if test "${with_override_jaxws+set}" = set; then :
30976   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30977 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30978 fi
30979 
30980 
30981 
30982 
30983 # Check whether --with-override-hotspot was given.
30984 if test "${with_override_hotspot+set}" = set; then :
30985   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30986 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30987 fi
30988 
30989 
30990 
30991 
30992 # Check whether --with-override-nashorn was given.
30993 if test "${with_override_nashorn+set}" = set; then :
30994   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30995 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30996 fi
30997 
30998 
30999 
31000 
31001 # Check whether --with-override-jdk was given.
31002 if test "${with_override_jdk+set}" = set; then :
31003   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31004 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31005 fi
31006 
31007 
31008 
31009 
31010   BUILD_OUTPUT="$OUTPUT_ROOT"
31011 
31012   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31013 
31014 
31015 
31016 # Check whether --with-import_hotspot was given.
31017 if test "${with_import_hotspot+set}" = set; then :
31018   withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31019 $as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31020 fi
31021 
31022 
31023 
31024 
31025 
31026 
31027 # Check whether --with-import-modules was given.
31028 if test "${with_import_modules+set}" = set; then :
31029   withval=$with_import_modules;
31030 fi
31031 
31032 
31033   if test "x$with_import_modules" != x \
31034       && test "x$with_import_modules" != "xno"; then
31035     if test -d "$with_import_modules"; then
31036       IMPORT_MODULES_TOPDIR="$with_import_modules"
31037 
31038   # Only process if variable expands to non-empty
31039 
31040   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31041     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31042 
31043   # Input might be given as Windows format, start by converting to
31044   # unix format.
31045   path="$IMPORT_MODULES_TOPDIR"
31046   new_path=`$CYGPATH -u "$path"`
31047 
31048   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31049   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31050   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31051   # "foo.exe" is OK but "foo" is an error.
31052   #
31053   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31054   # It is also a way to make sure we got the proper file name for the real test later on.
31055   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31056   if test "x$test_shortpath" = x; then
31057     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31058 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31059     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31060   fi
31061 
31062   # Call helper function which possibly converts this using DOS-style short mode.
31063   # If so, the updated path is stored in $new_path.
31064 
31065   input_path="$new_path"
31066   # Check if we need to convert this using DOS-style short mode. If the path
31067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31068   # take no chances and rewrite it.
31069   # Note: m4 eats our [], so we need to use [ and ] instead.
31070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31071   if test "x$has_forbidden_chars" != x; then
31072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31076       # Going to short mode and back again did indeed matter. Since short mode is
31077       # case insensitive, let's make it lowercase to improve readability.
31078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31079       # Now convert it back to Unix-style (cygpath)
31080       input_path=`$CYGPATH -u "$shortmode_path"`
31081       new_path="$input_path"
31082     fi
31083   fi
31084 
31085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31086   if test "x$test_cygdrive_prefix" = x; then
31087     # As a simple fix, exclude /usr/bin since it's not a real path.
31088     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31090       # a path prefixed by /cygdrive for fixpath to work.
31091       new_path="$CYGWIN_ROOT_PATH$input_path"
31092     fi
31093   fi
31094 
31095 
31096   if test "x$path" != "x$new_path"; then
31097     IMPORT_MODULES_TOPDIR="$new_path"
31098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31099 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31100   fi
31101 
31102     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31103 
31104   path="$IMPORT_MODULES_TOPDIR"
31105   has_colon=`$ECHO $path | $GREP ^.:`
31106   new_path="$path"
31107   if test "x$has_colon" = x; then
31108     # Not in mixed or Windows style, start by that.
31109     new_path=`cmd //c echo $path`
31110   fi
31111 
31112 
31113   input_path="$new_path"
31114   # Check if we need to convert this using DOS-style short mode. If the path
31115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31116   # take no chances and rewrite it.
31117   # Note: m4 eats our [], so we need to use [ and ] instead.
31118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31119   if test "x$has_forbidden_chars" != x; then
31120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31121     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31122   fi
31123 
31124 
31125   windows_path="$new_path"
31126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31127     unix_path=`$CYGPATH -u "$windows_path"`
31128     new_path="$unix_path"
31129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31131     new_path="$unix_path"
31132   fi
31133 
31134   if test "x$path" != "x$new_path"; then
31135     IMPORT_MODULES_TOPDIR="$new_path"
31136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31137 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31138   fi
31139 
31140   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31141   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31142 
31143     else
31144       # We're on a unix platform. Hooray! :)
31145       path="$IMPORT_MODULES_TOPDIR"
31146       has_space=`$ECHO "$path" | $GREP " "`
31147       if test "x$has_space" != x; then
31148         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31149 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31150         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31151       fi
31152 
31153       # Use eval to expand a potential ~
31154       eval path="$path"
31155       if test ! -f "$path" && test ! -d "$path"; then
31156         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31157       fi
31158 
31159       if test -d "$path"; then
31160         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31161       else
31162         dir="`$DIRNAME "$path"`"
31163         base="`$BASENAME "$path"`"
31164         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31165       fi
31166     fi
31167   fi
31168 
31169     elif test -e "$with_import_modules"; then
31170       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31171       $RM -rf "$IMPORT_MODULES_TOPDIR"
31172       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31173       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31174         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31175       fi
31176     else
31177       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31178     fi
31179   fi
31180 
31181   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31182     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31183   fi
31184   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31185     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31186   fi
31187   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31188     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31189   fi
31190   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31191     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31192   fi
31193   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31194     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31195   fi
31196   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31197     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31198   fi
31199 
31200 
31201 
31202 
31203 
31204 
31205 
31206 
31207 
31208 ###############################################################################
31209 #
31210 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31211 # native code.
31212 #
31213 ###############################################################################
31214 
31215 # See if we are doing a complete static build or not
31216 
31217   # Check whether --enable-static-build was given.
31218 if test "${enable_static_build+set}" = set; then :
31219   enableval=$enable_static_build;
31220 fi
31221 
31222   STATIC_BUILD=false
31223   if test "x$enable_static_build" = "xyes"; then
31224     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31225 $as_echo_n "checking if static build is enabled... " >&6; }
31226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31227 $as_echo "yes" >&6; }
31228     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31229       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31230     fi
31231     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31232     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31233     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31234     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31235     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31236     STATIC_BUILD=true
31237   elif test "x$enable_static_build" = "xno"; then
31238     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31239 $as_echo_n "checking if static build is enabled... " >&6; }
31240     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31241 $as_echo "no" >&6; }
31242   elif test "x$enable_static_build" != "x"; then
31243     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31244   fi
31245 
31246 
31247 
31248 
31249 # First determine the toolchain type (compiler family)
31250 
31251 
31252 # Check whether --with-toolchain-type was given.
31253 if test "${with_toolchain_type+set}" = set; then :
31254   withval=$with_toolchain_type;
31255 fi
31256 
31257 
31258   # Use indirect variable referencing
31259   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31260   VALID_TOOLCHAINS=${!toolchain_var_name}
31261 
31262   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31263     if test -n "$XCODEBUILD"; then
31264       # On Mac OS X, default toolchain to clang after Xcode 5
31265       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31266       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31267       if test $? -ne 0; then
31268         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31269       fi
31270       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31271           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31272           $CUT -f 1 -d .`
31273       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31274 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31275       if test $XCODE_MAJOR_VERSION -ge 5; then
31276           DEFAULT_TOOLCHAIN="clang"
31277       else
31278           DEFAULT_TOOLCHAIN="gcc"
31279       fi
31280     else
31281       # If Xcode is not installed, but the command line tools are
31282       # then we can't run xcodebuild. On these systems we should
31283       # default to clang
31284       DEFAULT_TOOLCHAIN="clang"
31285     fi
31286   else
31287     # First toolchain type in the list is the default
31288     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31289   fi
31290 
31291   if test "x$with_toolchain_type" = xlist; then
31292     # List all toolchains
31293     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31294 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31295     for toolchain in $VALID_TOOLCHAINS; do
31296       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31297       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31298       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31299     done
31300 
31301     exit 0
31302   elif test "x$with_toolchain_type" != x; then
31303     # User override; check that it is valid
31304     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31305       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31306 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31307       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31308 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31309       as_fn_error $? "Cannot continue." "$LINENO" 5
31310     fi
31311     TOOLCHAIN_TYPE=$with_toolchain_type
31312   else
31313     # No flag given, use default
31314     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31315   fi
31316 
31317 
31318   TOOLCHAIN_CC_BINARY_clang="clang"
31319   TOOLCHAIN_CC_BINARY_gcc="gcc"
31320   TOOLCHAIN_CC_BINARY_microsoft="cl"
31321   TOOLCHAIN_CC_BINARY_solstudio="cc"
31322   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31323 
31324   TOOLCHAIN_CXX_BINARY_clang="clang++"
31325   TOOLCHAIN_CXX_BINARY_gcc="g++"
31326   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31327   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31328   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31329 
31330   # Use indirect variable referencing
31331   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31332   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31333   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31334   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31335   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31336   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31337   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31338   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31339 
31340 
31341   # Define filename patterns
31342   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31343     LIBRARY_PREFIX=
31344     SHARED_LIBRARY_SUFFIX='.dll'
31345     STATIC_LIBRARY_SUFFIX='.lib'
31346     SHARED_LIBRARY='$1.dll'
31347     STATIC_LIBRARY='$1.lib'
31348     OBJ_SUFFIX='.obj'
31349     EXE_SUFFIX='.exe'
31350   else
31351     LIBRARY_PREFIX=lib
31352     SHARED_LIBRARY_SUFFIX='.so'
31353     STATIC_LIBRARY_SUFFIX='.a'
31354     SHARED_LIBRARY='lib$1.so'
31355     STATIC_LIBRARY='lib$1.a'
31356     OBJ_SUFFIX='.o'
31357     EXE_SUFFIX=''
31358     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31359       # For full static builds, we're overloading the SHARED_LIBRARY
31360       # variables in order to limit the amount of changes required.
31361       # It would be better to remove SHARED and just use LIBRARY and
31362       # LIBRARY_SUFFIX for libraries that can be built either
31363       # shared or static and use STATIC_* for libraries that are
31364       # always built statically.
31365       if test "x$STATIC_BUILD" = xtrue; then
31366         SHARED_LIBRARY='lib$1.a'
31367         SHARED_LIBRARY_SUFFIX='.a'
31368       else
31369         SHARED_LIBRARY='lib$1.dylib'
31370         SHARED_LIBRARY_SUFFIX='.dylib'
31371       fi
31372     fi
31373   fi
31374 
31375 
31376 
31377 
31378 
31379 
31380 
31381 
31382 
31383 
31384   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31385     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31386 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31387   else
31388     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31389 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31390   fi
31391 
31392 
31393 # User supplied flags should be used when configure detects compilers
31394 
31395   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31396     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31397 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31398   fi
31399 
31400   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31401     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31402 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31403   fi
31404 
31405   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31406     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31407 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31408   fi
31409 
31410 
31411 # Check whether --with-extra-cflags was given.
31412 if test "${with_extra_cflags+set}" = set; then :
31413   withval=$with_extra_cflags;
31414 fi
31415 
31416 
31417 
31418 # Check whether --with-extra-cxxflags was given.
31419 if test "${with_extra_cxxflags+set}" = set; then :
31420   withval=$with_extra_cxxflags;
31421 fi
31422 
31423 
31424 
31425 # Check whether --with-extra-ldflags was given.
31426 if test "${with_extra_ldflags+set}" = set; then :
31427   withval=$with_extra_ldflags;
31428 fi
31429 
31430 
31431   EXTRA_CFLAGS="$with_extra_cflags"
31432   EXTRA_CXXFLAGS="$with_extra_cxxflags"
31433   EXTRA_LDFLAGS="$with_extra_ldflags"
31434 
31435   # Hotspot needs these set in their legacy form
31436   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31437   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31438   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31439 
31440 
31441 
31442 
31443 
31444 
31445 
31446 
31447 
31448   # The global CFLAGS and LDLAGS variables are used by configure tests and
31449   # should include the extra parameters
31450   CFLAGS="$EXTRA_CFLAGS"
31451   CXXFLAGS="$EXTRA_CXXFLAGS"
31452   LDFLAGS="$EXTRA_LDFLAGS"
31453   CPPFLAGS=""
31454 
31455 # The sysroot cflags are needed for configure to be able to run the compilers
31456 
31457   if test "x$SYSROOT" != "x"; then
31458     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31459       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31460         # Solaris Studio does not have a concept of sysroot. Instead we must
31461         # make sure the default include and lib dirs are appended to each
31462         # compile and link command line. Must also add -I-xbuiltin to enable
31463         # inlining of system functions and intrinsics.
31464         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31465         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31466             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31467       fi
31468     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31469       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31470       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31471     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31472       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31473       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31474     fi
31475     # Propagate the sysroot args to hotspot
31476     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31477     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31478     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31479     # The global CFLAGS and LDFLAGS variables need these for configure to function
31480     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31481     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31482     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31483     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31484   fi
31485 
31486   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31487     # We also need -iframework<path>/System/Library/Frameworks
31488     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31489     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31490     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31491     # set this here so it doesn't have to be peppered throughout the forest
31492     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31493     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31494   fi
31495 
31496 
31497 
31498 
31499 
31500 # Then detect the actual binaries needed
31501 
31502   # FIXME: Is this needed?
31503   ac_ext=cpp
31504 ac_cpp='$CXXCPP $CPPFLAGS'
31505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31506 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31508 
31509 
31510   # Store the CFLAGS etc passed to the configure script.
31511   ORG_CFLAGS="$CFLAGS"
31512   ORG_CXXFLAGS="$CXXFLAGS"
31513 
31514   # autoconf magic only relies on PATH, so update it if tools dir is specified
31515   OLD_PATH="$PATH"
31516 
31517   # On Windows, we need to detect the visual studio installation first.
31518   # This will change the PATH, but we need to keep that new PATH even
31519   # after toolchain detection is done, since the compiler (on x86) uses
31520   # it for DLL resolution in runtime.
31521   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31522       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31523 
31524   # Store path to cygwin link.exe to help excluding it when searching for
31525   # VS linker. This must be done before changing the PATH when looking for VS.
31526   # Extract the first word of "link", so it can be a program name with args.
31527 set dummy link; ac_word=$2
31528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31529 $as_echo_n "checking for $ac_word... " >&6; }
31530 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31531   $as_echo_n "(cached) " >&6
31532 else
31533   case $CYGWIN_LINK in
31534   [\\/]* | ?:[\\/]*)
31535   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31536   ;;
31537   *)
31538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31539 for as_dir in $PATH
31540 do
31541   IFS=$as_save_IFS
31542   test -z "$as_dir" && as_dir=.
31543     for ac_exec_ext in '' $ac_executable_extensions; do
31544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31545     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31547     break 2
31548   fi
31549 done
31550   done
31551 IFS=$as_save_IFS
31552 
31553   ;;
31554 esac
31555 fi
31556 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31557 if test -n "$CYGWIN_LINK"; then
31558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31559 $as_echo "$CYGWIN_LINK" >&6; }
31560 else
31561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31562 $as_echo "no" >&6; }
31563 fi
31564 
31565 
31566   if test "x$CYGWIN_LINK" != x; then
31567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31568 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31569     "$CYGWIN_LINK" --version > /dev/null
31570     if test $? -eq 0 ; then
31571       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31572 $as_echo "yes" >&6; }
31573     else
31574       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31575 $as_echo "no" >&6; }
31576       # This might be the VS linker. Don't exclude it later on.
31577       CYGWIN_LINK=""
31578     fi
31579   fi
31580 
31581   # First-hand choice is to locate and run the vsvars bat file.
31582 
31583 
31584 # Check whether --with-toolchain-version was given.
31585 if test "${with_toolchain_version+set}" = set; then :
31586   withval=$with_toolchain_version;
31587 fi
31588 
31589 
31590   if test "x$with_toolchain_version" = xlist; then
31591     # List all toolchains
31592     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31593 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31594     for version in $VALID_VS_VERSIONS; do
31595       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31596       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31597     done
31598 
31599     exit 0
31600   elif test "x$DEVKIT_VS_VERSION" != x; then
31601     VS_VERSION=$DEVKIT_VS_VERSION
31602     TOOLCHAIN_VERSION=$VS_VERSION
31603     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31604     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31605     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31606     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31607     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31608     VS_PATH="$TOOLCHAIN_PATH:$PATH"
31609 
31610     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31611     # can still be exported as INCLUDE for compiler invocations without
31612     # SYSROOT_CFLAGS
31613     OLDIFS="$IFS"
31614     IFS=";"
31615     for i in $DEVKIT_VS_INCLUDE; do
31616       ipath=$i
31617 
31618   unix_path="$ipath"
31619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31620     windows_path=`$CYGPATH -m "$unix_path"`
31621     ipath="$windows_path"
31622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31623     windows_path=`cmd //c echo $unix_path`
31624     ipath="$windows_path"
31625   fi
31626 
31627       VS_INCLUDE="$VS_INCLUDE;$ipath"
31628     done
31629     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31630     # as LIB for compiler invocations without SYSROOT_LDFLAGS
31631     for i in $DEVKIT_VS_LIB; do
31632       libpath=$i
31633 
31634   unix_path="$libpath"
31635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31636     windows_path=`$CYGPATH -m "$unix_path"`
31637     libpath="$windows_path"
31638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31639     windows_path=`cmd //c echo $unix_path`
31640     libpath="$windows_path"
31641   fi
31642 
31643       VS_LIB="$VS_LIB;$libpath"
31644     done
31645     IFS="$OLDIFS"
31646 
31647     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31648 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31649 
31650   elif test "x$with_toolchain_version" != x; then
31651     # User override; check that it is valid
31652     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31653       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31654 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31655       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31656 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31657       as_fn_error $? "Cannot continue." "$LINENO" 5
31658     fi
31659     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31660   else
31661     # No flag given, use default
31662     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31663   fi
31664 
31665   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31666 
31667   VS_VERSION="$VS_VERSION"
31668   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31669   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31670   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31671   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31672 
31673   # When using --with-tools-dir, assume it points to the correct and default
31674   # version of Visual Studio or that --with-toolchain-version was also set.
31675   if test "x$with_tools_dir" != x; then
31676 
31677   if test "x$VS_ENV_CMD" = x; then
31678     VS_VERSION="${VS_VERSION}"
31679     VS_BASE="$with_tools_dir/../.."
31680     METHOD="--with-tools-dir"
31681 
31682     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31683       VCVARSFILE="vc/bin/vcvars32.bat"
31684     else
31685       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31686     fi
31687 
31688 
31689   windows_path="$VS_BASE"
31690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31691     unix_path=`$CYGPATH -u "$windows_path"`
31692     VS_BASE="$unix_path"
31693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31695     VS_BASE="$unix_path"
31696   fi
31697 
31698     if test -d "$VS_BASE"; then
31699       if test -f "$VS_BASE/$VCVARSFILE"; then
31700         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31701 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31702         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31703         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31704         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31705         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31706       else
31707         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31708 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31709         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31710 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31711       fi
31712     fi
31713   fi
31714 
31715 
31716   if test "x$VS_ENV_CMD" = x; then
31717     VS_VERSION="${VS_VERSION}"
31718     VS_BASE="$with_tools_dir/../../.."
31719     METHOD="--with-tools-dir"
31720 
31721     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31722       VCVARSFILE="vc/bin/vcvars32.bat"
31723     else
31724       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31725     fi
31726 
31727 
31728   windows_path="$VS_BASE"
31729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31730     unix_path=`$CYGPATH -u "$windows_path"`
31731     VS_BASE="$unix_path"
31732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31734     VS_BASE="$unix_path"
31735   fi
31736 
31737     if test -d "$VS_BASE"; then
31738       if test -f "$VS_BASE/$VCVARSFILE"; then
31739         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31740 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31741         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31742         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31743         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31744         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31745       else
31746         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31747 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31748         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31749 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31750       fi
31751     fi
31752   fi
31753 
31754     if test "x$VS_ENV_CMD" = x; then
31755       # Having specified an argument which is incorrect will produce an instant failure;
31756       # we should not go on looking
31757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31758 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31759       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31760 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31761       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31762 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31763       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31764     fi
31765   fi
31766 
31767   VS_ENV_CMD=""
31768   VS_ENV_ARGS=""
31769 
31770   if test "x$VS_COMNTOOLS" != x; then
31771 
31772   if test "x$VS_ENV_CMD" = x; then
31773     VS_VERSION="${VS_VERSION}"
31774     VS_BASE="$VS_COMNTOOLS/../.."
31775     METHOD="$VS_COMNTOOLS_VAR variable"
31776 
31777     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31778       VCVARSFILE="vc/bin/vcvars32.bat"
31779     else
31780       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31781     fi
31782 
31783 
31784   windows_path="$VS_BASE"
31785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31786     unix_path=`$CYGPATH -u "$windows_path"`
31787     VS_BASE="$unix_path"
31788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31790     VS_BASE="$unix_path"
31791   fi
31792 
31793     if test -d "$VS_BASE"; then
31794       if test -f "$VS_BASE/$VCVARSFILE"; then
31795         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31796 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31797         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31798         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31799         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31800         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31801       else
31802         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31803 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31804         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31805 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31806       fi
31807     fi
31808   fi
31809 
31810   fi
31811   if test "x$PROGRAMFILES" != x; then
31812 
31813   if test "x$VS_ENV_CMD" = x; then
31814     VS_VERSION="${VS_VERSION}"
31815     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31816     METHOD="well-known name"
31817 
31818     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31819       VCVARSFILE="vc/bin/vcvars32.bat"
31820     else
31821       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31822     fi
31823 
31824 
31825   windows_path="$VS_BASE"
31826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31827     unix_path=`$CYGPATH -u "$windows_path"`
31828     VS_BASE="$unix_path"
31829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31831     VS_BASE="$unix_path"
31832   fi
31833 
31834     if test -d "$VS_BASE"; then
31835       if test -f "$VS_BASE/$VCVARSFILE"; then
31836         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31837 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31838         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31839         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31840         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31841         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31842       else
31843         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31844 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31845         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31846 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31847       fi
31848     fi
31849   fi
31850 
31851   fi
31852   # Work around the insanely named ProgramFiles(x86) env variable
31853   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31854   if test "x$PROGRAMFILES_X86" != x; then
31855 
31856   if test "x$VS_ENV_CMD" = x; then
31857     VS_VERSION="${VS_VERSION}"
31858     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31859     METHOD="well-known name"
31860 
31861     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31862       VCVARSFILE="vc/bin/vcvars32.bat"
31863     else
31864       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31865     fi
31866 
31867 
31868   windows_path="$VS_BASE"
31869   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31870     unix_path=`$CYGPATH -u "$windows_path"`
31871     VS_BASE="$unix_path"
31872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31873     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31874     VS_BASE="$unix_path"
31875   fi
31876 
31877     if test -d "$VS_BASE"; then
31878       if test -f "$VS_BASE/$VCVARSFILE"; then
31879         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31880 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31881         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31882         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31883         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31884         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31885       else
31886         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31887 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31888         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31889 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31890       fi
31891     fi
31892   fi
31893 
31894   fi
31895 
31896   if test "x$VS_ENV_CMD" = x; then
31897     VS_VERSION="${VS_VERSION}"
31898     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31899     METHOD="well-known name"
31900 
31901     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31902       VCVARSFILE="vc/bin/vcvars32.bat"
31903     else
31904       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31905     fi
31906 
31907 
31908   windows_path="$VS_BASE"
31909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31910     unix_path=`$CYGPATH -u "$windows_path"`
31911     VS_BASE="$unix_path"
31912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31914     VS_BASE="$unix_path"
31915   fi
31916 
31917     if test -d "$VS_BASE"; then
31918       if test -f "$VS_BASE/$VCVARSFILE"; then
31919         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31920 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31921         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31922         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31923         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31924         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31925       else
31926         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31927 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31928         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31929 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31930       fi
31931     fi
31932   fi
31933 
31934 
31935   if test "x$VS_ENV_CMD" = x; then
31936     VS_VERSION="${VS_VERSION}"
31937     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31938     METHOD="well-known name"
31939 
31940     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31941       VCVARSFILE="vc/bin/vcvars32.bat"
31942     else
31943       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31944     fi
31945 
31946 
31947   windows_path="$VS_BASE"
31948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31949     unix_path=`$CYGPATH -u "$windows_path"`
31950     VS_BASE="$unix_path"
31951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31953     VS_BASE="$unix_path"
31954   fi
31955 
31956     if test -d "$VS_BASE"; then
31957       if test -f "$VS_BASE/$VCVARSFILE"; then
31958         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31959 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31960         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31961         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31962         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31963         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31964       else
31965         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31966 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31967         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31968 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31969       fi
31970     fi
31971   fi
31972 
31973 
31974   if test "x$SDK_INSTALL_DIR" != x; then
31975     if test "x$ProgramW6432" != x; then
31976 
31977   if test "x$VS_ENV_CMD" = x; then
31978     VS_VERSION="${VS_VERSION}"
31979     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31980     METHOD="well-known name"
31981 
31982   windows_path="$WIN_SDK_BASE"
31983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31984     unix_path=`$CYGPATH -u "$windows_path"`
31985     WIN_SDK_BASE="$unix_path"
31986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31987     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31988     WIN_SDK_BASE="$unix_path"
31989   fi
31990 
31991     if test -d "$WIN_SDK_BASE"; then
31992       # There have been cases of partial or broken SDK installations. A missing
31993       # lib dir is not going to work.
31994       if test ! -d "$WIN_SDK_BASE/lib"; then
31995         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31996 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31997         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31998 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31999       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32000         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32001 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32002         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32003         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32004           VS_ENV_ARGS="/x86"
32005         else
32006           VS_ENV_ARGS="/x64"
32007         fi
32008         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32009         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32010         # TODO: improve detection for other versions of SDK
32011         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32012       else
32013         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32014 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32015         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32016 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32017       fi
32018     fi
32019   fi
32020 
32021     fi
32022     if test "x$PROGRAMW6432" != x; then
32023 
32024   if test "x$VS_ENV_CMD" = x; then
32025     VS_VERSION="${VS_VERSION}"
32026     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32027     METHOD="well-known name"
32028 
32029   windows_path="$WIN_SDK_BASE"
32030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32031     unix_path=`$CYGPATH -u "$windows_path"`
32032     WIN_SDK_BASE="$unix_path"
32033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32035     WIN_SDK_BASE="$unix_path"
32036   fi
32037 
32038     if test -d "$WIN_SDK_BASE"; then
32039       # There have been cases of partial or broken SDK installations. A missing
32040       # lib dir is not going to work.
32041       if test ! -d "$WIN_SDK_BASE/lib"; then
32042         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32043 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32044         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32045 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32046       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32047         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32048 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32049         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32050         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32051           VS_ENV_ARGS="/x86"
32052         else
32053           VS_ENV_ARGS="/x64"
32054         fi
32055         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32056         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32057         # TODO: improve detection for other versions of SDK
32058         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32059       else
32060         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32061 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32062         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32063 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32064       fi
32065     fi
32066   fi
32067 
32068     fi
32069     if test "x$PROGRAMFILES" != x; then
32070 
32071   if test "x$VS_ENV_CMD" = x; then
32072     VS_VERSION="${VS_VERSION}"
32073     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32074     METHOD="well-known name"
32075 
32076   windows_path="$WIN_SDK_BASE"
32077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32078     unix_path=`$CYGPATH -u "$windows_path"`
32079     WIN_SDK_BASE="$unix_path"
32080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32082     WIN_SDK_BASE="$unix_path"
32083   fi
32084 
32085     if test -d "$WIN_SDK_BASE"; then
32086       # There have been cases of partial or broken SDK installations. A missing
32087       # lib dir is not going to work.
32088       if test ! -d "$WIN_SDK_BASE/lib"; then
32089         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32090 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32091         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32092 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32093       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32094         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32095 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32096         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32097         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32098           VS_ENV_ARGS="/x86"
32099         else
32100           VS_ENV_ARGS="/x64"
32101         fi
32102         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32103         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32104         # TODO: improve detection for other versions of SDK
32105         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32106       else
32107         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32108 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32109         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32110 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32111       fi
32112     fi
32113   fi
32114 
32115     fi
32116 
32117   if test "x$VS_ENV_CMD" = x; then
32118     VS_VERSION="${VS_VERSION}"
32119     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32120     METHOD="well-known name"
32121 
32122   windows_path="$WIN_SDK_BASE"
32123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32124     unix_path=`$CYGPATH -u "$windows_path"`
32125     WIN_SDK_BASE="$unix_path"
32126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32128     WIN_SDK_BASE="$unix_path"
32129   fi
32130 
32131     if test -d "$WIN_SDK_BASE"; then
32132       # There have been cases of partial or broken SDK installations. A missing
32133       # lib dir is not going to work.
32134       if test ! -d "$WIN_SDK_BASE/lib"; then
32135         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32136 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32137         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32138 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32139       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32140         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32141 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32142         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32143         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32144           VS_ENV_ARGS="/x86"
32145         else
32146           VS_ENV_ARGS="/x64"
32147         fi
32148         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32149         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32150         # TODO: improve detection for other versions of SDK
32151         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32152       else
32153         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32154 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32155         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32156 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32157       fi
32158     fi
32159   fi
32160 
32161 
32162   if test "x$VS_ENV_CMD" = x; then
32163     VS_VERSION="${VS_VERSION}"
32164     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32165     METHOD="well-known name"
32166 
32167   windows_path="$WIN_SDK_BASE"
32168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32169     unix_path=`$CYGPATH -u "$windows_path"`
32170     WIN_SDK_BASE="$unix_path"
32171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32172     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32173     WIN_SDK_BASE="$unix_path"
32174   fi
32175 
32176     if test -d "$WIN_SDK_BASE"; then
32177       # There have been cases of partial or broken SDK installations. A missing
32178       # lib dir is not going to work.
32179       if test ! -d "$WIN_SDK_BASE/lib"; then
32180         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32181 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32182         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32183 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32184       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32185         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32186 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32187         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32188         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32189           VS_ENV_ARGS="/x86"
32190         else
32191           VS_ENV_ARGS="/x64"
32192         fi
32193         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32194         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32195         # TODO: improve detection for other versions of SDK
32196         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32197       else
32198         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32199 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32200         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32201 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32202       fi
32203     fi
32204   fi
32205 
32206   fi
32207 
32208     if test "x$VS_ENV_CMD" != x; then
32209       TOOLCHAIN_VERSION=$VS_VERSION
32210       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32211       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32212       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32213       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32214       # The rest of the variables are already evaled while probing
32215       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32216 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32217       break
32218     fi
32219   done
32220 
32221 
32222   # If we have a devkit, skip all of the below.
32223   if test "x$DEVKIT_VS_VERSION" = x; then
32224     if test "x$VS_ENV_CMD" != x; then
32225       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32226 
32227   # Only process if variable expands to non-empty
32228 
32229   if test "x$VS_ENV_CMD" != x; then
32230     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32231 
32232   # First separate the path from the arguments. This will split at the first
32233   # space.
32234   complete="$VS_ENV_CMD"
32235   path="${complete%% *}"
32236   tmp="$complete EOL"
32237   arguments="${tmp#* }"
32238 
32239   # Input might be given as Windows format, start by converting to
32240   # unix format.
32241   new_path=`$CYGPATH -u "$path"`
32242 
32243   # Now try to locate executable using which
32244   new_path=`$WHICH "$new_path" 2> /dev/null`
32245   # bat and cmd files are not always considered executable in cygwin causing which
32246   # to not find them
32247   if test "x$new_path" = x \
32248       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32249       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32250     new_path=`$CYGPATH -u "$path"`
32251   fi
32252   if test "x$new_path" = x; then
32253     # Oops. Which didn't find the executable.
32254     # The splitting of arguments from the executable at a space might have been incorrect,
32255     # since paths with space are more likely in Windows. Give it another try with the whole
32256     # argument.
32257     path="$complete"
32258     arguments="EOL"
32259     new_path=`$CYGPATH -u "$path"`
32260     new_path=`$WHICH "$new_path" 2> /dev/null`
32261     # bat and cmd files are not always considered executable in cygwin causing which
32262     # to not find them
32263     if test "x$new_path" = x \
32264         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32265         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32266       new_path=`$CYGPATH -u "$path"`
32267     fi
32268     if test "x$new_path" = x; then
32269       # It's still not found. Now this is an unrecoverable error.
32270       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32271 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32272       has_space=`$ECHO "$complete" | $GREP " "`
32273       if test "x$has_space" != x; then
32274         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32275 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32276       fi
32277       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32278     fi
32279   fi
32280 
32281   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32282   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32283   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32284   # "foo.exe" is OK but "foo" is an error.
32285   #
32286   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32287   # It is also a way to make sure we got the proper file name for the real test later on.
32288   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32289   if test "x$test_shortpath" = x; then
32290     # Short path failed, file does not exist as specified.
32291     # Try adding .exe or .cmd
32292     if test -f "${new_path}.exe"; then
32293       input_to_shortpath="${new_path}.exe"
32294     elif test -f "${new_path}.cmd"; then
32295       input_to_shortpath="${new_path}.cmd"
32296     else
32297       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32298 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32299       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32300 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32301       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32302     fi
32303   else
32304     input_to_shortpath="$new_path"
32305   fi
32306 
32307   # Call helper function which possibly converts this using DOS-style short mode.
32308   # If so, the updated path is stored in $new_path.
32309   new_path="$input_to_shortpath"
32310 
32311   input_path="$input_to_shortpath"
32312   # Check if we need to convert this using DOS-style short mode. If the path
32313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32314   # take no chances and rewrite it.
32315   # Note: m4 eats our [], so we need to use [ and ] instead.
32316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32317   if test "x$has_forbidden_chars" != x; then
32318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32322       # Going to short mode and back again did indeed matter. Since short mode is
32323       # case insensitive, let's make it lowercase to improve readability.
32324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32325       # Now convert it back to Unix-style (cygpath)
32326       input_path=`$CYGPATH -u "$shortmode_path"`
32327       new_path="$input_path"
32328     fi
32329   fi
32330 
32331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32332   if test "x$test_cygdrive_prefix" = x; then
32333     # As a simple fix, exclude /usr/bin since it's not a real path.
32334     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32336       # a path prefixed by /cygdrive for fixpath to work.
32337       new_path="$CYGWIN_ROOT_PATH$input_path"
32338     fi
32339   fi
32340 
32341   # remove trailing .exe if any
32342   new_path="${new_path/%.exe/}"
32343 
32344     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32345 
32346   # First separate the path from the arguments. This will split at the first
32347   # space.
32348   complete="$VS_ENV_CMD"
32349   path="${complete%% *}"
32350   tmp="$complete EOL"
32351   arguments="${tmp#* }"
32352 
32353   # Input might be given as Windows format, start by converting to
32354   # unix format.
32355   new_path="$path"
32356 
32357   windows_path="$new_path"
32358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32359     unix_path=`$CYGPATH -u "$windows_path"`
32360     new_path="$unix_path"
32361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32363     new_path="$unix_path"
32364   fi
32365 
32366 
32367   # Now try to locate executable using which
32368   new_path=`$WHICH "$new_path" 2> /dev/null`
32369 
32370   if test "x$new_path" = x; then
32371     # Oops. Which didn't find the executable.
32372     # The splitting of arguments from the executable at a space might have been incorrect,
32373     # since paths with space are more likely in Windows. Give it another try with the whole
32374     # argument.
32375     path="$complete"
32376     arguments="EOL"
32377     new_path="$path"
32378 
32379   windows_path="$new_path"
32380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32381     unix_path=`$CYGPATH -u "$windows_path"`
32382     new_path="$unix_path"
32383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32384     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32385     new_path="$unix_path"
32386   fi
32387 
32388 
32389     new_path=`$WHICH "$new_path" 2> /dev/null`
32390     # bat and cmd files are not always considered executable in MSYS causing which
32391     # to not find them
32392     if test "x$new_path" = x \
32393         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32394         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32395       new_path="$path"
32396 
32397   windows_path="$new_path"
32398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32399     unix_path=`$CYGPATH -u "$windows_path"`
32400     new_path="$unix_path"
32401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32403     new_path="$unix_path"
32404   fi
32405 
32406     fi
32407 
32408     if test "x$new_path" = x; then
32409       # It's still not found. Now this is an unrecoverable error.
32410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32411 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32412       has_space=`$ECHO "$complete" | $GREP " "`
32413       if test "x$has_space" != x; then
32414         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32415 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32416       fi
32417       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32418     fi
32419   fi
32420 
32421   # Now new_path has a complete unix path to the binary
32422   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32423     # Keep paths in /bin as-is, but remove trailing .exe if any
32424     new_path="${new_path/%.exe/}"
32425     # Do not save /bin paths to all_fixpath_prefixes!
32426   else
32427     # Not in mixed or Windows style, start by that.
32428     new_path=`cmd //c echo $new_path`
32429 
32430   input_path="$new_path"
32431   # Check if we need to convert this using DOS-style short mode. If the path
32432   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32433   # take no chances and rewrite it.
32434   # Note: m4 eats our [], so we need to use [ and ] instead.
32435   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32436   if test "x$has_forbidden_chars" != x; then
32437     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32438     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32439   fi
32440 
32441     # Output is in $new_path
32442 
32443   windows_path="$new_path"
32444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32445     unix_path=`$CYGPATH -u "$windows_path"`
32446     new_path="$unix_path"
32447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32449     new_path="$unix_path"
32450   fi
32451 
32452     # remove trailing .exe if any
32453     new_path="${new_path/%.exe/}"
32454 
32455     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32456     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32457   fi
32458 
32459     else
32460       # We're on a unix platform. Hooray! :)
32461       # First separate the path from the arguments. This will split at the first
32462       # space.
32463       complete="$VS_ENV_CMD"
32464       path="${complete%% *}"
32465       tmp="$complete EOL"
32466       arguments="${tmp#* }"
32467 
32468       # Cannot rely on the command "which" here since it doesn't always work.
32469       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32470       if test -z "$is_absolute_path"; then
32471         # Path to executable is not absolute. Find it.
32472         IFS_save="$IFS"
32473         IFS=:
32474         for p in $PATH; do
32475           if test -f "$p/$path" && test -x "$p/$path"; then
32476             new_path="$p/$path"
32477             break
32478           fi
32479         done
32480         IFS="$IFS_save"
32481       else
32482         # This is an absolute path, we can use it without further modifications.
32483         new_path="$path"
32484       fi
32485 
32486       if test "x$new_path" = x; then
32487         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32488 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32489         has_space=`$ECHO "$complete" | $GREP " "`
32490         if test "x$has_space" != x; then
32491           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32492 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32493         fi
32494         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32495       fi
32496     fi
32497 
32498     # Now join together the path and the arguments once again
32499     if test "x$arguments" != xEOL; then
32500       new_complete="$new_path ${arguments% *}"
32501     else
32502       new_complete="$new_path"
32503     fi
32504 
32505     if test "x$complete" != "x$new_complete"; then
32506       VS_ENV_CMD="$new_complete"
32507       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32508 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32509     fi
32510   fi
32511 
32512 
32513       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32514       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32515 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32516 
32517       # We need to create a couple of temporary files.
32518       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32519       $MKDIR -p $VS_ENV_TMP_DIR
32520 
32521       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32522       # Instead create a shell script which will set the relevant variables when run.
32523       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32524 
32525   unix_path="$WINPATH_VS_ENV_CMD"
32526   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32527     windows_path=`$CYGPATH -m "$unix_path"`
32528     WINPATH_VS_ENV_CMD="$windows_path"
32529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32530     windows_path=`cmd //c echo $unix_path`
32531     WINPATH_VS_ENV_CMD="$windows_path"
32532   fi
32533 
32534       WINPATH_BASH="$BASH"
32535 
32536   unix_path="$WINPATH_BASH"
32537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32538     windows_path=`$CYGPATH -m "$unix_path"`
32539     WINPATH_BASH="$windows_path"
32540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32541     windows_path=`cmd //c echo $unix_path`
32542     WINPATH_BASH="$windows_path"
32543   fi
32544 
32545 
32546       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32547       # script (executable by bash) that will setup the important variables.
32548       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32549       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32550       # This will end up something like:
32551       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32552       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32553       # These will end up something like:
32554       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32555       # The trailing space for everyone except PATH is no typo, but is needed due
32556       # to trailing \ in the Windows paths. These will be stripped later.
32557       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32558           >> $EXTRACT_VC_ENV_BAT_FILE
32559       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32560           >> $EXTRACT_VC_ENV_BAT_FILE
32561       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32562           >> $EXTRACT_VC_ENV_BAT_FILE
32563       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32564           >> $EXTRACT_VC_ENV_BAT_FILE
32565       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32566           >> $EXTRACT_VC_ENV_BAT_FILE
32567       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32568           >> $EXTRACT_VC_ENV_BAT_FILE
32569 
32570       # Now execute the newly created bat file.
32571       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32572       # Change directory so we don't need to mess with Windows paths in redirects.
32573       cd $VS_ENV_TMP_DIR
32574       cmd /c extract-vs-env.bat | $CAT
32575       cd $CURDIR
32576 
32577       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32578         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32579 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32580         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32581 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32582         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32583 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32584         as_fn_error $? "Cannot continue" "$LINENO" 5
32585       fi
32586 
32587       # Now set all paths and other env variables. This will allow the rest of
32588       # the configure script to find and run the compiler in the proper way.
32589       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32590 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32591       . $VS_ENV_TMP_DIR/set-vs-env.sh
32592       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32593       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32594     else
32595       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32596       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32597 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32598     fi
32599   fi
32600 
32601   # At this point, we should have correct variables in the environment, or we can't continue.
32602   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32603 $as_echo_n "checking for Visual Studio variables... " >&6; }
32604 
32605   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32606       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32607     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32608       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32609 $as_echo "present but broken" >&6; }
32610       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32611     else
32612       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32613 $as_echo "ok" >&6; }
32614       # Remove any trailing "\" ";" and " " from the variables.
32615       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32616       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32617       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32618       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32619       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32620       # Remove any paths containing # (typically F#) as that messes up make. This
32621       # is needed if visual studio was installed with F# support.
32622       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32623 
32624 
32625 
32626 
32627 
32628       # Convert VS_INCLUDE into SYSROOT_CFLAGS
32629       OLDIFS="$IFS"
32630       IFS=";"
32631       for i in $VS_INCLUDE; do
32632         ipath=$i
32633         # Only process non-empty elements
32634         if test "x$ipath" != x; then
32635           IFS="$OLDIFS"
32636           # Check that directory exists before calling fixup_path
32637           testpath=$ipath
32638 
32639   windows_path="$testpath"
32640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32641     unix_path=`$CYGPATH -u "$windows_path"`
32642     testpath="$unix_path"
32643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32645     testpath="$unix_path"
32646   fi
32647 
32648           if test -d "$testpath"; then
32649 
32650   # Only process if variable expands to non-empty
32651 
32652   if test "x$ipath" != x; then
32653     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32654 
32655   # Input might be given as Windows format, start by converting to
32656   # unix format.
32657   path="$ipath"
32658   new_path=`$CYGPATH -u "$path"`
32659 
32660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32663   # "foo.exe" is OK but "foo" is an error.
32664   #
32665   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32666   # It is also a way to make sure we got the proper file name for the real test later on.
32667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32668   if test "x$test_shortpath" = x; then
32669     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32670 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32671     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32672   fi
32673 
32674   # Call helper function which possibly converts this using DOS-style short mode.
32675   # If so, the updated path is stored in $new_path.
32676 
32677   input_path="$new_path"
32678   # Check if we need to convert this using DOS-style short mode. If the path
32679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32680   # take no chances and rewrite it.
32681   # Note: m4 eats our [], so we need to use [ and ] instead.
32682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32683   if test "x$has_forbidden_chars" != x; then
32684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32688       # Going to short mode and back again did indeed matter. Since short mode is
32689       # case insensitive, let's make it lowercase to improve readability.
32690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32691       # Now convert it back to Unix-style (cygpath)
32692       input_path=`$CYGPATH -u "$shortmode_path"`
32693       new_path="$input_path"
32694     fi
32695   fi
32696 
32697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32698   if test "x$test_cygdrive_prefix" = x; then
32699     # As a simple fix, exclude /usr/bin since it's not a real path.
32700     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32702       # a path prefixed by /cygdrive for fixpath to work.
32703       new_path="$CYGWIN_ROOT_PATH$input_path"
32704     fi
32705   fi
32706 
32707 
32708   if test "x$path" != "x$new_path"; then
32709     ipath="$new_path"
32710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32711 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32712   fi
32713 
32714     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32715 
32716   path="$ipath"
32717   has_colon=`$ECHO $path | $GREP ^.:`
32718   new_path="$path"
32719   if test "x$has_colon" = x; then
32720     # Not in mixed or Windows style, start by that.
32721     new_path=`cmd //c echo $path`
32722   fi
32723 
32724 
32725   input_path="$new_path"
32726   # Check if we need to convert this using DOS-style short mode. If the path
32727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32728   # take no chances and rewrite it.
32729   # Note: m4 eats our [], so we need to use [ and ] instead.
32730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32731   if test "x$has_forbidden_chars" != x; then
32732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32733     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32734   fi
32735 
32736 
32737   windows_path="$new_path"
32738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32739     unix_path=`$CYGPATH -u "$windows_path"`
32740     new_path="$unix_path"
32741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32743     new_path="$unix_path"
32744   fi
32745 
32746   if test "x$path" != "x$new_path"; then
32747     ipath="$new_path"
32748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32749 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32750   fi
32751 
32752   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32753   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32754 
32755     else
32756       # We're on a unix platform. Hooray! :)
32757       path="$ipath"
32758       has_space=`$ECHO "$path" | $GREP " "`
32759       if test "x$has_space" != x; then
32760         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32761 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32762         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32763       fi
32764 
32765       # Use eval to expand a potential ~
32766       eval path="$path"
32767       if test ! -f "$path" && test ! -d "$path"; then
32768         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32769       fi
32770 
32771       if test -d "$path"; then
32772         ipath="`cd "$path"; $THEPWDCMD -L`"
32773       else
32774         dir="`$DIRNAME "$path"`"
32775         base="`$BASENAME "$path"`"
32776         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32777       fi
32778     fi
32779   fi
32780 
32781             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32782           fi
32783           IFS=";"
32784         fi
32785       done
32786       # Convert VS_LIB into SYSROOT_LDFLAGS
32787       for i in $VS_LIB; do
32788         libpath=$i
32789         # Only process non-empty elements
32790         if test "x$libpath" != x; then
32791           IFS="$OLDIFS"
32792           # Check that directory exists before calling fixup_path
32793           testpath=$libpath
32794 
32795   windows_path="$testpath"
32796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32797     unix_path=`$CYGPATH -u "$windows_path"`
32798     testpath="$unix_path"
32799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32801     testpath="$unix_path"
32802   fi
32803 
32804           if test -d "$testpath"; then
32805 
32806   # Only process if variable expands to non-empty
32807 
32808   if test "x$libpath" != x; then
32809     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32810 
32811   # Input might be given as Windows format, start by converting to
32812   # unix format.
32813   path="$libpath"
32814   new_path=`$CYGPATH -u "$path"`
32815 
32816   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32817   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32818   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32819   # "foo.exe" is OK but "foo" is an error.
32820   #
32821   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32822   # It is also a way to make sure we got the proper file name for the real test later on.
32823   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32824   if test "x$test_shortpath" = x; then
32825     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32826 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32827     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32828   fi
32829 
32830   # Call helper function which possibly converts this using DOS-style short mode.
32831   # If so, the updated path is stored in $new_path.
32832 
32833   input_path="$new_path"
32834   # Check if we need to convert this using DOS-style short mode. If the path
32835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32836   # take no chances and rewrite it.
32837   # Note: m4 eats our [], so we need to use [ and ] instead.
32838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32839   if test "x$has_forbidden_chars" != x; then
32840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32841     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32842     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32843     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32844       # Going to short mode and back again did indeed matter. Since short mode is
32845       # case insensitive, let's make it lowercase to improve readability.
32846       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32847       # Now convert it back to Unix-style (cygpath)
32848       input_path=`$CYGPATH -u "$shortmode_path"`
32849       new_path="$input_path"
32850     fi
32851   fi
32852 
32853   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32854   if test "x$test_cygdrive_prefix" = x; then
32855     # As a simple fix, exclude /usr/bin since it's not a real path.
32856     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32857       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32858       # a path prefixed by /cygdrive for fixpath to work.
32859       new_path="$CYGWIN_ROOT_PATH$input_path"
32860     fi
32861   fi
32862 
32863 
32864   if test "x$path" != "x$new_path"; then
32865     libpath="$new_path"
32866     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32867 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32868   fi
32869 
32870     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32871 
32872   path="$libpath"
32873   has_colon=`$ECHO $path | $GREP ^.:`
32874   new_path="$path"
32875   if test "x$has_colon" = x; then
32876     # Not in mixed or Windows style, start by that.
32877     new_path=`cmd //c echo $path`
32878   fi
32879 
32880 
32881   input_path="$new_path"
32882   # Check if we need to convert this using DOS-style short mode. If the path
32883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32884   # take no chances and rewrite it.
32885   # Note: m4 eats our [], so we need to use [ and ] instead.
32886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32887   if test "x$has_forbidden_chars" != x; then
32888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32889     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32890   fi
32891 
32892 
32893   windows_path="$new_path"
32894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32895     unix_path=`$CYGPATH -u "$windows_path"`
32896     new_path="$unix_path"
32897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32899     new_path="$unix_path"
32900   fi
32901 
32902   if test "x$path" != "x$new_path"; then
32903     libpath="$new_path"
32904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32905 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32906   fi
32907 
32908   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32909   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32910 
32911     else
32912       # We're on a unix platform. Hooray! :)
32913       path="$libpath"
32914       has_space=`$ECHO "$path" | $GREP " "`
32915       if test "x$has_space" != x; then
32916         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32917 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32918         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32919       fi
32920 
32921       # Use eval to expand a potential ~
32922       eval path="$path"
32923       if test ! -f "$path" && test ! -d "$path"; then
32924         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32925       fi
32926 
32927       if test -d "$path"; then
32928         libpath="`cd "$path"; $THEPWDCMD -L`"
32929       else
32930         dir="`$DIRNAME "$path"`"
32931         base="`$BASENAME "$path"`"
32932         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32933       fi
32934     fi
32935   fi
32936 
32937             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32938           fi
32939           IFS=";"
32940         fi
32941       done
32942       IFS="$OLDIFS"
32943     fi
32944   else
32945     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32946 $as_echo "not found" >&6; }
32947 
32948     if test "x$VS_ENV_CMD" = x; then
32949       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32950 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32951       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32952 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32953     else
32954       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32955 $as_echo "$as_me: Running the extraction script failed." >&6;}
32956     fi
32957     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32958 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32959     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32960 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32961     as_fn_error $? "Cannot continue" "$LINENO" 5
32962   fi
32963 
32964     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32965     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32966     PATH="$VS_PATH"
32967     # The microsoft toolchain also requires INCLUDE and LIB to be set.
32968     export INCLUDE="$VS_INCLUDE"
32969     export LIB="$VS_LIB"
32970   else
32971     if test "x$XCODE_VERSION_OUTPUT" != x; then
32972       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32973       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32974       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32975     else
32976       # Currently we do not define this for other toolchains. This might change as the need arise.
32977       TOOLCHAIN_VERSION=
32978     fi
32979   fi
32980 
32981 
32982   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32983   # override all other locations.
32984   if test "x$TOOLCHAIN_PATH" != x; then
32985     PATH=$TOOLCHAIN_PATH:$PATH
32986   fi
32987 
32988 
32989   #
32990   # Setup the compilers (CC and CXX)
32991   #
32992 
32993   COMPILER_NAME=C
32994   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32995 
32996   if test "x$CC" != x; then
32997     # User has supplied compiler name already, always let that override.
32998     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32999 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33000     if test "x`basename $CC`" = "x$CC"; then
33001       # A command without a complete path is provided, search $PATH.
33002 
33003       for ac_prog in $CC
33004 do
33005   # Extract the first word of "$ac_prog", so it can be a program name with args.
33006 set dummy $ac_prog; ac_word=$2
33007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33008 $as_echo_n "checking for $ac_word... " >&6; }
33009 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33010   $as_echo_n "(cached) " >&6
33011 else
33012   case $POTENTIAL_CC in
33013   [\\/]* | ?:[\\/]*)
33014   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33015   ;;
33016   *)
33017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33018 for as_dir in $PATH
33019 do
33020   IFS=$as_save_IFS
33021   test -z "$as_dir" && as_dir=.
33022     for ac_exec_ext in '' $ac_executable_extensions; do
33023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33024     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33026     break 2
33027   fi
33028 done
33029   done
33030 IFS=$as_save_IFS
33031 
33032   ;;
33033 esac
33034 fi
33035 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33036 if test -n "$POTENTIAL_CC"; then
33037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33038 $as_echo "$POTENTIAL_CC" >&6; }
33039 else
33040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33041 $as_echo "no" >&6; }
33042 fi
33043 
33044 
33045   test -n "$POTENTIAL_CC" && break
33046 done
33047 
33048       if test "x$POTENTIAL_CC" != x; then
33049         CC=$POTENTIAL_CC
33050       else
33051         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33052       fi
33053     else
33054       # Otherwise it might already be a complete path
33055       if test ! -x "$CC"; then
33056         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33057       fi
33058     fi
33059   else
33060     # No user supplied value. Locate compiler ourselves.
33061 
33062     # If we are cross compiling, assume cross compilation tools follows the
33063     # cross compilation standard where they are prefixed with the autoconf
33064     # standard name for the target. For example the binary
33065     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33066     # If we are not cross compiling, then the default compiler name will be
33067     # used.
33068 
33069     CC=
33070     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33071     # before checking the rest of the PATH.
33072     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33073     # step, this should not be necessary.
33074     if test -n "$TOOLCHAIN_PATH"; then
33075       PATH_save="$PATH"
33076       PATH="$TOOLCHAIN_PATH"
33077       for ac_prog in $SEARCH_LIST
33078 do
33079   # Extract the first word of "$ac_prog", so it can be a program name with args.
33080 set dummy $ac_prog; ac_word=$2
33081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33082 $as_echo_n "checking for $ac_word... " >&6; }
33083 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33084   $as_echo_n "(cached) " >&6
33085 else
33086   case $TOOLCHAIN_PATH_CC in
33087   [\\/]* | ?:[\\/]*)
33088   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33089   ;;
33090   *)
33091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33092 for as_dir in $PATH
33093 do
33094   IFS=$as_save_IFS
33095   test -z "$as_dir" && as_dir=.
33096     for ac_exec_ext in '' $ac_executable_extensions; do
33097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33098     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33100     break 2
33101   fi
33102 done
33103   done
33104 IFS=$as_save_IFS
33105 
33106   ;;
33107 esac
33108 fi
33109 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33110 if test -n "$TOOLCHAIN_PATH_CC"; then
33111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33112 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33113 else
33114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33115 $as_echo "no" >&6; }
33116 fi
33117 
33118 
33119   test -n "$TOOLCHAIN_PATH_CC" && break
33120 done
33121 
33122       CC=$TOOLCHAIN_PATH_CC
33123       PATH="$PATH_save"
33124     fi
33125 
33126     # AC_PATH_PROGS can't be run multiple times with the same variable,
33127     # so create a new name for this run.
33128     if test "x$CC" = x; then
33129       for ac_prog in $SEARCH_LIST
33130 do
33131   # Extract the first word of "$ac_prog", so it can be a program name with args.
33132 set dummy $ac_prog; ac_word=$2
33133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33134 $as_echo_n "checking for $ac_word... " >&6; }
33135 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33136   $as_echo_n "(cached) " >&6
33137 else
33138   case $POTENTIAL_CC in
33139   [\\/]* | ?:[\\/]*)
33140   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33141   ;;
33142   *)
33143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33144 for as_dir in $PATH
33145 do
33146   IFS=$as_save_IFS
33147   test -z "$as_dir" && as_dir=.
33148     for ac_exec_ext in '' $ac_executable_extensions; do
33149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33150     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33152     break 2
33153   fi
33154 done
33155   done
33156 IFS=$as_save_IFS
33157 
33158   ;;
33159 esac
33160 fi
33161 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33162 if test -n "$POTENTIAL_CC"; then
33163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33164 $as_echo "$POTENTIAL_CC" >&6; }
33165 else
33166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33167 $as_echo "no" >&6; }
33168 fi
33169 
33170 
33171   test -n "$POTENTIAL_CC" && break
33172 done
33173 
33174       CC=$POTENTIAL_CC
33175     fi
33176 
33177     if test "x$CC" = x; then
33178 
33179   # Print a helpful message on how to acquire the necessary build dependency.
33180   # devkit is the help tag: freetype, cups, alsa etc
33181   MISSING_DEPENDENCY=devkit
33182 
33183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33184     cygwin_help $MISSING_DEPENDENCY
33185   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33186     msys_help $MISSING_DEPENDENCY
33187   else
33188     PKGHANDLER_COMMAND=
33189 
33190     case $PKGHANDLER in
33191       apt-get)
33192         apt_help     $MISSING_DEPENDENCY ;;
33193       yum)
33194         yum_help     $MISSING_DEPENDENCY ;;
33195       port)
33196         port_help    $MISSING_DEPENDENCY ;;
33197       pkgutil)
33198         pkgutil_help $MISSING_DEPENDENCY ;;
33199       pkgadd)
33200         pkgadd_help  $MISSING_DEPENDENCY ;;
33201     esac
33202 
33203     if test "x$PKGHANDLER_COMMAND" != x; then
33204       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33205     fi
33206   fi
33207 
33208       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33209     fi
33210   fi
33211 
33212   # Now we have a compiler binary in CC. Make sure it's okay.
33213 
33214   # Only process if variable expands to non-empty
33215 
33216   if test "x$CC" != x; then
33217     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33218 
33219   # First separate the path from the arguments. This will split at the first
33220   # space.
33221   complete="$CC"
33222   path="${complete%% *}"
33223   tmp="$complete EOL"
33224   arguments="${tmp#* }"
33225 
33226   # Input might be given as Windows format, start by converting to
33227   # unix format.
33228   new_path=`$CYGPATH -u "$path"`
33229 
33230   # Now try to locate executable using which
33231   new_path=`$WHICH "$new_path" 2> /dev/null`
33232   # bat and cmd files are not always considered executable in cygwin causing which
33233   # to not find them
33234   if test "x$new_path" = x \
33235       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33236       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33237     new_path=`$CYGPATH -u "$path"`
33238   fi
33239   if test "x$new_path" = x; then
33240     # Oops. Which didn't find the executable.
33241     # The splitting of arguments from the executable at a space might have been incorrect,
33242     # since paths with space are more likely in Windows. Give it another try with the whole
33243     # argument.
33244     path="$complete"
33245     arguments="EOL"
33246     new_path=`$CYGPATH -u "$path"`
33247     new_path=`$WHICH "$new_path" 2> /dev/null`
33248     # bat and cmd files are not always considered executable in cygwin causing which
33249     # to not find them
33250     if test "x$new_path" = x \
33251         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33252         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33253       new_path=`$CYGPATH -u "$path"`
33254     fi
33255     if test "x$new_path" = x; then
33256       # It's still not found. Now this is an unrecoverable error.
33257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33258 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33259       has_space=`$ECHO "$complete" | $GREP " "`
33260       if test "x$has_space" != x; then
33261         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33262 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33263       fi
33264       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33265     fi
33266   fi
33267 
33268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33271   # "foo.exe" is OK but "foo" is an error.
33272   #
33273   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33274   # It is also a way to make sure we got the proper file name for the real test later on.
33275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33276   if test "x$test_shortpath" = x; then
33277     # Short path failed, file does not exist as specified.
33278     # Try adding .exe or .cmd
33279     if test -f "${new_path}.exe"; then
33280       input_to_shortpath="${new_path}.exe"
33281     elif test -f "${new_path}.cmd"; then
33282       input_to_shortpath="${new_path}.cmd"
33283     else
33284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33285 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33286       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33287 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33288       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33289     fi
33290   else
33291     input_to_shortpath="$new_path"
33292   fi
33293 
33294   # Call helper function which possibly converts this using DOS-style short mode.
33295   # If so, the updated path is stored in $new_path.
33296   new_path="$input_to_shortpath"
33297 
33298   input_path="$input_to_shortpath"
33299   # Check if we need to convert this using DOS-style short mode. If the path
33300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33301   # take no chances and rewrite it.
33302   # Note: m4 eats our [], so we need to use [ and ] instead.
33303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33304   if test "x$has_forbidden_chars" != x; then
33305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33306     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33307     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33308     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33309       # Going to short mode and back again did indeed matter. Since short mode is
33310       # case insensitive, let's make it lowercase to improve readability.
33311       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33312       # Now convert it back to Unix-style (cygpath)
33313       input_path=`$CYGPATH -u "$shortmode_path"`
33314       new_path="$input_path"
33315     fi
33316   fi
33317 
33318   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33319   if test "x$test_cygdrive_prefix" = x; then
33320     # As a simple fix, exclude /usr/bin since it's not a real path.
33321     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33322       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33323       # a path prefixed by /cygdrive for fixpath to work.
33324       new_path="$CYGWIN_ROOT_PATH$input_path"
33325     fi
33326   fi
33327 
33328   # remove trailing .exe if any
33329   new_path="${new_path/%.exe/}"
33330 
33331     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33332 
33333   # First separate the path from the arguments. This will split at the first
33334   # space.
33335   complete="$CC"
33336   path="${complete%% *}"
33337   tmp="$complete EOL"
33338   arguments="${tmp#* }"
33339 
33340   # Input might be given as Windows format, start by converting to
33341   # unix format.
33342   new_path="$path"
33343 
33344   windows_path="$new_path"
33345   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33346     unix_path=`$CYGPATH -u "$windows_path"`
33347     new_path="$unix_path"
33348   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33349     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33350     new_path="$unix_path"
33351   fi
33352 
33353 
33354   # Now try to locate executable using which
33355   new_path=`$WHICH "$new_path" 2> /dev/null`
33356 
33357   if test "x$new_path" = x; then
33358     # Oops. Which didn't find the executable.
33359     # The splitting of arguments from the executable at a space might have been incorrect,
33360     # since paths with space are more likely in Windows. Give it another try with the whole
33361     # argument.
33362     path="$complete"
33363     arguments="EOL"
33364     new_path="$path"
33365 
33366   windows_path="$new_path"
33367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33368     unix_path=`$CYGPATH -u "$windows_path"`
33369     new_path="$unix_path"
33370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33372     new_path="$unix_path"
33373   fi
33374 
33375 
33376     new_path=`$WHICH "$new_path" 2> /dev/null`
33377     # bat and cmd files are not always considered executable in MSYS causing which
33378     # to not find them
33379     if test "x$new_path" = x \
33380         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33381         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33382       new_path="$path"
33383 
33384   windows_path="$new_path"
33385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33386     unix_path=`$CYGPATH -u "$windows_path"`
33387     new_path="$unix_path"
33388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33390     new_path="$unix_path"
33391   fi
33392 
33393     fi
33394 
33395     if test "x$new_path" = x; then
33396       # It's still not found. Now this is an unrecoverable error.
33397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33398 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33399       has_space=`$ECHO "$complete" | $GREP " "`
33400       if test "x$has_space" != x; then
33401         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33402 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33403       fi
33404       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33405     fi
33406   fi
33407 
33408   # Now new_path has a complete unix path to the binary
33409   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33410     # Keep paths in /bin as-is, but remove trailing .exe if any
33411     new_path="${new_path/%.exe/}"
33412     # Do not save /bin paths to all_fixpath_prefixes!
33413   else
33414     # Not in mixed or Windows style, start by that.
33415     new_path=`cmd //c echo $new_path`
33416 
33417   input_path="$new_path"
33418   # Check if we need to convert this using DOS-style short mode. If the path
33419   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33420   # take no chances and rewrite it.
33421   # Note: m4 eats our [], so we need to use [ and ] instead.
33422   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33423   if test "x$has_forbidden_chars" != x; then
33424     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33425     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33426   fi
33427 
33428     # Output is in $new_path
33429 
33430   windows_path="$new_path"
33431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33432     unix_path=`$CYGPATH -u "$windows_path"`
33433     new_path="$unix_path"
33434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33436     new_path="$unix_path"
33437   fi
33438 
33439     # remove trailing .exe if any
33440     new_path="${new_path/%.exe/}"
33441 
33442     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33443     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33444   fi
33445 
33446     else
33447       # We're on a unix platform. Hooray! :)
33448       # First separate the path from the arguments. This will split at the first
33449       # space.
33450       complete="$CC"
33451       path="${complete%% *}"
33452       tmp="$complete EOL"
33453       arguments="${tmp#* }"
33454 
33455       # Cannot rely on the command "which" here since it doesn't always work.
33456       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33457       if test -z "$is_absolute_path"; then
33458         # Path to executable is not absolute. Find it.
33459         IFS_save="$IFS"
33460         IFS=:
33461         for p in $PATH; do
33462           if test -f "$p/$path" && test -x "$p/$path"; then
33463             new_path="$p/$path"
33464             break
33465           fi
33466         done
33467         IFS="$IFS_save"
33468       else
33469         # This is an absolute path, we can use it without further modifications.
33470         new_path="$path"
33471       fi
33472 
33473       if test "x$new_path" = x; then
33474         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33475 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33476         has_space=`$ECHO "$complete" | $GREP " "`
33477         if test "x$has_space" != x; then
33478           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33479 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33480         fi
33481         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33482       fi
33483     fi
33484 
33485     # Now join together the path and the arguments once again
33486     if test "x$arguments" != xEOL; then
33487       new_complete="$new_path ${arguments% *}"
33488     else
33489       new_complete="$new_path"
33490     fi
33491 
33492     if test "x$complete" != "x$new_complete"; then
33493       CC="$new_complete"
33494       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33495 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33496     fi
33497   fi
33498 
33499   TEST_COMPILER="$CC"
33500 
33501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33502 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33503   SYMLINK_ORIGINAL="$TEST_COMPILER"
33504 
33505   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33506     # Follow a chain of symbolic links. Use readlink
33507     # where it exists, else fall back to horribly
33508     # complicated shell code.
33509     if test "x$READLINK_TESTED" != yes; then
33510       # On MacOSX there is a readlink tool with a different
33511       # purpose than the GNU readlink tool. Check the found readlink.
33512       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33513       if test "x$ISGNU" = x; then
33514         # A readlink that we do not know how to use.
33515         # Are there other non-GNU readlinks out there?
33516         READLINK_TESTED=yes
33517         READLINK=
33518       fi
33519     fi
33520 
33521     if test "x$READLINK" != x; then
33522       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33523     else
33524       # Save the current directory for restoring afterwards
33525       STARTDIR=$PWD
33526       COUNTER=0
33527       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33528       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33529       cd $sym_link_dir
33530       # Use -P flag to resolve symlinks in directories.
33531       cd `$THEPWDCMD -P`
33532       sym_link_dir=`$THEPWDCMD -P`
33533       # Resolve file symlinks
33534       while test $COUNTER -lt 20; do
33535         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33536         if test "x$ISLINK" == x; then
33537           # This is not a symbolic link! We are done!
33538           break
33539         fi
33540         # Again resolve directory symlinks since the target of the just found
33541         # link could be in a different directory
33542         cd `$DIRNAME $ISLINK`
33543         sym_link_dir=`$THEPWDCMD -P`
33544         sym_link_file=`$BASENAME $ISLINK`
33545         let COUNTER=COUNTER+1
33546       done
33547       cd $STARTDIR
33548       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33549     fi
33550   fi
33551 
33552   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33553     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33554 $as_echo "no symlink" >&6; }
33555   else
33556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33557 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33558 
33559     # We can't handle ccache by gcc wrappers, since we need to know if we're
33560     # using ccache. Instead ccache usage must be controlled by a configure option.
33561     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33562     if test "x$COMPILER_BASENAME" = "xccache"; then
33563       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33564 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33565       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33566     fi
33567   fi
33568 
33569 
33570   COMPILER=$CC
33571   COMPILER_NAME=$COMPILER_NAME
33572 
33573   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33574     # cc -V output typically looks like
33575     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33576     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33577     # Check that this is likely to be the Solaris Studio cc.
33578     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33579     if test $? -ne 0; then
33580       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33581       { $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
33582 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33583       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33584 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33585       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33586 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33587       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33588     fi
33589     # Remove usage instructions (if present), and
33590     # collapse compiler output into a single line
33591     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33592         $SED -e 's/ *[Uu]sage:.*//'`
33593     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33594         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33595   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33596     # xlc -qversion output typically looks like
33597     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33598     #     Version: 11.01.0000.0015
33599     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33600     # Check that this is likely to be the IBM XL C compiler.
33601     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33602     if test $? -ne 0; then
33603       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33604       { $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
33605 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33606       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33607 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33608       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33609 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33610       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33611     fi
33612     # Collapse compiler output into a single line
33613     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33614     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33615         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33616   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33617     # There is no specific version flag, but all output starts with a version string.
33618     # First line typically looks something like:
33619     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33620     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33621     # Check that this is likely to be Microsoft CL.EXE.
33622     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33623     if test $? -ne 0; then
33624       { $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
33625 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33626       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33627 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33628       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33629     fi
33630     # Collapse compiler output into a single line
33631     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33632     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33633         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33634   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33635     # gcc --version output typically looks like
33636     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33637     #     Copyright (C) 2013 Free Software Foundation, Inc.
33638     #     This is free software; see the source for copying conditions.  There is NO
33639     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33640     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33641     # Check that this is likely to be GCC.
33642     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33643     if test $? -ne 0; then
33644       { $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
33645 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33646       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33647 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33648       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33649     fi
33650     # Remove Copyright and legalese from version string, and
33651     # collapse into a single line
33652     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33653         $SED -e 's/ *Copyright .*//'`
33654     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33655         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33656   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33657     # clang --version output typically looks like
33658     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33659     #    clang version 3.3 (tags/RELEASE_33/final)
33660     # or
33661     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33662     #    Target: x86_64-pc-linux-gnu
33663     #    Thread model: posix
33664     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33665     # Check that this is likely to be clang
33666     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33667     if test $? -ne 0; then
33668       { $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
33669 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33670       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33671 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33672       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33673     fi
33674     # Collapse compiler output into a single line
33675     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33676     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33677         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33678   else
33679       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33680   fi
33681   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33682   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33683   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33684   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33685 
33686   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33687 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33688 
33689 
33690   # Now that we have resolved CC ourself, let autoconf have its go at it
33691   ac_ext=c
33692 ac_cpp='$CPP $CPPFLAGS'
33693 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33694 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33695 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33696 if test -n "$ac_tool_prefix"; then
33697   for ac_prog in $CC
33698   do
33699     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33700 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33702 $as_echo_n "checking for $ac_word... " >&6; }
33703 if ${ac_cv_prog_CC+:} false; then :
33704   $as_echo_n "(cached) " >&6
33705 else
33706   if test -n "$CC"; then
33707   ac_cv_prog_CC="$CC" # Let the user override the test.
33708 else
33709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33710 for as_dir in $PATH
33711 do
33712   IFS=$as_save_IFS
33713   test -z "$as_dir" && as_dir=.
33714     for ac_exec_ext in '' $ac_executable_extensions; do
33715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33716     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33718     break 2
33719   fi
33720 done
33721   done
33722 IFS=$as_save_IFS
33723 
33724 fi
33725 fi
33726 CC=$ac_cv_prog_CC
33727 if test -n "$CC"; then
33728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33729 $as_echo "$CC" >&6; }
33730 else
33731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33732 $as_echo "no" >&6; }
33733 fi
33734 
33735 
33736     test -n "$CC" && break
33737   done
33738 fi
33739 if test -z "$CC"; then
33740   ac_ct_CC=$CC
33741   for ac_prog in $CC
33742 do
33743   # Extract the first word of "$ac_prog", so it can be a program name with args.
33744 set dummy $ac_prog; ac_word=$2
33745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33746 $as_echo_n "checking for $ac_word... " >&6; }
33747 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33748   $as_echo_n "(cached) " >&6
33749 else
33750   if test -n "$ac_ct_CC"; then
33751   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33752 else
33753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33754 for as_dir in $PATH
33755 do
33756   IFS=$as_save_IFS
33757   test -z "$as_dir" && as_dir=.
33758     for ac_exec_ext in '' $ac_executable_extensions; do
33759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33760     ac_cv_prog_ac_ct_CC="$ac_prog"
33761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33762     break 2
33763   fi
33764 done
33765   done
33766 IFS=$as_save_IFS
33767 
33768 fi
33769 fi
33770 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33771 if test -n "$ac_ct_CC"; then
33772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33773 $as_echo "$ac_ct_CC" >&6; }
33774 else
33775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33776 $as_echo "no" >&6; }
33777 fi
33778 
33779 
33780   test -n "$ac_ct_CC" && break
33781 done
33782 
33783   if test "x$ac_ct_CC" = x; then
33784     CC=""
33785   else
33786     case $cross_compiling:$ac_tool_warned in
33787 yes:)
33788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33789 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33790 ac_tool_warned=yes ;;
33791 esac
33792     CC=$ac_ct_CC
33793   fi
33794 fi
33795 
33796 
33797 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33798 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33799 as_fn_error $? "no acceptable C compiler found in \$PATH
33800 See \`config.log' for more details" "$LINENO" 5; }
33801 
33802 # Provide some information about the compiler.
33803 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33804 set X $ac_compile
33805 ac_compiler=$2
33806 for ac_option in --version -v -V -qversion; do
33807   { { ac_try="$ac_compiler $ac_option >&5"
33808 case "(($ac_try" in
33809   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33810   *) ac_try_echo=$ac_try;;
33811 esac
33812 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33813 $as_echo "$ac_try_echo"; } >&5
33814   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33815   ac_status=$?
33816   if test -s conftest.err; then
33817     sed '10a\
33818 ... rest of stderr output deleted ...
33819          10q' conftest.err >conftest.er1
33820     cat conftest.er1 >&5
33821   fi
33822   rm -f conftest.er1 conftest.err
33823   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33824   test $ac_status = 0; }
33825 done
33826 
33827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33828 /* end confdefs.h.  */
33829 
33830 int
33831 main ()
33832 {
33833 
33834   ;
33835   return 0;
33836 }
33837 _ACEOF
33838 ac_clean_files_save=$ac_clean_files
33839 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33840 # Try to create an executable without -o first, disregard a.out.
33841 # It will help us diagnose broken compilers, and finding out an intuition
33842 # of exeext.
33843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33844 $as_echo_n "checking whether the C compiler works... " >&6; }
33845 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33846 
33847 # The possible output files:
33848 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33849 
33850 ac_rmfiles=
33851 for ac_file in $ac_files
33852 do
33853   case $ac_file in
33854     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33855     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33856   esac
33857 done
33858 rm -f $ac_rmfiles
33859 
33860 if { { ac_try="$ac_link_default"
33861 case "(($ac_try" in
33862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33863   *) ac_try_echo=$ac_try;;
33864 esac
33865 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33866 $as_echo "$ac_try_echo"; } >&5
33867   (eval "$ac_link_default") 2>&5
33868   ac_status=$?
33869   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33870   test $ac_status = 0; }; then :
33871   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33872 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33873 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
33874 # so that the user can short-circuit this test for compilers unknown to
33875 # Autoconf.
33876 for ac_file in $ac_files ''
33877 do
33878   test -f "$ac_file" || continue
33879   case $ac_file in
33880     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33881         ;;
33882     [ab].out )
33883         # We found the default executable, but exeext='' is most
33884         # certainly right.
33885         break;;
33886     *.* )
33887         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33888         then :; else
33889            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33890         fi
33891         # We set ac_cv_exeext here because the later test for it is not
33892         # safe: cross compilers may not add the suffix if given an `-o'
33893         # argument, so we may need to know it at that point already.
33894         # Even if this section looks crufty: it has the advantage of
33895         # actually working.
33896         break;;
33897     * )
33898         break;;
33899   esac
33900 done
33901 test "$ac_cv_exeext" = no && ac_cv_exeext=
33902 
33903 else
33904   ac_file=''
33905 fi
33906 if test -z "$ac_file"; then :
33907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33908 $as_echo "no" >&6; }
33909 $as_echo "$as_me: failed program was:" >&5
33910 sed 's/^/| /' conftest.$ac_ext >&5
33911 
33912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33913 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33914 as_fn_error 77 "C compiler cannot create executables
33915 See \`config.log' for more details" "$LINENO" 5; }
33916 else
33917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33918 $as_echo "yes" >&6; }
33919 fi
33920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33921 $as_echo_n "checking for C compiler default output file name... " >&6; }
33922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33923 $as_echo "$ac_file" >&6; }
33924 ac_exeext=$ac_cv_exeext
33925 
33926 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33927 ac_clean_files=$ac_clean_files_save
33928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33929 $as_echo_n "checking for suffix of executables... " >&6; }
33930 if { { ac_try="$ac_link"
33931 case "(($ac_try" in
33932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33933   *) ac_try_echo=$ac_try;;
33934 esac
33935 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33936 $as_echo "$ac_try_echo"; } >&5
33937   (eval "$ac_link") 2>&5
33938   ac_status=$?
33939   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33940   test $ac_status = 0; }; then :
33941   # If both `conftest.exe' and `conftest' are `present' (well, observable)
33942 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33943 # work properly (i.e., refer to `conftest.exe'), while it won't with
33944 # `rm'.
33945 for ac_file in conftest.exe conftest conftest.*; do
33946   test -f "$ac_file" || continue
33947   case $ac_file in
33948     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33949     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33950           break;;
33951     * ) break;;
33952   esac
33953 done
33954 else
33955   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33956 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33957 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33958 See \`config.log' for more details" "$LINENO" 5; }
33959 fi
33960 rm -f conftest conftest$ac_cv_exeext
33961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33962 $as_echo "$ac_cv_exeext" >&6; }
33963 
33964 rm -f conftest.$ac_ext
33965 EXEEXT=$ac_cv_exeext
33966 ac_exeext=$EXEEXT
33967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33968 /* end confdefs.h.  */
33969 #include <stdio.h>
33970 int
33971 main ()
33972 {
33973 FILE *f = fopen ("conftest.out", "w");
33974  return ferror (f) || fclose (f) != 0;
33975 
33976   ;
33977   return 0;
33978 }
33979 _ACEOF
33980 ac_clean_files="$ac_clean_files conftest.out"
33981 # Check that the compiler produces executables we can run.  If not, either
33982 # the compiler is broken, or we cross compile.
33983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33984 $as_echo_n "checking whether we are cross compiling... " >&6; }
33985 if test "$cross_compiling" != yes; then
33986   { { ac_try="$ac_link"
33987 case "(($ac_try" in
33988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33989   *) ac_try_echo=$ac_try;;
33990 esac
33991 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33992 $as_echo "$ac_try_echo"; } >&5
33993   (eval "$ac_link") 2>&5
33994   ac_status=$?
33995   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33996   test $ac_status = 0; }
33997   if { ac_try='./conftest$ac_cv_exeext'
33998   { { case "(($ac_try" in
33999   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34000   *) ac_try_echo=$ac_try;;
34001 esac
34002 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34003 $as_echo "$ac_try_echo"; } >&5
34004   (eval "$ac_try") 2>&5
34005   ac_status=$?
34006   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34007   test $ac_status = 0; }; }; then
34008     cross_compiling=no
34009   else
34010     if test "$cross_compiling" = maybe; then
34011         cross_compiling=yes
34012     else
34013         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34014 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34015 as_fn_error $? "cannot run C compiled programs.
34016 If you meant to cross compile, use \`--host'.
34017 See \`config.log' for more details" "$LINENO" 5; }
34018     fi
34019   fi
34020 fi
34021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34022 $as_echo "$cross_compiling" >&6; }
34023 
34024 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34025 ac_clean_files=$ac_clean_files_save
34026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34027 $as_echo_n "checking for suffix of object files... " >&6; }
34028 if ${ac_cv_objext+:} false; then :
34029   $as_echo_n "(cached) " >&6
34030 else
34031   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34032 /* end confdefs.h.  */
34033 
34034 int
34035 main ()
34036 {
34037 
34038   ;
34039   return 0;
34040 }
34041 _ACEOF
34042 rm -f conftest.o conftest.obj
34043 if { { ac_try="$ac_compile"
34044 case "(($ac_try" in
34045   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34046   *) ac_try_echo=$ac_try;;
34047 esac
34048 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34049 $as_echo "$ac_try_echo"; } >&5
34050   (eval "$ac_compile") 2>&5
34051   ac_status=$?
34052   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34053   test $ac_status = 0; }; then :
34054   for ac_file in conftest.o conftest.obj conftest.*; do
34055   test -f "$ac_file" || continue;
34056   case $ac_file in
34057     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34058     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34059        break;;
34060   esac
34061 done
34062 else
34063   $as_echo "$as_me: failed program was:" >&5
34064 sed 's/^/| /' conftest.$ac_ext >&5
34065 
34066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34068 as_fn_error $? "cannot compute suffix of object files: cannot compile
34069 See \`config.log' for more details" "$LINENO" 5; }
34070 fi
34071 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34072 fi
34073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34074 $as_echo "$ac_cv_objext" >&6; }
34075 OBJEXT=$ac_cv_objext
34076 ac_objext=$OBJEXT
34077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34078 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34079 if ${ac_cv_c_compiler_gnu+:} false; then :
34080   $as_echo_n "(cached) " >&6
34081 else
34082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34083 /* end confdefs.h.  */
34084 
34085 int
34086 main ()
34087 {
34088 #ifndef __GNUC__
34089        choke me
34090 #endif
34091 
34092   ;
34093   return 0;
34094 }
34095 _ACEOF
34096 if ac_fn_c_try_compile "$LINENO"; then :
34097   ac_compiler_gnu=yes
34098 else
34099   ac_compiler_gnu=no
34100 fi
34101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34102 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34103 
34104 fi
34105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34106 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34107 if test $ac_compiler_gnu = yes; then
34108   GCC=yes
34109 else
34110   GCC=
34111 fi
34112 ac_test_CFLAGS=${CFLAGS+set}
34113 ac_save_CFLAGS=$CFLAGS
34114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34115 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34116 if ${ac_cv_prog_cc_g+:} false; then :
34117   $as_echo_n "(cached) " >&6
34118 else
34119   ac_save_c_werror_flag=$ac_c_werror_flag
34120    ac_c_werror_flag=yes
34121    ac_cv_prog_cc_g=no
34122    CFLAGS="-g"
34123    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34124 /* end confdefs.h.  */
34125 
34126 int
34127 main ()
34128 {
34129 
34130   ;
34131   return 0;
34132 }
34133 _ACEOF
34134 if ac_fn_c_try_compile "$LINENO"; then :
34135   ac_cv_prog_cc_g=yes
34136 else
34137   CFLAGS=""
34138       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34139 /* end confdefs.h.  */
34140 
34141 int
34142 main ()
34143 {
34144 
34145   ;
34146   return 0;
34147 }
34148 _ACEOF
34149 if ac_fn_c_try_compile "$LINENO"; then :
34150 
34151 else
34152   ac_c_werror_flag=$ac_save_c_werror_flag
34153          CFLAGS="-g"
34154          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34155 /* end confdefs.h.  */
34156 
34157 int
34158 main ()
34159 {
34160 
34161   ;
34162   return 0;
34163 }
34164 _ACEOF
34165 if ac_fn_c_try_compile "$LINENO"; then :
34166   ac_cv_prog_cc_g=yes
34167 fi
34168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34169 fi
34170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34171 fi
34172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34173    ac_c_werror_flag=$ac_save_c_werror_flag
34174 fi
34175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34176 $as_echo "$ac_cv_prog_cc_g" >&6; }
34177 if test "$ac_test_CFLAGS" = set; then
34178   CFLAGS=$ac_save_CFLAGS
34179 elif test $ac_cv_prog_cc_g = yes; then
34180   if test "$GCC" = yes; then
34181     CFLAGS="-g -O2"
34182   else
34183     CFLAGS="-g"
34184   fi
34185 else
34186   if test "$GCC" = yes; then
34187     CFLAGS="-O2"
34188   else
34189     CFLAGS=
34190   fi
34191 fi
34192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34193 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34194 if ${ac_cv_prog_cc_c89+:} false; then :
34195   $as_echo_n "(cached) " >&6
34196 else
34197   ac_cv_prog_cc_c89=no
34198 ac_save_CC=$CC
34199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34200 /* end confdefs.h.  */
34201 #include <stdarg.h>
34202 #include <stdio.h>
34203 struct stat;
34204 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34205 struct buf { int x; };
34206 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34207 static char *e (p, i)
34208      char **p;
34209      int i;
34210 {
34211   return p[i];
34212 }
34213 static char *f (char * (*g) (char **, int), char **p, ...)
34214 {
34215   char *s;
34216   va_list v;
34217   va_start (v,p);
34218   s = g (p, va_arg (v,int));
34219   va_end (v);
34220   return s;
34221 }
34222 
34223 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34224    function prototypes and stuff, but not '\xHH' hex character constants.
34225    These don't provoke an error unfortunately, instead are silently treated
34226    as 'x'.  The following induces an error, until -std is added to get
34227    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34228    array size at least.  It's necessary to write '\x00'==0 to get something
34229    that's true only with -std.  */
34230 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34231 
34232 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34233    inside strings and character constants.  */
34234 #define FOO(x) 'x'
34235 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34236 
34237 int test (int i, double x);
34238 struct s1 {int (*f) (int a);};
34239 struct s2 {int (*f) (double a);};
34240 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34241 int argc;
34242 char **argv;
34243 int
34244 main ()
34245 {
34246 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34247   ;
34248   return 0;
34249 }
34250 _ACEOF
34251 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34252         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34253 do
34254   CC="$ac_save_CC $ac_arg"
34255   if ac_fn_c_try_compile "$LINENO"; then :
34256   ac_cv_prog_cc_c89=$ac_arg
34257 fi
34258 rm -f core conftest.err conftest.$ac_objext
34259   test "x$ac_cv_prog_cc_c89" != "xno" && break
34260 done
34261 rm -f conftest.$ac_ext
34262 CC=$ac_save_CC
34263 
34264 fi
34265 # AC_CACHE_VAL
34266 case "x$ac_cv_prog_cc_c89" in
34267   x)
34268     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34269 $as_echo "none needed" >&6; } ;;
34270   xno)
34271     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34272 $as_echo "unsupported" >&6; } ;;
34273   *)
34274     CC="$CC $ac_cv_prog_cc_c89"
34275     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34276 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34277 esac
34278 if test "x$ac_cv_prog_cc_c89" != xno; then :
34279 
34280 fi
34281 
34282 ac_ext=cpp
34283 ac_cpp='$CXXCPP $CPPFLAGS'
34284 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34285 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34286 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34287 
34288 
34289 
34290   COMPILER_NAME=C++
34291   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34292 
34293   if test "x$CXX" != x; then
34294     # User has supplied compiler name already, always let that override.
34295     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34296 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34297     if test "x`basename $CXX`" = "x$CXX"; then
34298       # A command without a complete path is provided, search $PATH.
34299 
34300       for ac_prog in $CXX
34301 do
34302   # Extract the first word of "$ac_prog", so it can be a program name with args.
34303 set dummy $ac_prog; ac_word=$2
34304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34305 $as_echo_n "checking for $ac_word... " >&6; }
34306 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34307   $as_echo_n "(cached) " >&6
34308 else
34309   case $POTENTIAL_CXX in
34310   [\\/]* | ?:[\\/]*)
34311   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34312   ;;
34313   *)
34314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34315 for as_dir in $PATH
34316 do
34317   IFS=$as_save_IFS
34318   test -z "$as_dir" && as_dir=.
34319     for ac_exec_ext in '' $ac_executable_extensions; do
34320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34321     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34323     break 2
34324   fi
34325 done
34326   done
34327 IFS=$as_save_IFS
34328 
34329   ;;
34330 esac
34331 fi
34332 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34333 if test -n "$POTENTIAL_CXX"; then
34334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34335 $as_echo "$POTENTIAL_CXX" >&6; }
34336 else
34337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34338 $as_echo "no" >&6; }
34339 fi
34340 
34341 
34342   test -n "$POTENTIAL_CXX" && break
34343 done
34344 
34345       if test "x$POTENTIAL_CXX" != x; then
34346         CXX=$POTENTIAL_CXX
34347       else
34348         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34349       fi
34350     else
34351       # Otherwise it might already be a complete path
34352       if test ! -x "$CXX"; then
34353         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34354       fi
34355     fi
34356   else
34357     # No user supplied value. Locate compiler ourselves.
34358 
34359     # If we are cross compiling, assume cross compilation tools follows the
34360     # cross compilation standard where they are prefixed with the autoconf
34361     # standard name for the target. For example the binary
34362     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34363     # If we are not cross compiling, then the default compiler name will be
34364     # used.
34365 
34366     CXX=
34367     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34368     # before checking the rest of the PATH.
34369     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34370     # step, this should not be necessary.
34371     if test -n "$TOOLCHAIN_PATH"; then
34372       PATH_save="$PATH"
34373       PATH="$TOOLCHAIN_PATH"
34374       for ac_prog in $SEARCH_LIST
34375 do
34376   # Extract the first word of "$ac_prog", so it can be a program name with args.
34377 set dummy $ac_prog; ac_word=$2
34378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34379 $as_echo_n "checking for $ac_word... " >&6; }
34380 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34381   $as_echo_n "(cached) " >&6
34382 else
34383   case $TOOLCHAIN_PATH_CXX in
34384   [\\/]* | ?:[\\/]*)
34385   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34386   ;;
34387   *)
34388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34389 for as_dir in $PATH
34390 do
34391   IFS=$as_save_IFS
34392   test -z "$as_dir" && as_dir=.
34393     for ac_exec_ext in '' $ac_executable_extensions; do
34394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34395     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34397     break 2
34398   fi
34399 done
34400   done
34401 IFS=$as_save_IFS
34402 
34403   ;;
34404 esac
34405 fi
34406 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34407 if test -n "$TOOLCHAIN_PATH_CXX"; then
34408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34409 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34410 else
34411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34412 $as_echo "no" >&6; }
34413 fi
34414 
34415 
34416   test -n "$TOOLCHAIN_PATH_CXX" && break
34417 done
34418 
34419       CXX=$TOOLCHAIN_PATH_CXX
34420       PATH="$PATH_save"
34421     fi
34422 
34423     # AC_PATH_PROGS can't be run multiple times with the same variable,
34424     # so create a new name for this run.
34425     if test "x$CXX" = x; then
34426       for ac_prog in $SEARCH_LIST
34427 do
34428   # Extract the first word of "$ac_prog", so it can be a program name with args.
34429 set dummy $ac_prog; ac_word=$2
34430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34431 $as_echo_n "checking for $ac_word... " >&6; }
34432 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34433   $as_echo_n "(cached) " >&6
34434 else
34435   case $POTENTIAL_CXX in
34436   [\\/]* | ?:[\\/]*)
34437   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34438   ;;
34439   *)
34440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34441 for as_dir in $PATH
34442 do
34443   IFS=$as_save_IFS
34444   test -z "$as_dir" && as_dir=.
34445     for ac_exec_ext in '' $ac_executable_extensions; do
34446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34447     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34449     break 2
34450   fi
34451 done
34452   done
34453 IFS=$as_save_IFS
34454 
34455   ;;
34456 esac
34457 fi
34458 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34459 if test -n "$POTENTIAL_CXX"; then
34460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34461 $as_echo "$POTENTIAL_CXX" >&6; }
34462 else
34463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34464 $as_echo "no" >&6; }
34465 fi
34466 
34467 
34468   test -n "$POTENTIAL_CXX" && break
34469 done
34470 
34471       CXX=$POTENTIAL_CXX
34472     fi
34473 
34474     if test "x$CXX" = x; then
34475 
34476   # Print a helpful message on how to acquire the necessary build dependency.
34477   # devkit is the help tag: freetype, cups, alsa etc
34478   MISSING_DEPENDENCY=devkit
34479 
34480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34481     cygwin_help $MISSING_DEPENDENCY
34482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34483     msys_help $MISSING_DEPENDENCY
34484   else
34485     PKGHANDLER_COMMAND=
34486 
34487     case $PKGHANDLER in
34488       apt-get)
34489         apt_help     $MISSING_DEPENDENCY ;;
34490       yum)
34491         yum_help     $MISSING_DEPENDENCY ;;
34492       port)
34493         port_help    $MISSING_DEPENDENCY ;;
34494       pkgutil)
34495         pkgutil_help $MISSING_DEPENDENCY ;;
34496       pkgadd)
34497         pkgadd_help  $MISSING_DEPENDENCY ;;
34498     esac
34499 
34500     if test "x$PKGHANDLER_COMMAND" != x; then
34501       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34502     fi
34503   fi
34504 
34505       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34506     fi
34507   fi
34508 
34509   # Now we have a compiler binary in CXX. Make sure it's okay.
34510 
34511   # Only process if variable expands to non-empty
34512 
34513   if test "x$CXX" != x; then
34514     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34515 
34516   # First separate the path from the arguments. This will split at the first
34517   # space.
34518   complete="$CXX"
34519   path="${complete%% *}"
34520   tmp="$complete EOL"
34521   arguments="${tmp#* }"
34522 
34523   # Input might be given as Windows format, start by converting to
34524   # unix format.
34525   new_path=`$CYGPATH -u "$path"`
34526 
34527   # Now try to locate executable using which
34528   new_path=`$WHICH "$new_path" 2> /dev/null`
34529   # bat and cmd files are not always considered executable in cygwin causing which
34530   # to not find them
34531   if test "x$new_path" = x \
34532       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34533       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34534     new_path=`$CYGPATH -u "$path"`
34535   fi
34536   if test "x$new_path" = x; then
34537     # Oops. Which didn't find the executable.
34538     # The splitting of arguments from the executable at a space might have been incorrect,
34539     # since paths with space are more likely in Windows. Give it another try with the whole
34540     # argument.
34541     path="$complete"
34542     arguments="EOL"
34543     new_path=`$CYGPATH -u "$path"`
34544     new_path=`$WHICH "$new_path" 2> /dev/null`
34545     # bat and cmd files are not always considered executable in cygwin causing which
34546     # to not find them
34547     if test "x$new_path" = x \
34548         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34549         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34550       new_path=`$CYGPATH -u "$path"`
34551     fi
34552     if test "x$new_path" = x; then
34553       # It's still not found. Now this is an unrecoverable error.
34554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34555 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34556       has_space=`$ECHO "$complete" | $GREP " "`
34557       if test "x$has_space" != x; then
34558         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34559 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34560       fi
34561       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34562     fi
34563   fi
34564 
34565   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34566   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34567   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34568   # "foo.exe" is OK but "foo" is an error.
34569   #
34570   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34571   # It is also a way to make sure we got the proper file name for the real test later on.
34572   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34573   if test "x$test_shortpath" = x; then
34574     # Short path failed, file does not exist as specified.
34575     # Try adding .exe or .cmd
34576     if test -f "${new_path}.exe"; then
34577       input_to_shortpath="${new_path}.exe"
34578     elif test -f "${new_path}.cmd"; then
34579       input_to_shortpath="${new_path}.cmd"
34580     else
34581       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34582 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34583       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34584 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34585       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34586     fi
34587   else
34588     input_to_shortpath="$new_path"
34589   fi
34590 
34591   # Call helper function which possibly converts this using DOS-style short mode.
34592   # If so, the updated path is stored in $new_path.
34593   new_path="$input_to_shortpath"
34594 
34595   input_path="$input_to_shortpath"
34596   # Check if we need to convert this using DOS-style short mode. If the path
34597   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34598   # take no chances and rewrite it.
34599   # Note: m4 eats our [], so we need to use [ and ] instead.
34600   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34601   if test "x$has_forbidden_chars" != x; then
34602     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34603     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34604     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34605     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34606       # Going to short mode and back again did indeed matter. Since short mode is
34607       # case insensitive, let's make it lowercase to improve readability.
34608       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34609       # Now convert it back to Unix-style (cygpath)
34610       input_path=`$CYGPATH -u "$shortmode_path"`
34611       new_path="$input_path"
34612     fi
34613   fi
34614 
34615   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34616   if test "x$test_cygdrive_prefix" = x; then
34617     # As a simple fix, exclude /usr/bin since it's not a real path.
34618     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34619       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34620       # a path prefixed by /cygdrive for fixpath to work.
34621       new_path="$CYGWIN_ROOT_PATH$input_path"
34622     fi
34623   fi
34624 
34625   # remove trailing .exe if any
34626   new_path="${new_path/%.exe/}"
34627 
34628     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34629 
34630   # First separate the path from the arguments. This will split at the first
34631   # space.
34632   complete="$CXX"
34633   path="${complete%% *}"
34634   tmp="$complete EOL"
34635   arguments="${tmp#* }"
34636 
34637   # Input might be given as Windows format, start by converting to
34638   # unix format.
34639   new_path="$path"
34640 
34641   windows_path="$new_path"
34642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34643     unix_path=`$CYGPATH -u "$windows_path"`
34644     new_path="$unix_path"
34645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34647     new_path="$unix_path"
34648   fi
34649 
34650 
34651   # Now try to locate executable using which
34652   new_path=`$WHICH "$new_path" 2> /dev/null`
34653 
34654   if test "x$new_path" = x; then
34655     # Oops. Which didn't find the executable.
34656     # The splitting of arguments from the executable at a space might have been incorrect,
34657     # since paths with space are more likely in Windows. Give it another try with the whole
34658     # argument.
34659     path="$complete"
34660     arguments="EOL"
34661     new_path="$path"
34662 
34663   windows_path="$new_path"
34664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34665     unix_path=`$CYGPATH -u "$windows_path"`
34666     new_path="$unix_path"
34667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34669     new_path="$unix_path"
34670   fi
34671 
34672 
34673     new_path=`$WHICH "$new_path" 2> /dev/null`
34674     # bat and cmd files are not always considered executable in MSYS causing which
34675     # to not find them
34676     if test "x$new_path" = x \
34677         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34678         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34679       new_path="$path"
34680 
34681   windows_path="$new_path"
34682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34683     unix_path=`$CYGPATH -u "$windows_path"`
34684     new_path="$unix_path"
34685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34687     new_path="$unix_path"
34688   fi
34689 
34690     fi
34691 
34692     if test "x$new_path" = x; then
34693       # It's still not found. Now this is an unrecoverable error.
34694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34695 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34696       has_space=`$ECHO "$complete" | $GREP " "`
34697       if test "x$has_space" != x; then
34698         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34699 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34700       fi
34701       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34702     fi
34703   fi
34704 
34705   # Now new_path has a complete unix path to the binary
34706   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34707     # Keep paths in /bin as-is, but remove trailing .exe if any
34708     new_path="${new_path/%.exe/}"
34709     # Do not save /bin paths to all_fixpath_prefixes!
34710   else
34711     # Not in mixed or Windows style, start by that.
34712     new_path=`cmd //c echo $new_path`
34713 
34714   input_path="$new_path"
34715   # Check if we need to convert this using DOS-style short mode. If the path
34716   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34717   # take no chances and rewrite it.
34718   # Note: m4 eats our [], so we need to use [ and ] instead.
34719   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34720   if test "x$has_forbidden_chars" != x; then
34721     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34722     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34723   fi
34724 
34725     # Output is in $new_path
34726 
34727   windows_path="$new_path"
34728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34729     unix_path=`$CYGPATH -u "$windows_path"`
34730     new_path="$unix_path"
34731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34733     new_path="$unix_path"
34734   fi
34735 
34736     # remove trailing .exe if any
34737     new_path="${new_path/%.exe/}"
34738 
34739     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34740     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34741   fi
34742 
34743     else
34744       # We're on a unix platform. Hooray! :)
34745       # First separate the path from the arguments. This will split at the first
34746       # space.
34747       complete="$CXX"
34748       path="${complete%% *}"
34749       tmp="$complete EOL"
34750       arguments="${tmp#* }"
34751 
34752       # Cannot rely on the command "which" here since it doesn't always work.
34753       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34754       if test -z "$is_absolute_path"; then
34755         # Path to executable is not absolute. Find it.
34756         IFS_save="$IFS"
34757         IFS=:
34758         for p in $PATH; do
34759           if test -f "$p/$path" && test -x "$p/$path"; then
34760             new_path="$p/$path"
34761             break
34762           fi
34763         done
34764         IFS="$IFS_save"
34765       else
34766         # This is an absolute path, we can use it without further modifications.
34767         new_path="$path"
34768       fi
34769 
34770       if test "x$new_path" = x; then
34771         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34772 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34773         has_space=`$ECHO "$complete" | $GREP " "`
34774         if test "x$has_space" != x; then
34775           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34776 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34777         fi
34778         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34779       fi
34780     fi
34781 
34782     # Now join together the path and the arguments once again
34783     if test "x$arguments" != xEOL; then
34784       new_complete="$new_path ${arguments% *}"
34785     else
34786       new_complete="$new_path"
34787     fi
34788 
34789     if test "x$complete" != "x$new_complete"; then
34790       CXX="$new_complete"
34791       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34792 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34793     fi
34794   fi
34795 
34796   TEST_COMPILER="$CXX"
34797 
34798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34799 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34800   SYMLINK_ORIGINAL="$TEST_COMPILER"
34801 
34802   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34803     # Follow a chain of symbolic links. Use readlink
34804     # where it exists, else fall back to horribly
34805     # complicated shell code.
34806     if test "x$READLINK_TESTED" != yes; then
34807       # On MacOSX there is a readlink tool with a different
34808       # purpose than the GNU readlink tool. Check the found readlink.
34809       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34810       if test "x$ISGNU" = x; then
34811         # A readlink that we do not know how to use.
34812         # Are there other non-GNU readlinks out there?
34813         READLINK_TESTED=yes
34814         READLINK=
34815       fi
34816     fi
34817 
34818     if test "x$READLINK" != x; then
34819       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34820     else
34821       # Save the current directory for restoring afterwards
34822       STARTDIR=$PWD
34823       COUNTER=0
34824       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34825       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34826       cd $sym_link_dir
34827       # Use -P flag to resolve symlinks in directories.
34828       cd `$THEPWDCMD -P`
34829       sym_link_dir=`$THEPWDCMD -P`
34830       # Resolve file symlinks
34831       while test $COUNTER -lt 20; do
34832         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34833         if test "x$ISLINK" == x; then
34834           # This is not a symbolic link! We are done!
34835           break
34836         fi
34837         # Again resolve directory symlinks since the target of the just found
34838         # link could be in a different directory
34839         cd `$DIRNAME $ISLINK`
34840         sym_link_dir=`$THEPWDCMD -P`
34841         sym_link_file=`$BASENAME $ISLINK`
34842         let COUNTER=COUNTER+1
34843       done
34844       cd $STARTDIR
34845       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34846     fi
34847   fi
34848 
34849   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34850     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34851 $as_echo "no symlink" >&6; }
34852   else
34853     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34854 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34855 
34856     # We can't handle ccache by gcc wrappers, since we need to know if we're
34857     # using ccache. Instead ccache usage must be controlled by a configure option.
34858     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34859     if test "x$COMPILER_BASENAME" = "xccache"; then
34860       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34861 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34862       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34863     fi
34864   fi
34865 
34866 
34867   COMPILER=$CXX
34868   COMPILER_NAME=$COMPILER_NAME
34869 
34870   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34871     # cc -V output typically looks like
34872     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34873     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34874     # Check that this is likely to be the Solaris Studio cc.
34875     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34876     if test $? -ne 0; then
34877       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34878       { $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
34879 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34880       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34881 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34882       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34883 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34884       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34885     fi
34886     # Remove usage instructions (if present), and
34887     # collapse compiler output into a single line
34888     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34889         $SED -e 's/ *[Uu]sage:.*//'`
34890     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34891         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34892   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34893     # xlc -qversion output typically looks like
34894     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34895     #     Version: 11.01.0000.0015
34896     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34897     # Check that this is likely to be the IBM XL C compiler.
34898     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34899     if test $? -ne 0; then
34900       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34901       { $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
34902 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34903       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34904 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34905       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34906 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34907       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34908     fi
34909     # Collapse compiler output into a single line
34910     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34911     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34912         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34913   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34914     # There is no specific version flag, but all output starts with a version string.
34915     # First line typically looks something like:
34916     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34917     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34918     # Check that this is likely to be Microsoft CL.EXE.
34919     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34920     if test $? -ne 0; then
34921       { $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
34922 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34923       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34924 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34925       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34926     fi
34927     # Collapse compiler output into a single line
34928     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34929     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34930         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34931   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34932     # gcc --version output typically looks like
34933     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34934     #     Copyright (C) 2013 Free Software Foundation, Inc.
34935     #     This is free software; see the source for copying conditions.  There is NO
34936     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34937     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34938     # Check that this is likely to be GCC.
34939     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34940     if test $? -ne 0; then
34941       { $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
34942 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34943       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34944 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34945       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34946     fi
34947     # Remove Copyright and legalese from version string, and
34948     # collapse into a single line
34949     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34950         $SED -e 's/ *Copyright .*//'`
34951     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34952         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34953   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34954     # clang --version output typically looks like
34955     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34956     #    clang version 3.3 (tags/RELEASE_33/final)
34957     # or
34958     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34959     #    Target: x86_64-pc-linux-gnu
34960     #    Thread model: posix
34961     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34962     # Check that this is likely to be clang
34963     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34964     if test $? -ne 0; then
34965       { $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
34966 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34967       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34968 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34969       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34970     fi
34971     # Collapse compiler output into a single line
34972     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34973     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34974         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34975   else
34976       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34977   fi
34978   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34979   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34980   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34981   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34982 
34983   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34984 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34985 
34986 
34987   # Now that we have resolved CXX ourself, let autoconf have its go at it
34988   ac_ext=cpp
34989 ac_cpp='$CXXCPP $CPPFLAGS'
34990 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34991 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34992 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34993 if test -z "$CXX"; then
34994   if test -n "$CCC"; then
34995     CXX=$CCC
34996   else
34997     if test -n "$ac_tool_prefix"; then
34998   for ac_prog in $CXX
34999   do
35000     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35001 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35003 $as_echo_n "checking for $ac_word... " >&6; }
35004 if ${ac_cv_prog_CXX+:} false; then :
35005   $as_echo_n "(cached) " >&6
35006 else
35007   if test -n "$CXX"; then
35008   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35009 else
35010 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35011 for as_dir in $PATH
35012 do
35013   IFS=$as_save_IFS
35014   test -z "$as_dir" && as_dir=.
35015     for ac_exec_ext in '' $ac_executable_extensions; do
35016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35017     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35019     break 2
35020   fi
35021 done
35022   done
35023 IFS=$as_save_IFS
35024 
35025 fi
35026 fi
35027 CXX=$ac_cv_prog_CXX
35028 if test -n "$CXX"; then
35029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35030 $as_echo "$CXX" >&6; }
35031 else
35032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35033 $as_echo "no" >&6; }
35034 fi
35035 
35036 
35037     test -n "$CXX" && break
35038   done
35039 fi
35040 if test -z "$CXX"; then
35041   ac_ct_CXX=$CXX
35042   for ac_prog in $CXX
35043 do
35044   # Extract the first word of "$ac_prog", so it can be a program name with args.
35045 set dummy $ac_prog; ac_word=$2
35046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35047 $as_echo_n "checking for $ac_word... " >&6; }
35048 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35049   $as_echo_n "(cached) " >&6
35050 else
35051   if test -n "$ac_ct_CXX"; then
35052   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35053 else
35054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35055 for as_dir in $PATH
35056 do
35057   IFS=$as_save_IFS
35058   test -z "$as_dir" && as_dir=.
35059     for ac_exec_ext in '' $ac_executable_extensions; do
35060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35061     ac_cv_prog_ac_ct_CXX="$ac_prog"
35062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35063     break 2
35064   fi
35065 done
35066   done
35067 IFS=$as_save_IFS
35068 
35069 fi
35070 fi
35071 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35072 if test -n "$ac_ct_CXX"; then
35073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35074 $as_echo "$ac_ct_CXX" >&6; }
35075 else
35076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35077 $as_echo "no" >&6; }
35078 fi
35079 
35080 
35081   test -n "$ac_ct_CXX" && break
35082 done
35083 
35084   if test "x$ac_ct_CXX" = x; then
35085     CXX="g++"
35086   else
35087     case $cross_compiling:$ac_tool_warned in
35088 yes:)
35089 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35090 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35091 ac_tool_warned=yes ;;
35092 esac
35093     CXX=$ac_ct_CXX
35094   fi
35095 fi
35096 
35097   fi
35098 fi
35099 # Provide some information about the compiler.
35100 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35101 set X $ac_compile
35102 ac_compiler=$2
35103 for ac_option in --version -v -V -qversion; do
35104   { { ac_try="$ac_compiler $ac_option >&5"
35105 case "(($ac_try" in
35106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35107   *) ac_try_echo=$ac_try;;
35108 esac
35109 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35110 $as_echo "$ac_try_echo"; } >&5
35111   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35112   ac_status=$?
35113   if test -s conftest.err; then
35114     sed '10a\
35115 ... rest of stderr output deleted ...
35116          10q' conftest.err >conftest.er1
35117     cat conftest.er1 >&5
35118   fi
35119   rm -f conftest.er1 conftest.err
35120   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35121   test $ac_status = 0; }
35122 done
35123 
35124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35125 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35126 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35127   $as_echo_n "(cached) " >&6
35128 else
35129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35130 /* end confdefs.h.  */
35131 
35132 int
35133 main ()
35134 {
35135 #ifndef __GNUC__
35136        choke me
35137 #endif
35138 
35139   ;
35140   return 0;
35141 }
35142 _ACEOF
35143 if ac_fn_cxx_try_compile "$LINENO"; then :
35144   ac_compiler_gnu=yes
35145 else
35146   ac_compiler_gnu=no
35147 fi
35148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35149 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35150 
35151 fi
35152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35153 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35154 if test $ac_compiler_gnu = yes; then
35155   GXX=yes
35156 else
35157   GXX=
35158 fi
35159 ac_test_CXXFLAGS=${CXXFLAGS+set}
35160 ac_save_CXXFLAGS=$CXXFLAGS
35161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35162 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35163 if ${ac_cv_prog_cxx_g+:} false; then :
35164   $as_echo_n "(cached) " >&6
35165 else
35166   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35167    ac_cxx_werror_flag=yes
35168    ac_cv_prog_cxx_g=no
35169    CXXFLAGS="-g"
35170    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35171 /* end confdefs.h.  */
35172 
35173 int
35174 main ()
35175 {
35176 
35177   ;
35178   return 0;
35179 }
35180 _ACEOF
35181 if ac_fn_cxx_try_compile "$LINENO"; then :
35182   ac_cv_prog_cxx_g=yes
35183 else
35184   CXXFLAGS=""
35185       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35186 /* end confdefs.h.  */
35187 
35188 int
35189 main ()
35190 {
35191 
35192   ;
35193   return 0;
35194 }
35195 _ACEOF
35196 if ac_fn_cxx_try_compile "$LINENO"; then :
35197 
35198 else
35199   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35200          CXXFLAGS="-g"
35201          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35202 /* end confdefs.h.  */
35203 
35204 int
35205 main ()
35206 {
35207 
35208   ;
35209   return 0;
35210 }
35211 _ACEOF
35212 if ac_fn_cxx_try_compile "$LINENO"; then :
35213   ac_cv_prog_cxx_g=yes
35214 fi
35215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35216 fi
35217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35218 fi
35219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35220    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35221 fi
35222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35223 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35224 if test "$ac_test_CXXFLAGS" = set; then
35225   CXXFLAGS=$ac_save_CXXFLAGS
35226 elif test $ac_cv_prog_cxx_g = yes; then
35227   if test "$GXX" = yes; then
35228     CXXFLAGS="-g -O2"
35229   else
35230     CXXFLAGS="-g"
35231   fi
35232 else
35233   if test "$GXX" = yes; then
35234     CXXFLAGS="-O2"
35235   else
35236     CXXFLAGS=
35237   fi
35238 fi
35239 ac_ext=cpp
35240 ac_cpp='$CXXCPP $CPPFLAGS'
35241 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35242 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35243 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35244 
35245 
35246   # This is the compiler version number on the form X.Y[.Z]
35247 
35248 
35249 
35250 
35251   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35252     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35253 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35254     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35255 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35256   fi
35257 
35258   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35259   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35260     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35261 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35262   fi
35263 
35264   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35265     { $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
35266 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35267   fi
35268 
35269   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35270 
35271 
35272   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35273 
35274 
35275 
35276 
35277 
35278 
35279 
35280 
35281 
35282 
35283 
35284 
35285 
35286 
35287 
35288 
35289 
35290 
35291 
35292 
35293 
35294 
35295 
35296 
35297 
35298 
35299 
35300 
35301 
35302 
35303 
35304 
35305 
35306 
35307 
35308 
35309 
35310 
35311 
35312 
35313 
35314 
35315 
35316 
35317 
35318 
35319 
35320 
35321 
35322     # Execute function body
35323 
35324   # Need to assign to a variable since m4 is blocked from modifying parts in [].
35325   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35326 
35327   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35328     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35329   fi
35330 
35331   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35332     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35333   fi
35334 
35335   # Version comparison method inspired by http://stackoverflow.com/a/24067243
35336   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35337 
35338   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35339     :
35340 
35341   else
35342     :
35343 
35344           { $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
35345 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35346 
35347 
35348   fi
35349 
35350 
35351 
35352 
35353 
35354 
35355 
35356 
35357 
35358 
35359 
35360 
35361 
35362 
35363   fi
35364 
35365   #
35366   # Setup the preprocessor (CPP and CXXCPP)
35367   #
35368   ac_ext=c
35369 ac_cpp='$CPP $CPPFLAGS'
35370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35374 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35375 # On Suns, sometimes $CPP names a directory.
35376 if test -n "$CPP" && test -d "$CPP"; then
35377   CPP=
35378 fi
35379 if test -z "$CPP"; then
35380   if ${ac_cv_prog_CPP+:} false; then :
35381   $as_echo_n "(cached) " >&6
35382 else
35383       # Double quotes because CPP needs to be expanded
35384     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35385     do
35386       ac_preproc_ok=false
35387 for ac_c_preproc_warn_flag in '' yes
35388 do
35389   # Use a header file that comes with gcc, so configuring glibc
35390   # with a fresh cross-compiler works.
35391   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35392   # <limits.h> exists even on freestanding compilers.
35393   # On the NeXT, cc -E runs the code through the compiler's parser,
35394   # not just through cpp. "Syntax error" is here to catch this case.
35395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35396 /* end confdefs.h.  */
35397 #ifdef __STDC__
35398 # include <limits.h>
35399 #else
35400 # include <assert.h>
35401 #endif
35402                      Syntax error
35403 _ACEOF
35404 if ac_fn_c_try_cpp "$LINENO"; then :
35405 
35406 else
35407   # Broken: fails on valid input.
35408 continue
35409 fi
35410 rm -f conftest.err conftest.i conftest.$ac_ext
35411 
35412   # OK, works on sane cases.  Now check whether nonexistent headers
35413   # can be detected and how.
35414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35415 /* end confdefs.h.  */
35416 #include <ac_nonexistent.h>
35417 _ACEOF
35418 if ac_fn_c_try_cpp "$LINENO"; then :
35419   # Broken: success on invalid input.
35420 continue
35421 else
35422   # Passes both tests.
35423 ac_preproc_ok=:
35424 break
35425 fi
35426 rm -f conftest.err conftest.i conftest.$ac_ext
35427 
35428 done
35429 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35430 rm -f conftest.i conftest.err conftest.$ac_ext
35431 if $ac_preproc_ok; then :
35432   break
35433 fi
35434 
35435     done
35436     ac_cv_prog_CPP=$CPP
35437 
35438 fi
35439   CPP=$ac_cv_prog_CPP
35440 else
35441   ac_cv_prog_CPP=$CPP
35442 fi
35443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35444 $as_echo "$CPP" >&6; }
35445 ac_preproc_ok=false
35446 for ac_c_preproc_warn_flag in '' yes
35447 do
35448   # Use a header file that comes with gcc, so configuring glibc
35449   # with a fresh cross-compiler works.
35450   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35451   # <limits.h> exists even on freestanding compilers.
35452   # On the NeXT, cc -E runs the code through the compiler's parser,
35453   # not just through cpp. "Syntax error" is here to catch this case.
35454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35455 /* end confdefs.h.  */
35456 #ifdef __STDC__
35457 # include <limits.h>
35458 #else
35459 # include <assert.h>
35460 #endif
35461                      Syntax error
35462 _ACEOF
35463 if ac_fn_c_try_cpp "$LINENO"; then :
35464 
35465 else
35466   # Broken: fails on valid input.
35467 continue
35468 fi
35469 rm -f conftest.err conftest.i conftest.$ac_ext
35470 
35471   # OK, works on sane cases.  Now check whether nonexistent headers
35472   # can be detected and how.
35473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35474 /* end confdefs.h.  */
35475 #include <ac_nonexistent.h>
35476 _ACEOF
35477 if ac_fn_c_try_cpp "$LINENO"; then :
35478   # Broken: success on invalid input.
35479 continue
35480 else
35481   # Passes both tests.
35482 ac_preproc_ok=:
35483 break
35484 fi
35485 rm -f conftest.err conftest.i conftest.$ac_ext
35486 
35487 done
35488 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35489 rm -f conftest.i conftest.err conftest.$ac_ext
35490 if $ac_preproc_ok; then :
35491 
35492 else
35493   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35494 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35495 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35496 See \`config.log' for more details" "$LINENO" 5; }
35497 fi
35498 
35499 ac_ext=cpp
35500 ac_cpp='$CXXCPP $CPPFLAGS'
35501 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35502 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35503 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35504 
35505 
35506   # Only process if variable expands to non-empty
35507 
35508   if test "x$CPP" != x; then
35509     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35510 
35511   # First separate the path from the arguments. This will split at the first
35512   # space.
35513   complete="$CPP"
35514   path="${complete%% *}"
35515   tmp="$complete EOL"
35516   arguments="${tmp#* }"
35517 
35518   # Input might be given as Windows format, start by converting to
35519   # unix format.
35520   new_path=`$CYGPATH -u "$path"`
35521 
35522   # Now try to locate executable using which
35523   new_path=`$WHICH "$new_path" 2> /dev/null`
35524   # bat and cmd files are not always considered executable in cygwin causing which
35525   # to not find them
35526   if test "x$new_path" = x \
35527       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35528       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35529     new_path=`$CYGPATH -u "$path"`
35530   fi
35531   if test "x$new_path" = x; then
35532     # Oops. Which didn't find the executable.
35533     # The splitting of arguments from the executable at a space might have been incorrect,
35534     # since paths with space are more likely in Windows. Give it another try with the whole
35535     # argument.
35536     path="$complete"
35537     arguments="EOL"
35538     new_path=`$CYGPATH -u "$path"`
35539     new_path=`$WHICH "$new_path" 2> /dev/null`
35540     # bat and cmd files are not always considered executable in cygwin causing which
35541     # to not find them
35542     if test "x$new_path" = x \
35543         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35544         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35545       new_path=`$CYGPATH -u "$path"`
35546     fi
35547     if test "x$new_path" = x; then
35548       # It's still not found. Now this is an unrecoverable error.
35549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35550 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35551       has_space=`$ECHO "$complete" | $GREP " "`
35552       if test "x$has_space" != x; then
35553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35555       fi
35556       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35557     fi
35558   fi
35559 
35560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35563   # "foo.exe" is OK but "foo" is an error.
35564   #
35565   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35566   # It is also a way to make sure we got the proper file name for the real test later on.
35567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35568   if test "x$test_shortpath" = x; then
35569     # Short path failed, file does not exist as specified.
35570     # Try adding .exe or .cmd
35571     if test -f "${new_path}.exe"; then
35572       input_to_shortpath="${new_path}.exe"
35573     elif test -f "${new_path}.cmd"; then
35574       input_to_shortpath="${new_path}.cmd"
35575     else
35576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35577 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35578       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35579 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35580       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35581     fi
35582   else
35583     input_to_shortpath="$new_path"
35584   fi
35585 
35586   # Call helper function which possibly converts this using DOS-style short mode.
35587   # If so, the updated path is stored in $new_path.
35588   new_path="$input_to_shortpath"
35589 
35590   input_path="$input_to_shortpath"
35591   # Check if we need to convert this using DOS-style short mode. If the path
35592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35593   # take no chances and rewrite it.
35594   # Note: m4 eats our [], so we need to use [ and ] instead.
35595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35596   if test "x$has_forbidden_chars" != x; then
35597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35601       # Going to short mode and back again did indeed matter. Since short mode is
35602       # case insensitive, let's make it lowercase to improve readability.
35603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35604       # Now convert it back to Unix-style (cygpath)
35605       input_path=`$CYGPATH -u "$shortmode_path"`
35606       new_path="$input_path"
35607     fi
35608   fi
35609 
35610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35611   if test "x$test_cygdrive_prefix" = x; then
35612     # As a simple fix, exclude /usr/bin since it's not a real path.
35613     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35615       # a path prefixed by /cygdrive for fixpath to work.
35616       new_path="$CYGWIN_ROOT_PATH$input_path"
35617     fi
35618   fi
35619 
35620   # remove trailing .exe if any
35621   new_path="${new_path/%.exe/}"
35622 
35623     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35624 
35625   # First separate the path from the arguments. This will split at the first
35626   # space.
35627   complete="$CPP"
35628   path="${complete%% *}"
35629   tmp="$complete EOL"
35630   arguments="${tmp#* }"
35631 
35632   # Input might be given as Windows format, start by converting to
35633   # unix format.
35634   new_path="$path"
35635 
35636   windows_path="$new_path"
35637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35638     unix_path=`$CYGPATH -u "$windows_path"`
35639     new_path="$unix_path"
35640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35642     new_path="$unix_path"
35643   fi
35644 
35645 
35646   # Now try to locate executable using which
35647   new_path=`$WHICH "$new_path" 2> /dev/null`
35648 
35649   if test "x$new_path" = x; then
35650     # Oops. Which didn't find the executable.
35651     # The splitting of arguments from the executable at a space might have been incorrect,
35652     # since paths with space are more likely in Windows. Give it another try with the whole
35653     # argument.
35654     path="$complete"
35655     arguments="EOL"
35656     new_path="$path"
35657 
35658   windows_path="$new_path"
35659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35660     unix_path=`$CYGPATH -u "$windows_path"`
35661     new_path="$unix_path"
35662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35664     new_path="$unix_path"
35665   fi
35666 
35667 
35668     new_path=`$WHICH "$new_path" 2> /dev/null`
35669     # bat and cmd files are not always considered executable in MSYS causing which
35670     # to not find them
35671     if test "x$new_path" = x \
35672         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35673         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35674       new_path="$path"
35675 
35676   windows_path="$new_path"
35677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35678     unix_path=`$CYGPATH -u "$windows_path"`
35679     new_path="$unix_path"
35680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35682     new_path="$unix_path"
35683   fi
35684 
35685     fi
35686 
35687     if test "x$new_path" = x; then
35688       # It's still not found. Now this is an unrecoverable error.
35689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35690 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35691       has_space=`$ECHO "$complete" | $GREP " "`
35692       if test "x$has_space" != x; then
35693         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35694 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35695       fi
35696       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35697     fi
35698   fi
35699 
35700   # Now new_path has a complete unix path to the binary
35701   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35702     # Keep paths in /bin as-is, but remove trailing .exe if any
35703     new_path="${new_path/%.exe/}"
35704     # Do not save /bin paths to all_fixpath_prefixes!
35705   else
35706     # Not in mixed or Windows style, start by that.
35707     new_path=`cmd //c echo $new_path`
35708 
35709   input_path="$new_path"
35710   # Check if we need to convert this using DOS-style short mode. If the path
35711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35712   # take no chances and rewrite it.
35713   # Note: m4 eats our [], so we need to use [ and ] instead.
35714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35715   if test "x$has_forbidden_chars" != x; then
35716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35717     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35718   fi
35719 
35720     # Output is in $new_path
35721 
35722   windows_path="$new_path"
35723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35724     unix_path=`$CYGPATH -u "$windows_path"`
35725     new_path="$unix_path"
35726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35728     new_path="$unix_path"
35729   fi
35730 
35731     # remove trailing .exe if any
35732     new_path="${new_path/%.exe/}"
35733 
35734     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35735     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35736   fi
35737 
35738     else
35739       # We're on a unix platform. Hooray! :)
35740       # First separate the path from the arguments. This will split at the first
35741       # space.
35742       complete="$CPP"
35743       path="${complete%% *}"
35744       tmp="$complete EOL"
35745       arguments="${tmp#* }"
35746 
35747       # Cannot rely on the command "which" here since it doesn't always work.
35748       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35749       if test -z "$is_absolute_path"; then
35750         # Path to executable is not absolute. Find it.
35751         IFS_save="$IFS"
35752         IFS=:
35753         for p in $PATH; do
35754           if test -f "$p/$path" && test -x "$p/$path"; then
35755             new_path="$p/$path"
35756             break
35757           fi
35758         done
35759         IFS="$IFS_save"
35760       else
35761         # This is an absolute path, we can use it without further modifications.
35762         new_path="$path"
35763       fi
35764 
35765       if test "x$new_path" = x; then
35766         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35767 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35768         has_space=`$ECHO "$complete" | $GREP " "`
35769         if test "x$has_space" != x; then
35770           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35771 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35772         fi
35773         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35774       fi
35775     fi
35776 
35777     # Now join together the path and the arguments once again
35778     if test "x$arguments" != xEOL; then
35779       new_complete="$new_path ${arguments% *}"
35780     else
35781       new_complete="$new_path"
35782     fi
35783 
35784     if test "x$complete" != "x$new_complete"; then
35785       CPP="$new_complete"
35786       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35787 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35788     fi
35789   fi
35790 
35791   ac_ext=cpp
35792 ac_cpp='$CXXCPP $CPPFLAGS'
35793 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35794 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35795 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35797 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35798 if test -z "$CXXCPP"; then
35799   if ${ac_cv_prog_CXXCPP+:} false; then :
35800   $as_echo_n "(cached) " >&6
35801 else
35802       # Double quotes because CXXCPP needs to be expanded
35803     for CXXCPP in "$CXX -E" "/lib/cpp"
35804     do
35805       ac_preproc_ok=false
35806 for ac_cxx_preproc_warn_flag in '' yes
35807 do
35808   # Use a header file that comes with gcc, so configuring glibc
35809   # with a fresh cross-compiler works.
35810   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35811   # <limits.h> exists even on freestanding compilers.
35812   # On the NeXT, cc -E runs the code through the compiler's parser,
35813   # not just through cpp. "Syntax error" is here to catch this case.
35814   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35815 /* end confdefs.h.  */
35816 #ifdef __STDC__
35817 # include <limits.h>
35818 #else
35819 # include <assert.h>
35820 #endif
35821                      Syntax error
35822 _ACEOF
35823 if ac_fn_cxx_try_cpp "$LINENO"; then :
35824 
35825 else
35826   # Broken: fails on valid input.
35827 continue
35828 fi
35829 rm -f conftest.err conftest.i conftest.$ac_ext
35830 
35831   # OK, works on sane cases.  Now check whether nonexistent headers
35832   # can be detected and how.
35833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35834 /* end confdefs.h.  */
35835 #include <ac_nonexistent.h>
35836 _ACEOF
35837 if ac_fn_cxx_try_cpp "$LINENO"; then :
35838   # Broken: success on invalid input.
35839 continue
35840 else
35841   # Passes both tests.
35842 ac_preproc_ok=:
35843 break
35844 fi
35845 rm -f conftest.err conftest.i conftest.$ac_ext
35846 
35847 done
35848 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35849 rm -f conftest.i conftest.err conftest.$ac_ext
35850 if $ac_preproc_ok; then :
35851   break
35852 fi
35853 
35854     done
35855     ac_cv_prog_CXXCPP=$CXXCPP
35856 
35857 fi
35858   CXXCPP=$ac_cv_prog_CXXCPP
35859 else
35860   ac_cv_prog_CXXCPP=$CXXCPP
35861 fi
35862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35863 $as_echo "$CXXCPP" >&6; }
35864 ac_preproc_ok=false
35865 for ac_cxx_preproc_warn_flag in '' yes
35866 do
35867   # Use a header file that comes with gcc, so configuring glibc
35868   # with a fresh cross-compiler works.
35869   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35870   # <limits.h> exists even on freestanding compilers.
35871   # On the NeXT, cc -E runs the code through the compiler's parser,
35872   # not just through cpp. "Syntax error" is here to catch this case.
35873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35874 /* end confdefs.h.  */
35875 #ifdef __STDC__
35876 # include <limits.h>
35877 #else
35878 # include <assert.h>
35879 #endif
35880                      Syntax error
35881 _ACEOF
35882 if ac_fn_cxx_try_cpp "$LINENO"; then :
35883 
35884 else
35885   # Broken: fails on valid input.
35886 continue
35887 fi
35888 rm -f conftest.err conftest.i conftest.$ac_ext
35889 
35890   # OK, works on sane cases.  Now check whether nonexistent headers
35891   # can be detected and how.
35892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35893 /* end confdefs.h.  */
35894 #include <ac_nonexistent.h>
35895 _ACEOF
35896 if ac_fn_cxx_try_cpp "$LINENO"; then :
35897   # Broken: success on invalid input.
35898 continue
35899 else
35900   # Passes both tests.
35901 ac_preproc_ok=:
35902 break
35903 fi
35904 rm -f conftest.err conftest.i conftest.$ac_ext
35905 
35906 done
35907 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35908 rm -f conftest.i conftest.err conftest.$ac_ext
35909 if $ac_preproc_ok; then :
35910 
35911 else
35912   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35913 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35914 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35915 See \`config.log' for more details" "$LINENO" 5; }
35916 fi
35917 
35918 ac_ext=cpp
35919 ac_cpp='$CXXCPP $CPPFLAGS'
35920 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35921 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35922 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35923 
35924 
35925   # Only process if variable expands to non-empty
35926 
35927   if test "x$CXXCPP" != x; then
35928     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35929 
35930   # First separate the path from the arguments. This will split at the first
35931   # space.
35932   complete="$CXXCPP"
35933   path="${complete%% *}"
35934   tmp="$complete EOL"
35935   arguments="${tmp#* }"
35936 
35937   # Input might be given as Windows format, start by converting to
35938   # unix format.
35939   new_path=`$CYGPATH -u "$path"`
35940 
35941   # Now try to locate executable using which
35942   new_path=`$WHICH "$new_path" 2> /dev/null`
35943   # bat and cmd files are not always considered executable in cygwin causing which
35944   # to not find them
35945   if test "x$new_path" = x \
35946       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35947       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35948     new_path=`$CYGPATH -u "$path"`
35949   fi
35950   if test "x$new_path" = x; then
35951     # Oops. Which didn't find the executable.
35952     # The splitting of arguments from the executable at a space might have been incorrect,
35953     # since paths with space are more likely in Windows. Give it another try with the whole
35954     # argument.
35955     path="$complete"
35956     arguments="EOL"
35957     new_path=`$CYGPATH -u "$path"`
35958     new_path=`$WHICH "$new_path" 2> /dev/null`
35959     # bat and cmd files are not always considered executable in cygwin causing which
35960     # to not find them
35961     if test "x$new_path" = x \
35962         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35963         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35964       new_path=`$CYGPATH -u "$path"`
35965     fi
35966     if test "x$new_path" = x; then
35967       # It's still not found. Now this is an unrecoverable error.
35968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35969 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35970       has_space=`$ECHO "$complete" | $GREP " "`
35971       if test "x$has_space" != x; then
35972         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35974       fi
35975       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35976     fi
35977   fi
35978 
35979   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35980   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35981   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35982   # "foo.exe" is OK but "foo" is an error.
35983   #
35984   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35985   # It is also a way to make sure we got the proper file name for the real test later on.
35986   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35987   if test "x$test_shortpath" = x; then
35988     # Short path failed, file does not exist as specified.
35989     # Try adding .exe or .cmd
35990     if test -f "${new_path}.exe"; then
35991       input_to_shortpath="${new_path}.exe"
35992     elif test -f "${new_path}.cmd"; then
35993       input_to_shortpath="${new_path}.cmd"
35994     else
35995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35996 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35997       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35998 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35999       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36000     fi
36001   else
36002     input_to_shortpath="$new_path"
36003   fi
36004 
36005   # Call helper function which possibly converts this using DOS-style short mode.
36006   # If so, the updated path is stored in $new_path.
36007   new_path="$input_to_shortpath"
36008 
36009   input_path="$input_to_shortpath"
36010   # Check if we need to convert this using DOS-style short mode. If the path
36011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36012   # take no chances and rewrite it.
36013   # Note: m4 eats our [], so we need to use [ and ] instead.
36014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36015   if test "x$has_forbidden_chars" != x; then
36016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36017     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36018     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36019     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36020       # Going to short mode and back again did indeed matter. Since short mode is
36021       # case insensitive, let's make it lowercase to improve readability.
36022       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36023       # Now convert it back to Unix-style (cygpath)
36024       input_path=`$CYGPATH -u "$shortmode_path"`
36025       new_path="$input_path"
36026     fi
36027   fi
36028 
36029   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36030   if test "x$test_cygdrive_prefix" = x; then
36031     # As a simple fix, exclude /usr/bin since it's not a real path.
36032     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36033       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36034       # a path prefixed by /cygdrive for fixpath to work.
36035       new_path="$CYGWIN_ROOT_PATH$input_path"
36036     fi
36037   fi
36038 
36039   # remove trailing .exe if any
36040   new_path="${new_path/%.exe/}"
36041 
36042     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36043 
36044   # First separate the path from the arguments. This will split at the first
36045   # space.
36046   complete="$CXXCPP"
36047   path="${complete%% *}"
36048   tmp="$complete EOL"
36049   arguments="${tmp#* }"
36050 
36051   # Input might be given as Windows format, start by converting to
36052   # unix format.
36053   new_path="$path"
36054 
36055   windows_path="$new_path"
36056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36057     unix_path=`$CYGPATH -u "$windows_path"`
36058     new_path="$unix_path"
36059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36061     new_path="$unix_path"
36062   fi
36063 
36064 
36065   # Now try to locate executable using which
36066   new_path=`$WHICH "$new_path" 2> /dev/null`
36067 
36068   if test "x$new_path" = x; then
36069     # Oops. Which didn't find the executable.
36070     # The splitting of arguments from the executable at a space might have been incorrect,
36071     # since paths with space are more likely in Windows. Give it another try with the whole
36072     # argument.
36073     path="$complete"
36074     arguments="EOL"
36075     new_path="$path"
36076 
36077   windows_path="$new_path"
36078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36079     unix_path=`$CYGPATH -u "$windows_path"`
36080     new_path="$unix_path"
36081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36083     new_path="$unix_path"
36084   fi
36085 
36086 
36087     new_path=`$WHICH "$new_path" 2> /dev/null`
36088     # bat and cmd files are not always considered executable in MSYS causing which
36089     # to not find them
36090     if test "x$new_path" = x \
36091         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36092         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36093       new_path="$path"
36094 
36095   windows_path="$new_path"
36096   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36097     unix_path=`$CYGPATH -u "$windows_path"`
36098     new_path="$unix_path"
36099   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36100     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36101     new_path="$unix_path"
36102   fi
36103 
36104     fi
36105 
36106     if test "x$new_path" = x; then
36107       # It's still not found. Now this is an unrecoverable error.
36108       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36109 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36110       has_space=`$ECHO "$complete" | $GREP " "`
36111       if test "x$has_space" != x; then
36112         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36113 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36114       fi
36115       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36116     fi
36117   fi
36118 
36119   # Now new_path has a complete unix path to the binary
36120   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36121     # Keep paths in /bin as-is, but remove trailing .exe if any
36122     new_path="${new_path/%.exe/}"
36123     # Do not save /bin paths to all_fixpath_prefixes!
36124   else
36125     # Not in mixed or Windows style, start by that.
36126     new_path=`cmd //c echo $new_path`
36127 
36128   input_path="$new_path"
36129   # Check if we need to convert this using DOS-style short mode. If the path
36130   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36131   # take no chances and rewrite it.
36132   # Note: m4 eats our [], so we need to use [ and ] instead.
36133   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36134   if test "x$has_forbidden_chars" != x; then
36135     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36136     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36137   fi
36138 
36139     # Output is in $new_path
36140 
36141   windows_path="$new_path"
36142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36143     unix_path=`$CYGPATH -u "$windows_path"`
36144     new_path="$unix_path"
36145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36147     new_path="$unix_path"
36148   fi
36149 
36150     # remove trailing .exe if any
36151     new_path="${new_path/%.exe/}"
36152 
36153     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36154     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36155   fi
36156 
36157     else
36158       # We're on a unix platform. Hooray! :)
36159       # First separate the path from the arguments. This will split at the first
36160       # space.
36161       complete="$CXXCPP"
36162       path="${complete%% *}"
36163       tmp="$complete EOL"
36164       arguments="${tmp#* }"
36165 
36166       # Cannot rely on the command "which" here since it doesn't always work.
36167       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36168       if test -z "$is_absolute_path"; then
36169         # Path to executable is not absolute. Find it.
36170         IFS_save="$IFS"
36171         IFS=:
36172         for p in $PATH; do
36173           if test -f "$p/$path" && test -x "$p/$path"; then
36174             new_path="$p/$path"
36175             break
36176           fi
36177         done
36178         IFS="$IFS_save"
36179       else
36180         # This is an absolute path, we can use it without further modifications.
36181         new_path="$path"
36182       fi
36183 
36184       if test "x$new_path" = x; then
36185         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36186 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36187         has_space=`$ECHO "$complete" | $GREP " "`
36188         if test "x$has_space" != x; then
36189           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36190 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36191         fi
36192         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36193       fi
36194     fi
36195 
36196     # Now join together the path and the arguments once again
36197     if test "x$arguments" != xEOL; then
36198       new_complete="$new_path ${arguments% *}"
36199     else
36200       new_complete="$new_path"
36201     fi
36202 
36203     if test "x$complete" != "x$new_complete"; then
36204       CXXCPP="$new_complete"
36205       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36206 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36207     fi
36208   fi
36209 
36210 
36211   #
36212   # Setup the linker (LD)
36213   #
36214   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36215     # In the Microsoft toolchain we have a separate LD command "link".
36216     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36217     # a cygwin program for something completely different.
36218     # Extract the first word of "link", so it can be a program name with args.
36219 set dummy link; ac_word=$2
36220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36221 $as_echo_n "checking for $ac_word... " >&6; }
36222 if ${ac_cv_prog_LD+:} false; then :
36223   $as_echo_n "(cached) " >&6
36224 else
36225   if test -n "$LD"; then
36226   ac_cv_prog_LD="$LD" # Let the user override the test.
36227 else
36228   ac_prog_rejected=no
36229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36230 for as_dir in $PATH
36231 do
36232   IFS=$as_save_IFS
36233   test -z "$as_dir" && as_dir=.
36234     for ac_exec_ext in '' $ac_executable_extensions; do
36235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36236     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36237        ac_prog_rejected=yes
36238        continue
36239      fi
36240     ac_cv_prog_LD="link"
36241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36242     break 2
36243   fi
36244 done
36245   done
36246 IFS=$as_save_IFS
36247 
36248 if test $ac_prog_rejected = yes; then
36249   # We found a bogon in the path, so make sure we never use it.
36250   set dummy $ac_cv_prog_LD
36251   shift
36252   if test $# != 0; then
36253     # We chose a different compiler from the bogus one.
36254     # However, it has the same basename, so the bogon will be chosen
36255     # first if we set LD to just the basename; use the full file name.
36256     shift
36257     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36258   fi
36259 fi
36260 fi
36261 fi
36262 LD=$ac_cv_prog_LD
36263 if test -n "$LD"; then
36264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36265 $as_echo "$LD" >&6; }
36266 else
36267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36268 $as_echo "no" >&6; }
36269 fi
36270 
36271 
36272 
36273   # Only process if variable expands to non-empty
36274 
36275   if test "x$LD" != x; then
36276     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36277 
36278   # First separate the path from the arguments. This will split at the first
36279   # space.
36280   complete="$LD"
36281   path="${complete%% *}"
36282   tmp="$complete EOL"
36283   arguments="${tmp#* }"
36284 
36285   # Input might be given as Windows format, start by converting to
36286   # unix format.
36287   new_path=`$CYGPATH -u "$path"`
36288 
36289   # Now try to locate executable using which
36290   new_path=`$WHICH "$new_path" 2> /dev/null`
36291   # bat and cmd files are not always considered executable in cygwin causing which
36292   # to not find them
36293   if test "x$new_path" = x \
36294       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36295       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36296     new_path=`$CYGPATH -u "$path"`
36297   fi
36298   if test "x$new_path" = x; then
36299     # Oops. Which didn't find the executable.
36300     # The splitting of arguments from the executable at a space might have been incorrect,
36301     # since paths with space are more likely in Windows. Give it another try with the whole
36302     # argument.
36303     path="$complete"
36304     arguments="EOL"
36305     new_path=`$CYGPATH -u "$path"`
36306     new_path=`$WHICH "$new_path" 2> /dev/null`
36307     # bat and cmd files are not always considered executable in cygwin causing which
36308     # to not find them
36309     if test "x$new_path" = x \
36310         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36311         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36312       new_path=`$CYGPATH -u "$path"`
36313     fi
36314     if test "x$new_path" = x; then
36315       # It's still not found. Now this is an unrecoverable error.
36316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36317 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36318       has_space=`$ECHO "$complete" | $GREP " "`
36319       if test "x$has_space" != x; then
36320         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36321 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36322       fi
36323       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36324     fi
36325   fi
36326 
36327   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36328   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36329   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36330   # "foo.exe" is OK but "foo" is an error.
36331   #
36332   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36333   # It is also a way to make sure we got the proper file name for the real test later on.
36334   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36335   if test "x$test_shortpath" = x; then
36336     # Short path failed, file does not exist as specified.
36337     # Try adding .exe or .cmd
36338     if test -f "${new_path}.exe"; then
36339       input_to_shortpath="${new_path}.exe"
36340     elif test -f "${new_path}.cmd"; then
36341       input_to_shortpath="${new_path}.cmd"
36342     else
36343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36344 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36345       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36346 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36347       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36348     fi
36349   else
36350     input_to_shortpath="$new_path"
36351   fi
36352 
36353   # Call helper function which possibly converts this using DOS-style short mode.
36354   # If so, the updated path is stored in $new_path.
36355   new_path="$input_to_shortpath"
36356 
36357   input_path="$input_to_shortpath"
36358   # Check if we need to convert this using DOS-style short mode. If the path
36359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36360   # take no chances and rewrite it.
36361   # Note: m4 eats our [], so we need to use [ and ] instead.
36362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36363   if test "x$has_forbidden_chars" != x; then
36364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36365     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36366     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36367     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36368       # Going to short mode and back again did indeed matter. Since short mode is
36369       # case insensitive, let's make it lowercase to improve readability.
36370       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36371       # Now convert it back to Unix-style (cygpath)
36372       input_path=`$CYGPATH -u "$shortmode_path"`
36373       new_path="$input_path"
36374     fi
36375   fi
36376 
36377   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36378   if test "x$test_cygdrive_prefix" = x; then
36379     # As a simple fix, exclude /usr/bin since it's not a real path.
36380     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36381       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36382       # a path prefixed by /cygdrive for fixpath to work.
36383       new_path="$CYGWIN_ROOT_PATH$input_path"
36384     fi
36385   fi
36386 
36387   # remove trailing .exe if any
36388   new_path="${new_path/%.exe/}"
36389 
36390     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36391 
36392   # First separate the path from the arguments. This will split at the first
36393   # space.
36394   complete="$LD"
36395   path="${complete%% *}"
36396   tmp="$complete EOL"
36397   arguments="${tmp#* }"
36398 
36399   # Input might be given as Windows format, start by converting to
36400   # unix format.
36401   new_path="$path"
36402 
36403   windows_path="$new_path"
36404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36405     unix_path=`$CYGPATH -u "$windows_path"`
36406     new_path="$unix_path"
36407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36409     new_path="$unix_path"
36410   fi
36411 
36412 
36413   # Now try to locate executable using which
36414   new_path=`$WHICH "$new_path" 2> /dev/null`
36415 
36416   if test "x$new_path" = x; then
36417     # Oops. Which didn't find the executable.
36418     # The splitting of arguments from the executable at a space might have been incorrect,
36419     # since paths with space are more likely in Windows. Give it another try with the whole
36420     # argument.
36421     path="$complete"
36422     arguments="EOL"
36423     new_path="$path"
36424 
36425   windows_path="$new_path"
36426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36427     unix_path=`$CYGPATH -u "$windows_path"`
36428     new_path="$unix_path"
36429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36431     new_path="$unix_path"
36432   fi
36433 
36434 
36435     new_path=`$WHICH "$new_path" 2> /dev/null`
36436     # bat and cmd files are not always considered executable in MSYS causing which
36437     # to not find them
36438     if test "x$new_path" = x \
36439         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36440         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36441       new_path="$path"
36442 
36443   windows_path="$new_path"
36444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36445     unix_path=`$CYGPATH -u "$windows_path"`
36446     new_path="$unix_path"
36447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36449     new_path="$unix_path"
36450   fi
36451 
36452     fi
36453 
36454     if test "x$new_path" = x; then
36455       # It's still not found. Now this is an unrecoverable error.
36456       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36457 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36458       has_space=`$ECHO "$complete" | $GREP " "`
36459       if test "x$has_space" != x; then
36460         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36461 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36462       fi
36463       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36464     fi
36465   fi
36466 
36467   # Now new_path has a complete unix path to the binary
36468   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36469     # Keep paths in /bin as-is, but remove trailing .exe if any
36470     new_path="${new_path/%.exe/}"
36471     # Do not save /bin paths to all_fixpath_prefixes!
36472   else
36473     # Not in mixed or Windows style, start by that.
36474     new_path=`cmd //c echo $new_path`
36475 
36476   input_path="$new_path"
36477   # Check if we need to convert this using DOS-style short mode. If the path
36478   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36479   # take no chances and rewrite it.
36480   # Note: m4 eats our [], so we need to use [ and ] instead.
36481   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36482   if test "x$has_forbidden_chars" != x; then
36483     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36484     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36485   fi
36486 
36487     # Output is in $new_path
36488 
36489   windows_path="$new_path"
36490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36491     unix_path=`$CYGPATH -u "$windows_path"`
36492     new_path="$unix_path"
36493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36495     new_path="$unix_path"
36496   fi
36497 
36498     # remove trailing .exe if any
36499     new_path="${new_path/%.exe/}"
36500 
36501     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36502     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36503   fi
36504 
36505     else
36506       # We're on a unix platform. Hooray! :)
36507       # First separate the path from the arguments. This will split at the first
36508       # space.
36509       complete="$LD"
36510       path="${complete%% *}"
36511       tmp="$complete EOL"
36512       arguments="${tmp#* }"
36513 
36514       # Cannot rely on the command "which" here since it doesn't always work.
36515       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36516       if test -z "$is_absolute_path"; then
36517         # Path to executable is not absolute. Find it.
36518         IFS_save="$IFS"
36519         IFS=:
36520         for p in $PATH; do
36521           if test -f "$p/$path" && test -x "$p/$path"; then
36522             new_path="$p/$path"
36523             break
36524           fi
36525         done
36526         IFS="$IFS_save"
36527       else
36528         # This is an absolute path, we can use it without further modifications.
36529         new_path="$path"
36530       fi
36531 
36532       if test "x$new_path" = x; then
36533         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36534 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36535         has_space=`$ECHO "$complete" | $GREP " "`
36536         if test "x$has_space" != x; then
36537           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36538 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36539         fi
36540         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36541       fi
36542     fi
36543 
36544     # Now join together the path and the arguments once again
36545     if test "x$arguments" != xEOL; then
36546       new_complete="$new_path ${arguments% *}"
36547     else
36548       new_complete="$new_path"
36549     fi
36550 
36551     if test "x$complete" != "x$new_complete"; then
36552       LD="$new_complete"
36553       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36554 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36555     fi
36556   fi
36557 
36558     # Verify that we indeed succeeded with this trick.
36559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36560 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36561     "$LD" --version > /dev/null
36562     if test $? -eq 0 ; then
36563       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36564 $as_echo "no" >&6; }
36565       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36566     else
36567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36568 $as_echo "yes" >&6; }
36569     fi
36570     LDCXX="$LD"
36571   else
36572     # All other toolchains use the compiler to link.
36573     LD="$CC"
36574     LDCXX="$CXX"
36575   fi
36576 
36577   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36578 
36579 
36580   #
36581   # Setup the assembler (AS)
36582   #
36583   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36584 
36585 
36586   # Publish this variable in the help.
36587 
36588 
36589   if [ -z "${AS+x}" ]; then
36590     # The variable is not set by user, try to locate tool using the code snippet
36591     for ac_prog in as
36592 do
36593   # Extract the first word of "$ac_prog", so it can be a program name with args.
36594 set dummy $ac_prog; ac_word=$2
36595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36596 $as_echo_n "checking for $ac_word... " >&6; }
36597 if ${ac_cv_path_AS+:} false; then :
36598   $as_echo_n "(cached) " >&6
36599 else
36600   case $AS in
36601   [\\/]* | ?:[\\/]*)
36602   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36603   ;;
36604   *)
36605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36606 for as_dir in $PATH
36607 do
36608   IFS=$as_save_IFS
36609   test -z "$as_dir" && as_dir=.
36610     for ac_exec_ext in '' $ac_executable_extensions; do
36611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36612     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36614     break 2
36615   fi
36616 done
36617   done
36618 IFS=$as_save_IFS
36619 
36620   ;;
36621 esac
36622 fi
36623 AS=$ac_cv_path_AS
36624 if test -n "$AS"; then
36625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36626 $as_echo "$AS" >&6; }
36627 else
36628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36629 $as_echo "no" >&6; }
36630 fi
36631 
36632 
36633   test -n "$AS" && break
36634 done
36635 
36636   else
36637     # The variable is set, but is it from the command line or the environment?
36638 
36639     # Try to remove the string !AS! from our list.
36640     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36641     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36642       # If it failed, the variable was not from the command line. Ignore it,
36643       # but warn the user (except for BASH, which is always set by the calling BASH).
36644       if test "xAS" != xBASH; then
36645         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36646 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36647       fi
36648       # Try to locate tool using the code snippet
36649       for ac_prog in as
36650 do
36651   # Extract the first word of "$ac_prog", so it can be a program name with args.
36652 set dummy $ac_prog; ac_word=$2
36653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36654 $as_echo_n "checking for $ac_word... " >&6; }
36655 if ${ac_cv_path_AS+:} false; then :
36656   $as_echo_n "(cached) " >&6
36657 else
36658   case $AS in
36659   [\\/]* | ?:[\\/]*)
36660   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36661   ;;
36662   *)
36663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36664 for as_dir in $PATH
36665 do
36666   IFS=$as_save_IFS
36667   test -z "$as_dir" && as_dir=.
36668     for ac_exec_ext in '' $ac_executable_extensions; do
36669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36670     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36672     break 2
36673   fi
36674 done
36675   done
36676 IFS=$as_save_IFS
36677 
36678   ;;
36679 esac
36680 fi
36681 AS=$ac_cv_path_AS
36682 if test -n "$AS"; then
36683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36684 $as_echo "$AS" >&6; }
36685 else
36686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36687 $as_echo "no" >&6; }
36688 fi
36689 
36690 
36691   test -n "$AS" && break
36692 done
36693 
36694     else
36695       # If it succeeded, then it was overridden by the user. We will use it
36696       # for the tool.
36697 
36698       # First remove it from the list of overridden variables, so we can test
36699       # for unknown variables in the end.
36700       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36701 
36702       # Check if we try to supply an empty value
36703       if test "x$AS" = x; then
36704         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36705 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36706         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36707 $as_echo_n "checking for AS... " >&6; }
36708         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36709 $as_echo "disabled" >&6; }
36710       else
36711         # Check if the provided tool contains a complete path.
36712         tool_specified="$AS"
36713         tool_basename="${tool_specified##*/}"
36714         if test "x$tool_basename" = "x$tool_specified"; then
36715           # A command without a complete path is provided, search $PATH.
36716           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36717 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36718           # Extract the first word of "$tool_basename", so it can be a program name with args.
36719 set dummy $tool_basename; ac_word=$2
36720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36721 $as_echo_n "checking for $ac_word... " >&6; }
36722 if ${ac_cv_path_AS+:} false; then :
36723   $as_echo_n "(cached) " >&6
36724 else
36725   case $AS in
36726   [\\/]* | ?:[\\/]*)
36727   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36728   ;;
36729   *)
36730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36731 for as_dir in $PATH
36732 do
36733   IFS=$as_save_IFS
36734   test -z "$as_dir" && as_dir=.
36735     for ac_exec_ext in '' $ac_executable_extensions; do
36736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36737     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36739     break 2
36740   fi
36741 done
36742   done
36743 IFS=$as_save_IFS
36744 
36745   ;;
36746 esac
36747 fi
36748 AS=$ac_cv_path_AS
36749 if test -n "$AS"; then
36750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36751 $as_echo "$AS" >&6; }
36752 else
36753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36754 $as_echo "no" >&6; }
36755 fi
36756 
36757 
36758           if test "x$AS" = x; then
36759             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36760           fi
36761         else
36762           # Otherwise we believe it is a complete path. Use it as it is.
36763           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36764 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36765           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36766 $as_echo_n "checking for AS... " >&6; }
36767           if test ! -x "$tool_specified"; then
36768             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36769 $as_echo "not found" >&6; }
36770             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36771           fi
36772           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36773 $as_echo "$tool_specified" >&6; }
36774         fi
36775       fi
36776     fi
36777 
36778   fi
36779 
36780 
36781 
36782   # Only process if variable expands to non-empty
36783 
36784   if test "x$AS" != x; then
36785     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36786 
36787   # First separate the path from the arguments. This will split at the first
36788   # space.
36789   complete="$AS"
36790   path="${complete%% *}"
36791   tmp="$complete EOL"
36792   arguments="${tmp#* }"
36793 
36794   # Input might be given as Windows format, start by converting to
36795   # unix format.
36796   new_path=`$CYGPATH -u "$path"`
36797 
36798   # Now try to locate executable using which
36799   new_path=`$WHICH "$new_path" 2> /dev/null`
36800   # bat and cmd files are not always considered executable in cygwin causing which
36801   # to not find them
36802   if test "x$new_path" = x \
36803       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36804       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36805     new_path=`$CYGPATH -u "$path"`
36806   fi
36807   if test "x$new_path" = x; then
36808     # Oops. Which didn't find the executable.
36809     # The splitting of arguments from the executable at a space might have been incorrect,
36810     # since paths with space are more likely in Windows. Give it another try with the whole
36811     # argument.
36812     path="$complete"
36813     arguments="EOL"
36814     new_path=`$CYGPATH -u "$path"`
36815     new_path=`$WHICH "$new_path" 2> /dev/null`
36816     # bat and cmd files are not always considered executable in cygwin causing which
36817     # to not find them
36818     if test "x$new_path" = x \
36819         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36820         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36821       new_path=`$CYGPATH -u "$path"`
36822     fi
36823     if test "x$new_path" = x; then
36824       # It's still not found. Now this is an unrecoverable error.
36825       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36826 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36827       has_space=`$ECHO "$complete" | $GREP " "`
36828       if test "x$has_space" != x; then
36829         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36830 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36831       fi
36832       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36833     fi
36834   fi
36835 
36836   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36837   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36838   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36839   # "foo.exe" is OK but "foo" is an error.
36840   #
36841   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36842   # It is also a way to make sure we got the proper file name for the real test later on.
36843   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36844   if test "x$test_shortpath" = x; then
36845     # Short path failed, file does not exist as specified.
36846     # Try adding .exe or .cmd
36847     if test -f "${new_path}.exe"; then
36848       input_to_shortpath="${new_path}.exe"
36849     elif test -f "${new_path}.cmd"; then
36850       input_to_shortpath="${new_path}.cmd"
36851     else
36852       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36853 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36854       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36855 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36856       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36857     fi
36858   else
36859     input_to_shortpath="$new_path"
36860   fi
36861 
36862   # Call helper function which possibly converts this using DOS-style short mode.
36863   # If so, the updated path is stored in $new_path.
36864   new_path="$input_to_shortpath"
36865 
36866   input_path="$input_to_shortpath"
36867   # Check if we need to convert this using DOS-style short mode. If the path
36868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36869   # take no chances and rewrite it.
36870   # Note: m4 eats our [], so we need to use [ and ] instead.
36871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36872   if test "x$has_forbidden_chars" != x; then
36873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36874     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36875     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36876     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36877       # Going to short mode and back again did indeed matter. Since short mode is
36878       # case insensitive, let's make it lowercase to improve readability.
36879       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36880       # Now convert it back to Unix-style (cygpath)
36881       input_path=`$CYGPATH -u "$shortmode_path"`
36882       new_path="$input_path"
36883     fi
36884   fi
36885 
36886   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36887   if test "x$test_cygdrive_prefix" = x; then
36888     # As a simple fix, exclude /usr/bin since it's not a real path.
36889     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36890       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36891       # a path prefixed by /cygdrive for fixpath to work.
36892       new_path="$CYGWIN_ROOT_PATH$input_path"
36893     fi
36894   fi
36895 
36896   # remove trailing .exe if any
36897   new_path="${new_path/%.exe/}"
36898 
36899     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36900 
36901   # First separate the path from the arguments. This will split at the first
36902   # space.
36903   complete="$AS"
36904   path="${complete%% *}"
36905   tmp="$complete EOL"
36906   arguments="${tmp#* }"
36907 
36908   # Input might be given as Windows format, start by converting to
36909   # unix format.
36910   new_path="$path"
36911 
36912   windows_path="$new_path"
36913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36914     unix_path=`$CYGPATH -u "$windows_path"`
36915     new_path="$unix_path"
36916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36918     new_path="$unix_path"
36919   fi
36920 
36921 
36922   # Now try to locate executable using which
36923   new_path=`$WHICH "$new_path" 2> /dev/null`
36924 
36925   if test "x$new_path" = x; then
36926     # Oops. Which didn't find the executable.
36927     # The splitting of arguments from the executable at a space might have been incorrect,
36928     # since paths with space are more likely in Windows. Give it another try with the whole
36929     # argument.
36930     path="$complete"
36931     arguments="EOL"
36932     new_path="$path"
36933 
36934   windows_path="$new_path"
36935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36936     unix_path=`$CYGPATH -u "$windows_path"`
36937     new_path="$unix_path"
36938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36940     new_path="$unix_path"
36941   fi
36942 
36943 
36944     new_path=`$WHICH "$new_path" 2> /dev/null`
36945     # bat and cmd files are not always considered executable in MSYS causing which
36946     # to not find them
36947     if test "x$new_path" = x \
36948         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36949         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36950       new_path="$path"
36951 
36952   windows_path="$new_path"
36953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36954     unix_path=`$CYGPATH -u "$windows_path"`
36955     new_path="$unix_path"
36956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36958     new_path="$unix_path"
36959   fi
36960 
36961     fi
36962 
36963     if test "x$new_path" = x; then
36964       # It's still not found. Now this is an unrecoverable error.
36965       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36966 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36967       has_space=`$ECHO "$complete" | $GREP " "`
36968       if test "x$has_space" != x; then
36969         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36970 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36971       fi
36972       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36973     fi
36974   fi
36975 
36976   # Now new_path has a complete unix path to the binary
36977   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36978     # Keep paths in /bin as-is, but remove trailing .exe if any
36979     new_path="${new_path/%.exe/}"
36980     # Do not save /bin paths to all_fixpath_prefixes!
36981   else
36982     # Not in mixed or Windows style, start by that.
36983     new_path=`cmd //c echo $new_path`
36984 
36985   input_path="$new_path"
36986   # Check if we need to convert this using DOS-style short mode. If the path
36987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36988   # take no chances and rewrite it.
36989   # Note: m4 eats our [], so we need to use [ and ] instead.
36990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36991   if test "x$has_forbidden_chars" != x; then
36992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36993     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36994   fi
36995 
36996     # Output is in $new_path
36997 
36998   windows_path="$new_path"
36999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37000     unix_path=`$CYGPATH -u "$windows_path"`
37001     new_path="$unix_path"
37002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37004     new_path="$unix_path"
37005   fi
37006 
37007     # remove trailing .exe if any
37008     new_path="${new_path/%.exe/}"
37009 
37010     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37011     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37012   fi
37013 
37014     else
37015       # We're on a unix platform. Hooray! :)
37016       # First separate the path from the arguments. This will split at the first
37017       # space.
37018       complete="$AS"
37019       path="${complete%% *}"
37020       tmp="$complete EOL"
37021       arguments="${tmp#* }"
37022 
37023       # Cannot rely on the command "which" here since it doesn't always work.
37024       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37025       if test -z "$is_absolute_path"; then
37026         # Path to executable is not absolute. Find it.
37027         IFS_save="$IFS"
37028         IFS=:
37029         for p in $PATH; do
37030           if test -f "$p/$path" && test -x "$p/$path"; then
37031             new_path="$p/$path"
37032             break
37033           fi
37034         done
37035         IFS="$IFS_save"
37036       else
37037         # This is an absolute path, we can use it without further modifications.
37038         new_path="$path"
37039       fi
37040 
37041       if test "x$new_path" = x; then
37042         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37043 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37044         has_space=`$ECHO "$complete" | $GREP " "`
37045         if test "x$has_space" != x; then
37046           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37047 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37048         fi
37049         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37050       fi
37051     fi
37052 
37053     # Now join together the path and the arguments once again
37054     if test "x$arguments" != xEOL; then
37055       new_complete="$new_path ${arguments% *}"
37056     else
37057       new_complete="$new_path"
37058     fi
37059 
37060     if test "x$complete" != "x$new_complete"; then
37061       AS="$new_complete"
37062       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37063 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37064     fi
37065   fi
37066 
37067     if test "x$AS" = x; then
37068       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37069     fi
37070   else
37071     # FIXME: is this correct for microsoft?
37072     AS="$CC -c"
37073   fi
37074 
37075 
37076   #
37077   # Setup the archiver (AR)
37078   #
37079   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37080     # The corresponding ar tool is lib.exe (used to create static libraries)
37081     # Extract the first word of "lib", so it can be a program name with args.
37082 set dummy lib; ac_word=$2
37083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37084 $as_echo_n "checking for $ac_word... " >&6; }
37085 if ${ac_cv_prog_AR+:} false; then :
37086   $as_echo_n "(cached) " >&6
37087 else
37088   if test -n "$AR"; then
37089   ac_cv_prog_AR="$AR" # Let the user override the test.
37090 else
37091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37092 for as_dir in $PATH
37093 do
37094   IFS=$as_save_IFS
37095   test -z "$as_dir" && as_dir=.
37096     for ac_exec_ext in '' $ac_executable_extensions; do
37097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37098     ac_cv_prog_AR="lib"
37099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37100     break 2
37101   fi
37102 done
37103   done
37104 IFS=$as_save_IFS
37105 
37106 fi
37107 fi
37108 AR=$ac_cv_prog_AR
37109 if test -n "$AR"; then
37110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37111 $as_echo "$AR" >&6; }
37112 else
37113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37114 $as_echo "no" >&6; }
37115 fi
37116 
37117 
37118   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37119 
37120 
37121   # Publish this variable in the help.
37122 
37123 
37124   if [ -z "${AR+x}" ]; then
37125     # The variable is not set by user, try to locate tool using the code snippet
37126     if test -n "$ac_tool_prefix"; then
37127   for ac_prog in ar gcc-ar
37128   do
37129     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37130 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37132 $as_echo_n "checking for $ac_word... " >&6; }
37133 if ${ac_cv_prog_AR+:} false; then :
37134   $as_echo_n "(cached) " >&6
37135 else
37136   if test -n "$AR"; then
37137   ac_cv_prog_AR="$AR" # Let the user override the test.
37138 else
37139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37140 for as_dir in $PATH
37141 do
37142   IFS=$as_save_IFS
37143   test -z "$as_dir" && as_dir=.
37144     for ac_exec_ext in '' $ac_executable_extensions; do
37145   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37146     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37147     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37148     break 2
37149   fi
37150 done
37151   done
37152 IFS=$as_save_IFS
37153 
37154 fi
37155 fi
37156 AR=$ac_cv_prog_AR
37157 if test -n "$AR"; then
37158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37159 $as_echo "$AR" >&6; }
37160 else
37161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37162 $as_echo "no" >&6; }
37163 fi
37164 
37165 
37166     test -n "$AR" && break
37167   done
37168 fi
37169 if test -z "$AR"; then
37170   ac_ct_AR=$AR
37171   for ac_prog in ar gcc-ar
37172 do
37173   # Extract the first word of "$ac_prog", so it can be a program name with args.
37174 set dummy $ac_prog; ac_word=$2
37175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37176 $as_echo_n "checking for $ac_word... " >&6; }
37177 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37178   $as_echo_n "(cached) " >&6
37179 else
37180   if test -n "$ac_ct_AR"; then
37181   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37182 else
37183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37184 for as_dir in $PATH
37185 do
37186   IFS=$as_save_IFS
37187   test -z "$as_dir" && as_dir=.
37188     for ac_exec_ext in '' $ac_executable_extensions; do
37189   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37190     ac_cv_prog_ac_ct_AR="$ac_prog"
37191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37192     break 2
37193   fi
37194 done
37195   done
37196 IFS=$as_save_IFS
37197 
37198 fi
37199 fi
37200 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37201 if test -n "$ac_ct_AR"; then
37202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37203 $as_echo "$ac_ct_AR" >&6; }
37204 else
37205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37206 $as_echo "no" >&6; }
37207 fi
37208 
37209 
37210   test -n "$ac_ct_AR" && break
37211 done
37212 
37213   if test "x$ac_ct_AR" = x; then
37214     AR=""
37215   else
37216     case $cross_compiling:$ac_tool_warned in
37217 yes:)
37218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37219 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37220 ac_tool_warned=yes ;;
37221 esac
37222     AR=$ac_ct_AR
37223   fi
37224 fi
37225 
37226   else
37227     # The variable is set, but is it from the command line or the environment?
37228 
37229     # Try to remove the string !AR! from our list.
37230     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37231     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37232       # If it failed, the variable was not from the command line. Ignore it,
37233       # but warn the user (except for BASH, which is always set by the calling BASH).
37234       if test "xAR" != xBASH; then
37235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37236 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37237       fi
37238       # Try to locate tool using the code snippet
37239       if test -n "$ac_tool_prefix"; then
37240   for ac_prog in ar gcc-ar
37241   do
37242     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37243 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37245 $as_echo_n "checking for $ac_word... " >&6; }
37246 if ${ac_cv_prog_AR+:} false; then :
37247   $as_echo_n "(cached) " >&6
37248 else
37249   if test -n "$AR"; then
37250   ac_cv_prog_AR="$AR" # Let the user override the test.
37251 else
37252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37253 for as_dir in $PATH
37254 do
37255   IFS=$as_save_IFS
37256   test -z "$as_dir" && as_dir=.
37257     for ac_exec_ext in '' $ac_executable_extensions; do
37258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37259     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37261     break 2
37262   fi
37263 done
37264   done
37265 IFS=$as_save_IFS
37266 
37267 fi
37268 fi
37269 AR=$ac_cv_prog_AR
37270 if test -n "$AR"; then
37271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37272 $as_echo "$AR" >&6; }
37273 else
37274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37275 $as_echo "no" >&6; }
37276 fi
37277 
37278 
37279     test -n "$AR" && break
37280   done
37281 fi
37282 if test -z "$AR"; then
37283   ac_ct_AR=$AR
37284   for ac_prog in ar gcc-ar
37285 do
37286   # Extract the first word of "$ac_prog", so it can be a program name with args.
37287 set dummy $ac_prog; ac_word=$2
37288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37289 $as_echo_n "checking for $ac_word... " >&6; }
37290 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37291   $as_echo_n "(cached) " >&6
37292 else
37293   if test -n "$ac_ct_AR"; then
37294   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37295 else
37296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37297 for as_dir in $PATH
37298 do
37299   IFS=$as_save_IFS
37300   test -z "$as_dir" && as_dir=.
37301     for ac_exec_ext in '' $ac_executable_extensions; do
37302   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37303     ac_cv_prog_ac_ct_AR="$ac_prog"
37304     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37305     break 2
37306   fi
37307 done
37308   done
37309 IFS=$as_save_IFS
37310 
37311 fi
37312 fi
37313 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37314 if test -n "$ac_ct_AR"; then
37315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37316 $as_echo "$ac_ct_AR" >&6; }
37317 else
37318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37319 $as_echo "no" >&6; }
37320 fi
37321 
37322 
37323   test -n "$ac_ct_AR" && break
37324 done
37325 
37326   if test "x$ac_ct_AR" = x; then
37327     AR=""
37328   else
37329     case $cross_compiling:$ac_tool_warned in
37330 yes:)
37331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37332 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37333 ac_tool_warned=yes ;;
37334 esac
37335     AR=$ac_ct_AR
37336   fi
37337 fi
37338 
37339     else
37340       # If it succeeded, then it was overridden by the user. We will use it
37341       # for the tool.
37342 
37343       # First remove it from the list of overridden variables, so we can test
37344       # for unknown variables in the end.
37345       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37346 
37347       # Check if we try to supply an empty value
37348       if test "x$AR" = x; then
37349         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37350 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37351         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37352 $as_echo_n "checking for AR... " >&6; }
37353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37354 $as_echo "disabled" >&6; }
37355       else
37356         # Check if the provided tool contains a complete path.
37357         tool_specified="$AR"
37358         tool_basename="${tool_specified##*/}"
37359         if test "x$tool_basename" = "x$tool_specified"; then
37360           # A command without a complete path is provided, search $PATH.
37361           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37362 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37363           # Extract the first word of "$tool_basename", so it can be a program name with args.
37364 set dummy $tool_basename; ac_word=$2
37365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37366 $as_echo_n "checking for $ac_word... " >&6; }
37367 if ${ac_cv_path_AR+:} false; then :
37368   $as_echo_n "(cached) " >&6
37369 else
37370   case $AR in
37371   [\\/]* | ?:[\\/]*)
37372   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37373   ;;
37374   *)
37375   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37376 for as_dir in $PATH
37377 do
37378   IFS=$as_save_IFS
37379   test -z "$as_dir" && as_dir=.
37380     for ac_exec_ext in '' $ac_executable_extensions; do
37381   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37382     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37384     break 2
37385   fi
37386 done
37387   done
37388 IFS=$as_save_IFS
37389 
37390   ;;
37391 esac
37392 fi
37393 AR=$ac_cv_path_AR
37394 if test -n "$AR"; then
37395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37396 $as_echo "$AR" >&6; }
37397 else
37398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37399 $as_echo "no" >&6; }
37400 fi
37401 
37402 
37403           if test "x$AR" = x; then
37404             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37405           fi
37406         else
37407           # Otherwise we believe it is a complete path. Use it as it is.
37408           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37409 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37410           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37411 $as_echo_n "checking for AR... " >&6; }
37412           if test ! -x "$tool_specified"; then
37413             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37414 $as_echo "not found" >&6; }
37415             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37416           fi
37417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37418 $as_echo "$tool_specified" >&6; }
37419         fi
37420       fi
37421     fi
37422 
37423   fi
37424 
37425 
37426   else
37427 
37428 
37429   # Publish this variable in the help.
37430 
37431 
37432   if [ -z "${AR+x}" ]; then
37433     # The variable is not set by user, try to locate tool using the code snippet
37434     if test -n "$ac_tool_prefix"; then
37435   for ac_prog in ar
37436   do
37437     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37438 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37440 $as_echo_n "checking for $ac_word... " >&6; }
37441 if ${ac_cv_prog_AR+:} false; then :
37442   $as_echo_n "(cached) " >&6
37443 else
37444   if test -n "$AR"; then
37445   ac_cv_prog_AR="$AR" # Let the user override the test.
37446 else
37447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37448 for as_dir in $PATH
37449 do
37450   IFS=$as_save_IFS
37451   test -z "$as_dir" && as_dir=.
37452     for ac_exec_ext in '' $ac_executable_extensions; do
37453   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37454     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37455     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37456     break 2
37457   fi
37458 done
37459   done
37460 IFS=$as_save_IFS
37461 
37462 fi
37463 fi
37464 AR=$ac_cv_prog_AR
37465 if test -n "$AR"; then
37466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37467 $as_echo "$AR" >&6; }
37468 else
37469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37470 $as_echo "no" >&6; }
37471 fi
37472 
37473 
37474     test -n "$AR" && break
37475   done
37476 fi
37477 if test -z "$AR"; then
37478   ac_ct_AR=$AR
37479   for ac_prog in ar
37480 do
37481   # Extract the first word of "$ac_prog", so it can be a program name with args.
37482 set dummy $ac_prog; ac_word=$2
37483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37484 $as_echo_n "checking for $ac_word... " >&6; }
37485 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37486   $as_echo_n "(cached) " >&6
37487 else
37488   if test -n "$ac_ct_AR"; then
37489   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37490 else
37491 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37492 for as_dir in $PATH
37493 do
37494   IFS=$as_save_IFS
37495   test -z "$as_dir" && as_dir=.
37496     for ac_exec_ext in '' $ac_executable_extensions; do
37497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37498     ac_cv_prog_ac_ct_AR="$ac_prog"
37499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37500     break 2
37501   fi
37502 done
37503   done
37504 IFS=$as_save_IFS
37505 
37506 fi
37507 fi
37508 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37509 if test -n "$ac_ct_AR"; then
37510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37511 $as_echo "$ac_ct_AR" >&6; }
37512 else
37513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37514 $as_echo "no" >&6; }
37515 fi
37516 
37517 
37518   test -n "$ac_ct_AR" && break
37519 done
37520 
37521   if test "x$ac_ct_AR" = x; then
37522     AR=""
37523   else
37524     case $cross_compiling:$ac_tool_warned in
37525 yes:)
37526 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37527 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37528 ac_tool_warned=yes ;;
37529 esac
37530     AR=$ac_ct_AR
37531   fi
37532 fi
37533 
37534   else
37535     # The variable is set, but is it from the command line or the environment?
37536 
37537     # Try to remove the string !AR! from our list.
37538     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37539     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37540       # If it failed, the variable was not from the command line. Ignore it,
37541       # but warn the user (except for BASH, which is always set by the calling BASH).
37542       if test "xAR" != xBASH; then
37543         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37544 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37545       fi
37546       # Try to locate tool using the code snippet
37547       if test -n "$ac_tool_prefix"; then
37548   for ac_prog in ar
37549   do
37550     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37551 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37553 $as_echo_n "checking for $ac_word... " >&6; }
37554 if ${ac_cv_prog_AR+:} false; then :
37555   $as_echo_n "(cached) " >&6
37556 else
37557   if test -n "$AR"; then
37558   ac_cv_prog_AR="$AR" # Let the user override the test.
37559 else
37560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37561 for as_dir in $PATH
37562 do
37563   IFS=$as_save_IFS
37564   test -z "$as_dir" && as_dir=.
37565     for ac_exec_ext in '' $ac_executable_extensions; do
37566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37567     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37569     break 2
37570   fi
37571 done
37572   done
37573 IFS=$as_save_IFS
37574 
37575 fi
37576 fi
37577 AR=$ac_cv_prog_AR
37578 if test -n "$AR"; then
37579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37580 $as_echo "$AR" >&6; }
37581 else
37582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37583 $as_echo "no" >&6; }
37584 fi
37585 
37586 
37587     test -n "$AR" && break
37588   done
37589 fi
37590 if test -z "$AR"; then
37591   ac_ct_AR=$AR
37592   for ac_prog in ar
37593 do
37594   # Extract the first word of "$ac_prog", so it can be a program name with args.
37595 set dummy $ac_prog; ac_word=$2
37596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37597 $as_echo_n "checking for $ac_word... " >&6; }
37598 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37599   $as_echo_n "(cached) " >&6
37600 else
37601   if test -n "$ac_ct_AR"; then
37602   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37603 else
37604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37605 for as_dir in $PATH
37606 do
37607   IFS=$as_save_IFS
37608   test -z "$as_dir" && as_dir=.
37609     for ac_exec_ext in '' $ac_executable_extensions; do
37610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37611     ac_cv_prog_ac_ct_AR="$ac_prog"
37612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37613     break 2
37614   fi
37615 done
37616   done
37617 IFS=$as_save_IFS
37618 
37619 fi
37620 fi
37621 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37622 if test -n "$ac_ct_AR"; then
37623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37624 $as_echo "$ac_ct_AR" >&6; }
37625 else
37626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37627 $as_echo "no" >&6; }
37628 fi
37629 
37630 
37631   test -n "$ac_ct_AR" && break
37632 done
37633 
37634   if test "x$ac_ct_AR" = x; then
37635     AR=""
37636   else
37637     case $cross_compiling:$ac_tool_warned in
37638 yes:)
37639 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37640 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37641 ac_tool_warned=yes ;;
37642 esac
37643     AR=$ac_ct_AR
37644   fi
37645 fi
37646 
37647     else
37648       # If it succeeded, then it was overridden by the user. We will use it
37649       # for the tool.
37650 
37651       # First remove it from the list of overridden variables, so we can test
37652       # for unknown variables in the end.
37653       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37654 
37655       # Check if we try to supply an empty value
37656       if test "x$AR" = x; then
37657         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37658 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37659         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37660 $as_echo_n "checking for AR... " >&6; }
37661         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37662 $as_echo "disabled" >&6; }
37663       else
37664         # Check if the provided tool contains a complete path.
37665         tool_specified="$AR"
37666         tool_basename="${tool_specified##*/}"
37667         if test "x$tool_basename" = "x$tool_specified"; then
37668           # A command without a complete path is provided, search $PATH.
37669           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37670 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37671           # Extract the first word of "$tool_basename", so it can be a program name with args.
37672 set dummy $tool_basename; ac_word=$2
37673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37674 $as_echo_n "checking for $ac_word... " >&6; }
37675 if ${ac_cv_path_AR+:} false; then :
37676   $as_echo_n "(cached) " >&6
37677 else
37678   case $AR in
37679   [\\/]* | ?:[\\/]*)
37680   ac_cv_path_AR="$AR" # Let the user override the test with a path.
37681   ;;
37682   *)
37683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37684 for as_dir in $PATH
37685 do
37686   IFS=$as_save_IFS
37687   test -z "$as_dir" && as_dir=.
37688     for ac_exec_ext in '' $ac_executable_extensions; do
37689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37690     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37692     break 2
37693   fi
37694 done
37695   done
37696 IFS=$as_save_IFS
37697 
37698   ;;
37699 esac
37700 fi
37701 AR=$ac_cv_path_AR
37702 if test -n "$AR"; then
37703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37704 $as_echo "$AR" >&6; }
37705 else
37706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37707 $as_echo "no" >&6; }
37708 fi
37709 
37710 
37711           if test "x$AR" = x; then
37712             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37713           fi
37714         else
37715           # Otherwise we believe it is a complete path. Use it as it is.
37716           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37717 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37718           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37719 $as_echo_n "checking for AR... " >&6; }
37720           if test ! -x "$tool_specified"; then
37721             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37722 $as_echo "not found" >&6; }
37723             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37724           fi
37725           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37726 $as_echo "$tool_specified" >&6; }
37727         fi
37728       fi
37729     fi
37730 
37731   fi
37732 
37733 
37734   fi
37735 
37736   # Only process if variable expands to non-empty
37737 
37738   if test "x$AR" != x; then
37739     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37740 
37741   # First separate the path from the arguments. This will split at the first
37742   # space.
37743   complete="$AR"
37744   path="${complete%% *}"
37745   tmp="$complete EOL"
37746   arguments="${tmp#* }"
37747 
37748   # Input might be given as Windows format, start by converting to
37749   # unix format.
37750   new_path=`$CYGPATH -u "$path"`
37751 
37752   # Now try to locate executable using which
37753   new_path=`$WHICH "$new_path" 2> /dev/null`
37754   # bat and cmd files are not always considered executable in cygwin causing which
37755   # to not find them
37756   if test "x$new_path" = x \
37757       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37758       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37759     new_path=`$CYGPATH -u "$path"`
37760   fi
37761   if test "x$new_path" = x; then
37762     # Oops. Which didn't find the executable.
37763     # The splitting of arguments from the executable at a space might have been incorrect,
37764     # since paths with space are more likely in Windows. Give it another try with the whole
37765     # argument.
37766     path="$complete"
37767     arguments="EOL"
37768     new_path=`$CYGPATH -u "$path"`
37769     new_path=`$WHICH "$new_path" 2> /dev/null`
37770     # bat and cmd files are not always considered executable in cygwin causing which
37771     # to not find them
37772     if test "x$new_path" = x \
37773         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37774         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37775       new_path=`$CYGPATH -u "$path"`
37776     fi
37777     if test "x$new_path" = x; then
37778       # It's still not found. Now this is an unrecoverable error.
37779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37780 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37781       has_space=`$ECHO "$complete" | $GREP " "`
37782       if test "x$has_space" != x; then
37783         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37784 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37785       fi
37786       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37787     fi
37788   fi
37789 
37790   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37791   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37792   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37793   # "foo.exe" is OK but "foo" is an error.
37794   #
37795   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37796   # It is also a way to make sure we got the proper file name for the real test later on.
37797   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37798   if test "x$test_shortpath" = x; then
37799     # Short path failed, file does not exist as specified.
37800     # Try adding .exe or .cmd
37801     if test -f "${new_path}.exe"; then
37802       input_to_shortpath="${new_path}.exe"
37803     elif test -f "${new_path}.cmd"; then
37804       input_to_shortpath="${new_path}.cmd"
37805     else
37806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37807 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37808       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37809 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37810       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37811     fi
37812   else
37813     input_to_shortpath="$new_path"
37814   fi
37815 
37816   # Call helper function which possibly converts this using DOS-style short mode.
37817   # If so, the updated path is stored in $new_path.
37818   new_path="$input_to_shortpath"
37819 
37820   input_path="$input_to_shortpath"
37821   # Check if we need to convert this using DOS-style short mode. If the path
37822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37823   # take no chances and rewrite it.
37824   # Note: m4 eats our [], so we need to use [ and ] instead.
37825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37826   if test "x$has_forbidden_chars" != x; then
37827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37828     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37829     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37830     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37831       # Going to short mode and back again did indeed matter. Since short mode is
37832       # case insensitive, let's make it lowercase to improve readability.
37833       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37834       # Now convert it back to Unix-style (cygpath)
37835       input_path=`$CYGPATH -u "$shortmode_path"`
37836       new_path="$input_path"
37837     fi
37838   fi
37839 
37840   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37841   if test "x$test_cygdrive_prefix" = x; then
37842     # As a simple fix, exclude /usr/bin since it's not a real path.
37843     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37844       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37845       # a path prefixed by /cygdrive for fixpath to work.
37846       new_path="$CYGWIN_ROOT_PATH$input_path"
37847     fi
37848   fi
37849 
37850   # remove trailing .exe if any
37851   new_path="${new_path/%.exe/}"
37852 
37853     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37854 
37855   # First separate the path from the arguments. This will split at the first
37856   # space.
37857   complete="$AR"
37858   path="${complete%% *}"
37859   tmp="$complete EOL"
37860   arguments="${tmp#* }"
37861 
37862   # Input might be given as Windows format, start by converting to
37863   # unix format.
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   # Now try to locate executable using which
37877   new_path=`$WHICH "$new_path" 2> /dev/null`
37878 
37879   if test "x$new_path" = x; then
37880     # Oops. Which didn't find the executable.
37881     # The splitting of arguments from the executable at a space might have been incorrect,
37882     # since paths with space are more likely in Windows. Give it another try with the whole
37883     # argument.
37884     path="$complete"
37885     arguments="EOL"
37886     new_path="$path"
37887 
37888   windows_path="$new_path"
37889   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37890     unix_path=`$CYGPATH -u "$windows_path"`
37891     new_path="$unix_path"
37892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37893     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37894     new_path="$unix_path"
37895   fi
37896 
37897 
37898     new_path=`$WHICH "$new_path" 2> /dev/null`
37899     # bat and cmd files are not always considered executable in MSYS causing which
37900     # to not find them
37901     if test "x$new_path" = x \
37902         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37903         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37904       new_path="$path"
37905 
37906   windows_path="$new_path"
37907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37908     unix_path=`$CYGPATH -u "$windows_path"`
37909     new_path="$unix_path"
37910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37912     new_path="$unix_path"
37913   fi
37914 
37915     fi
37916 
37917     if test "x$new_path" = x; then
37918       # It's still not found. Now this is an unrecoverable error.
37919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37920 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37921       has_space=`$ECHO "$complete" | $GREP " "`
37922       if test "x$has_space" != x; then
37923         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37924 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37925       fi
37926       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37927     fi
37928   fi
37929 
37930   # Now new_path has a complete unix path to the binary
37931   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37932     # Keep paths in /bin as-is, but remove trailing .exe if any
37933     new_path="${new_path/%.exe/}"
37934     # Do not save /bin paths to all_fixpath_prefixes!
37935   else
37936     # Not in mixed or Windows style, start by that.
37937     new_path=`cmd //c echo $new_path`
37938 
37939   input_path="$new_path"
37940   # Check if we need to convert this using DOS-style short mode. If the path
37941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37942   # take no chances and rewrite it.
37943   # Note: m4 eats our [], so we need to use [ and ] instead.
37944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37945   if test "x$has_forbidden_chars" != x; then
37946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37948   fi
37949 
37950     # Output is in $new_path
37951 
37952   windows_path="$new_path"
37953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37954     unix_path=`$CYGPATH -u "$windows_path"`
37955     new_path="$unix_path"
37956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37958     new_path="$unix_path"
37959   fi
37960 
37961     # remove trailing .exe if any
37962     new_path="${new_path/%.exe/}"
37963 
37964     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37965     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37966   fi
37967 
37968     else
37969       # We're on a unix platform. Hooray! :)
37970       # First separate the path from the arguments. This will split at the first
37971       # space.
37972       complete="$AR"
37973       path="${complete%% *}"
37974       tmp="$complete EOL"
37975       arguments="${tmp#* }"
37976 
37977       # Cannot rely on the command "which" here since it doesn't always work.
37978       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37979       if test -z "$is_absolute_path"; then
37980         # Path to executable is not absolute. Find it.
37981         IFS_save="$IFS"
37982         IFS=:
37983         for p in $PATH; do
37984           if test -f "$p/$path" && test -x "$p/$path"; then
37985             new_path="$p/$path"
37986             break
37987           fi
37988         done
37989         IFS="$IFS_save"
37990       else
37991         # This is an absolute path, we can use it without further modifications.
37992         new_path="$path"
37993       fi
37994 
37995       if test "x$new_path" = x; then
37996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37997 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37998         has_space=`$ECHO "$complete" | $GREP " "`
37999         if test "x$has_space" != x; then
38000           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38001 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38002         fi
38003         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38004       fi
38005     fi
38006 
38007     # Now join together the path and the arguments once again
38008     if test "x$arguments" != xEOL; then
38009       new_complete="$new_path ${arguments% *}"
38010     else
38011       new_complete="$new_path"
38012     fi
38013 
38014     if test "x$complete" != "x$new_complete"; then
38015       AR="$new_complete"
38016       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38017 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38018     fi
38019   fi
38020 
38021 
38022 
38023   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38024 
38025 
38026   # Publish this variable in the help.
38027 
38028 
38029   if [ -z "${LIPO+x}" ]; then
38030     # The variable is not set by user, try to locate tool using the code snippet
38031     for ac_prog in lipo
38032 do
38033   # Extract the first word of "$ac_prog", so it can be a program name with args.
38034 set dummy $ac_prog; ac_word=$2
38035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38036 $as_echo_n "checking for $ac_word... " >&6; }
38037 if ${ac_cv_path_LIPO+:} false; then :
38038   $as_echo_n "(cached) " >&6
38039 else
38040   case $LIPO in
38041   [\\/]* | ?:[\\/]*)
38042   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38043   ;;
38044   *)
38045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38046 for as_dir in $PATH
38047 do
38048   IFS=$as_save_IFS
38049   test -z "$as_dir" && as_dir=.
38050     for ac_exec_ext in '' $ac_executable_extensions; do
38051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38052     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38054     break 2
38055   fi
38056 done
38057   done
38058 IFS=$as_save_IFS
38059 
38060   ;;
38061 esac
38062 fi
38063 LIPO=$ac_cv_path_LIPO
38064 if test -n "$LIPO"; then
38065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38066 $as_echo "$LIPO" >&6; }
38067 else
38068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38069 $as_echo "no" >&6; }
38070 fi
38071 
38072 
38073   test -n "$LIPO" && break
38074 done
38075 
38076   else
38077     # The variable is set, but is it from the command line or the environment?
38078 
38079     # Try to remove the string !LIPO! from our list.
38080     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38081     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38082       # If it failed, the variable was not from the command line. Ignore it,
38083       # but warn the user (except for BASH, which is always set by the calling BASH).
38084       if test "xLIPO" != xBASH; then
38085         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38086 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38087       fi
38088       # Try to locate tool using the code snippet
38089       for ac_prog in lipo
38090 do
38091   # Extract the first word of "$ac_prog", so it can be a program name with args.
38092 set dummy $ac_prog; ac_word=$2
38093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38094 $as_echo_n "checking for $ac_word... " >&6; }
38095 if ${ac_cv_path_LIPO+:} false; then :
38096   $as_echo_n "(cached) " >&6
38097 else
38098   case $LIPO in
38099   [\\/]* | ?:[\\/]*)
38100   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38101   ;;
38102   *)
38103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38104 for as_dir in $PATH
38105 do
38106   IFS=$as_save_IFS
38107   test -z "$as_dir" && as_dir=.
38108     for ac_exec_ext in '' $ac_executable_extensions; do
38109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38110     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38112     break 2
38113   fi
38114 done
38115   done
38116 IFS=$as_save_IFS
38117 
38118   ;;
38119 esac
38120 fi
38121 LIPO=$ac_cv_path_LIPO
38122 if test -n "$LIPO"; then
38123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38124 $as_echo "$LIPO" >&6; }
38125 else
38126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38127 $as_echo "no" >&6; }
38128 fi
38129 
38130 
38131   test -n "$LIPO" && break
38132 done
38133 
38134     else
38135       # If it succeeded, then it was overridden by the user. We will use it
38136       # for the tool.
38137 
38138       # First remove it from the list of overridden variables, so we can test
38139       # for unknown variables in the end.
38140       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38141 
38142       # Check if we try to supply an empty value
38143       if test "x$LIPO" = x; then
38144         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38145 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38146         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38147 $as_echo_n "checking for LIPO... " >&6; }
38148         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38149 $as_echo "disabled" >&6; }
38150       else
38151         # Check if the provided tool contains a complete path.
38152         tool_specified="$LIPO"
38153         tool_basename="${tool_specified##*/}"
38154         if test "x$tool_basename" = "x$tool_specified"; then
38155           # A command without a complete path is provided, search $PATH.
38156           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38157 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38158           # Extract the first word of "$tool_basename", so it can be a program name with args.
38159 set dummy $tool_basename; ac_word=$2
38160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38161 $as_echo_n "checking for $ac_word... " >&6; }
38162 if ${ac_cv_path_LIPO+:} false; then :
38163   $as_echo_n "(cached) " >&6
38164 else
38165   case $LIPO in
38166   [\\/]* | ?:[\\/]*)
38167   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38168   ;;
38169   *)
38170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38171 for as_dir in $PATH
38172 do
38173   IFS=$as_save_IFS
38174   test -z "$as_dir" && as_dir=.
38175     for ac_exec_ext in '' $ac_executable_extensions; do
38176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38177     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38179     break 2
38180   fi
38181 done
38182   done
38183 IFS=$as_save_IFS
38184 
38185   ;;
38186 esac
38187 fi
38188 LIPO=$ac_cv_path_LIPO
38189 if test -n "$LIPO"; then
38190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38191 $as_echo "$LIPO" >&6; }
38192 else
38193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38194 $as_echo "no" >&6; }
38195 fi
38196 
38197 
38198           if test "x$LIPO" = x; then
38199             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38200           fi
38201         else
38202           # Otherwise we believe it is a complete path. Use it as it is.
38203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38204 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38205           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38206 $as_echo_n "checking for LIPO... " >&6; }
38207           if test ! -x "$tool_specified"; then
38208             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38209 $as_echo "not found" >&6; }
38210             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38211           fi
38212           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38213 $as_echo "$tool_specified" >&6; }
38214         fi
38215       fi
38216     fi
38217 
38218   fi
38219 
38220 
38221 
38222   # Only process if variable expands to non-empty
38223 
38224   if test "x$LIPO" != x; then
38225     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38226 
38227   # First separate the path from the arguments. This will split at the first
38228   # space.
38229   complete="$LIPO"
38230   path="${complete%% *}"
38231   tmp="$complete EOL"
38232   arguments="${tmp#* }"
38233 
38234   # Input might be given as Windows format, start by converting to
38235   # unix format.
38236   new_path=`$CYGPATH -u "$path"`
38237 
38238   # Now try to locate executable using which
38239   new_path=`$WHICH "$new_path" 2> /dev/null`
38240   # bat and cmd files are not always considered executable in cygwin causing which
38241   # to not find them
38242   if test "x$new_path" = x \
38243       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38244       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38245     new_path=`$CYGPATH -u "$path"`
38246   fi
38247   if test "x$new_path" = x; then
38248     # Oops. Which didn't find the executable.
38249     # The splitting of arguments from the executable at a space might have been incorrect,
38250     # since paths with space are more likely in Windows. Give it another try with the whole
38251     # argument.
38252     path="$complete"
38253     arguments="EOL"
38254     new_path=`$CYGPATH -u "$path"`
38255     new_path=`$WHICH "$new_path" 2> /dev/null`
38256     # bat and cmd files are not always considered executable in cygwin causing which
38257     # to not find them
38258     if test "x$new_path" = x \
38259         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38260         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38261       new_path=`$CYGPATH -u "$path"`
38262     fi
38263     if test "x$new_path" = x; then
38264       # It's still not found. Now this is an unrecoverable error.
38265       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38266 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38267       has_space=`$ECHO "$complete" | $GREP " "`
38268       if test "x$has_space" != x; then
38269         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38270 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38271       fi
38272       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38273     fi
38274   fi
38275 
38276   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38277   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38278   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38279   # "foo.exe" is OK but "foo" is an error.
38280   #
38281   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38282   # It is also a way to make sure we got the proper file name for the real test later on.
38283   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38284   if test "x$test_shortpath" = x; then
38285     # Short path failed, file does not exist as specified.
38286     # Try adding .exe or .cmd
38287     if test -f "${new_path}.exe"; then
38288       input_to_shortpath="${new_path}.exe"
38289     elif test -f "${new_path}.cmd"; then
38290       input_to_shortpath="${new_path}.cmd"
38291     else
38292       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38293 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38294       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38295 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38296       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38297     fi
38298   else
38299     input_to_shortpath="$new_path"
38300   fi
38301 
38302   # Call helper function which possibly converts this using DOS-style short mode.
38303   # If so, the updated path is stored in $new_path.
38304   new_path="$input_to_shortpath"
38305 
38306   input_path="$input_to_shortpath"
38307   # Check if we need to convert this using DOS-style short mode. If the path
38308   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38309   # take no chances and rewrite it.
38310   # Note: m4 eats our [], so we need to use [ and ] instead.
38311   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38312   if test "x$has_forbidden_chars" != x; then
38313     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38314     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38315     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38316     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38317       # Going to short mode and back again did indeed matter. Since short mode is
38318       # case insensitive, let's make it lowercase to improve readability.
38319       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38320       # Now convert it back to Unix-style (cygpath)
38321       input_path=`$CYGPATH -u "$shortmode_path"`
38322       new_path="$input_path"
38323     fi
38324   fi
38325 
38326   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38327   if test "x$test_cygdrive_prefix" = x; then
38328     # As a simple fix, exclude /usr/bin since it's not a real path.
38329     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38330       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38331       # a path prefixed by /cygdrive for fixpath to work.
38332       new_path="$CYGWIN_ROOT_PATH$input_path"
38333     fi
38334   fi
38335 
38336   # remove trailing .exe if any
38337   new_path="${new_path/%.exe/}"
38338 
38339     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38340 
38341   # First separate the path from the arguments. This will split at the first
38342   # space.
38343   complete="$LIPO"
38344   path="${complete%% *}"
38345   tmp="$complete EOL"
38346   arguments="${tmp#* }"
38347 
38348   # Input might be given as Windows format, start by converting to
38349   # unix format.
38350   new_path="$path"
38351 
38352   windows_path="$new_path"
38353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38354     unix_path=`$CYGPATH -u "$windows_path"`
38355     new_path="$unix_path"
38356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38358     new_path="$unix_path"
38359   fi
38360 
38361 
38362   # Now try to locate executable using which
38363   new_path=`$WHICH "$new_path" 2> /dev/null`
38364 
38365   if test "x$new_path" = x; then
38366     # Oops. Which didn't find the executable.
38367     # The splitting of arguments from the executable at a space might have been incorrect,
38368     # since paths with space are more likely in Windows. Give it another try with the whole
38369     # argument.
38370     path="$complete"
38371     arguments="EOL"
38372     new_path="$path"
38373 
38374   windows_path="$new_path"
38375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38376     unix_path=`$CYGPATH -u "$windows_path"`
38377     new_path="$unix_path"
38378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38380     new_path="$unix_path"
38381   fi
38382 
38383 
38384     new_path=`$WHICH "$new_path" 2> /dev/null`
38385     # bat and cmd files are not always considered executable in MSYS causing which
38386     # to not find them
38387     if test "x$new_path" = x \
38388         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38389         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38390       new_path="$path"
38391 
38392   windows_path="$new_path"
38393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38394     unix_path=`$CYGPATH -u "$windows_path"`
38395     new_path="$unix_path"
38396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38398     new_path="$unix_path"
38399   fi
38400 
38401     fi
38402 
38403     if test "x$new_path" = x; then
38404       # It's still not found. Now this is an unrecoverable error.
38405       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38406 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38407       has_space=`$ECHO "$complete" | $GREP " "`
38408       if test "x$has_space" != x; then
38409         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38410 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38411       fi
38412       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38413     fi
38414   fi
38415 
38416   # Now new_path has a complete unix path to the binary
38417   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38418     # Keep paths in /bin as-is, but remove trailing .exe if any
38419     new_path="${new_path/%.exe/}"
38420     # Do not save /bin paths to all_fixpath_prefixes!
38421   else
38422     # Not in mixed or Windows style, start by that.
38423     new_path=`cmd //c echo $new_path`
38424 
38425   input_path="$new_path"
38426   # Check if we need to convert this using DOS-style short mode. If the path
38427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38428   # take no chances and rewrite it.
38429   # Note: m4 eats our [], so we need to use [ and ] instead.
38430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38431   if test "x$has_forbidden_chars" != x; then
38432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38433     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38434   fi
38435 
38436     # Output is in $new_path
38437 
38438   windows_path="$new_path"
38439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38440     unix_path=`$CYGPATH -u "$windows_path"`
38441     new_path="$unix_path"
38442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38444     new_path="$unix_path"
38445   fi
38446 
38447     # remove trailing .exe if any
38448     new_path="${new_path/%.exe/}"
38449 
38450     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38451     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38452   fi
38453 
38454     else
38455       # We're on a unix platform. Hooray! :)
38456       # First separate the path from the arguments. This will split at the first
38457       # space.
38458       complete="$LIPO"
38459       path="${complete%% *}"
38460       tmp="$complete EOL"
38461       arguments="${tmp#* }"
38462 
38463       # Cannot rely on the command "which" here since it doesn't always work.
38464       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38465       if test -z "$is_absolute_path"; then
38466         # Path to executable is not absolute. Find it.
38467         IFS_save="$IFS"
38468         IFS=:
38469         for p in $PATH; do
38470           if test -f "$p/$path" && test -x "$p/$path"; then
38471             new_path="$p/$path"
38472             break
38473           fi
38474         done
38475         IFS="$IFS_save"
38476       else
38477         # This is an absolute path, we can use it without further modifications.
38478         new_path="$path"
38479       fi
38480 
38481       if test "x$new_path" = x; then
38482         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38483 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38484         has_space=`$ECHO "$complete" | $GREP " "`
38485         if test "x$has_space" != x; then
38486           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38487 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38488         fi
38489         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38490       fi
38491     fi
38492 
38493     # Now join together the path and the arguments once again
38494     if test "x$arguments" != xEOL; then
38495       new_complete="$new_path ${arguments% *}"
38496     else
38497       new_complete="$new_path"
38498     fi
38499 
38500     if test "x$complete" != "x$new_complete"; then
38501       LIPO="$new_complete"
38502       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38503 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38504     fi
38505   fi
38506 
38507   fi
38508 
38509   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38510     # Extract the first word of "mt", so it can be a program name with args.
38511 set dummy mt; ac_word=$2
38512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38513 $as_echo_n "checking for $ac_word... " >&6; }
38514 if ${ac_cv_prog_MT+:} false; then :
38515   $as_echo_n "(cached) " >&6
38516 else
38517   if test -n "$MT"; then
38518   ac_cv_prog_MT="$MT" # Let the user override the test.
38519 else
38520   ac_prog_rejected=no
38521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38522 for as_dir in $PATH
38523 do
38524   IFS=$as_save_IFS
38525   test -z "$as_dir" && as_dir=.
38526     for ac_exec_ext in '' $ac_executable_extensions; do
38527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38528     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38529        ac_prog_rejected=yes
38530        continue
38531      fi
38532     ac_cv_prog_MT="mt"
38533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38534     break 2
38535   fi
38536 done
38537   done
38538 IFS=$as_save_IFS
38539 
38540 if test $ac_prog_rejected = yes; then
38541   # We found a bogon in the path, so make sure we never use it.
38542   set dummy $ac_cv_prog_MT
38543   shift
38544   if test $# != 0; then
38545     # We chose a different compiler from the bogus one.
38546     # However, it has the same basename, so the bogon will be chosen
38547     # first if we set MT to just the basename; use the full file name.
38548     shift
38549     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38550   fi
38551 fi
38552 fi
38553 fi
38554 MT=$ac_cv_prog_MT
38555 if test -n "$MT"; then
38556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38557 $as_echo "$MT" >&6; }
38558 else
38559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38560 $as_echo "no" >&6; }
38561 fi
38562 
38563 
38564 
38565   # Only process if variable expands to non-empty
38566 
38567   if test "x$MT" != x; then
38568     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38569 
38570   # First separate the path from the arguments. This will split at the first
38571   # space.
38572   complete="$MT"
38573   path="${complete%% *}"
38574   tmp="$complete EOL"
38575   arguments="${tmp#* }"
38576 
38577   # Input might be given as Windows format, start by converting to
38578   # unix format.
38579   new_path=`$CYGPATH -u "$path"`
38580 
38581   # Now try to locate executable using which
38582   new_path=`$WHICH "$new_path" 2> /dev/null`
38583   # bat and cmd files are not always considered executable in cygwin causing which
38584   # to not find them
38585   if test "x$new_path" = x \
38586       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38587       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38588     new_path=`$CYGPATH -u "$path"`
38589   fi
38590   if test "x$new_path" = x; then
38591     # Oops. Which didn't find the executable.
38592     # The splitting of arguments from the executable at a space might have been incorrect,
38593     # since paths with space are more likely in Windows. Give it another try with the whole
38594     # argument.
38595     path="$complete"
38596     arguments="EOL"
38597     new_path=`$CYGPATH -u "$path"`
38598     new_path=`$WHICH "$new_path" 2> /dev/null`
38599     # bat and cmd files are not always considered executable in cygwin causing which
38600     # to not find them
38601     if test "x$new_path" = x \
38602         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38603         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38604       new_path=`$CYGPATH -u "$path"`
38605     fi
38606     if test "x$new_path" = x; then
38607       # It's still not found. Now this is an unrecoverable error.
38608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38609 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38610       has_space=`$ECHO "$complete" | $GREP " "`
38611       if test "x$has_space" != x; then
38612         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38613 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38614       fi
38615       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38616     fi
38617   fi
38618 
38619   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38620   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38621   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38622   # "foo.exe" is OK but "foo" is an error.
38623   #
38624   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38625   # It is also a way to make sure we got the proper file name for the real test later on.
38626   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38627   if test "x$test_shortpath" = x; then
38628     # Short path failed, file does not exist as specified.
38629     # Try adding .exe or .cmd
38630     if test -f "${new_path}.exe"; then
38631       input_to_shortpath="${new_path}.exe"
38632     elif test -f "${new_path}.cmd"; then
38633       input_to_shortpath="${new_path}.cmd"
38634     else
38635       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38636 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38637       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38638 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38639       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38640     fi
38641   else
38642     input_to_shortpath="$new_path"
38643   fi
38644 
38645   # Call helper function which possibly converts this using DOS-style short mode.
38646   # If so, the updated path is stored in $new_path.
38647   new_path="$input_to_shortpath"
38648 
38649   input_path="$input_to_shortpath"
38650   # Check if we need to convert this using DOS-style short mode. If the path
38651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38652   # take no chances and rewrite it.
38653   # Note: m4 eats our [], so we need to use [ and ] instead.
38654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38655   if test "x$has_forbidden_chars" != x; then
38656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38657     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38658     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38659     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38660       # Going to short mode and back again did indeed matter. Since short mode is
38661       # case insensitive, let's make it lowercase to improve readability.
38662       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38663       # Now convert it back to Unix-style (cygpath)
38664       input_path=`$CYGPATH -u "$shortmode_path"`
38665       new_path="$input_path"
38666     fi
38667   fi
38668 
38669   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38670   if test "x$test_cygdrive_prefix" = x; then
38671     # As a simple fix, exclude /usr/bin since it's not a real path.
38672     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38673       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38674       # a path prefixed by /cygdrive for fixpath to work.
38675       new_path="$CYGWIN_ROOT_PATH$input_path"
38676     fi
38677   fi
38678 
38679   # remove trailing .exe if any
38680   new_path="${new_path/%.exe/}"
38681 
38682     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38683 
38684   # First separate the path from the arguments. This will split at the first
38685   # space.
38686   complete="$MT"
38687   path="${complete%% *}"
38688   tmp="$complete EOL"
38689   arguments="${tmp#* }"
38690 
38691   # Input might be given as Windows format, start by converting to
38692   # unix format.
38693   new_path="$path"
38694 
38695   windows_path="$new_path"
38696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38697     unix_path=`$CYGPATH -u "$windows_path"`
38698     new_path="$unix_path"
38699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38701     new_path="$unix_path"
38702   fi
38703 
38704 
38705   # Now try to locate executable using which
38706   new_path=`$WHICH "$new_path" 2> /dev/null`
38707 
38708   if test "x$new_path" = x; then
38709     # Oops. Which didn't find the executable.
38710     # The splitting of arguments from the executable at a space might have been incorrect,
38711     # since paths with space are more likely in Windows. Give it another try with the whole
38712     # argument.
38713     path="$complete"
38714     arguments="EOL"
38715     new_path="$path"
38716 
38717   windows_path="$new_path"
38718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38719     unix_path=`$CYGPATH -u "$windows_path"`
38720     new_path="$unix_path"
38721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38723     new_path="$unix_path"
38724   fi
38725 
38726 
38727     new_path=`$WHICH "$new_path" 2> /dev/null`
38728     # bat and cmd files are not always considered executable in MSYS causing which
38729     # to not find them
38730     if test "x$new_path" = x \
38731         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38732         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38733       new_path="$path"
38734 
38735   windows_path="$new_path"
38736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38737     unix_path=`$CYGPATH -u "$windows_path"`
38738     new_path="$unix_path"
38739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38741     new_path="$unix_path"
38742   fi
38743 
38744     fi
38745 
38746     if test "x$new_path" = x; then
38747       # It's still not found. Now this is an unrecoverable error.
38748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38749 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38750       has_space=`$ECHO "$complete" | $GREP " "`
38751       if test "x$has_space" != x; then
38752         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38753 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38754       fi
38755       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38756     fi
38757   fi
38758 
38759   # Now new_path has a complete unix path to the binary
38760   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38761     # Keep paths in /bin as-is, but remove trailing .exe if any
38762     new_path="${new_path/%.exe/}"
38763     # Do not save /bin paths to all_fixpath_prefixes!
38764   else
38765     # Not in mixed or Windows style, start by that.
38766     new_path=`cmd //c echo $new_path`
38767 
38768   input_path="$new_path"
38769   # Check if we need to convert this using DOS-style short mode. If the path
38770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38771   # take no chances and rewrite it.
38772   # Note: m4 eats our [], so we need to use [ and ] instead.
38773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38774   if test "x$has_forbidden_chars" != x; then
38775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38776     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38777   fi
38778 
38779     # Output is in $new_path
38780 
38781   windows_path="$new_path"
38782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38783     unix_path=`$CYGPATH -u "$windows_path"`
38784     new_path="$unix_path"
38785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38787     new_path="$unix_path"
38788   fi
38789 
38790     # remove trailing .exe if any
38791     new_path="${new_path/%.exe/}"
38792 
38793     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38794     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38795   fi
38796 
38797     else
38798       # We're on a unix platform. Hooray! :)
38799       # First separate the path from the arguments. This will split at the first
38800       # space.
38801       complete="$MT"
38802       path="${complete%% *}"
38803       tmp="$complete EOL"
38804       arguments="${tmp#* }"
38805 
38806       # Cannot rely on the command "which" here since it doesn't always work.
38807       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38808       if test -z "$is_absolute_path"; then
38809         # Path to executable is not absolute. Find it.
38810         IFS_save="$IFS"
38811         IFS=:
38812         for p in $PATH; do
38813           if test -f "$p/$path" && test -x "$p/$path"; then
38814             new_path="$p/$path"
38815             break
38816           fi
38817         done
38818         IFS="$IFS_save"
38819       else
38820         # This is an absolute path, we can use it without further modifications.
38821         new_path="$path"
38822       fi
38823 
38824       if test "x$new_path" = x; then
38825         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38826 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38827         has_space=`$ECHO "$complete" | $GREP " "`
38828         if test "x$has_space" != x; then
38829           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38830 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38831         fi
38832         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38833       fi
38834     fi
38835 
38836     # Now join together the path and the arguments once again
38837     if test "x$arguments" != xEOL; then
38838       new_complete="$new_path ${arguments% *}"
38839     else
38840       new_complete="$new_path"
38841     fi
38842 
38843     if test "x$complete" != "x$new_complete"; then
38844       MT="$new_complete"
38845       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38846 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38847     fi
38848   fi
38849 
38850     # Setup the resource compiler (RC)
38851     # Extract the first word of "rc", so it can be a program name with args.
38852 set dummy rc; ac_word=$2
38853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38854 $as_echo_n "checking for $ac_word... " >&6; }
38855 if ${ac_cv_prog_RC+:} false; then :
38856   $as_echo_n "(cached) " >&6
38857 else
38858   if test -n "$RC"; then
38859   ac_cv_prog_RC="$RC" # Let the user override the test.
38860 else
38861   ac_prog_rejected=no
38862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38863 for as_dir in $PATH
38864 do
38865   IFS=$as_save_IFS
38866   test -z "$as_dir" && as_dir=.
38867     for ac_exec_ext in '' $ac_executable_extensions; do
38868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38869     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38870        ac_prog_rejected=yes
38871        continue
38872      fi
38873     ac_cv_prog_RC="rc"
38874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38875     break 2
38876   fi
38877 done
38878   done
38879 IFS=$as_save_IFS
38880 
38881 if test $ac_prog_rejected = yes; then
38882   # We found a bogon in the path, so make sure we never use it.
38883   set dummy $ac_cv_prog_RC
38884   shift
38885   if test $# != 0; then
38886     # We chose a different compiler from the bogus one.
38887     # However, it has the same basename, so the bogon will be chosen
38888     # first if we set RC to just the basename; use the full file name.
38889     shift
38890     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38891   fi
38892 fi
38893 fi
38894 fi
38895 RC=$ac_cv_prog_RC
38896 if test -n "$RC"; then
38897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38898 $as_echo "$RC" >&6; }
38899 else
38900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38901 $as_echo "no" >&6; }
38902 fi
38903 
38904 
38905 
38906   # Only process if variable expands to non-empty
38907 
38908   if test "x$RC" != x; then
38909     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38910 
38911   # First separate the path from the arguments. This will split at the first
38912   # space.
38913   complete="$RC"
38914   path="${complete%% *}"
38915   tmp="$complete EOL"
38916   arguments="${tmp#* }"
38917 
38918   # Input might be given as Windows format, start by converting to
38919   # unix format.
38920   new_path=`$CYGPATH -u "$path"`
38921 
38922   # Now try to locate executable using which
38923   new_path=`$WHICH "$new_path" 2> /dev/null`
38924   # bat and cmd files are not always considered executable in cygwin causing which
38925   # to not find them
38926   if test "x$new_path" = x \
38927       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38928       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38929     new_path=`$CYGPATH -u "$path"`
38930   fi
38931   if test "x$new_path" = x; then
38932     # Oops. Which didn't find the executable.
38933     # The splitting of arguments from the executable at a space might have been incorrect,
38934     # since paths with space are more likely in Windows. Give it another try with the whole
38935     # argument.
38936     path="$complete"
38937     arguments="EOL"
38938     new_path=`$CYGPATH -u "$path"`
38939     new_path=`$WHICH "$new_path" 2> /dev/null`
38940     # bat and cmd files are not always considered executable in cygwin causing which
38941     # to not find them
38942     if test "x$new_path" = x \
38943         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38944         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38945       new_path=`$CYGPATH -u "$path"`
38946     fi
38947     if test "x$new_path" = x; then
38948       # It's still not found. Now this is an unrecoverable error.
38949       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38950 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38951       has_space=`$ECHO "$complete" | $GREP " "`
38952       if test "x$has_space" != x; then
38953         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38954 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38955       fi
38956       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38957     fi
38958   fi
38959 
38960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38963   # "foo.exe" is OK but "foo" is an error.
38964   #
38965   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38966   # It is also a way to make sure we got the proper file name for the real test later on.
38967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38968   if test "x$test_shortpath" = x; then
38969     # Short path failed, file does not exist as specified.
38970     # Try adding .exe or .cmd
38971     if test -f "${new_path}.exe"; then
38972       input_to_shortpath="${new_path}.exe"
38973     elif test -f "${new_path}.cmd"; then
38974       input_to_shortpath="${new_path}.cmd"
38975     else
38976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38977 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38978       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38979 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38980       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38981     fi
38982   else
38983     input_to_shortpath="$new_path"
38984   fi
38985 
38986   # Call helper function which possibly converts this using DOS-style short mode.
38987   # If so, the updated path is stored in $new_path.
38988   new_path="$input_to_shortpath"
38989 
38990   input_path="$input_to_shortpath"
38991   # Check if we need to convert this using DOS-style short mode. If the path
38992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38993   # take no chances and rewrite it.
38994   # Note: m4 eats our [], so we need to use [ and ] instead.
38995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38996   if test "x$has_forbidden_chars" != x; then
38997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39001       # Going to short mode and back again did indeed matter. Since short mode is
39002       # case insensitive, let's make it lowercase to improve readability.
39003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39004       # Now convert it back to Unix-style (cygpath)
39005       input_path=`$CYGPATH -u "$shortmode_path"`
39006       new_path="$input_path"
39007     fi
39008   fi
39009 
39010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39011   if test "x$test_cygdrive_prefix" = x; then
39012     # As a simple fix, exclude /usr/bin since it's not a real path.
39013     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39015       # a path prefixed by /cygdrive for fixpath to work.
39016       new_path="$CYGWIN_ROOT_PATH$input_path"
39017     fi
39018   fi
39019 
39020   # remove trailing .exe if any
39021   new_path="${new_path/%.exe/}"
39022 
39023     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39024 
39025   # First separate the path from the arguments. This will split at the first
39026   # space.
39027   complete="$RC"
39028   path="${complete%% *}"
39029   tmp="$complete EOL"
39030   arguments="${tmp#* }"
39031 
39032   # Input might be given as Windows format, start by converting to
39033   # unix format.
39034   new_path="$path"
39035 
39036   windows_path="$new_path"
39037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39038     unix_path=`$CYGPATH -u "$windows_path"`
39039     new_path="$unix_path"
39040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39042     new_path="$unix_path"
39043   fi
39044 
39045 
39046   # Now try to locate executable using which
39047   new_path=`$WHICH "$new_path" 2> /dev/null`
39048 
39049   if test "x$new_path" = x; then
39050     # Oops. Which didn't find the executable.
39051     # The splitting of arguments from the executable at a space might have been incorrect,
39052     # since paths with space are more likely in Windows. Give it another try with the whole
39053     # argument.
39054     path="$complete"
39055     arguments="EOL"
39056     new_path="$path"
39057 
39058   windows_path="$new_path"
39059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39060     unix_path=`$CYGPATH -u "$windows_path"`
39061     new_path="$unix_path"
39062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39064     new_path="$unix_path"
39065   fi
39066 
39067 
39068     new_path=`$WHICH "$new_path" 2> /dev/null`
39069     # bat and cmd files are not always considered executable in MSYS causing which
39070     # to not find them
39071     if test "x$new_path" = x \
39072         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39073         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39074       new_path="$path"
39075 
39076   windows_path="$new_path"
39077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39078     unix_path=`$CYGPATH -u "$windows_path"`
39079     new_path="$unix_path"
39080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39082     new_path="$unix_path"
39083   fi
39084 
39085     fi
39086 
39087     if test "x$new_path" = x; then
39088       # It's still not found. Now this is an unrecoverable error.
39089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39090 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39091       has_space=`$ECHO "$complete" | $GREP " "`
39092       if test "x$has_space" != x; then
39093         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39094 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39095       fi
39096       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39097     fi
39098   fi
39099 
39100   # Now new_path has a complete unix path to the binary
39101   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39102     # Keep paths in /bin as-is, but remove trailing .exe if any
39103     new_path="${new_path/%.exe/}"
39104     # Do not save /bin paths to all_fixpath_prefixes!
39105   else
39106     # Not in mixed or Windows style, start by that.
39107     new_path=`cmd //c echo $new_path`
39108 
39109   input_path="$new_path"
39110   # Check if we need to convert this using DOS-style short mode. If the path
39111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39112   # take no chances and rewrite it.
39113   # Note: m4 eats our [], so we need to use [ and ] instead.
39114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39115   if test "x$has_forbidden_chars" != x; then
39116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39117     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39118   fi
39119 
39120     # Output is in $new_path
39121 
39122   windows_path="$new_path"
39123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39124     unix_path=`$CYGPATH -u "$windows_path"`
39125     new_path="$unix_path"
39126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39128     new_path="$unix_path"
39129   fi
39130 
39131     # remove trailing .exe if any
39132     new_path="${new_path/%.exe/}"
39133 
39134     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39135     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39136   fi
39137 
39138     else
39139       # We're on a unix platform. Hooray! :)
39140       # First separate the path from the arguments. This will split at the first
39141       # space.
39142       complete="$RC"
39143       path="${complete%% *}"
39144       tmp="$complete EOL"
39145       arguments="${tmp#* }"
39146 
39147       # Cannot rely on the command "which" here since it doesn't always work.
39148       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39149       if test -z "$is_absolute_path"; then
39150         # Path to executable is not absolute. Find it.
39151         IFS_save="$IFS"
39152         IFS=:
39153         for p in $PATH; do
39154           if test -f "$p/$path" && test -x "$p/$path"; then
39155             new_path="$p/$path"
39156             break
39157           fi
39158         done
39159         IFS="$IFS_save"
39160       else
39161         # This is an absolute path, we can use it without further modifications.
39162         new_path="$path"
39163       fi
39164 
39165       if test "x$new_path" = x; then
39166         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39167 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39168         has_space=`$ECHO "$complete" | $GREP " "`
39169         if test "x$has_space" != x; then
39170           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39171 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39172         fi
39173         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39174       fi
39175     fi
39176 
39177     # Now join together the path and the arguments once again
39178     if test "x$arguments" != xEOL; then
39179       new_complete="$new_path ${arguments% *}"
39180     else
39181       new_complete="$new_path"
39182     fi
39183 
39184     if test "x$complete" != "x$new_complete"; then
39185       RC="$new_complete"
39186       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39187 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39188     fi
39189   fi
39190 
39191     # Extract the first word of "dumpbin", so it can be a program name with args.
39192 set dummy dumpbin; ac_word=$2
39193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39194 $as_echo_n "checking for $ac_word... " >&6; }
39195 if ${ac_cv_prog_DUMPBIN+:} false; then :
39196   $as_echo_n "(cached) " >&6
39197 else
39198   if test -n "$DUMPBIN"; then
39199   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39200 else
39201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39202 for as_dir in $PATH
39203 do
39204   IFS=$as_save_IFS
39205   test -z "$as_dir" && as_dir=.
39206     for ac_exec_ext in '' $ac_executable_extensions; do
39207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39208     ac_cv_prog_DUMPBIN="dumpbin"
39209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39210     break 2
39211   fi
39212 done
39213   done
39214 IFS=$as_save_IFS
39215 
39216 fi
39217 fi
39218 DUMPBIN=$ac_cv_prog_DUMPBIN
39219 if test -n "$DUMPBIN"; then
39220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39221 $as_echo "$DUMPBIN" >&6; }
39222 else
39223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39224 $as_echo "no" >&6; }
39225 fi
39226 
39227 
39228 
39229   # Only process if variable expands to non-empty
39230 
39231   if test "x$DUMPBIN" != x; then
39232     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39233 
39234   # First separate the path from the arguments. This will split at the first
39235   # space.
39236   complete="$DUMPBIN"
39237   path="${complete%% *}"
39238   tmp="$complete EOL"
39239   arguments="${tmp#* }"
39240 
39241   # Input might be given as Windows format, start by converting to
39242   # unix format.
39243   new_path=`$CYGPATH -u "$path"`
39244 
39245   # Now try to locate executable using which
39246   new_path=`$WHICH "$new_path" 2> /dev/null`
39247   # bat and cmd files are not always considered executable in cygwin causing which
39248   # to not find them
39249   if test "x$new_path" = x \
39250       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39251       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39252     new_path=`$CYGPATH -u "$path"`
39253   fi
39254   if test "x$new_path" = x; then
39255     # Oops. Which didn't find the executable.
39256     # The splitting of arguments from the executable at a space might have been incorrect,
39257     # since paths with space are more likely in Windows. Give it another try with the whole
39258     # argument.
39259     path="$complete"
39260     arguments="EOL"
39261     new_path=`$CYGPATH -u "$path"`
39262     new_path=`$WHICH "$new_path" 2> /dev/null`
39263     # bat and cmd files are not always considered executable in cygwin causing which
39264     # to not find them
39265     if test "x$new_path" = x \
39266         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39267         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39268       new_path=`$CYGPATH -u "$path"`
39269     fi
39270     if test "x$new_path" = x; then
39271       # It's still not found. Now this is an unrecoverable error.
39272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39273 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39274       has_space=`$ECHO "$complete" | $GREP " "`
39275       if test "x$has_space" != x; then
39276         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39277 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39278       fi
39279       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39280     fi
39281   fi
39282 
39283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39286   # "foo.exe" is OK but "foo" is an error.
39287   #
39288   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39289   # It is also a way to make sure we got the proper file name for the real test later on.
39290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39291   if test "x$test_shortpath" = x; then
39292     # Short path failed, file does not exist as specified.
39293     # Try adding .exe or .cmd
39294     if test -f "${new_path}.exe"; then
39295       input_to_shortpath="${new_path}.exe"
39296     elif test -f "${new_path}.cmd"; then
39297       input_to_shortpath="${new_path}.cmd"
39298     else
39299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39300 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39301       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39302 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39303       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39304     fi
39305   else
39306     input_to_shortpath="$new_path"
39307   fi
39308 
39309   # Call helper function which possibly converts this using DOS-style short mode.
39310   # If so, the updated path is stored in $new_path.
39311   new_path="$input_to_shortpath"
39312 
39313   input_path="$input_to_shortpath"
39314   # Check if we need to convert this using DOS-style short mode. If the path
39315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39316   # take no chances and rewrite it.
39317   # Note: m4 eats our [], so we need to use [ and ] instead.
39318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39319   if test "x$has_forbidden_chars" != x; then
39320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39324       # Going to short mode and back again did indeed matter. Since short mode is
39325       # case insensitive, let's make it lowercase to improve readability.
39326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39327       # Now convert it back to Unix-style (cygpath)
39328       input_path=`$CYGPATH -u "$shortmode_path"`
39329       new_path="$input_path"
39330     fi
39331   fi
39332 
39333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39334   if test "x$test_cygdrive_prefix" = x; then
39335     # As a simple fix, exclude /usr/bin since it's not a real path.
39336     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39338       # a path prefixed by /cygdrive for fixpath to work.
39339       new_path="$CYGWIN_ROOT_PATH$input_path"
39340     fi
39341   fi
39342 
39343   # remove trailing .exe if any
39344   new_path="${new_path/%.exe/}"
39345 
39346     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39347 
39348   # First separate the path from the arguments. This will split at the first
39349   # space.
39350   complete="$DUMPBIN"
39351   path="${complete%% *}"
39352   tmp="$complete EOL"
39353   arguments="${tmp#* }"
39354 
39355   # Input might be given as Windows format, start by converting to
39356   # unix format.
39357   new_path="$path"
39358 
39359   windows_path="$new_path"
39360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39361     unix_path=`$CYGPATH -u "$windows_path"`
39362     new_path="$unix_path"
39363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39365     new_path="$unix_path"
39366   fi
39367 
39368 
39369   # Now try to locate executable using which
39370   new_path=`$WHICH "$new_path" 2> /dev/null`
39371 
39372   if test "x$new_path" = x; then
39373     # Oops. Which didn't find the executable.
39374     # The splitting of arguments from the executable at a space might have been incorrect,
39375     # since paths with space are more likely in Windows. Give it another try with the whole
39376     # argument.
39377     path="$complete"
39378     arguments="EOL"
39379     new_path="$path"
39380 
39381   windows_path="$new_path"
39382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39383     unix_path=`$CYGPATH -u "$windows_path"`
39384     new_path="$unix_path"
39385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39387     new_path="$unix_path"
39388   fi
39389 
39390 
39391     new_path=`$WHICH "$new_path" 2> /dev/null`
39392     # bat and cmd files are not always considered executable in MSYS causing which
39393     # to not find them
39394     if test "x$new_path" = x \
39395         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39396         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39397       new_path="$path"
39398 
39399   windows_path="$new_path"
39400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39401     unix_path=`$CYGPATH -u "$windows_path"`
39402     new_path="$unix_path"
39403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39405     new_path="$unix_path"
39406   fi
39407 
39408     fi
39409 
39410     if test "x$new_path" = x; then
39411       # It's still not found. Now this is an unrecoverable error.
39412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39413 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39414       has_space=`$ECHO "$complete" | $GREP " "`
39415       if test "x$has_space" != x; then
39416         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39417 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39418       fi
39419       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39420     fi
39421   fi
39422 
39423   # Now new_path has a complete unix path to the binary
39424   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39425     # Keep paths in /bin as-is, but remove trailing .exe if any
39426     new_path="${new_path/%.exe/}"
39427     # Do not save /bin paths to all_fixpath_prefixes!
39428   else
39429     # Not in mixed or Windows style, start by that.
39430     new_path=`cmd //c echo $new_path`
39431 
39432   input_path="$new_path"
39433   # Check if we need to convert this using DOS-style short mode. If the path
39434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39435   # take no chances and rewrite it.
39436   # Note: m4 eats our [], so we need to use [ and ] instead.
39437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39438   if test "x$has_forbidden_chars" != x; then
39439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39441   fi
39442 
39443     # Output is in $new_path
39444 
39445   windows_path="$new_path"
39446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39447     unix_path=`$CYGPATH -u "$windows_path"`
39448     new_path="$unix_path"
39449   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39450     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39451     new_path="$unix_path"
39452   fi
39453 
39454     # remove trailing .exe if any
39455     new_path="${new_path/%.exe/}"
39456 
39457     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39458     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39459   fi
39460 
39461     else
39462       # We're on a unix platform. Hooray! :)
39463       # First separate the path from the arguments. This will split at the first
39464       # space.
39465       complete="$DUMPBIN"
39466       path="${complete%% *}"
39467       tmp="$complete EOL"
39468       arguments="${tmp#* }"
39469 
39470       # Cannot rely on the command "which" here since it doesn't always work.
39471       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39472       if test -z "$is_absolute_path"; then
39473         # Path to executable is not absolute. Find it.
39474         IFS_save="$IFS"
39475         IFS=:
39476         for p in $PATH; do
39477           if test -f "$p/$path" && test -x "$p/$path"; then
39478             new_path="$p/$path"
39479             break
39480           fi
39481         done
39482         IFS="$IFS_save"
39483       else
39484         # This is an absolute path, we can use it without further modifications.
39485         new_path="$path"
39486       fi
39487 
39488       if test "x$new_path" = x; then
39489         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39490 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39491         has_space=`$ECHO "$complete" | $GREP " "`
39492         if test "x$has_space" != x; then
39493           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39494 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39495         fi
39496         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39497       fi
39498     fi
39499 
39500     # Now join together the path and the arguments once again
39501     if test "x$arguments" != xEOL; then
39502       new_complete="$new_path ${arguments% *}"
39503     else
39504       new_complete="$new_path"
39505     fi
39506 
39507     if test "x$complete" != "x$new_complete"; then
39508       DUMPBIN="$new_complete"
39509       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39510 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39511     fi
39512   fi
39513 
39514     # We need to check for 'msbuild.exe' because at the place where we expect to
39515     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39516     # won't find the 'msbuild.exe' executable in that case (and the
39517     # 'ac_executable_extensions' is unusable due to performance reasons).
39518     # Notice that we intentionally don't fix up the path to MSBUILD because we
39519     # will call it in a DOS shell during freetype detection on Windows (see
39520     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39521     # Extract the first word of "msbuild.exe", so it can be a program name with args.
39522 set dummy msbuild.exe; ac_word=$2
39523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39524 $as_echo_n "checking for $ac_word... " >&6; }
39525 if ${ac_cv_prog_MSBUILD+:} false; then :
39526   $as_echo_n "(cached) " >&6
39527 else
39528   if test -n "$MSBUILD"; then
39529   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39530 else
39531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39532 for as_dir in $PATH
39533 do
39534   IFS=$as_save_IFS
39535   test -z "$as_dir" && as_dir=.
39536     for ac_exec_ext in '' $ac_executable_extensions; do
39537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39538     ac_cv_prog_MSBUILD="msbuild.exe"
39539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39540     break 2
39541   fi
39542 done
39543   done
39544 IFS=$as_save_IFS
39545 
39546 fi
39547 fi
39548 MSBUILD=$ac_cv_prog_MSBUILD
39549 if test -n "$MSBUILD"; then
39550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39551 $as_echo "$MSBUILD" >&6; }
39552 else
39553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39554 $as_echo "no" >&6; }
39555 fi
39556 
39557 
39558   fi
39559 
39560   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39561 
39562 
39563   # Publish this variable in the help.
39564 
39565 
39566   if [ -z "${STRIP+x}" ]; then
39567     # The variable is not set by user, try to locate tool using the code snippet
39568     for ac_prog in strip
39569 do
39570   # Extract the first word of "$ac_prog", so it can be a program name with args.
39571 set dummy $ac_prog; ac_word=$2
39572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39573 $as_echo_n "checking for $ac_word... " >&6; }
39574 if ${ac_cv_path_STRIP+:} false; then :
39575   $as_echo_n "(cached) " >&6
39576 else
39577   case $STRIP in
39578   [\\/]* | ?:[\\/]*)
39579   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39580   ;;
39581   *)
39582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39583 for as_dir in $PATH
39584 do
39585   IFS=$as_save_IFS
39586   test -z "$as_dir" && as_dir=.
39587     for ac_exec_ext in '' $ac_executable_extensions; do
39588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39589     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39591     break 2
39592   fi
39593 done
39594   done
39595 IFS=$as_save_IFS
39596 
39597   ;;
39598 esac
39599 fi
39600 STRIP=$ac_cv_path_STRIP
39601 if test -n "$STRIP"; then
39602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39603 $as_echo "$STRIP" >&6; }
39604 else
39605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39606 $as_echo "no" >&6; }
39607 fi
39608 
39609 
39610   test -n "$STRIP" && break
39611 done
39612 
39613   else
39614     # The variable is set, but is it from the command line or the environment?
39615 
39616     # Try to remove the string !STRIP! from our list.
39617     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39618     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39619       # If it failed, the variable was not from the command line. Ignore it,
39620       # but warn the user (except for BASH, which is always set by the calling BASH).
39621       if test "xSTRIP" != xBASH; then
39622         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39623 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39624       fi
39625       # Try to locate tool using the code snippet
39626       for ac_prog in strip
39627 do
39628   # Extract the first word of "$ac_prog", so it can be a program name with args.
39629 set dummy $ac_prog; ac_word=$2
39630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39631 $as_echo_n "checking for $ac_word... " >&6; }
39632 if ${ac_cv_path_STRIP+:} false; then :
39633   $as_echo_n "(cached) " >&6
39634 else
39635   case $STRIP in
39636   [\\/]* | ?:[\\/]*)
39637   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39638   ;;
39639   *)
39640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39641 for as_dir in $PATH
39642 do
39643   IFS=$as_save_IFS
39644   test -z "$as_dir" && as_dir=.
39645     for ac_exec_ext in '' $ac_executable_extensions; do
39646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39647     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39649     break 2
39650   fi
39651 done
39652   done
39653 IFS=$as_save_IFS
39654 
39655   ;;
39656 esac
39657 fi
39658 STRIP=$ac_cv_path_STRIP
39659 if test -n "$STRIP"; then
39660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39661 $as_echo "$STRIP" >&6; }
39662 else
39663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39664 $as_echo "no" >&6; }
39665 fi
39666 
39667 
39668   test -n "$STRIP" && break
39669 done
39670 
39671     else
39672       # If it succeeded, then it was overridden by the user. We will use it
39673       # for the tool.
39674 
39675       # First remove it from the list of overridden variables, so we can test
39676       # for unknown variables in the end.
39677       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39678 
39679       # Check if we try to supply an empty value
39680       if test "x$STRIP" = x; then
39681         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39682 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39683         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39684 $as_echo_n "checking for STRIP... " >&6; }
39685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39686 $as_echo "disabled" >&6; }
39687       else
39688         # Check if the provided tool contains a complete path.
39689         tool_specified="$STRIP"
39690         tool_basename="${tool_specified##*/}"
39691         if test "x$tool_basename" = "x$tool_specified"; then
39692           # A command without a complete path is provided, search $PATH.
39693           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39694 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39695           # Extract the first word of "$tool_basename", so it can be a program name with args.
39696 set dummy $tool_basename; ac_word=$2
39697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39698 $as_echo_n "checking for $ac_word... " >&6; }
39699 if ${ac_cv_path_STRIP+:} false; then :
39700   $as_echo_n "(cached) " >&6
39701 else
39702   case $STRIP in
39703   [\\/]* | ?:[\\/]*)
39704   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39705   ;;
39706   *)
39707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39708 for as_dir in $PATH
39709 do
39710   IFS=$as_save_IFS
39711   test -z "$as_dir" && as_dir=.
39712     for ac_exec_ext in '' $ac_executable_extensions; do
39713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39714     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39716     break 2
39717   fi
39718 done
39719   done
39720 IFS=$as_save_IFS
39721 
39722   ;;
39723 esac
39724 fi
39725 STRIP=$ac_cv_path_STRIP
39726 if test -n "$STRIP"; then
39727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39728 $as_echo "$STRIP" >&6; }
39729 else
39730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39731 $as_echo "no" >&6; }
39732 fi
39733 
39734 
39735           if test "x$STRIP" = x; then
39736             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39737           fi
39738         else
39739           # Otherwise we believe it is a complete path. Use it as it is.
39740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39741 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39742           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39743 $as_echo_n "checking for STRIP... " >&6; }
39744           if test ! -x "$tool_specified"; then
39745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39746 $as_echo "not found" >&6; }
39747             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39748           fi
39749           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39750 $as_echo "$tool_specified" >&6; }
39751         fi
39752       fi
39753     fi
39754 
39755   fi
39756 
39757 
39758 
39759   # Only process if variable expands to non-empty
39760 
39761   if test "x$STRIP" != x; then
39762     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39763 
39764   # First separate the path from the arguments. This will split at the first
39765   # space.
39766   complete="$STRIP"
39767   path="${complete%% *}"
39768   tmp="$complete EOL"
39769   arguments="${tmp#* }"
39770 
39771   # Input might be given as Windows format, start by converting to
39772   # unix format.
39773   new_path=`$CYGPATH -u "$path"`
39774 
39775   # Now try to locate executable using which
39776   new_path=`$WHICH "$new_path" 2> /dev/null`
39777   # bat and cmd files are not always considered executable in cygwin causing which
39778   # to not find them
39779   if test "x$new_path" = x \
39780       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39781       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39782     new_path=`$CYGPATH -u "$path"`
39783   fi
39784   if test "x$new_path" = x; then
39785     # Oops. Which didn't find the executable.
39786     # The splitting of arguments from the executable at a space might have been incorrect,
39787     # since paths with space are more likely in Windows. Give it another try with the whole
39788     # argument.
39789     path="$complete"
39790     arguments="EOL"
39791     new_path=`$CYGPATH -u "$path"`
39792     new_path=`$WHICH "$new_path" 2> /dev/null`
39793     # bat and cmd files are not always considered executable in cygwin causing which
39794     # to not find them
39795     if test "x$new_path" = x \
39796         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39797         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39798       new_path=`$CYGPATH -u "$path"`
39799     fi
39800     if test "x$new_path" = x; then
39801       # It's still not found. Now this is an unrecoverable error.
39802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39803 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39804       has_space=`$ECHO "$complete" | $GREP " "`
39805       if test "x$has_space" != x; then
39806         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39807 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39808       fi
39809       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39810     fi
39811   fi
39812 
39813   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39814   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39815   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39816   # "foo.exe" is OK but "foo" is an error.
39817   #
39818   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39819   # It is also a way to make sure we got the proper file name for the real test later on.
39820   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39821   if test "x$test_shortpath" = x; then
39822     # Short path failed, file does not exist as specified.
39823     # Try adding .exe or .cmd
39824     if test -f "${new_path}.exe"; then
39825       input_to_shortpath="${new_path}.exe"
39826     elif test -f "${new_path}.cmd"; then
39827       input_to_shortpath="${new_path}.cmd"
39828     else
39829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39830 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39831       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39832 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39833       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39834     fi
39835   else
39836     input_to_shortpath="$new_path"
39837   fi
39838 
39839   # Call helper function which possibly converts this using DOS-style short mode.
39840   # If so, the updated path is stored in $new_path.
39841   new_path="$input_to_shortpath"
39842 
39843   input_path="$input_to_shortpath"
39844   # Check if we need to convert this using DOS-style short mode. If the path
39845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39846   # take no chances and rewrite it.
39847   # Note: m4 eats our [], so we need to use [ and ] instead.
39848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39849   if test "x$has_forbidden_chars" != x; then
39850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39851     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39852     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39853     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39854       # Going to short mode and back again did indeed matter. Since short mode is
39855       # case insensitive, let's make it lowercase to improve readability.
39856       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39857       # Now convert it back to Unix-style (cygpath)
39858       input_path=`$CYGPATH -u "$shortmode_path"`
39859       new_path="$input_path"
39860     fi
39861   fi
39862 
39863   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39864   if test "x$test_cygdrive_prefix" = x; then
39865     # As a simple fix, exclude /usr/bin since it's not a real path.
39866     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39867       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39868       # a path prefixed by /cygdrive for fixpath to work.
39869       new_path="$CYGWIN_ROOT_PATH$input_path"
39870     fi
39871   fi
39872 
39873   # remove trailing .exe if any
39874   new_path="${new_path/%.exe/}"
39875 
39876     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39877 
39878   # First separate the path from the arguments. This will split at the first
39879   # space.
39880   complete="$STRIP"
39881   path="${complete%% *}"
39882   tmp="$complete EOL"
39883   arguments="${tmp#* }"
39884 
39885   # Input might be given as Windows format, start by converting to
39886   # unix format.
39887   new_path="$path"
39888 
39889   windows_path="$new_path"
39890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39891     unix_path=`$CYGPATH -u "$windows_path"`
39892     new_path="$unix_path"
39893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39894     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39895     new_path="$unix_path"
39896   fi
39897 
39898 
39899   # Now try to locate executable using which
39900   new_path=`$WHICH "$new_path" 2> /dev/null`
39901 
39902   if test "x$new_path" = x; then
39903     # Oops. Which didn't find the executable.
39904     # The splitting of arguments from the executable at a space might have been incorrect,
39905     # since paths with space are more likely in Windows. Give it another try with the whole
39906     # argument.
39907     path="$complete"
39908     arguments="EOL"
39909     new_path="$path"
39910 
39911   windows_path="$new_path"
39912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39913     unix_path=`$CYGPATH -u "$windows_path"`
39914     new_path="$unix_path"
39915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39917     new_path="$unix_path"
39918   fi
39919 
39920 
39921     new_path=`$WHICH "$new_path" 2> /dev/null`
39922     # bat and cmd files are not always considered executable in MSYS causing which
39923     # to not find them
39924     if test "x$new_path" = x \
39925         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39926         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39927       new_path="$path"
39928 
39929   windows_path="$new_path"
39930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39931     unix_path=`$CYGPATH -u "$windows_path"`
39932     new_path="$unix_path"
39933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39935     new_path="$unix_path"
39936   fi
39937 
39938     fi
39939 
39940     if test "x$new_path" = x; then
39941       # It's still not found. Now this is an unrecoverable error.
39942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39943 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39944       has_space=`$ECHO "$complete" | $GREP " "`
39945       if test "x$has_space" != x; then
39946         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39947 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39948       fi
39949       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39950     fi
39951   fi
39952 
39953   # Now new_path has a complete unix path to the binary
39954   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39955     # Keep paths in /bin as-is, but remove trailing .exe if any
39956     new_path="${new_path/%.exe/}"
39957     # Do not save /bin paths to all_fixpath_prefixes!
39958   else
39959     # Not in mixed or Windows style, start by that.
39960     new_path=`cmd //c echo $new_path`
39961 
39962   input_path="$new_path"
39963   # Check if we need to convert this using DOS-style short mode. If the path
39964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39965   # take no chances and rewrite it.
39966   # Note: m4 eats our [], so we need to use [ and ] instead.
39967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39968   if test "x$has_forbidden_chars" != x; then
39969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39970     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39971   fi
39972 
39973     # Output is in $new_path
39974 
39975   windows_path="$new_path"
39976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39977     unix_path=`$CYGPATH -u "$windows_path"`
39978     new_path="$unix_path"
39979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39981     new_path="$unix_path"
39982   fi
39983 
39984     # remove trailing .exe if any
39985     new_path="${new_path/%.exe/}"
39986 
39987     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39988     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39989   fi
39990 
39991     else
39992       # We're on a unix platform. Hooray! :)
39993       # First separate the path from the arguments. This will split at the first
39994       # space.
39995       complete="$STRIP"
39996       path="${complete%% *}"
39997       tmp="$complete EOL"
39998       arguments="${tmp#* }"
39999 
40000       # Cannot rely on the command "which" here since it doesn't always work.
40001       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40002       if test -z "$is_absolute_path"; then
40003         # Path to executable is not absolute. Find it.
40004         IFS_save="$IFS"
40005         IFS=:
40006         for p in $PATH; do
40007           if test -f "$p/$path" && test -x "$p/$path"; then
40008             new_path="$p/$path"
40009             break
40010           fi
40011         done
40012         IFS="$IFS_save"
40013       else
40014         # This is an absolute path, we can use it without further modifications.
40015         new_path="$path"
40016       fi
40017 
40018       if test "x$new_path" = x; then
40019         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40020 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40021         has_space=`$ECHO "$complete" | $GREP " "`
40022         if test "x$has_space" != x; then
40023           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40024 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40025         fi
40026         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40027       fi
40028     fi
40029 
40030     # Now join together the path and the arguments once again
40031     if test "x$arguments" != xEOL; then
40032       new_complete="$new_path ${arguments% *}"
40033     else
40034       new_complete="$new_path"
40035     fi
40036 
40037     if test "x$complete" != "x$new_complete"; then
40038       STRIP="$new_complete"
40039       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40040 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40041     fi
40042   fi
40043 
40044 
40045 
40046   # Publish this variable in the help.
40047 
40048 
40049   if [ -z "${NM+x}" ]; then
40050     # The variable is not set by user, try to locate tool using the code snippet
40051     for ac_prog in nm
40052 do
40053   # Extract the first word of "$ac_prog", so it can be a program name with args.
40054 set dummy $ac_prog; ac_word=$2
40055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40056 $as_echo_n "checking for $ac_word... " >&6; }
40057 if ${ac_cv_path_NM+:} false; then :
40058   $as_echo_n "(cached) " >&6
40059 else
40060   case $NM in
40061   [\\/]* | ?:[\\/]*)
40062   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40063   ;;
40064   *)
40065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40066 for as_dir in $PATH
40067 do
40068   IFS=$as_save_IFS
40069   test -z "$as_dir" && as_dir=.
40070     for ac_exec_ext in '' $ac_executable_extensions; do
40071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40072     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40074     break 2
40075   fi
40076 done
40077   done
40078 IFS=$as_save_IFS
40079 
40080   ;;
40081 esac
40082 fi
40083 NM=$ac_cv_path_NM
40084 if test -n "$NM"; then
40085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40086 $as_echo "$NM" >&6; }
40087 else
40088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40089 $as_echo "no" >&6; }
40090 fi
40091 
40092 
40093   test -n "$NM" && break
40094 done
40095 
40096   else
40097     # The variable is set, but is it from the command line or the environment?
40098 
40099     # Try to remove the string !NM! from our list.
40100     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40101     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40102       # If it failed, the variable was not from the command line. Ignore it,
40103       # but warn the user (except for BASH, which is always set by the calling BASH).
40104       if test "xNM" != xBASH; then
40105         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40106 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40107       fi
40108       # Try to locate tool using the code snippet
40109       for ac_prog in nm
40110 do
40111   # Extract the first word of "$ac_prog", so it can be a program name with args.
40112 set dummy $ac_prog; ac_word=$2
40113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40114 $as_echo_n "checking for $ac_word... " >&6; }
40115 if ${ac_cv_path_NM+:} false; then :
40116   $as_echo_n "(cached) " >&6
40117 else
40118   case $NM in
40119   [\\/]* | ?:[\\/]*)
40120   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40121   ;;
40122   *)
40123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40124 for as_dir in $PATH
40125 do
40126   IFS=$as_save_IFS
40127   test -z "$as_dir" && as_dir=.
40128     for ac_exec_ext in '' $ac_executable_extensions; do
40129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40130     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40132     break 2
40133   fi
40134 done
40135   done
40136 IFS=$as_save_IFS
40137 
40138   ;;
40139 esac
40140 fi
40141 NM=$ac_cv_path_NM
40142 if test -n "$NM"; then
40143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40144 $as_echo "$NM" >&6; }
40145 else
40146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40147 $as_echo "no" >&6; }
40148 fi
40149 
40150 
40151   test -n "$NM" && break
40152 done
40153 
40154     else
40155       # If it succeeded, then it was overridden by the user. We will use it
40156       # for the tool.
40157 
40158       # First remove it from the list of overridden variables, so we can test
40159       # for unknown variables in the end.
40160       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40161 
40162       # Check if we try to supply an empty value
40163       if test "x$NM" = x; then
40164         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40165 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40166         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40167 $as_echo_n "checking for NM... " >&6; }
40168         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40169 $as_echo "disabled" >&6; }
40170       else
40171         # Check if the provided tool contains a complete path.
40172         tool_specified="$NM"
40173         tool_basename="${tool_specified##*/}"
40174         if test "x$tool_basename" = "x$tool_specified"; then
40175           # A command without a complete path is provided, search $PATH.
40176           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40177 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40178           # Extract the first word of "$tool_basename", so it can be a program name with args.
40179 set dummy $tool_basename; ac_word=$2
40180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40181 $as_echo_n "checking for $ac_word... " >&6; }
40182 if ${ac_cv_path_NM+:} false; then :
40183   $as_echo_n "(cached) " >&6
40184 else
40185   case $NM in
40186   [\\/]* | ?:[\\/]*)
40187   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40188   ;;
40189   *)
40190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40191 for as_dir in $PATH
40192 do
40193   IFS=$as_save_IFS
40194   test -z "$as_dir" && as_dir=.
40195     for ac_exec_ext in '' $ac_executable_extensions; do
40196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40197     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40199     break 2
40200   fi
40201 done
40202   done
40203 IFS=$as_save_IFS
40204 
40205   ;;
40206 esac
40207 fi
40208 NM=$ac_cv_path_NM
40209 if test -n "$NM"; then
40210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40211 $as_echo "$NM" >&6; }
40212 else
40213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40214 $as_echo "no" >&6; }
40215 fi
40216 
40217 
40218           if test "x$NM" = x; then
40219             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40220           fi
40221         else
40222           # Otherwise we believe it is a complete path. Use it as it is.
40223           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40224 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40225           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40226 $as_echo_n "checking for NM... " >&6; }
40227           if test ! -x "$tool_specified"; then
40228             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40229 $as_echo "not found" >&6; }
40230             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40231           fi
40232           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40233 $as_echo "$tool_specified" >&6; }
40234         fi
40235       fi
40236     fi
40237 
40238   fi
40239 
40240 
40241 
40242   # Only process if variable expands to non-empty
40243 
40244   if test "x$NM" != x; then
40245     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40246 
40247   # First separate the path from the arguments. This will split at the first
40248   # space.
40249   complete="$NM"
40250   path="${complete%% *}"
40251   tmp="$complete EOL"
40252   arguments="${tmp#* }"
40253 
40254   # Input might be given as Windows format, start by converting to
40255   # unix format.
40256   new_path=`$CYGPATH -u "$path"`
40257 
40258   # Now try to locate executable using which
40259   new_path=`$WHICH "$new_path" 2> /dev/null`
40260   # bat and cmd files are not always considered executable in cygwin causing which
40261   # to not find them
40262   if test "x$new_path" = x \
40263       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40264       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40265     new_path=`$CYGPATH -u "$path"`
40266   fi
40267   if test "x$new_path" = x; then
40268     # Oops. Which didn't find the executable.
40269     # The splitting of arguments from the executable at a space might have been incorrect,
40270     # since paths with space are more likely in Windows. Give it another try with the whole
40271     # argument.
40272     path="$complete"
40273     arguments="EOL"
40274     new_path=`$CYGPATH -u "$path"`
40275     new_path=`$WHICH "$new_path" 2> /dev/null`
40276     # bat and cmd files are not always considered executable in cygwin causing which
40277     # to not find them
40278     if test "x$new_path" = x \
40279         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40280         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40281       new_path=`$CYGPATH -u "$path"`
40282     fi
40283     if test "x$new_path" = x; then
40284       # It's still not found. Now this is an unrecoverable error.
40285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40286 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40287       has_space=`$ECHO "$complete" | $GREP " "`
40288       if test "x$has_space" != x; then
40289         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40291       fi
40292       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40293     fi
40294   fi
40295 
40296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40299   # "foo.exe" is OK but "foo" is an error.
40300   #
40301   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40302   # It is also a way to make sure we got the proper file name for the real test later on.
40303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40304   if test "x$test_shortpath" = x; then
40305     # Short path failed, file does not exist as specified.
40306     # Try adding .exe or .cmd
40307     if test -f "${new_path}.exe"; then
40308       input_to_shortpath="${new_path}.exe"
40309     elif test -f "${new_path}.cmd"; then
40310       input_to_shortpath="${new_path}.cmd"
40311     else
40312       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40313 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40314       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40315 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40316       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40317     fi
40318   else
40319     input_to_shortpath="$new_path"
40320   fi
40321 
40322   # Call helper function which possibly converts this using DOS-style short mode.
40323   # If so, the updated path is stored in $new_path.
40324   new_path="$input_to_shortpath"
40325 
40326   input_path="$input_to_shortpath"
40327   # Check if we need to convert this using DOS-style short mode. If the path
40328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40329   # take no chances and rewrite it.
40330   # Note: m4 eats our [], so we need to use [ and ] instead.
40331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40332   if test "x$has_forbidden_chars" != x; then
40333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40334     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40335     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40336     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40337       # Going to short mode and back again did indeed matter. Since short mode is
40338       # case insensitive, let's make it lowercase to improve readability.
40339       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40340       # Now convert it back to Unix-style (cygpath)
40341       input_path=`$CYGPATH -u "$shortmode_path"`
40342       new_path="$input_path"
40343     fi
40344   fi
40345 
40346   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40347   if test "x$test_cygdrive_prefix" = x; then
40348     # As a simple fix, exclude /usr/bin since it's not a real path.
40349     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40350       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40351       # a path prefixed by /cygdrive for fixpath to work.
40352       new_path="$CYGWIN_ROOT_PATH$input_path"
40353     fi
40354   fi
40355 
40356   # remove trailing .exe if any
40357   new_path="${new_path/%.exe/}"
40358 
40359     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40360 
40361   # First separate the path from the arguments. This will split at the first
40362   # space.
40363   complete="$NM"
40364   path="${complete%% *}"
40365   tmp="$complete EOL"
40366   arguments="${tmp#* }"
40367 
40368   # Input might be given as Windows format, start by converting to
40369   # unix format.
40370   new_path="$path"
40371 
40372   windows_path="$new_path"
40373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40374     unix_path=`$CYGPATH -u "$windows_path"`
40375     new_path="$unix_path"
40376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40378     new_path="$unix_path"
40379   fi
40380 
40381 
40382   # Now try to locate executable using which
40383   new_path=`$WHICH "$new_path" 2> /dev/null`
40384 
40385   if test "x$new_path" = x; then
40386     # Oops. Which didn't find the executable.
40387     # The splitting of arguments from the executable at a space might have been incorrect,
40388     # since paths with space are more likely in Windows. Give it another try with the whole
40389     # argument.
40390     path="$complete"
40391     arguments="EOL"
40392     new_path="$path"
40393 
40394   windows_path="$new_path"
40395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40396     unix_path=`$CYGPATH -u "$windows_path"`
40397     new_path="$unix_path"
40398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40400     new_path="$unix_path"
40401   fi
40402 
40403 
40404     new_path=`$WHICH "$new_path" 2> /dev/null`
40405     # bat and cmd files are not always considered executable in MSYS causing which
40406     # to not find them
40407     if test "x$new_path" = x \
40408         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40409         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40410       new_path="$path"
40411 
40412   windows_path="$new_path"
40413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40414     unix_path=`$CYGPATH -u "$windows_path"`
40415     new_path="$unix_path"
40416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40418     new_path="$unix_path"
40419   fi
40420 
40421     fi
40422 
40423     if test "x$new_path" = x; then
40424       # It's still not found. Now this is an unrecoverable error.
40425       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40426 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40427       has_space=`$ECHO "$complete" | $GREP " "`
40428       if test "x$has_space" != x; then
40429         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40430 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40431       fi
40432       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40433     fi
40434   fi
40435 
40436   # Now new_path has a complete unix path to the binary
40437   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40438     # Keep paths in /bin as-is, but remove trailing .exe if any
40439     new_path="${new_path/%.exe/}"
40440     # Do not save /bin paths to all_fixpath_prefixes!
40441   else
40442     # Not in mixed or Windows style, start by that.
40443     new_path=`cmd //c echo $new_path`
40444 
40445   input_path="$new_path"
40446   # Check if we need to convert this using DOS-style short mode. If the path
40447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40448   # take no chances and rewrite it.
40449   # Note: m4 eats our [], so we need to use [ and ] instead.
40450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40451   if test "x$has_forbidden_chars" != x; then
40452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40453     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40454   fi
40455 
40456     # Output is in $new_path
40457 
40458   windows_path="$new_path"
40459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40460     unix_path=`$CYGPATH -u "$windows_path"`
40461     new_path="$unix_path"
40462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40464     new_path="$unix_path"
40465   fi
40466 
40467     # remove trailing .exe if any
40468     new_path="${new_path/%.exe/}"
40469 
40470     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40471     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40472   fi
40473 
40474     else
40475       # We're on a unix platform. Hooray! :)
40476       # First separate the path from the arguments. This will split at the first
40477       # space.
40478       complete="$NM"
40479       path="${complete%% *}"
40480       tmp="$complete EOL"
40481       arguments="${tmp#* }"
40482 
40483       # Cannot rely on the command "which" here since it doesn't always work.
40484       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40485       if test -z "$is_absolute_path"; then
40486         # Path to executable is not absolute. Find it.
40487         IFS_save="$IFS"
40488         IFS=:
40489         for p in $PATH; do
40490           if test -f "$p/$path" && test -x "$p/$path"; then
40491             new_path="$p/$path"
40492             break
40493           fi
40494         done
40495         IFS="$IFS_save"
40496       else
40497         # This is an absolute path, we can use it without further modifications.
40498         new_path="$path"
40499       fi
40500 
40501       if test "x$new_path" = x; then
40502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40503 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40504         has_space=`$ECHO "$complete" | $GREP " "`
40505         if test "x$has_space" != x; then
40506           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40507 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40508         fi
40509         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40510       fi
40511     fi
40512 
40513     # Now join together the path and the arguments once again
40514     if test "x$arguments" != xEOL; then
40515       new_complete="$new_path ${arguments% *}"
40516     else
40517       new_complete="$new_path"
40518     fi
40519 
40520     if test "x$complete" != "x$new_complete"; then
40521       NM="$new_complete"
40522       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40523 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40524     fi
40525   fi
40526 
40527 
40528 
40529   # Publish this variable in the help.
40530 
40531 
40532   if [ -z "${GNM+x}" ]; then
40533     # The variable is not set by user, try to locate tool using the code snippet
40534     for ac_prog in gnm
40535 do
40536   # Extract the first word of "$ac_prog", so it can be a program name with args.
40537 set dummy $ac_prog; ac_word=$2
40538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40539 $as_echo_n "checking for $ac_word... " >&6; }
40540 if ${ac_cv_path_GNM+:} false; then :
40541   $as_echo_n "(cached) " >&6
40542 else
40543   case $GNM in
40544   [\\/]* | ?:[\\/]*)
40545   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40546   ;;
40547   *)
40548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40549 for as_dir in $PATH
40550 do
40551   IFS=$as_save_IFS
40552   test -z "$as_dir" && as_dir=.
40553     for ac_exec_ext in '' $ac_executable_extensions; do
40554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40555     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40557     break 2
40558   fi
40559 done
40560   done
40561 IFS=$as_save_IFS
40562 
40563   ;;
40564 esac
40565 fi
40566 GNM=$ac_cv_path_GNM
40567 if test -n "$GNM"; then
40568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40569 $as_echo "$GNM" >&6; }
40570 else
40571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40572 $as_echo "no" >&6; }
40573 fi
40574 
40575 
40576   test -n "$GNM" && break
40577 done
40578 
40579   else
40580     # The variable is set, but is it from the command line or the environment?
40581 
40582     # Try to remove the string !GNM! from our list.
40583     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40584     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40585       # If it failed, the variable was not from the command line. Ignore it,
40586       # but warn the user (except for BASH, which is always set by the calling BASH).
40587       if test "xGNM" != xBASH; then
40588         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40589 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40590       fi
40591       # Try to locate tool using the code snippet
40592       for ac_prog in gnm
40593 do
40594   # Extract the first word of "$ac_prog", so it can be a program name with args.
40595 set dummy $ac_prog; ac_word=$2
40596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40597 $as_echo_n "checking for $ac_word... " >&6; }
40598 if ${ac_cv_path_GNM+:} false; then :
40599   $as_echo_n "(cached) " >&6
40600 else
40601   case $GNM in
40602   [\\/]* | ?:[\\/]*)
40603   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40604   ;;
40605   *)
40606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40607 for as_dir in $PATH
40608 do
40609   IFS=$as_save_IFS
40610   test -z "$as_dir" && as_dir=.
40611     for ac_exec_ext in '' $ac_executable_extensions; do
40612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40613     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40615     break 2
40616   fi
40617 done
40618   done
40619 IFS=$as_save_IFS
40620 
40621   ;;
40622 esac
40623 fi
40624 GNM=$ac_cv_path_GNM
40625 if test -n "$GNM"; then
40626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40627 $as_echo "$GNM" >&6; }
40628 else
40629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40630 $as_echo "no" >&6; }
40631 fi
40632 
40633 
40634   test -n "$GNM" && break
40635 done
40636 
40637     else
40638       # If it succeeded, then it was overridden by the user. We will use it
40639       # for the tool.
40640 
40641       # First remove it from the list of overridden variables, so we can test
40642       # for unknown variables in the end.
40643       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40644 
40645       # Check if we try to supply an empty value
40646       if test "x$GNM" = x; then
40647         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40648 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40649         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40650 $as_echo_n "checking for GNM... " >&6; }
40651         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40652 $as_echo "disabled" >&6; }
40653       else
40654         # Check if the provided tool contains a complete path.
40655         tool_specified="$GNM"
40656         tool_basename="${tool_specified##*/}"
40657         if test "x$tool_basename" = "x$tool_specified"; then
40658           # A command without a complete path is provided, search $PATH.
40659           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40660 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40661           # Extract the first word of "$tool_basename", so it can be a program name with args.
40662 set dummy $tool_basename; ac_word=$2
40663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40664 $as_echo_n "checking for $ac_word... " >&6; }
40665 if ${ac_cv_path_GNM+:} false; then :
40666   $as_echo_n "(cached) " >&6
40667 else
40668   case $GNM in
40669   [\\/]* | ?:[\\/]*)
40670   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40671   ;;
40672   *)
40673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40674 for as_dir in $PATH
40675 do
40676   IFS=$as_save_IFS
40677   test -z "$as_dir" && as_dir=.
40678     for ac_exec_ext in '' $ac_executable_extensions; do
40679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40680     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40682     break 2
40683   fi
40684 done
40685   done
40686 IFS=$as_save_IFS
40687 
40688   ;;
40689 esac
40690 fi
40691 GNM=$ac_cv_path_GNM
40692 if test -n "$GNM"; then
40693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40694 $as_echo "$GNM" >&6; }
40695 else
40696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40697 $as_echo "no" >&6; }
40698 fi
40699 
40700 
40701           if test "x$GNM" = x; then
40702             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40703           fi
40704         else
40705           # Otherwise we believe it is a complete path. Use it as it is.
40706           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40707 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40708           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40709 $as_echo_n "checking for GNM... " >&6; }
40710           if test ! -x "$tool_specified"; then
40711             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40712 $as_echo "not found" >&6; }
40713             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40714           fi
40715           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40716 $as_echo "$tool_specified" >&6; }
40717         fi
40718       fi
40719     fi
40720 
40721   fi
40722 
40723 
40724 
40725   # Only process if variable expands to non-empty
40726 
40727   if test "x$GNM" != x; then
40728     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40729 
40730   # First separate the path from the arguments. This will split at the first
40731   # space.
40732   complete="$GNM"
40733   path="${complete%% *}"
40734   tmp="$complete EOL"
40735   arguments="${tmp#* }"
40736 
40737   # Input might be given as Windows format, start by converting to
40738   # unix format.
40739   new_path=`$CYGPATH -u "$path"`
40740 
40741   # Now try to locate executable using which
40742   new_path=`$WHICH "$new_path" 2> /dev/null`
40743   # bat and cmd files are not always considered executable in cygwin causing which
40744   # to not find them
40745   if test "x$new_path" = x \
40746       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40747       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40748     new_path=`$CYGPATH -u "$path"`
40749   fi
40750   if test "x$new_path" = x; then
40751     # Oops. Which didn't find the executable.
40752     # The splitting of arguments from the executable at a space might have been incorrect,
40753     # since paths with space are more likely in Windows. Give it another try with the whole
40754     # argument.
40755     path="$complete"
40756     arguments="EOL"
40757     new_path=`$CYGPATH -u "$path"`
40758     new_path=`$WHICH "$new_path" 2> /dev/null`
40759     # bat and cmd files are not always considered executable in cygwin causing which
40760     # to not find them
40761     if test "x$new_path" = x \
40762         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40763         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40764       new_path=`$CYGPATH -u "$path"`
40765     fi
40766     if test "x$new_path" = x; then
40767       # It's still not found. Now this is an unrecoverable error.
40768       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40769 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40770       has_space=`$ECHO "$complete" | $GREP " "`
40771       if test "x$has_space" != x; then
40772         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40773 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40774       fi
40775       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40776     fi
40777   fi
40778 
40779   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40780   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40781   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40782   # "foo.exe" is OK but "foo" is an error.
40783   #
40784   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40785   # It is also a way to make sure we got the proper file name for the real test later on.
40786   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40787   if test "x$test_shortpath" = x; then
40788     # Short path failed, file does not exist as specified.
40789     # Try adding .exe or .cmd
40790     if test -f "${new_path}.exe"; then
40791       input_to_shortpath="${new_path}.exe"
40792     elif test -f "${new_path}.cmd"; then
40793       input_to_shortpath="${new_path}.cmd"
40794     else
40795       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40796 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40797       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40798 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40799       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40800     fi
40801   else
40802     input_to_shortpath="$new_path"
40803   fi
40804 
40805   # Call helper function which possibly converts this using DOS-style short mode.
40806   # If so, the updated path is stored in $new_path.
40807   new_path="$input_to_shortpath"
40808 
40809   input_path="$input_to_shortpath"
40810   # Check if we need to convert this using DOS-style short mode. If the path
40811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40812   # take no chances and rewrite it.
40813   # Note: m4 eats our [], so we need to use [ and ] instead.
40814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40815   if test "x$has_forbidden_chars" != x; then
40816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40817     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40818     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40819     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40820       # Going to short mode and back again did indeed matter. Since short mode is
40821       # case insensitive, let's make it lowercase to improve readability.
40822       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40823       # Now convert it back to Unix-style (cygpath)
40824       input_path=`$CYGPATH -u "$shortmode_path"`
40825       new_path="$input_path"
40826     fi
40827   fi
40828 
40829   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40830   if test "x$test_cygdrive_prefix" = x; then
40831     # As a simple fix, exclude /usr/bin since it's not a real path.
40832     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40833       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40834       # a path prefixed by /cygdrive for fixpath to work.
40835       new_path="$CYGWIN_ROOT_PATH$input_path"
40836     fi
40837   fi
40838 
40839   # remove trailing .exe if any
40840   new_path="${new_path/%.exe/}"
40841 
40842     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40843 
40844   # First separate the path from the arguments. This will split at the first
40845   # space.
40846   complete="$GNM"
40847   path="${complete%% *}"
40848   tmp="$complete EOL"
40849   arguments="${tmp#* }"
40850 
40851   # Input might be given as Windows format, start by converting to
40852   # unix format.
40853   new_path="$path"
40854 
40855   windows_path="$new_path"
40856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40857     unix_path=`$CYGPATH -u "$windows_path"`
40858     new_path="$unix_path"
40859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40860     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40861     new_path="$unix_path"
40862   fi
40863 
40864 
40865   # Now try to locate executable using which
40866   new_path=`$WHICH "$new_path" 2> /dev/null`
40867 
40868   if test "x$new_path" = x; then
40869     # Oops. Which didn't find the executable.
40870     # The splitting of arguments from the executable at a space might have been incorrect,
40871     # since paths with space are more likely in Windows. Give it another try with the whole
40872     # argument.
40873     path="$complete"
40874     arguments="EOL"
40875     new_path="$path"
40876 
40877   windows_path="$new_path"
40878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40879     unix_path=`$CYGPATH -u "$windows_path"`
40880     new_path="$unix_path"
40881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40883     new_path="$unix_path"
40884   fi
40885 
40886 
40887     new_path=`$WHICH "$new_path" 2> /dev/null`
40888     # bat and cmd files are not always considered executable in MSYS causing which
40889     # to not find them
40890     if test "x$new_path" = x \
40891         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40892         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40893       new_path="$path"
40894 
40895   windows_path="$new_path"
40896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40897     unix_path=`$CYGPATH -u "$windows_path"`
40898     new_path="$unix_path"
40899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40901     new_path="$unix_path"
40902   fi
40903 
40904     fi
40905 
40906     if test "x$new_path" = x; then
40907       # It's still not found. Now this is an unrecoverable error.
40908       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40909 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40910       has_space=`$ECHO "$complete" | $GREP " "`
40911       if test "x$has_space" != x; then
40912         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40913 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40914       fi
40915       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40916     fi
40917   fi
40918 
40919   # Now new_path has a complete unix path to the binary
40920   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40921     # Keep paths in /bin as-is, but remove trailing .exe if any
40922     new_path="${new_path/%.exe/}"
40923     # Do not save /bin paths to all_fixpath_prefixes!
40924   else
40925     # Not in mixed or Windows style, start by that.
40926     new_path=`cmd //c echo $new_path`
40927 
40928   input_path="$new_path"
40929   # Check if we need to convert this using DOS-style short mode. If the path
40930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40931   # take no chances and rewrite it.
40932   # Note: m4 eats our [], so we need to use [ and ] instead.
40933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40934   if test "x$has_forbidden_chars" != x; then
40935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40937   fi
40938 
40939     # Output is in $new_path
40940 
40941   windows_path="$new_path"
40942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40943     unix_path=`$CYGPATH -u "$windows_path"`
40944     new_path="$unix_path"
40945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40947     new_path="$unix_path"
40948   fi
40949 
40950     # remove trailing .exe if any
40951     new_path="${new_path/%.exe/}"
40952 
40953     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40954     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40955   fi
40956 
40957     else
40958       # We're on a unix platform. Hooray! :)
40959       # First separate the path from the arguments. This will split at the first
40960       # space.
40961       complete="$GNM"
40962       path="${complete%% *}"
40963       tmp="$complete EOL"
40964       arguments="${tmp#* }"
40965 
40966       # Cannot rely on the command "which" here since it doesn't always work.
40967       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40968       if test -z "$is_absolute_path"; then
40969         # Path to executable is not absolute. Find it.
40970         IFS_save="$IFS"
40971         IFS=:
40972         for p in $PATH; do
40973           if test -f "$p/$path" && test -x "$p/$path"; then
40974             new_path="$p/$path"
40975             break
40976           fi
40977         done
40978         IFS="$IFS_save"
40979       else
40980         # This is an absolute path, we can use it without further modifications.
40981         new_path="$path"
40982       fi
40983 
40984       if test "x$new_path" = x; then
40985         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40986 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40987         has_space=`$ECHO "$complete" | $GREP " "`
40988         if test "x$has_space" != x; then
40989           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40990 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40991         fi
40992         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40993       fi
40994     fi
40995 
40996     # Now join together the path and the arguments once again
40997     if test "x$arguments" != xEOL; then
40998       new_complete="$new_path ${arguments% *}"
40999     else
41000       new_complete="$new_path"
41001     fi
41002 
41003     if test "x$complete" != "x$new_complete"; then
41004       GNM="$new_complete"
41005       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41006 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41007     fi
41008   fi
41009 
41010   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41011     # FIXME: we should unify this with the solaris case above.
41012 
41013 
41014   # Publish this variable in the help.
41015 
41016 
41017   if [ -z "${STRIP+x}" ]; then
41018     # The variable is not set by user, try to locate tool using the code snippet
41019     if test -n "$ac_tool_prefix"; then
41020   for ac_prog in strip
41021   do
41022     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41023 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41025 $as_echo_n "checking for $ac_word... " >&6; }
41026 if ${ac_cv_prog_STRIP+:} false; then :
41027   $as_echo_n "(cached) " >&6
41028 else
41029   if test -n "$STRIP"; then
41030   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41031 else
41032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41033 for as_dir in $PATH
41034 do
41035   IFS=$as_save_IFS
41036   test -z "$as_dir" && as_dir=.
41037     for ac_exec_ext in '' $ac_executable_extensions; do
41038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41039     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41041     break 2
41042   fi
41043 done
41044   done
41045 IFS=$as_save_IFS
41046 
41047 fi
41048 fi
41049 STRIP=$ac_cv_prog_STRIP
41050 if test -n "$STRIP"; then
41051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41052 $as_echo "$STRIP" >&6; }
41053 else
41054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41055 $as_echo "no" >&6; }
41056 fi
41057 
41058 
41059     test -n "$STRIP" && break
41060   done
41061 fi
41062 if test -z "$STRIP"; then
41063   ac_ct_STRIP=$STRIP
41064   for ac_prog in strip
41065 do
41066   # Extract the first word of "$ac_prog", so it can be a program name with args.
41067 set dummy $ac_prog; ac_word=$2
41068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41069 $as_echo_n "checking for $ac_word... " >&6; }
41070 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41071   $as_echo_n "(cached) " >&6
41072 else
41073   if test -n "$ac_ct_STRIP"; then
41074   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41075 else
41076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41077 for as_dir in $PATH
41078 do
41079   IFS=$as_save_IFS
41080   test -z "$as_dir" && as_dir=.
41081     for ac_exec_ext in '' $ac_executable_extensions; do
41082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41083     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41085     break 2
41086   fi
41087 done
41088   done
41089 IFS=$as_save_IFS
41090 
41091 fi
41092 fi
41093 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41094 if test -n "$ac_ct_STRIP"; then
41095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41096 $as_echo "$ac_ct_STRIP" >&6; }
41097 else
41098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41099 $as_echo "no" >&6; }
41100 fi
41101 
41102 
41103   test -n "$ac_ct_STRIP" && break
41104 done
41105 
41106   if test "x$ac_ct_STRIP" = x; then
41107     STRIP=""
41108   else
41109     case $cross_compiling:$ac_tool_warned in
41110 yes:)
41111 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41112 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41113 ac_tool_warned=yes ;;
41114 esac
41115     STRIP=$ac_ct_STRIP
41116   fi
41117 fi
41118 
41119   else
41120     # The variable is set, but is it from the command line or the environment?
41121 
41122     # Try to remove the string !STRIP! from our list.
41123     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41124     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41125       # If it failed, the variable was not from the command line. Ignore it,
41126       # but warn the user (except for BASH, which is always set by the calling BASH).
41127       if test "xSTRIP" != xBASH; then
41128         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41129 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41130       fi
41131       # Try to locate tool using the code snippet
41132       if test -n "$ac_tool_prefix"; then
41133   for ac_prog in strip
41134   do
41135     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41136 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41138 $as_echo_n "checking for $ac_word... " >&6; }
41139 if ${ac_cv_prog_STRIP+:} false; then :
41140   $as_echo_n "(cached) " >&6
41141 else
41142   if test -n "$STRIP"; then
41143   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41144 else
41145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41146 for as_dir in $PATH
41147 do
41148   IFS=$as_save_IFS
41149   test -z "$as_dir" && as_dir=.
41150     for ac_exec_ext in '' $ac_executable_extensions; do
41151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41152     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41154     break 2
41155   fi
41156 done
41157   done
41158 IFS=$as_save_IFS
41159 
41160 fi
41161 fi
41162 STRIP=$ac_cv_prog_STRIP
41163 if test -n "$STRIP"; then
41164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41165 $as_echo "$STRIP" >&6; }
41166 else
41167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41168 $as_echo "no" >&6; }
41169 fi
41170 
41171 
41172     test -n "$STRIP" && break
41173   done
41174 fi
41175 if test -z "$STRIP"; then
41176   ac_ct_STRIP=$STRIP
41177   for ac_prog in strip
41178 do
41179   # Extract the first word of "$ac_prog", so it can be a program name with args.
41180 set dummy $ac_prog; ac_word=$2
41181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41182 $as_echo_n "checking for $ac_word... " >&6; }
41183 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41184   $as_echo_n "(cached) " >&6
41185 else
41186   if test -n "$ac_ct_STRIP"; then
41187   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41188 else
41189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41190 for as_dir in $PATH
41191 do
41192   IFS=$as_save_IFS
41193   test -z "$as_dir" && as_dir=.
41194     for ac_exec_ext in '' $ac_executable_extensions; do
41195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41196     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41198     break 2
41199   fi
41200 done
41201   done
41202 IFS=$as_save_IFS
41203 
41204 fi
41205 fi
41206 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41207 if test -n "$ac_ct_STRIP"; then
41208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41209 $as_echo "$ac_ct_STRIP" >&6; }
41210 else
41211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41212 $as_echo "no" >&6; }
41213 fi
41214 
41215 
41216   test -n "$ac_ct_STRIP" && break
41217 done
41218 
41219   if test "x$ac_ct_STRIP" = x; then
41220     STRIP=""
41221   else
41222     case $cross_compiling:$ac_tool_warned in
41223 yes:)
41224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41225 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41226 ac_tool_warned=yes ;;
41227 esac
41228     STRIP=$ac_ct_STRIP
41229   fi
41230 fi
41231 
41232     else
41233       # If it succeeded, then it was overridden by the user. We will use it
41234       # for the tool.
41235 
41236       # First remove it from the list of overridden variables, so we can test
41237       # for unknown variables in the end.
41238       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41239 
41240       # Check if we try to supply an empty value
41241       if test "x$STRIP" = x; then
41242         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41243 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41244         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41245 $as_echo_n "checking for STRIP... " >&6; }
41246         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41247 $as_echo "disabled" >&6; }
41248       else
41249         # Check if the provided tool contains a complete path.
41250         tool_specified="$STRIP"
41251         tool_basename="${tool_specified##*/}"
41252         if test "x$tool_basename" = "x$tool_specified"; then
41253           # A command without a complete path is provided, search $PATH.
41254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41255 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41256           # Extract the first word of "$tool_basename", so it can be a program name with args.
41257 set dummy $tool_basename; ac_word=$2
41258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41259 $as_echo_n "checking for $ac_word... " >&6; }
41260 if ${ac_cv_path_STRIP+:} false; then :
41261   $as_echo_n "(cached) " >&6
41262 else
41263   case $STRIP in
41264   [\\/]* | ?:[\\/]*)
41265   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41266   ;;
41267   *)
41268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41269 for as_dir in $PATH
41270 do
41271   IFS=$as_save_IFS
41272   test -z "$as_dir" && as_dir=.
41273     for ac_exec_ext in '' $ac_executable_extensions; do
41274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41275     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41277     break 2
41278   fi
41279 done
41280   done
41281 IFS=$as_save_IFS
41282 
41283   ;;
41284 esac
41285 fi
41286 STRIP=$ac_cv_path_STRIP
41287 if test -n "$STRIP"; then
41288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41289 $as_echo "$STRIP" >&6; }
41290 else
41291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41292 $as_echo "no" >&6; }
41293 fi
41294 
41295 
41296           if test "x$STRIP" = x; then
41297             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41298           fi
41299         else
41300           # Otherwise we believe it is a complete path. Use it as it is.
41301           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41302 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41303           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41304 $as_echo_n "checking for STRIP... " >&6; }
41305           if test ! -x "$tool_specified"; then
41306             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41307 $as_echo "not found" >&6; }
41308             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41309           fi
41310           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41311 $as_echo "$tool_specified" >&6; }
41312         fi
41313       fi
41314     fi
41315 
41316   fi
41317 
41318 
41319 
41320   # Only process if variable expands to non-empty
41321 
41322   if test "x$STRIP" != x; then
41323     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41324 
41325   # First separate the path from the arguments. This will split at the first
41326   # space.
41327   complete="$STRIP"
41328   path="${complete%% *}"
41329   tmp="$complete EOL"
41330   arguments="${tmp#* }"
41331 
41332   # Input might be given as Windows format, start by converting to
41333   # unix format.
41334   new_path=`$CYGPATH -u "$path"`
41335 
41336   # Now try to locate executable using which
41337   new_path=`$WHICH "$new_path" 2> /dev/null`
41338   # bat and cmd files are not always considered executable in cygwin causing which
41339   # to not find them
41340   if test "x$new_path" = x \
41341       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41342       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41343     new_path=`$CYGPATH -u "$path"`
41344   fi
41345   if test "x$new_path" = x; then
41346     # Oops. Which didn't find the executable.
41347     # The splitting of arguments from the executable at a space might have been incorrect,
41348     # since paths with space are more likely in Windows. Give it another try with the whole
41349     # argument.
41350     path="$complete"
41351     arguments="EOL"
41352     new_path=`$CYGPATH -u "$path"`
41353     new_path=`$WHICH "$new_path" 2> /dev/null`
41354     # bat and cmd files are not always considered executable in cygwin causing which
41355     # to not find them
41356     if test "x$new_path" = x \
41357         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41358         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41359       new_path=`$CYGPATH -u "$path"`
41360     fi
41361     if test "x$new_path" = x; then
41362       # It's still not found. Now this is an unrecoverable error.
41363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41364 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41365       has_space=`$ECHO "$complete" | $GREP " "`
41366       if test "x$has_space" != x; then
41367         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41368 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41369       fi
41370       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41371     fi
41372   fi
41373 
41374   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41375   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41376   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41377   # "foo.exe" is OK but "foo" is an error.
41378   #
41379   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41380   # It is also a way to make sure we got the proper file name for the real test later on.
41381   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41382   if test "x$test_shortpath" = x; then
41383     # Short path failed, file does not exist as specified.
41384     # Try adding .exe or .cmd
41385     if test -f "${new_path}.exe"; then
41386       input_to_shortpath="${new_path}.exe"
41387     elif test -f "${new_path}.cmd"; then
41388       input_to_shortpath="${new_path}.cmd"
41389     else
41390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41391 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41392       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41393 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41394       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41395     fi
41396   else
41397     input_to_shortpath="$new_path"
41398   fi
41399 
41400   # Call helper function which possibly converts this using DOS-style short mode.
41401   # If so, the updated path is stored in $new_path.
41402   new_path="$input_to_shortpath"
41403 
41404   input_path="$input_to_shortpath"
41405   # Check if we need to convert this using DOS-style short mode. If the path
41406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41407   # take no chances and rewrite it.
41408   # Note: m4 eats our [], so we need to use [ and ] instead.
41409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41410   if test "x$has_forbidden_chars" != x; then
41411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41412     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41413     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41414     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41415       # Going to short mode and back again did indeed matter. Since short mode is
41416       # case insensitive, let's make it lowercase to improve readability.
41417       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41418       # Now convert it back to Unix-style (cygpath)
41419       input_path=`$CYGPATH -u "$shortmode_path"`
41420       new_path="$input_path"
41421     fi
41422   fi
41423 
41424   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41425   if test "x$test_cygdrive_prefix" = x; then
41426     # As a simple fix, exclude /usr/bin since it's not a real path.
41427     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41428       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41429       # a path prefixed by /cygdrive for fixpath to work.
41430       new_path="$CYGWIN_ROOT_PATH$input_path"
41431     fi
41432   fi
41433 
41434   # remove trailing .exe if any
41435   new_path="${new_path/%.exe/}"
41436 
41437     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41438 
41439   # First separate the path from the arguments. This will split at the first
41440   # space.
41441   complete="$STRIP"
41442   path="${complete%% *}"
41443   tmp="$complete EOL"
41444   arguments="${tmp#* }"
41445 
41446   # Input might be given as Windows format, start by converting to
41447   # unix format.
41448   new_path="$path"
41449 
41450   windows_path="$new_path"
41451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41452     unix_path=`$CYGPATH -u "$windows_path"`
41453     new_path="$unix_path"
41454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41456     new_path="$unix_path"
41457   fi
41458 
41459 
41460   # Now try to locate executable using which
41461   new_path=`$WHICH "$new_path" 2> /dev/null`
41462 
41463   if test "x$new_path" = x; then
41464     # Oops. Which didn't find the executable.
41465     # The splitting of arguments from the executable at a space might have been incorrect,
41466     # since paths with space are more likely in Windows. Give it another try with the whole
41467     # argument.
41468     path="$complete"
41469     arguments="EOL"
41470     new_path="$path"
41471 
41472   windows_path="$new_path"
41473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41474     unix_path=`$CYGPATH -u "$windows_path"`
41475     new_path="$unix_path"
41476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41478     new_path="$unix_path"
41479   fi
41480 
41481 
41482     new_path=`$WHICH "$new_path" 2> /dev/null`
41483     # bat and cmd files are not always considered executable in MSYS causing which
41484     # to not find them
41485     if test "x$new_path" = x \
41486         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41487         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41488       new_path="$path"
41489 
41490   windows_path="$new_path"
41491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41492     unix_path=`$CYGPATH -u "$windows_path"`
41493     new_path="$unix_path"
41494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41496     new_path="$unix_path"
41497   fi
41498 
41499     fi
41500 
41501     if test "x$new_path" = x; then
41502       # It's still not found. Now this is an unrecoverable error.
41503       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41504 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41505       has_space=`$ECHO "$complete" | $GREP " "`
41506       if test "x$has_space" != x; then
41507         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41508 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41509       fi
41510       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41511     fi
41512   fi
41513 
41514   # Now new_path has a complete unix path to the binary
41515   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41516     # Keep paths in /bin as-is, but remove trailing .exe if any
41517     new_path="${new_path/%.exe/}"
41518     # Do not save /bin paths to all_fixpath_prefixes!
41519   else
41520     # Not in mixed or Windows style, start by that.
41521     new_path=`cmd //c echo $new_path`
41522 
41523   input_path="$new_path"
41524   # Check if we need to convert this using DOS-style short mode. If the path
41525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41526   # take no chances and rewrite it.
41527   # Note: m4 eats our [], so we need to use [ and ] instead.
41528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41529   if test "x$has_forbidden_chars" != x; then
41530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41532   fi
41533 
41534     # Output is in $new_path
41535 
41536   windows_path="$new_path"
41537   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41538     unix_path=`$CYGPATH -u "$windows_path"`
41539     new_path="$unix_path"
41540   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41541     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41542     new_path="$unix_path"
41543   fi
41544 
41545     # remove trailing .exe if any
41546     new_path="${new_path/%.exe/}"
41547 
41548     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41549     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41550   fi
41551 
41552     else
41553       # We're on a unix platform. Hooray! :)
41554       # First separate the path from the arguments. This will split at the first
41555       # space.
41556       complete="$STRIP"
41557       path="${complete%% *}"
41558       tmp="$complete EOL"
41559       arguments="${tmp#* }"
41560 
41561       # Cannot rely on the command "which" here since it doesn't always work.
41562       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41563       if test -z "$is_absolute_path"; then
41564         # Path to executable is not absolute. Find it.
41565         IFS_save="$IFS"
41566         IFS=:
41567         for p in $PATH; do
41568           if test -f "$p/$path" && test -x "$p/$path"; then
41569             new_path="$p/$path"
41570             break
41571           fi
41572         done
41573         IFS="$IFS_save"
41574       else
41575         # This is an absolute path, we can use it without further modifications.
41576         new_path="$path"
41577       fi
41578 
41579       if test "x$new_path" = x; then
41580         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41581 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41582         has_space=`$ECHO "$complete" | $GREP " "`
41583         if test "x$has_space" != x; then
41584           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41585 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41586         fi
41587         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41588       fi
41589     fi
41590 
41591     # Now join together the path and the arguments once again
41592     if test "x$arguments" != xEOL; then
41593       new_complete="$new_path ${arguments% *}"
41594     else
41595       new_complete="$new_path"
41596     fi
41597 
41598     if test "x$complete" != "x$new_complete"; then
41599       STRIP="$new_complete"
41600       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41601 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41602     fi
41603   fi
41604 
41605     if test "x$TOOLCHAIN_TYPE" = xgcc; then
41606 
41607 
41608   # Publish this variable in the help.
41609 
41610 
41611   if [ -z "${NM+x}" ]; then
41612     # The variable is not set by user, try to locate tool using the code snippet
41613     if test -n "$ac_tool_prefix"; then
41614   for ac_prog in nm gcc-nm
41615   do
41616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41619 $as_echo_n "checking for $ac_word... " >&6; }
41620 if ${ac_cv_prog_NM+:} false; then :
41621   $as_echo_n "(cached) " >&6
41622 else
41623   if test -n "$NM"; then
41624   ac_cv_prog_NM="$NM" # Let the user override the test.
41625 else
41626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41627 for as_dir in $PATH
41628 do
41629   IFS=$as_save_IFS
41630   test -z "$as_dir" && as_dir=.
41631     for ac_exec_ext in '' $ac_executable_extensions; do
41632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41633     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41635     break 2
41636   fi
41637 done
41638   done
41639 IFS=$as_save_IFS
41640 
41641 fi
41642 fi
41643 NM=$ac_cv_prog_NM
41644 if test -n "$NM"; then
41645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41646 $as_echo "$NM" >&6; }
41647 else
41648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41649 $as_echo "no" >&6; }
41650 fi
41651 
41652 
41653     test -n "$NM" && break
41654   done
41655 fi
41656 if test -z "$NM"; then
41657   ac_ct_NM=$NM
41658   for ac_prog in nm gcc-nm
41659 do
41660   # Extract the first word of "$ac_prog", so it can be a program name with args.
41661 set dummy $ac_prog; ac_word=$2
41662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41663 $as_echo_n "checking for $ac_word... " >&6; }
41664 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41665   $as_echo_n "(cached) " >&6
41666 else
41667   if test -n "$ac_ct_NM"; then
41668   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41669 else
41670 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41671 for as_dir in $PATH
41672 do
41673   IFS=$as_save_IFS
41674   test -z "$as_dir" && as_dir=.
41675     for ac_exec_ext in '' $ac_executable_extensions; do
41676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41677     ac_cv_prog_ac_ct_NM="$ac_prog"
41678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41679     break 2
41680   fi
41681 done
41682   done
41683 IFS=$as_save_IFS
41684 
41685 fi
41686 fi
41687 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41688 if test -n "$ac_ct_NM"; then
41689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41690 $as_echo "$ac_ct_NM" >&6; }
41691 else
41692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41693 $as_echo "no" >&6; }
41694 fi
41695 
41696 
41697   test -n "$ac_ct_NM" && break
41698 done
41699 
41700   if test "x$ac_ct_NM" = x; then
41701     NM=""
41702   else
41703     case $cross_compiling:$ac_tool_warned in
41704 yes:)
41705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41706 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41707 ac_tool_warned=yes ;;
41708 esac
41709     NM=$ac_ct_NM
41710   fi
41711 fi
41712 
41713   else
41714     # The variable is set, but is it from the command line or the environment?
41715 
41716     # Try to remove the string !NM! from our list.
41717     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41718     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41719       # If it failed, the variable was not from the command line. Ignore it,
41720       # but warn the user (except for BASH, which is always set by the calling BASH).
41721       if test "xNM" != xBASH; then
41722         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41723 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41724       fi
41725       # Try to locate tool using the code snippet
41726       if test -n "$ac_tool_prefix"; then
41727   for ac_prog in nm gcc-nm
41728   do
41729     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41730 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41732 $as_echo_n "checking for $ac_word... " >&6; }
41733 if ${ac_cv_prog_NM+:} false; then :
41734   $as_echo_n "(cached) " >&6
41735 else
41736   if test -n "$NM"; then
41737   ac_cv_prog_NM="$NM" # Let the user override the test.
41738 else
41739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41740 for as_dir in $PATH
41741 do
41742   IFS=$as_save_IFS
41743   test -z "$as_dir" && as_dir=.
41744     for ac_exec_ext in '' $ac_executable_extensions; do
41745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41746     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41748     break 2
41749   fi
41750 done
41751   done
41752 IFS=$as_save_IFS
41753 
41754 fi
41755 fi
41756 NM=$ac_cv_prog_NM
41757 if test -n "$NM"; then
41758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41759 $as_echo "$NM" >&6; }
41760 else
41761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41762 $as_echo "no" >&6; }
41763 fi
41764 
41765 
41766     test -n "$NM" && break
41767   done
41768 fi
41769 if test -z "$NM"; then
41770   ac_ct_NM=$NM
41771   for ac_prog in nm gcc-nm
41772 do
41773   # Extract the first word of "$ac_prog", so it can be a program name with args.
41774 set dummy $ac_prog; ac_word=$2
41775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41776 $as_echo_n "checking for $ac_word... " >&6; }
41777 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41778   $as_echo_n "(cached) " >&6
41779 else
41780   if test -n "$ac_ct_NM"; then
41781   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41782 else
41783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41784 for as_dir in $PATH
41785 do
41786   IFS=$as_save_IFS
41787   test -z "$as_dir" && as_dir=.
41788     for ac_exec_ext in '' $ac_executable_extensions; do
41789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41790     ac_cv_prog_ac_ct_NM="$ac_prog"
41791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41792     break 2
41793   fi
41794 done
41795   done
41796 IFS=$as_save_IFS
41797 
41798 fi
41799 fi
41800 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41801 if test -n "$ac_ct_NM"; then
41802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41803 $as_echo "$ac_ct_NM" >&6; }
41804 else
41805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41806 $as_echo "no" >&6; }
41807 fi
41808 
41809 
41810   test -n "$ac_ct_NM" && break
41811 done
41812 
41813   if test "x$ac_ct_NM" = x; then
41814     NM=""
41815   else
41816     case $cross_compiling:$ac_tool_warned in
41817 yes:)
41818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41819 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41820 ac_tool_warned=yes ;;
41821 esac
41822     NM=$ac_ct_NM
41823   fi
41824 fi
41825 
41826     else
41827       # If it succeeded, then it was overridden by the user. We will use it
41828       # for the tool.
41829 
41830       # First remove it from the list of overridden variables, so we can test
41831       # for unknown variables in the end.
41832       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41833 
41834       # Check if we try to supply an empty value
41835       if test "x$NM" = x; then
41836         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41837 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41838         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41839 $as_echo_n "checking for NM... " >&6; }
41840         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41841 $as_echo "disabled" >&6; }
41842       else
41843         # Check if the provided tool contains a complete path.
41844         tool_specified="$NM"
41845         tool_basename="${tool_specified##*/}"
41846         if test "x$tool_basename" = "x$tool_specified"; then
41847           # A command without a complete path is provided, search $PATH.
41848           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41849 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41850           # Extract the first word of "$tool_basename", so it can be a program name with args.
41851 set dummy $tool_basename; ac_word=$2
41852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41853 $as_echo_n "checking for $ac_word... " >&6; }
41854 if ${ac_cv_path_NM+:} false; then :
41855   $as_echo_n "(cached) " >&6
41856 else
41857   case $NM in
41858   [\\/]* | ?:[\\/]*)
41859   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41860   ;;
41861   *)
41862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41863 for as_dir in $PATH
41864 do
41865   IFS=$as_save_IFS
41866   test -z "$as_dir" && as_dir=.
41867     for ac_exec_ext in '' $ac_executable_extensions; do
41868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41869     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41871     break 2
41872   fi
41873 done
41874   done
41875 IFS=$as_save_IFS
41876 
41877   ;;
41878 esac
41879 fi
41880 NM=$ac_cv_path_NM
41881 if test -n "$NM"; then
41882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41883 $as_echo "$NM" >&6; }
41884 else
41885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41886 $as_echo "no" >&6; }
41887 fi
41888 
41889 
41890           if test "x$NM" = x; then
41891             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41892           fi
41893         else
41894           # Otherwise we believe it is a complete path. Use it as it is.
41895           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41896 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41897           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41898 $as_echo_n "checking for NM... " >&6; }
41899           if test ! -x "$tool_specified"; then
41900             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41901 $as_echo "not found" >&6; }
41902             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41903           fi
41904           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41905 $as_echo "$tool_specified" >&6; }
41906         fi
41907       fi
41908     fi
41909 
41910   fi
41911 
41912 
41913     else
41914 
41915 
41916   # Publish this variable in the help.
41917 
41918 
41919   if [ -z "${NM+x}" ]; then
41920     # The variable is not set by user, try to locate tool using the code snippet
41921     if test -n "$ac_tool_prefix"; then
41922   for ac_prog in nm
41923   do
41924     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41925 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41927 $as_echo_n "checking for $ac_word... " >&6; }
41928 if ${ac_cv_prog_NM+:} false; then :
41929   $as_echo_n "(cached) " >&6
41930 else
41931   if test -n "$NM"; then
41932   ac_cv_prog_NM="$NM" # Let the user override the test.
41933 else
41934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41935 for as_dir in $PATH
41936 do
41937   IFS=$as_save_IFS
41938   test -z "$as_dir" && as_dir=.
41939     for ac_exec_ext in '' $ac_executable_extensions; do
41940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41941     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41943     break 2
41944   fi
41945 done
41946   done
41947 IFS=$as_save_IFS
41948 
41949 fi
41950 fi
41951 NM=$ac_cv_prog_NM
41952 if test -n "$NM"; then
41953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41954 $as_echo "$NM" >&6; }
41955 else
41956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41957 $as_echo "no" >&6; }
41958 fi
41959 
41960 
41961     test -n "$NM" && break
41962   done
41963 fi
41964 if test -z "$NM"; then
41965   ac_ct_NM=$NM
41966   for ac_prog in nm
41967 do
41968   # Extract the first word of "$ac_prog", so it can be a program name with args.
41969 set dummy $ac_prog; ac_word=$2
41970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41971 $as_echo_n "checking for $ac_word... " >&6; }
41972 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41973   $as_echo_n "(cached) " >&6
41974 else
41975   if test -n "$ac_ct_NM"; then
41976   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41977 else
41978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41979 for as_dir in $PATH
41980 do
41981   IFS=$as_save_IFS
41982   test -z "$as_dir" && as_dir=.
41983     for ac_exec_ext in '' $ac_executable_extensions; do
41984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41985     ac_cv_prog_ac_ct_NM="$ac_prog"
41986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41987     break 2
41988   fi
41989 done
41990   done
41991 IFS=$as_save_IFS
41992 
41993 fi
41994 fi
41995 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41996 if test -n "$ac_ct_NM"; then
41997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41998 $as_echo "$ac_ct_NM" >&6; }
41999 else
42000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42001 $as_echo "no" >&6; }
42002 fi
42003 
42004 
42005   test -n "$ac_ct_NM" && break
42006 done
42007 
42008   if test "x$ac_ct_NM" = x; then
42009     NM=""
42010   else
42011     case $cross_compiling:$ac_tool_warned in
42012 yes:)
42013 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42014 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42015 ac_tool_warned=yes ;;
42016 esac
42017     NM=$ac_ct_NM
42018   fi
42019 fi
42020 
42021   else
42022     # The variable is set, but is it from the command line or the environment?
42023 
42024     # Try to remove the string !NM! from our list.
42025     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42026     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42027       # If it failed, the variable was not from the command line. Ignore it,
42028       # but warn the user (except for BASH, which is always set by the calling BASH).
42029       if test "xNM" != xBASH; then
42030         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42031 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42032       fi
42033       # Try to locate tool using the code snippet
42034       if test -n "$ac_tool_prefix"; then
42035   for ac_prog in nm
42036   do
42037     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42038 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42040 $as_echo_n "checking for $ac_word... " >&6; }
42041 if ${ac_cv_prog_NM+:} false; then :
42042   $as_echo_n "(cached) " >&6
42043 else
42044   if test -n "$NM"; then
42045   ac_cv_prog_NM="$NM" # Let the user override the test.
42046 else
42047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42048 for as_dir in $PATH
42049 do
42050   IFS=$as_save_IFS
42051   test -z "$as_dir" && as_dir=.
42052     for ac_exec_ext in '' $ac_executable_extensions; do
42053   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42054     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42055     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42056     break 2
42057   fi
42058 done
42059   done
42060 IFS=$as_save_IFS
42061 
42062 fi
42063 fi
42064 NM=$ac_cv_prog_NM
42065 if test -n "$NM"; then
42066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42067 $as_echo "$NM" >&6; }
42068 else
42069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42070 $as_echo "no" >&6; }
42071 fi
42072 
42073 
42074     test -n "$NM" && break
42075   done
42076 fi
42077 if test -z "$NM"; then
42078   ac_ct_NM=$NM
42079   for ac_prog in nm
42080 do
42081   # Extract the first word of "$ac_prog", so it can be a program name with args.
42082 set dummy $ac_prog; ac_word=$2
42083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42084 $as_echo_n "checking for $ac_word... " >&6; }
42085 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42086   $as_echo_n "(cached) " >&6
42087 else
42088   if test -n "$ac_ct_NM"; then
42089   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42090 else
42091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42092 for as_dir in $PATH
42093 do
42094   IFS=$as_save_IFS
42095   test -z "$as_dir" && as_dir=.
42096     for ac_exec_ext in '' $ac_executable_extensions; do
42097   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42098     ac_cv_prog_ac_ct_NM="$ac_prog"
42099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42100     break 2
42101   fi
42102 done
42103   done
42104 IFS=$as_save_IFS
42105 
42106 fi
42107 fi
42108 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42109 if test -n "$ac_ct_NM"; then
42110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42111 $as_echo "$ac_ct_NM" >&6; }
42112 else
42113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42114 $as_echo "no" >&6; }
42115 fi
42116 
42117 
42118   test -n "$ac_ct_NM" && break
42119 done
42120 
42121   if test "x$ac_ct_NM" = x; then
42122     NM=""
42123   else
42124     case $cross_compiling:$ac_tool_warned in
42125 yes:)
42126 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42127 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42128 ac_tool_warned=yes ;;
42129 esac
42130     NM=$ac_ct_NM
42131   fi
42132 fi
42133 
42134     else
42135       # If it succeeded, then it was overridden by the user. We will use it
42136       # for the tool.
42137 
42138       # First remove it from the list of overridden variables, so we can test
42139       # for unknown variables in the end.
42140       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42141 
42142       # Check if we try to supply an empty value
42143       if test "x$NM" = x; then
42144         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42145 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42146         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42147 $as_echo_n "checking for NM... " >&6; }
42148         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42149 $as_echo "disabled" >&6; }
42150       else
42151         # Check if the provided tool contains a complete path.
42152         tool_specified="$NM"
42153         tool_basename="${tool_specified##*/}"
42154         if test "x$tool_basename" = "x$tool_specified"; then
42155           # A command without a complete path is provided, search $PATH.
42156           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42157 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42158           # Extract the first word of "$tool_basename", so it can be a program name with args.
42159 set dummy $tool_basename; ac_word=$2
42160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42161 $as_echo_n "checking for $ac_word... " >&6; }
42162 if ${ac_cv_path_NM+:} false; then :
42163   $as_echo_n "(cached) " >&6
42164 else
42165   case $NM in
42166   [\\/]* | ?:[\\/]*)
42167   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42168   ;;
42169   *)
42170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42171 for as_dir in $PATH
42172 do
42173   IFS=$as_save_IFS
42174   test -z "$as_dir" && as_dir=.
42175     for ac_exec_ext in '' $ac_executable_extensions; do
42176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42177     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42179     break 2
42180   fi
42181 done
42182   done
42183 IFS=$as_save_IFS
42184 
42185   ;;
42186 esac
42187 fi
42188 NM=$ac_cv_path_NM
42189 if test -n "$NM"; then
42190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42191 $as_echo "$NM" >&6; }
42192 else
42193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42194 $as_echo "no" >&6; }
42195 fi
42196 
42197 
42198           if test "x$NM" = x; then
42199             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42200           fi
42201         else
42202           # Otherwise we believe it is a complete path. Use it as it is.
42203           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42204 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42205           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42206 $as_echo_n "checking for NM... " >&6; }
42207           if test ! -x "$tool_specified"; then
42208             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42209 $as_echo "not found" >&6; }
42210             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42211           fi
42212           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42213 $as_echo "$tool_specified" >&6; }
42214         fi
42215       fi
42216     fi
42217 
42218   fi
42219 
42220 
42221     fi
42222 
42223   # Only process if variable expands to non-empty
42224 
42225   if test "x$NM" != x; then
42226     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42227 
42228   # First separate the path from the arguments. This will split at the first
42229   # space.
42230   complete="$NM"
42231   path="${complete%% *}"
42232   tmp="$complete EOL"
42233   arguments="${tmp#* }"
42234 
42235   # Input might be given as Windows format, start by converting to
42236   # unix format.
42237   new_path=`$CYGPATH -u "$path"`
42238 
42239   # Now try to locate executable using which
42240   new_path=`$WHICH "$new_path" 2> /dev/null`
42241   # bat and cmd files are not always considered executable in cygwin causing which
42242   # to not find them
42243   if test "x$new_path" = x \
42244       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42245       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42246     new_path=`$CYGPATH -u "$path"`
42247   fi
42248   if test "x$new_path" = x; then
42249     # Oops. Which didn't find the executable.
42250     # The splitting of arguments from the executable at a space might have been incorrect,
42251     # since paths with space are more likely in Windows. Give it another try with the whole
42252     # argument.
42253     path="$complete"
42254     arguments="EOL"
42255     new_path=`$CYGPATH -u "$path"`
42256     new_path=`$WHICH "$new_path" 2> /dev/null`
42257     # bat and cmd files are not always considered executable in cygwin causing which
42258     # to not find them
42259     if test "x$new_path" = x \
42260         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42261         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42262       new_path=`$CYGPATH -u "$path"`
42263     fi
42264     if test "x$new_path" = x; then
42265       # It's still not found. Now this is an unrecoverable error.
42266       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42267 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42268       has_space=`$ECHO "$complete" | $GREP " "`
42269       if test "x$has_space" != x; then
42270         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42271 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42272       fi
42273       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42274     fi
42275   fi
42276 
42277   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42278   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42279   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42280   # "foo.exe" is OK but "foo" is an error.
42281   #
42282   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42283   # It is also a way to make sure we got the proper file name for the real test later on.
42284   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42285   if test "x$test_shortpath" = x; then
42286     # Short path failed, file does not exist as specified.
42287     # Try adding .exe or .cmd
42288     if test -f "${new_path}.exe"; then
42289       input_to_shortpath="${new_path}.exe"
42290     elif test -f "${new_path}.cmd"; then
42291       input_to_shortpath="${new_path}.cmd"
42292     else
42293       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42294 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42295       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42296 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42297       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42298     fi
42299   else
42300     input_to_shortpath="$new_path"
42301   fi
42302 
42303   # Call helper function which possibly converts this using DOS-style short mode.
42304   # If so, the updated path is stored in $new_path.
42305   new_path="$input_to_shortpath"
42306 
42307   input_path="$input_to_shortpath"
42308   # Check if we need to convert this using DOS-style short mode. If the path
42309   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42310   # take no chances and rewrite it.
42311   # Note: m4 eats our [], so we need to use [ and ] instead.
42312   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42313   if test "x$has_forbidden_chars" != x; then
42314     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42315     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42316     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42317     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42318       # Going to short mode and back again did indeed matter. Since short mode is
42319       # case insensitive, let's make it lowercase to improve readability.
42320       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42321       # Now convert it back to Unix-style (cygpath)
42322       input_path=`$CYGPATH -u "$shortmode_path"`
42323       new_path="$input_path"
42324     fi
42325   fi
42326 
42327   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42328   if test "x$test_cygdrive_prefix" = x; then
42329     # As a simple fix, exclude /usr/bin since it's not a real path.
42330     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42331       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42332       # a path prefixed by /cygdrive for fixpath to work.
42333       new_path="$CYGWIN_ROOT_PATH$input_path"
42334     fi
42335   fi
42336 
42337   # remove trailing .exe if any
42338   new_path="${new_path/%.exe/}"
42339 
42340     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42341 
42342   # First separate the path from the arguments. This will split at the first
42343   # space.
42344   complete="$NM"
42345   path="${complete%% *}"
42346   tmp="$complete EOL"
42347   arguments="${tmp#* }"
42348 
42349   # Input might be given as Windows format, start by converting to
42350   # unix format.
42351   new_path="$path"
42352 
42353   windows_path="$new_path"
42354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42355     unix_path=`$CYGPATH -u "$windows_path"`
42356     new_path="$unix_path"
42357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42359     new_path="$unix_path"
42360   fi
42361 
42362 
42363   # Now try to locate executable using which
42364   new_path=`$WHICH "$new_path" 2> /dev/null`
42365 
42366   if test "x$new_path" = x; then
42367     # Oops. Which didn't find the executable.
42368     # The splitting of arguments from the executable at a space might have been incorrect,
42369     # since paths with space are more likely in Windows. Give it another try with the whole
42370     # argument.
42371     path="$complete"
42372     arguments="EOL"
42373     new_path="$path"
42374 
42375   windows_path="$new_path"
42376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42377     unix_path=`$CYGPATH -u "$windows_path"`
42378     new_path="$unix_path"
42379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42381     new_path="$unix_path"
42382   fi
42383 
42384 
42385     new_path=`$WHICH "$new_path" 2> /dev/null`
42386     # bat and cmd files are not always considered executable in MSYS causing which
42387     # to not find them
42388     if test "x$new_path" = x \
42389         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42390         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42391       new_path="$path"
42392 
42393   windows_path="$new_path"
42394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42395     unix_path=`$CYGPATH -u "$windows_path"`
42396     new_path="$unix_path"
42397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42398     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42399     new_path="$unix_path"
42400   fi
42401 
42402     fi
42403 
42404     if test "x$new_path" = x; then
42405       # It's still not found. Now this is an unrecoverable error.
42406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42407 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42408       has_space=`$ECHO "$complete" | $GREP " "`
42409       if test "x$has_space" != x; then
42410         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42411 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42412       fi
42413       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42414     fi
42415   fi
42416 
42417   # Now new_path has a complete unix path to the binary
42418   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42419     # Keep paths in /bin as-is, but remove trailing .exe if any
42420     new_path="${new_path/%.exe/}"
42421     # Do not save /bin paths to all_fixpath_prefixes!
42422   else
42423     # Not in mixed or Windows style, start by that.
42424     new_path=`cmd //c echo $new_path`
42425 
42426   input_path="$new_path"
42427   # Check if we need to convert this using DOS-style short mode. If the path
42428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42429   # take no chances and rewrite it.
42430   # Note: m4 eats our [], so we need to use [ and ] instead.
42431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42432   if test "x$has_forbidden_chars" != x; then
42433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42434     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42435   fi
42436 
42437     # Output is in $new_path
42438 
42439   windows_path="$new_path"
42440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42441     unix_path=`$CYGPATH -u "$windows_path"`
42442     new_path="$unix_path"
42443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42445     new_path="$unix_path"
42446   fi
42447 
42448     # remove trailing .exe if any
42449     new_path="${new_path/%.exe/}"
42450 
42451     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42452     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42453   fi
42454 
42455     else
42456       # We're on a unix platform. Hooray! :)
42457       # First separate the path from the arguments. This will split at the first
42458       # space.
42459       complete="$NM"
42460       path="${complete%% *}"
42461       tmp="$complete EOL"
42462       arguments="${tmp#* }"
42463 
42464       # Cannot rely on the command "which" here since it doesn't always work.
42465       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42466       if test -z "$is_absolute_path"; then
42467         # Path to executable is not absolute. Find it.
42468         IFS_save="$IFS"
42469         IFS=:
42470         for p in $PATH; do
42471           if test -f "$p/$path" && test -x "$p/$path"; then
42472             new_path="$p/$path"
42473             break
42474           fi
42475         done
42476         IFS="$IFS_save"
42477       else
42478         # This is an absolute path, we can use it without further modifications.
42479         new_path="$path"
42480       fi
42481 
42482       if test "x$new_path" = x; then
42483         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42484 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42485         has_space=`$ECHO "$complete" | $GREP " "`
42486         if test "x$has_space" != x; then
42487           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42488 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42489         fi
42490         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42491       fi
42492     fi
42493 
42494     # Now join together the path and the arguments once again
42495     if test "x$arguments" != xEOL; then
42496       new_complete="$new_path ${arguments% *}"
42497     else
42498       new_complete="$new_path"
42499     fi
42500 
42501     if test "x$complete" != "x$new_complete"; then
42502       NM="$new_complete"
42503       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42504 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42505     fi
42506   fi
42507 
42508     GNM="$NM"
42509 
42510   fi
42511 
42512   # objcopy is used for moving debug symbols to separate files when
42513   # full debug symbols are enabled.
42514   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42515 
42516 
42517   # Publish this variable in the help.
42518 
42519 
42520   if [ -z "${OBJCOPY+x}" ]; then
42521     # The variable is not set by user, try to locate tool using the code snippet
42522     if test -n "$ac_tool_prefix"; then
42523   for ac_prog in gobjcopy objcopy
42524   do
42525     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42526 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42528 $as_echo_n "checking for $ac_word... " >&6; }
42529 if ${ac_cv_prog_OBJCOPY+:} false; then :
42530   $as_echo_n "(cached) " >&6
42531 else
42532   if test -n "$OBJCOPY"; then
42533   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42534 else
42535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42536 for as_dir in $PATH
42537 do
42538   IFS=$as_save_IFS
42539   test -z "$as_dir" && as_dir=.
42540     for ac_exec_ext in '' $ac_executable_extensions; do
42541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42542     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42544     break 2
42545   fi
42546 done
42547   done
42548 IFS=$as_save_IFS
42549 
42550 fi
42551 fi
42552 OBJCOPY=$ac_cv_prog_OBJCOPY
42553 if test -n "$OBJCOPY"; then
42554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42555 $as_echo "$OBJCOPY" >&6; }
42556 else
42557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42558 $as_echo "no" >&6; }
42559 fi
42560 
42561 
42562     test -n "$OBJCOPY" && break
42563   done
42564 fi
42565 if test -z "$OBJCOPY"; then
42566   ac_ct_OBJCOPY=$OBJCOPY
42567   for ac_prog in gobjcopy objcopy
42568 do
42569   # Extract the first word of "$ac_prog", so it can be a program name with args.
42570 set dummy $ac_prog; ac_word=$2
42571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42572 $as_echo_n "checking for $ac_word... " >&6; }
42573 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42574   $as_echo_n "(cached) " >&6
42575 else
42576   if test -n "$ac_ct_OBJCOPY"; then
42577   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42578 else
42579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42580 for as_dir in $PATH
42581 do
42582   IFS=$as_save_IFS
42583   test -z "$as_dir" && as_dir=.
42584     for ac_exec_ext in '' $ac_executable_extensions; do
42585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42586     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42588     break 2
42589   fi
42590 done
42591   done
42592 IFS=$as_save_IFS
42593 
42594 fi
42595 fi
42596 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42597 if test -n "$ac_ct_OBJCOPY"; then
42598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42599 $as_echo "$ac_ct_OBJCOPY" >&6; }
42600 else
42601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42602 $as_echo "no" >&6; }
42603 fi
42604 
42605 
42606   test -n "$ac_ct_OBJCOPY" && break
42607 done
42608 
42609   if test "x$ac_ct_OBJCOPY" = x; then
42610     OBJCOPY=""
42611   else
42612     case $cross_compiling:$ac_tool_warned in
42613 yes:)
42614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42615 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42616 ac_tool_warned=yes ;;
42617 esac
42618     OBJCOPY=$ac_ct_OBJCOPY
42619   fi
42620 fi
42621 
42622   else
42623     # The variable is set, but is it from the command line or the environment?
42624 
42625     # Try to remove the string !OBJCOPY! from our list.
42626     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42627     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42628       # If it failed, the variable was not from the command line. Ignore it,
42629       # but warn the user (except for BASH, which is always set by the calling BASH).
42630       if test "xOBJCOPY" != xBASH; then
42631         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42632 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42633       fi
42634       # Try to locate tool using the code snippet
42635       if test -n "$ac_tool_prefix"; then
42636   for ac_prog in gobjcopy objcopy
42637   do
42638     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42639 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42641 $as_echo_n "checking for $ac_word... " >&6; }
42642 if ${ac_cv_prog_OBJCOPY+:} false; then :
42643   $as_echo_n "(cached) " >&6
42644 else
42645   if test -n "$OBJCOPY"; then
42646   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42647 else
42648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42649 for as_dir in $PATH
42650 do
42651   IFS=$as_save_IFS
42652   test -z "$as_dir" && as_dir=.
42653     for ac_exec_ext in '' $ac_executable_extensions; do
42654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42655     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42657     break 2
42658   fi
42659 done
42660   done
42661 IFS=$as_save_IFS
42662 
42663 fi
42664 fi
42665 OBJCOPY=$ac_cv_prog_OBJCOPY
42666 if test -n "$OBJCOPY"; then
42667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42668 $as_echo "$OBJCOPY" >&6; }
42669 else
42670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42671 $as_echo "no" >&6; }
42672 fi
42673 
42674 
42675     test -n "$OBJCOPY" && break
42676   done
42677 fi
42678 if test -z "$OBJCOPY"; then
42679   ac_ct_OBJCOPY=$OBJCOPY
42680   for ac_prog in gobjcopy objcopy
42681 do
42682   # Extract the first word of "$ac_prog", so it can be a program name with args.
42683 set dummy $ac_prog; ac_word=$2
42684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42685 $as_echo_n "checking for $ac_word... " >&6; }
42686 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42687   $as_echo_n "(cached) " >&6
42688 else
42689   if test -n "$ac_ct_OBJCOPY"; then
42690   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42691 else
42692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42693 for as_dir in $PATH
42694 do
42695   IFS=$as_save_IFS
42696   test -z "$as_dir" && as_dir=.
42697     for ac_exec_ext in '' $ac_executable_extensions; do
42698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42699     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42701     break 2
42702   fi
42703 done
42704   done
42705 IFS=$as_save_IFS
42706 
42707 fi
42708 fi
42709 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42710 if test -n "$ac_ct_OBJCOPY"; then
42711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42712 $as_echo "$ac_ct_OBJCOPY" >&6; }
42713 else
42714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42715 $as_echo "no" >&6; }
42716 fi
42717 
42718 
42719   test -n "$ac_ct_OBJCOPY" && break
42720 done
42721 
42722   if test "x$ac_ct_OBJCOPY" = x; then
42723     OBJCOPY=""
42724   else
42725     case $cross_compiling:$ac_tool_warned in
42726 yes:)
42727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42729 ac_tool_warned=yes ;;
42730 esac
42731     OBJCOPY=$ac_ct_OBJCOPY
42732   fi
42733 fi
42734 
42735     else
42736       # If it succeeded, then it was overridden by the user. We will use it
42737       # for the tool.
42738 
42739       # First remove it from the list of overridden variables, so we can test
42740       # for unknown variables in the end.
42741       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42742 
42743       # Check if we try to supply an empty value
42744       if test "x$OBJCOPY" = x; then
42745         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42746 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42747         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42748 $as_echo_n "checking for OBJCOPY... " >&6; }
42749         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42750 $as_echo "disabled" >&6; }
42751       else
42752         # Check if the provided tool contains a complete path.
42753         tool_specified="$OBJCOPY"
42754         tool_basename="${tool_specified##*/}"
42755         if test "x$tool_basename" = "x$tool_specified"; then
42756           # A command without a complete path is provided, search $PATH.
42757           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42758 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42759           # Extract the first word of "$tool_basename", so it can be a program name with args.
42760 set dummy $tool_basename; ac_word=$2
42761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42762 $as_echo_n "checking for $ac_word... " >&6; }
42763 if ${ac_cv_path_OBJCOPY+:} false; then :
42764   $as_echo_n "(cached) " >&6
42765 else
42766   case $OBJCOPY in
42767   [\\/]* | ?:[\\/]*)
42768   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42769   ;;
42770   *)
42771   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42772 for as_dir in $PATH
42773 do
42774   IFS=$as_save_IFS
42775   test -z "$as_dir" && as_dir=.
42776     for ac_exec_ext in '' $ac_executable_extensions; do
42777   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42778     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42779     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42780     break 2
42781   fi
42782 done
42783   done
42784 IFS=$as_save_IFS
42785 
42786   ;;
42787 esac
42788 fi
42789 OBJCOPY=$ac_cv_path_OBJCOPY
42790 if test -n "$OBJCOPY"; then
42791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42792 $as_echo "$OBJCOPY" >&6; }
42793 else
42794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42795 $as_echo "no" >&6; }
42796 fi
42797 
42798 
42799           if test "x$OBJCOPY" = x; then
42800             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42801           fi
42802         else
42803           # Otherwise we believe it is a complete path. Use it as it is.
42804           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42805 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42806           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42807 $as_echo_n "checking for OBJCOPY... " >&6; }
42808           if test ! -x "$tool_specified"; then
42809             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42810 $as_echo "not found" >&6; }
42811             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42812           fi
42813           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42814 $as_echo "$tool_specified" >&6; }
42815         fi
42816       fi
42817     fi
42818 
42819   fi
42820 
42821 
42822     # Only call fixup if objcopy was found.
42823     if test -n "$OBJCOPY"; then
42824 
42825   # Only process if variable expands to non-empty
42826 
42827   if test "x$OBJCOPY" != x; then
42828     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42829 
42830   # First separate the path from the arguments. This will split at the first
42831   # space.
42832   complete="$OBJCOPY"
42833   path="${complete%% *}"
42834   tmp="$complete EOL"
42835   arguments="${tmp#* }"
42836 
42837   # Input might be given as Windows format, start by converting to
42838   # unix format.
42839   new_path=`$CYGPATH -u "$path"`
42840 
42841   # Now try to locate executable using which
42842   new_path=`$WHICH "$new_path" 2> /dev/null`
42843   # bat and cmd files are not always considered executable in cygwin causing which
42844   # to not find them
42845   if test "x$new_path" = x \
42846       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42847       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42848     new_path=`$CYGPATH -u "$path"`
42849   fi
42850   if test "x$new_path" = x; then
42851     # Oops. Which didn't find the executable.
42852     # The splitting of arguments from the executable at a space might have been incorrect,
42853     # since paths with space are more likely in Windows. Give it another try with the whole
42854     # argument.
42855     path="$complete"
42856     arguments="EOL"
42857     new_path=`$CYGPATH -u "$path"`
42858     new_path=`$WHICH "$new_path" 2> /dev/null`
42859     # bat and cmd files are not always considered executable in cygwin causing which
42860     # to not find them
42861     if test "x$new_path" = x \
42862         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42863         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42864       new_path=`$CYGPATH -u "$path"`
42865     fi
42866     if test "x$new_path" = x; then
42867       # It's still not found. Now this is an unrecoverable error.
42868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42869 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42870       has_space=`$ECHO "$complete" | $GREP " "`
42871       if test "x$has_space" != x; then
42872         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42873 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42874       fi
42875       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42876     fi
42877   fi
42878 
42879   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42880   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42881   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42882   # "foo.exe" is OK but "foo" is an error.
42883   #
42884   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42885   # It is also a way to make sure we got the proper file name for the real test later on.
42886   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42887   if test "x$test_shortpath" = x; then
42888     # Short path failed, file does not exist as specified.
42889     # Try adding .exe or .cmd
42890     if test -f "${new_path}.exe"; then
42891       input_to_shortpath="${new_path}.exe"
42892     elif test -f "${new_path}.cmd"; then
42893       input_to_shortpath="${new_path}.cmd"
42894     else
42895       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42896 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42897       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42898 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42899       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42900     fi
42901   else
42902     input_to_shortpath="$new_path"
42903   fi
42904 
42905   # Call helper function which possibly converts this using DOS-style short mode.
42906   # If so, the updated path is stored in $new_path.
42907   new_path="$input_to_shortpath"
42908 
42909   input_path="$input_to_shortpath"
42910   # Check if we need to convert this using DOS-style short mode. If the path
42911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42912   # take no chances and rewrite it.
42913   # Note: m4 eats our [], so we need to use [ and ] instead.
42914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42915   if test "x$has_forbidden_chars" != x; then
42916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42917     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42918     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42919     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42920       # Going to short mode and back again did indeed matter. Since short mode is
42921       # case insensitive, let's make it lowercase to improve readability.
42922       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42923       # Now convert it back to Unix-style (cygpath)
42924       input_path=`$CYGPATH -u "$shortmode_path"`
42925       new_path="$input_path"
42926     fi
42927   fi
42928 
42929   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42930   if test "x$test_cygdrive_prefix" = x; then
42931     # As a simple fix, exclude /usr/bin since it's not a real path.
42932     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42933       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42934       # a path prefixed by /cygdrive for fixpath to work.
42935       new_path="$CYGWIN_ROOT_PATH$input_path"
42936     fi
42937   fi
42938 
42939   # remove trailing .exe if any
42940   new_path="${new_path/%.exe/}"
42941 
42942     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42943 
42944   # First separate the path from the arguments. This will split at the first
42945   # space.
42946   complete="$OBJCOPY"
42947   path="${complete%% *}"
42948   tmp="$complete EOL"
42949   arguments="${tmp#* }"
42950 
42951   # Input might be given as Windows format, start by converting to
42952   # unix format.
42953   new_path="$path"
42954 
42955   windows_path="$new_path"
42956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42957     unix_path=`$CYGPATH -u "$windows_path"`
42958     new_path="$unix_path"
42959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42961     new_path="$unix_path"
42962   fi
42963 
42964 
42965   # Now try to locate executable using which
42966   new_path=`$WHICH "$new_path" 2> /dev/null`
42967 
42968   if test "x$new_path" = x; then
42969     # Oops. Which didn't find the executable.
42970     # The splitting of arguments from the executable at a space might have been incorrect,
42971     # since paths with space are more likely in Windows. Give it another try with the whole
42972     # argument.
42973     path="$complete"
42974     arguments="EOL"
42975     new_path="$path"
42976 
42977   windows_path="$new_path"
42978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42979     unix_path=`$CYGPATH -u "$windows_path"`
42980     new_path="$unix_path"
42981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42983     new_path="$unix_path"
42984   fi
42985 
42986 
42987     new_path=`$WHICH "$new_path" 2> /dev/null`
42988     # bat and cmd files are not always considered executable in MSYS causing which
42989     # to not find them
42990     if test "x$new_path" = x \
42991         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42992         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42993       new_path="$path"
42994 
42995   windows_path="$new_path"
42996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42997     unix_path=`$CYGPATH -u "$windows_path"`
42998     new_path="$unix_path"
42999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43001     new_path="$unix_path"
43002   fi
43003 
43004     fi
43005 
43006     if test "x$new_path" = x; then
43007       # It's still not found. Now this is an unrecoverable error.
43008       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43009 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43010       has_space=`$ECHO "$complete" | $GREP " "`
43011       if test "x$has_space" != x; then
43012         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43013 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43014       fi
43015       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43016     fi
43017   fi
43018 
43019   # Now new_path has a complete unix path to the binary
43020   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43021     # Keep paths in /bin as-is, but remove trailing .exe if any
43022     new_path="${new_path/%.exe/}"
43023     # Do not save /bin paths to all_fixpath_prefixes!
43024   else
43025     # Not in mixed or Windows style, start by that.
43026     new_path=`cmd //c echo $new_path`
43027 
43028   input_path="$new_path"
43029   # Check if we need to convert this using DOS-style short mode. If the path
43030   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43031   # take no chances and rewrite it.
43032   # Note: m4 eats our [], so we need to use [ and ] instead.
43033   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43034   if test "x$has_forbidden_chars" != x; then
43035     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43036     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43037   fi
43038 
43039     # Output is in $new_path
43040 
43041   windows_path="$new_path"
43042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43043     unix_path=`$CYGPATH -u "$windows_path"`
43044     new_path="$unix_path"
43045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43047     new_path="$unix_path"
43048   fi
43049 
43050     # remove trailing .exe if any
43051     new_path="${new_path/%.exe/}"
43052 
43053     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43054     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43055   fi
43056 
43057     else
43058       # We're on a unix platform. Hooray! :)
43059       # First separate the path from the arguments. This will split at the first
43060       # space.
43061       complete="$OBJCOPY"
43062       path="${complete%% *}"
43063       tmp="$complete EOL"
43064       arguments="${tmp#* }"
43065 
43066       # Cannot rely on the command "which" here since it doesn't always work.
43067       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43068       if test -z "$is_absolute_path"; then
43069         # Path to executable is not absolute. Find it.
43070         IFS_save="$IFS"
43071         IFS=:
43072         for p in $PATH; do
43073           if test -f "$p/$path" && test -x "$p/$path"; then
43074             new_path="$p/$path"
43075             break
43076           fi
43077         done
43078         IFS="$IFS_save"
43079       else
43080         # This is an absolute path, we can use it without further modifications.
43081         new_path="$path"
43082       fi
43083 
43084       if test "x$new_path" = x; then
43085         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43086 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43087         has_space=`$ECHO "$complete" | $GREP " "`
43088         if test "x$has_space" != x; then
43089           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43090 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43091         fi
43092         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43093       fi
43094     fi
43095 
43096     # Now join together the path and the arguments once again
43097     if test "x$arguments" != xEOL; then
43098       new_complete="$new_path ${arguments% *}"
43099     else
43100       new_complete="$new_path"
43101     fi
43102 
43103     if test "x$complete" != "x$new_complete"; then
43104       OBJCOPY="$new_complete"
43105       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43106 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43107     fi
43108   fi
43109 
43110       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43111         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43112         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43113         # - version number is last blank separate word on first line
43114         # - version number formats that have been seen:
43115         #   - <major>.<minor>
43116         #   - <major>.<minor>.<micro>
43117         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43118         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43119          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43120               -e 's/.* //' \
43121               -e '/^[01]\./b bad' \
43122               -e '/^2\./{' \
43123               -e '  s/^2\.//' \
43124               -e '  /^[0-9]$/b bad' \
43125               -e '  /^[0-9]\./b bad' \
43126               -e '  /^1[0-9]$/b bad' \
43127               -e '  /^1[0-9]\./b bad' \
43128               -e '  /^20\./b bad' \
43129               -e '  /^21\.0$/b bad' \
43130               -e '  /^21\.0\./b bad' \
43131               -e '}' \
43132               -e ':good' \
43133               -e 's/.*/VALID_VERSION/p' \
43134               -e 'q' \
43135               -e ':bad' \
43136               -e 's/.*/BAD_VERSION/p' \
43137               -e 'q'`
43138         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43139           OBJCOPY=
43140           { $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
43141 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43142           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43143 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43144           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43145 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43146           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43147 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43148           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43149 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43150         fi
43151       fi
43152     fi
43153   fi
43154 
43155 
43156 
43157   # Publish this variable in the help.
43158 
43159 
43160   if [ -z "${OBJDUMP+x}" ]; then
43161     # The variable is not set by user, try to locate tool using the code snippet
43162     if test -n "$ac_tool_prefix"; then
43163   for ac_prog in gobjdump objdump
43164   do
43165     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43166 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43168 $as_echo_n "checking for $ac_word... " >&6; }
43169 if ${ac_cv_prog_OBJDUMP+:} false; then :
43170   $as_echo_n "(cached) " >&6
43171 else
43172   if test -n "$OBJDUMP"; then
43173   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43174 else
43175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43176 for as_dir in $PATH
43177 do
43178   IFS=$as_save_IFS
43179   test -z "$as_dir" && as_dir=.
43180     for ac_exec_ext in '' $ac_executable_extensions; do
43181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43182     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43184     break 2
43185   fi
43186 done
43187   done
43188 IFS=$as_save_IFS
43189 
43190 fi
43191 fi
43192 OBJDUMP=$ac_cv_prog_OBJDUMP
43193 if test -n "$OBJDUMP"; then
43194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43195 $as_echo "$OBJDUMP" >&6; }
43196 else
43197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43198 $as_echo "no" >&6; }
43199 fi
43200 
43201 
43202     test -n "$OBJDUMP" && break
43203   done
43204 fi
43205 if test -z "$OBJDUMP"; then
43206   ac_ct_OBJDUMP=$OBJDUMP
43207   for ac_prog in gobjdump objdump
43208 do
43209   # Extract the first word of "$ac_prog", so it can be a program name with args.
43210 set dummy $ac_prog; ac_word=$2
43211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43212 $as_echo_n "checking for $ac_word... " >&6; }
43213 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43214   $as_echo_n "(cached) " >&6
43215 else
43216   if test -n "$ac_ct_OBJDUMP"; then
43217   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43218 else
43219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43220 for as_dir in $PATH
43221 do
43222   IFS=$as_save_IFS
43223   test -z "$as_dir" && as_dir=.
43224     for ac_exec_ext in '' $ac_executable_extensions; do
43225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43226     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43228     break 2
43229   fi
43230 done
43231   done
43232 IFS=$as_save_IFS
43233 
43234 fi
43235 fi
43236 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43237 if test -n "$ac_ct_OBJDUMP"; then
43238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43239 $as_echo "$ac_ct_OBJDUMP" >&6; }
43240 else
43241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43242 $as_echo "no" >&6; }
43243 fi
43244 
43245 
43246   test -n "$ac_ct_OBJDUMP" && break
43247 done
43248 
43249   if test "x$ac_ct_OBJDUMP" = x; then
43250     OBJDUMP=""
43251   else
43252     case $cross_compiling:$ac_tool_warned in
43253 yes:)
43254 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43255 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43256 ac_tool_warned=yes ;;
43257 esac
43258     OBJDUMP=$ac_ct_OBJDUMP
43259   fi
43260 fi
43261 
43262   else
43263     # The variable is set, but is it from the command line or the environment?
43264 
43265     # Try to remove the string !OBJDUMP! from our list.
43266     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43267     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43268       # If it failed, the variable was not from the command line. Ignore it,
43269       # but warn the user (except for BASH, which is always set by the calling BASH).
43270       if test "xOBJDUMP" != xBASH; then
43271         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43272 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43273       fi
43274       # Try to locate tool using the code snippet
43275       if test -n "$ac_tool_prefix"; then
43276   for ac_prog in gobjdump objdump
43277   do
43278     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43279 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43281 $as_echo_n "checking for $ac_word... " >&6; }
43282 if ${ac_cv_prog_OBJDUMP+:} false; then :
43283   $as_echo_n "(cached) " >&6
43284 else
43285   if test -n "$OBJDUMP"; then
43286   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43287 else
43288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43289 for as_dir in $PATH
43290 do
43291   IFS=$as_save_IFS
43292   test -z "$as_dir" && as_dir=.
43293     for ac_exec_ext in '' $ac_executable_extensions; do
43294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43295     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43297     break 2
43298   fi
43299 done
43300   done
43301 IFS=$as_save_IFS
43302 
43303 fi
43304 fi
43305 OBJDUMP=$ac_cv_prog_OBJDUMP
43306 if test -n "$OBJDUMP"; then
43307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43308 $as_echo "$OBJDUMP" >&6; }
43309 else
43310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43311 $as_echo "no" >&6; }
43312 fi
43313 
43314 
43315     test -n "$OBJDUMP" && break
43316   done
43317 fi
43318 if test -z "$OBJDUMP"; then
43319   ac_ct_OBJDUMP=$OBJDUMP
43320   for ac_prog in gobjdump objdump
43321 do
43322   # Extract the first word of "$ac_prog", so it can be a program name with args.
43323 set dummy $ac_prog; ac_word=$2
43324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43325 $as_echo_n "checking for $ac_word... " >&6; }
43326 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43327   $as_echo_n "(cached) " >&6
43328 else
43329   if test -n "$ac_ct_OBJDUMP"; then
43330   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43331 else
43332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43333 for as_dir in $PATH
43334 do
43335   IFS=$as_save_IFS
43336   test -z "$as_dir" && as_dir=.
43337     for ac_exec_ext in '' $ac_executable_extensions; do
43338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43339     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43341     break 2
43342   fi
43343 done
43344   done
43345 IFS=$as_save_IFS
43346 
43347 fi
43348 fi
43349 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43350 if test -n "$ac_ct_OBJDUMP"; then
43351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43352 $as_echo "$ac_ct_OBJDUMP" >&6; }
43353 else
43354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43355 $as_echo "no" >&6; }
43356 fi
43357 
43358 
43359   test -n "$ac_ct_OBJDUMP" && break
43360 done
43361 
43362   if test "x$ac_ct_OBJDUMP" = x; then
43363     OBJDUMP=""
43364   else
43365     case $cross_compiling:$ac_tool_warned in
43366 yes:)
43367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43368 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43369 ac_tool_warned=yes ;;
43370 esac
43371     OBJDUMP=$ac_ct_OBJDUMP
43372   fi
43373 fi
43374 
43375     else
43376       # If it succeeded, then it was overridden by the user. We will use it
43377       # for the tool.
43378 
43379       # First remove it from the list of overridden variables, so we can test
43380       # for unknown variables in the end.
43381       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43382 
43383       # Check if we try to supply an empty value
43384       if test "x$OBJDUMP" = x; then
43385         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43386 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43387         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43388 $as_echo_n "checking for OBJDUMP... " >&6; }
43389         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43390 $as_echo "disabled" >&6; }
43391       else
43392         # Check if the provided tool contains a complete path.
43393         tool_specified="$OBJDUMP"
43394         tool_basename="${tool_specified##*/}"
43395         if test "x$tool_basename" = "x$tool_specified"; then
43396           # A command without a complete path is provided, search $PATH.
43397           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43398 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43399           # Extract the first word of "$tool_basename", so it can be a program name with args.
43400 set dummy $tool_basename; ac_word=$2
43401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43402 $as_echo_n "checking for $ac_word... " >&6; }
43403 if ${ac_cv_path_OBJDUMP+:} false; then :
43404   $as_echo_n "(cached) " >&6
43405 else
43406   case $OBJDUMP in
43407   [\\/]* | ?:[\\/]*)
43408   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43409   ;;
43410   *)
43411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43412 for as_dir in $PATH
43413 do
43414   IFS=$as_save_IFS
43415   test -z "$as_dir" && as_dir=.
43416     for ac_exec_ext in '' $ac_executable_extensions; do
43417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43418     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43420     break 2
43421   fi
43422 done
43423   done
43424 IFS=$as_save_IFS
43425 
43426   ;;
43427 esac
43428 fi
43429 OBJDUMP=$ac_cv_path_OBJDUMP
43430 if test -n "$OBJDUMP"; then
43431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43432 $as_echo "$OBJDUMP" >&6; }
43433 else
43434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43435 $as_echo "no" >&6; }
43436 fi
43437 
43438 
43439           if test "x$OBJDUMP" = x; then
43440             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43441           fi
43442         else
43443           # Otherwise we believe it is a complete path. Use it as it is.
43444           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43445 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43446           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43447 $as_echo_n "checking for OBJDUMP... " >&6; }
43448           if test ! -x "$tool_specified"; then
43449             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43450 $as_echo "not found" >&6; }
43451             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43452           fi
43453           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43454 $as_echo "$tool_specified" >&6; }
43455         fi
43456       fi
43457     fi
43458 
43459   fi
43460 
43461 
43462   if test "x$OBJDUMP" != x; then
43463     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43464     # bails if argument is missing.
43465 
43466   # Only process if variable expands to non-empty
43467 
43468   if test "x$OBJDUMP" != x; then
43469     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43470 
43471   # First separate the path from the arguments. This will split at the first
43472   # space.
43473   complete="$OBJDUMP"
43474   path="${complete%% *}"
43475   tmp="$complete EOL"
43476   arguments="${tmp#* }"
43477 
43478   # Input might be given as Windows format, start by converting to
43479   # unix format.
43480   new_path=`$CYGPATH -u "$path"`
43481 
43482   # Now try to locate executable using which
43483   new_path=`$WHICH "$new_path" 2> /dev/null`
43484   # bat and cmd files are not always considered executable in cygwin causing which
43485   # to not find them
43486   if test "x$new_path" = x \
43487       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43488       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43489     new_path=`$CYGPATH -u "$path"`
43490   fi
43491   if test "x$new_path" = x; then
43492     # Oops. Which didn't find the executable.
43493     # The splitting of arguments from the executable at a space might have been incorrect,
43494     # since paths with space are more likely in Windows. Give it another try with the whole
43495     # argument.
43496     path="$complete"
43497     arguments="EOL"
43498     new_path=`$CYGPATH -u "$path"`
43499     new_path=`$WHICH "$new_path" 2> /dev/null`
43500     # bat and cmd files are not always considered executable in cygwin causing which
43501     # to not find them
43502     if test "x$new_path" = x \
43503         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43504         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43505       new_path=`$CYGPATH -u "$path"`
43506     fi
43507     if test "x$new_path" = x; then
43508       # It's still not found. Now this is an unrecoverable error.
43509       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43510 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43511       has_space=`$ECHO "$complete" | $GREP " "`
43512       if test "x$has_space" != x; then
43513         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43514 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43515       fi
43516       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43517     fi
43518   fi
43519 
43520   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43521   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43522   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43523   # "foo.exe" is OK but "foo" is an error.
43524   #
43525   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43526   # It is also a way to make sure we got the proper file name for the real test later on.
43527   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43528   if test "x$test_shortpath" = x; then
43529     # Short path failed, file does not exist as specified.
43530     # Try adding .exe or .cmd
43531     if test -f "${new_path}.exe"; then
43532       input_to_shortpath="${new_path}.exe"
43533     elif test -f "${new_path}.cmd"; then
43534       input_to_shortpath="${new_path}.cmd"
43535     else
43536       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43537 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43538       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43539 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43540       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43541     fi
43542   else
43543     input_to_shortpath="$new_path"
43544   fi
43545 
43546   # Call helper function which possibly converts this using DOS-style short mode.
43547   # If so, the updated path is stored in $new_path.
43548   new_path="$input_to_shortpath"
43549 
43550   input_path="$input_to_shortpath"
43551   # Check if we need to convert this using DOS-style short mode. If the path
43552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43553   # take no chances and rewrite it.
43554   # Note: m4 eats our [], so we need to use [ and ] instead.
43555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43556   if test "x$has_forbidden_chars" != x; then
43557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43558     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43559     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43560     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43561       # Going to short mode and back again did indeed matter. Since short mode is
43562       # case insensitive, let's make it lowercase to improve readability.
43563       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43564       # Now convert it back to Unix-style (cygpath)
43565       input_path=`$CYGPATH -u "$shortmode_path"`
43566       new_path="$input_path"
43567     fi
43568   fi
43569 
43570   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43571   if test "x$test_cygdrive_prefix" = x; then
43572     # As a simple fix, exclude /usr/bin since it's not a real path.
43573     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43574       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43575       # a path prefixed by /cygdrive for fixpath to work.
43576       new_path="$CYGWIN_ROOT_PATH$input_path"
43577     fi
43578   fi
43579 
43580   # remove trailing .exe if any
43581   new_path="${new_path/%.exe/}"
43582 
43583     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43584 
43585   # First separate the path from the arguments. This will split at the first
43586   # space.
43587   complete="$OBJDUMP"
43588   path="${complete%% *}"
43589   tmp="$complete EOL"
43590   arguments="${tmp#* }"
43591 
43592   # Input might be given as Windows format, start by converting to
43593   # unix format.
43594   new_path="$path"
43595 
43596   windows_path="$new_path"
43597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43598     unix_path=`$CYGPATH -u "$windows_path"`
43599     new_path="$unix_path"
43600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43602     new_path="$unix_path"
43603   fi
43604 
43605 
43606   # Now try to locate executable using which
43607   new_path=`$WHICH "$new_path" 2> /dev/null`
43608 
43609   if test "x$new_path" = x; then
43610     # Oops. Which didn't find the executable.
43611     # The splitting of arguments from the executable at a space might have been incorrect,
43612     # since paths with space are more likely in Windows. Give it another try with the whole
43613     # argument.
43614     path="$complete"
43615     arguments="EOL"
43616     new_path="$path"
43617 
43618   windows_path="$new_path"
43619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43620     unix_path=`$CYGPATH -u "$windows_path"`
43621     new_path="$unix_path"
43622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43624     new_path="$unix_path"
43625   fi
43626 
43627 
43628     new_path=`$WHICH "$new_path" 2> /dev/null`
43629     # bat and cmd files are not always considered executable in MSYS causing which
43630     # to not find them
43631     if test "x$new_path" = x \
43632         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43633         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43634       new_path="$path"
43635 
43636   windows_path="$new_path"
43637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43638     unix_path=`$CYGPATH -u "$windows_path"`
43639     new_path="$unix_path"
43640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43642     new_path="$unix_path"
43643   fi
43644 
43645     fi
43646 
43647     if test "x$new_path" = x; then
43648       # It's still not found. Now this is an unrecoverable error.
43649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43650 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43651       has_space=`$ECHO "$complete" | $GREP " "`
43652       if test "x$has_space" != x; then
43653         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43654 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43655       fi
43656       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43657     fi
43658   fi
43659 
43660   # Now new_path has a complete unix path to the binary
43661   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43662     # Keep paths in /bin as-is, but remove trailing .exe if any
43663     new_path="${new_path/%.exe/}"
43664     # Do not save /bin paths to all_fixpath_prefixes!
43665   else
43666     # Not in mixed or Windows style, start by that.
43667     new_path=`cmd //c echo $new_path`
43668 
43669   input_path="$new_path"
43670   # Check if we need to convert this using DOS-style short mode. If the path
43671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43672   # take no chances and rewrite it.
43673   # Note: m4 eats our [], so we need to use [ and ] instead.
43674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43675   if test "x$has_forbidden_chars" != x; then
43676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43678   fi
43679 
43680     # Output is in $new_path
43681 
43682   windows_path="$new_path"
43683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43684     unix_path=`$CYGPATH -u "$windows_path"`
43685     new_path="$unix_path"
43686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43688     new_path="$unix_path"
43689   fi
43690 
43691     # remove trailing .exe if any
43692     new_path="${new_path/%.exe/}"
43693 
43694     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43695     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43696   fi
43697 
43698     else
43699       # We're on a unix platform. Hooray! :)
43700       # First separate the path from the arguments. This will split at the first
43701       # space.
43702       complete="$OBJDUMP"
43703       path="${complete%% *}"
43704       tmp="$complete EOL"
43705       arguments="${tmp#* }"
43706 
43707       # Cannot rely on the command "which" here since it doesn't always work.
43708       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43709       if test -z "$is_absolute_path"; then
43710         # Path to executable is not absolute. Find it.
43711         IFS_save="$IFS"
43712         IFS=:
43713         for p in $PATH; do
43714           if test -f "$p/$path" && test -x "$p/$path"; then
43715             new_path="$p/$path"
43716             break
43717           fi
43718         done
43719         IFS="$IFS_save"
43720       else
43721         # This is an absolute path, we can use it without further modifications.
43722         new_path="$path"
43723       fi
43724 
43725       if test "x$new_path" = x; then
43726         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43727 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43728         has_space=`$ECHO "$complete" | $GREP " "`
43729         if test "x$has_space" != x; then
43730           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43731 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43732         fi
43733         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43734       fi
43735     fi
43736 
43737     # Now join together the path and the arguments once again
43738     if test "x$arguments" != xEOL; then
43739       new_complete="$new_path ${arguments% *}"
43740     else
43741       new_complete="$new_path"
43742     fi
43743 
43744     if test "x$complete" != "x$new_complete"; then
43745       OBJDUMP="$new_complete"
43746       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43747 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43748     fi
43749   fi
43750 
43751   fi
43752 
43753 
43754   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43755   # to remain in place. Otherwise the compiler will not work in some siutations
43756   # in later configure checks.
43757   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43758     PATH="$OLD_PATH"
43759   fi
43760 
43761   # Restore the flags to the user specified values.
43762   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43763   CFLAGS="$ORG_CFLAGS"
43764   CXXFLAGS="$ORG_CXXFLAGS"
43765 
43766 
43767 # Finally do some processing after the detection phase
43768 
43769   if test "x$COMPILE_TYPE" = "xcross"; then
43770     # Now we need to find a C/C++ compiler that can build executables for the
43771     # build platform. We can't use the AC_PROG_CC macro, since it can only be
43772     # used once. Also, we need to do this without adding a tools dir to the
43773     # path, otherwise we might pick up cross-compilers which don't use standard
43774     # naming.
43775 
43776     OLDPATH="$PATH"
43777 
43778 
43779 # Check whether --with-build-devkit was given.
43780 if test "${with_build_devkit+set}" = set; then :
43781   withval=$with_build_devkit;
43782 fi
43783 
43784     if test "x$with_build_devkit" = "xyes"; then
43785       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43786     elif test -n "$with_build_devkit"; then
43787       if test ! -d "$with_build_devkit"; then
43788         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43789       else
43790 
43791   # Only process if variable expands to non-empty
43792 
43793   if test "x$with_build_devkit" != x; then
43794     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43795 
43796   # Input might be given as Windows format, start by converting to
43797   # unix format.
43798   path="$with_build_devkit"
43799   new_path=`$CYGPATH -u "$path"`
43800 
43801   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43802   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43803   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43804   # "foo.exe" is OK but "foo" is an error.
43805   #
43806   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43807   # It is also a way to make sure we got the proper file name for the real test later on.
43808   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43809   if test "x$test_shortpath" = x; then
43810     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43811 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43812     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43813   fi
43814 
43815   # Call helper function which possibly converts this using DOS-style short mode.
43816   # If so, the updated path is stored in $new_path.
43817 
43818   input_path="$new_path"
43819   # Check if we need to convert this using DOS-style short mode. If the path
43820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43821   # take no chances and rewrite it.
43822   # Note: m4 eats our [], so we need to use [ and ] instead.
43823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43824   if test "x$has_forbidden_chars" != x; then
43825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43826     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43827     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43828     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43829       # Going to short mode and back again did indeed matter. Since short mode is
43830       # case insensitive, let's make it lowercase to improve readability.
43831       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43832       # Now convert it back to Unix-style (cygpath)
43833       input_path=`$CYGPATH -u "$shortmode_path"`
43834       new_path="$input_path"
43835     fi
43836   fi
43837 
43838   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43839   if test "x$test_cygdrive_prefix" = x; then
43840     # As a simple fix, exclude /usr/bin since it's not a real path.
43841     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43842       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43843       # a path prefixed by /cygdrive for fixpath to work.
43844       new_path="$CYGWIN_ROOT_PATH$input_path"
43845     fi
43846   fi
43847 
43848 
43849   if test "x$path" != "x$new_path"; then
43850     with_build_devkit="$new_path"
43851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43852 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43853   fi
43854 
43855     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43856 
43857   path="$with_build_devkit"
43858   has_colon=`$ECHO $path | $GREP ^.:`
43859   new_path="$path"
43860   if test "x$has_colon" = x; then
43861     # Not in mixed or Windows style, start by that.
43862     new_path=`cmd //c echo $path`
43863   fi
43864 
43865 
43866   input_path="$new_path"
43867   # Check if we need to convert this using DOS-style short mode. If the path
43868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43869   # take no chances and rewrite it.
43870   # Note: m4 eats our [], so we need to use [ and ] instead.
43871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43872   if test "x$has_forbidden_chars" != x; then
43873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43874     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43875   fi
43876 
43877 
43878   windows_path="$new_path"
43879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43880     unix_path=`$CYGPATH -u "$windows_path"`
43881     new_path="$unix_path"
43882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43884     new_path="$unix_path"
43885   fi
43886 
43887   if test "x$path" != "x$new_path"; then
43888     with_build_devkit="$new_path"
43889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43890 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43891   fi
43892 
43893   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43894   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43895 
43896     else
43897       # We're on a unix platform. Hooray! :)
43898       path="$with_build_devkit"
43899       has_space=`$ECHO "$path" | $GREP " "`
43900       if test "x$has_space" != x; then
43901         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43902 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43903         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43904       fi
43905 
43906       # Use eval to expand a potential ~
43907       eval path="$path"
43908       if test ! -f "$path" && test ! -d "$path"; then
43909         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43910       fi
43911 
43912       if test -d "$path"; then
43913         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43914       else
43915         dir="`$DIRNAME "$path"`"
43916         base="`$BASENAME "$path"`"
43917         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43918       fi
43919     fi
43920   fi
43921 
43922         BUILD_DEVKIT_ROOT="$with_build_devkit"
43923         # Check for a meta data info file in the root of the devkit
43924         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43925           # Process devkit.info so that existing devkit variables are not
43926           # modified by this
43927           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43928               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43929               -e "s/\$host/\$build/g" \
43930               $BUILD_DEVKIT_ROOT/devkit.info \
43931               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43932           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43933           # This potentially sets the following:
43934           # A descriptive name of the devkit
43935 
43936   if test "x$BUILD_DEVKIT_NAME" = x; then
43937     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43938   fi
43939 
43940           # Corresponds to --with-extra-path
43941 
43942   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43943     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43944   fi
43945 
43946           # Corresponds to --with-toolchain-path
43947 
43948   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43949     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43950   fi
43951 
43952           # Corresponds to --with-sysroot
43953 
43954   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43955     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43956   fi
43957 
43958           # Skip the Window specific parts
43959         fi
43960 
43961         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43962 $as_echo_n "checking for build platform devkit... " >&6; }
43963         if test "x$BUILD_DEVKIT_NAME" != x; then
43964           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43965 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43966         else
43967           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43968 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43969         fi
43970 
43971         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43972 
43973   if test "x$BUILD_SYSROOT" != "x"; then
43974     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43975       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43976         # Solaris Studio does not have a concept of sysroot. Instead we must
43977         # make sure the default include and lib dirs are appended to each
43978         # compile and link command line. Must also add -I-xbuiltin to enable
43979         # inlining of system functions and intrinsics.
43980         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43981         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43982             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43983       fi
43984     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43985       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43986       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43987     elif test "x$TOOLCHAIN_TYPE" = xclang; then
43988       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43989       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43990     fi
43991     # Propagate the sysroot args to hotspot
43992     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43993     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43994     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43995     # The global CFLAGS and LDFLAGS variables need these for configure to function
43996     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43997     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43998     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43999     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44000   fi
44001 
44002   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44003     # We also need -iframework<path>/System/Library/Frameworks
44004     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44005     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44006     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44007     # set this here so it doesn't have to be peppered throughout the forest
44008     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44009     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44010   fi
44011 
44012 
44013 
44014 
44015 
44016          # Fallback default of just /bin if DEVKIT_PATH is not defined
44017         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44018           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44019         fi
44020         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44021       fi
44022     fi
44023 
44024     # FIXME: we should list the discovered compilers as an exclude pattern!
44025     # If we do that, we can do this detection before POST_DETECTION, and still
44026     # find the build compilers in the tools dir, if needed.
44027 
44028 
44029 
44030   # Publish this variable in the help.
44031 
44032 
44033   if [ -z "${BUILD_CC+x}" ]; then
44034     # The variable is not set by user, try to locate tool using the code snippet
44035     for ac_prog in cl cc gcc
44036 do
44037   # Extract the first word of "$ac_prog", so it can be a program name with args.
44038 set dummy $ac_prog; ac_word=$2
44039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44040 $as_echo_n "checking for $ac_word... " >&6; }
44041 if ${ac_cv_path_BUILD_CC+:} false; then :
44042   $as_echo_n "(cached) " >&6
44043 else
44044   case $BUILD_CC in
44045   [\\/]* | ?:[\\/]*)
44046   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44047   ;;
44048   *)
44049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44050 for as_dir in $PATH
44051 do
44052   IFS=$as_save_IFS
44053   test -z "$as_dir" && as_dir=.
44054     for ac_exec_ext in '' $ac_executable_extensions; do
44055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44056     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44058     break 2
44059   fi
44060 done
44061   done
44062 IFS=$as_save_IFS
44063 
44064   ;;
44065 esac
44066 fi
44067 BUILD_CC=$ac_cv_path_BUILD_CC
44068 if test -n "$BUILD_CC"; then
44069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44070 $as_echo "$BUILD_CC" >&6; }
44071 else
44072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44073 $as_echo "no" >&6; }
44074 fi
44075 
44076 
44077   test -n "$BUILD_CC" && break
44078 done
44079 
44080   else
44081     # The variable is set, but is it from the command line or the environment?
44082 
44083     # Try to remove the string !BUILD_CC! from our list.
44084     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44085     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44086       # If it failed, the variable was not from the command line. Ignore it,
44087       # but warn the user (except for BASH, which is always set by the calling BASH).
44088       if test "xBUILD_CC" != xBASH; then
44089         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44090 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44091       fi
44092       # Try to locate tool using the code snippet
44093       for ac_prog in cl cc gcc
44094 do
44095   # Extract the first word of "$ac_prog", so it can be a program name with args.
44096 set dummy $ac_prog; ac_word=$2
44097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44098 $as_echo_n "checking for $ac_word... " >&6; }
44099 if ${ac_cv_path_BUILD_CC+:} false; then :
44100   $as_echo_n "(cached) " >&6
44101 else
44102   case $BUILD_CC in
44103   [\\/]* | ?:[\\/]*)
44104   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44105   ;;
44106   *)
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_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
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   ;;
44123 esac
44124 fi
44125 BUILD_CC=$ac_cv_path_BUILD_CC
44126 if test -n "$BUILD_CC"; then
44127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44128 $as_echo "$BUILD_CC" >&6; }
44129 else
44130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44131 $as_echo "no" >&6; }
44132 fi
44133 
44134 
44135   test -n "$BUILD_CC" && break
44136 done
44137 
44138     else
44139       # If it succeeded, then it was overridden by the user. We will use it
44140       # for the tool.
44141 
44142       # First remove it from the list of overridden variables, so we can test
44143       # for unknown variables in the end.
44144       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44145 
44146       # Check if we try to supply an empty value
44147       if test "x$BUILD_CC" = x; then
44148         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44149 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44150         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44151 $as_echo_n "checking for BUILD_CC... " >&6; }
44152         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44153 $as_echo "disabled" >&6; }
44154       else
44155         # Check if the provided tool contains a complete path.
44156         tool_specified="$BUILD_CC"
44157         tool_basename="${tool_specified##*/}"
44158         if test "x$tool_basename" = "x$tool_specified"; then
44159           # A command without a complete path is provided, search $PATH.
44160           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44161 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44162           # Extract the first word of "$tool_basename", so it can be a program name with args.
44163 set dummy $tool_basename; ac_word=$2
44164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44165 $as_echo_n "checking for $ac_word... " >&6; }
44166 if ${ac_cv_path_BUILD_CC+:} false; then :
44167   $as_echo_n "(cached) " >&6
44168 else
44169   case $BUILD_CC in
44170   [\\/]* | ?:[\\/]*)
44171   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44172   ;;
44173   *)
44174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44175 for as_dir in $PATH
44176 do
44177   IFS=$as_save_IFS
44178   test -z "$as_dir" && as_dir=.
44179     for ac_exec_ext in '' $ac_executable_extensions; do
44180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44181     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44183     break 2
44184   fi
44185 done
44186   done
44187 IFS=$as_save_IFS
44188 
44189   ;;
44190 esac
44191 fi
44192 BUILD_CC=$ac_cv_path_BUILD_CC
44193 if test -n "$BUILD_CC"; then
44194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44195 $as_echo "$BUILD_CC" >&6; }
44196 else
44197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44198 $as_echo "no" >&6; }
44199 fi
44200 
44201 
44202           if test "x$BUILD_CC" = x; then
44203             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44204           fi
44205         else
44206           # Otherwise we believe it is a complete path. Use it as it is.
44207           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44208 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44209           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44210 $as_echo_n "checking for BUILD_CC... " >&6; }
44211           if test ! -x "$tool_specified"; then
44212             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44213 $as_echo "not found" >&6; }
44214             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44215           fi
44216           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44217 $as_echo "$tool_specified" >&6; }
44218         fi
44219       fi
44220     fi
44221 
44222   fi
44223 
44224 
44225 
44226   if test "x$BUILD_CC" = x; then
44227     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44228   fi
44229 
44230 
44231 
44232   # Only process if variable expands to non-empty
44233 
44234   if test "x$BUILD_CC" != x; then
44235     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44236 
44237   # First separate the path from the arguments. This will split at the first
44238   # space.
44239   complete="$BUILD_CC"
44240   path="${complete%% *}"
44241   tmp="$complete EOL"
44242   arguments="${tmp#* }"
44243 
44244   # Input might be given as Windows format, start by converting to
44245   # unix format.
44246   new_path=`$CYGPATH -u "$path"`
44247 
44248   # Now try to locate executable using which
44249   new_path=`$WHICH "$new_path" 2> /dev/null`
44250   # bat and cmd files are not always considered executable in cygwin causing which
44251   # to not find them
44252   if test "x$new_path" = x \
44253       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44254       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44255     new_path=`$CYGPATH -u "$path"`
44256   fi
44257   if test "x$new_path" = x; then
44258     # Oops. Which didn't find the executable.
44259     # The splitting of arguments from the executable at a space might have been incorrect,
44260     # since paths with space are more likely in Windows. Give it another try with the whole
44261     # argument.
44262     path="$complete"
44263     arguments="EOL"
44264     new_path=`$CYGPATH -u "$path"`
44265     new_path=`$WHICH "$new_path" 2> /dev/null`
44266     # bat and cmd files are not always considered executable in cygwin causing which
44267     # to not find them
44268     if test "x$new_path" = x \
44269         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44270         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44271       new_path=`$CYGPATH -u "$path"`
44272     fi
44273     if test "x$new_path" = x; then
44274       # It's still not found. Now this is an unrecoverable error.
44275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44276 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44277       has_space=`$ECHO "$complete" | $GREP " "`
44278       if test "x$has_space" != x; then
44279         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44280 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44281       fi
44282       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44283     fi
44284   fi
44285 
44286   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44287   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44288   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44289   # "foo.exe" is OK but "foo" is an error.
44290   #
44291   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44292   # It is also a way to make sure we got the proper file name for the real test later on.
44293   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44294   if test "x$test_shortpath" = x; then
44295     # Short path failed, file does not exist as specified.
44296     # Try adding .exe or .cmd
44297     if test -f "${new_path}.exe"; then
44298       input_to_shortpath="${new_path}.exe"
44299     elif test -f "${new_path}.cmd"; then
44300       input_to_shortpath="${new_path}.cmd"
44301     else
44302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44303 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44304       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44305 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44306       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44307     fi
44308   else
44309     input_to_shortpath="$new_path"
44310   fi
44311 
44312   # Call helper function which possibly converts this using DOS-style short mode.
44313   # If so, the updated path is stored in $new_path.
44314   new_path="$input_to_shortpath"
44315 
44316   input_path="$input_to_shortpath"
44317   # Check if we need to convert this using DOS-style short mode. If the path
44318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44319   # take no chances and rewrite it.
44320   # Note: m4 eats our [], so we need to use [ and ] instead.
44321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44322   if test "x$has_forbidden_chars" != x; then
44323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44324     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44325     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44326     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44327       # Going to short mode and back again did indeed matter. Since short mode is
44328       # case insensitive, let's make it lowercase to improve readability.
44329       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44330       # Now convert it back to Unix-style (cygpath)
44331       input_path=`$CYGPATH -u "$shortmode_path"`
44332       new_path="$input_path"
44333     fi
44334   fi
44335 
44336   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44337   if test "x$test_cygdrive_prefix" = x; then
44338     # As a simple fix, exclude /usr/bin since it's not a real path.
44339     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44340       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44341       # a path prefixed by /cygdrive for fixpath to work.
44342       new_path="$CYGWIN_ROOT_PATH$input_path"
44343     fi
44344   fi
44345 
44346   # remove trailing .exe if any
44347   new_path="${new_path/%.exe/}"
44348 
44349     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44350 
44351   # First separate the path from the arguments. This will split at the first
44352   # space.
44353   complete="$BUILD_CC"
44354   path="${complete%% *}"
44355   tmp="$complete EOL"
44356   arguments="${tmp#* }"
44357 
44358   # Input might be given as Windows format, start by converting to
44359   # unix format.
44360   new_path="$path"
44361 
44362   windows_path="$new_path"
44363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44364     unix_path=`$CYGPATH -u "$windows_path"`
44365     new_path="$unix_path"
44366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44368     new_path="$unix_path"
44369   fi
44370 
44371 
44372   # Now try to locate executable using which
44373   new_path=`$WHICH "$new_path" 2> /dev/null`
44374 
44375   if test "x$new_path" = x; then
44376     # Oops. Which didn't find the executable.
44377     # The splitting of arguments from the executable at a space might have been incorrect,
44378     # since paths with space are more likely in Windows. Give it another try with the whole
44379     # argument.
44380     path="$complete"
44381     arguments="EOL"
44382     new_path="$path"
44383 
44384   windows_path="$new_path"
44385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44386     unix_path=`$CYGPATH -u "$windows_path"`
44387     new_path="$unix_path"
44388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44390     new_path="$unix_path"
44391   fi
44392 
44393 
44394     new_path=`$WHICH "$new_path" 2> /dev/null`
44395     # bat and cmd files are not always considered executable in MSYS causing which
44396     # to not find them
44397     if test "x$new_path" = x \
44398         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44399         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44400       new_path="$path"
44401 
44402   windows_path="$new_path"
44403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44404     unix_path=`$CYGPATH -u "$windows_path"`
44405     new_path="$unix_path"
44406   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44407     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44408     new_path="$unix_path"
44409   fi
44410 
44411     fi
44412 
44413     if test "x$new_path" = x; then
44414       # It's still not found. Now this is an unrecoverable error.
44415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44416 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44417       has_space=`$ECHO "$complete" | $GREP " "`
44418       if test "x$has_space" != x; then
44419         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44420 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44421       fi
44422       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44423     fi
44424   fi
44425 
44426   # Now new_path has a complete unix path to the binary
44427   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44428     # Keep paths in /bin as-is, but remove trailing .exe if any
44429     new_path="${new_path/%.exe/}"
44430     # Do not save /bin paths to all_fixpath_prefixes!
44431   else
44432     # Not in mixed or Windows style, start by that.
44433     new_path=`cmd //c echo $new_path`
44434 
44435   input_path="$new_path"
44436   # Check if we need to convert this using DOS-style short mode. If the path
44437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44438   # take no chances and rewrite it.
44439   # Note: m4 eats our [], so we need to use [ and ] instead.
44440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44441   if test "x$has_forbidden_chars" != x; then
44442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44443     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44444   fi
44445 
44446     # Output is in $new_path
44447 
44448   windows_path="$new_path"
44449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44450     unix_path=`$CYGPATH -u "$windows_path"`
44451     new_path="$unix_path"
44452   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44453     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44454     new_path="$unix_path"
44455   fi
44456 
44457     # remove trailing .exe if any
44458     new_path="${new_path/%.exe/}"
44459 
44460     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44461     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44462   fi
44463 
44464     else
44465       # We're on a unix platform. Hooray! :)
44466       # First separate the path from the arguments. This will split at the first
44467       # space.
44468       complete="$BUILD_CC"
44469       path="${complete%% *}"
44470       tmp="$complete EOL"
44471       arguments="${tmp#* }"
44472 
44473       # Cannot rely on the command "which" here since it doesn't always work.
44474       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44475       if test -z "$is_absolute_path"; then
44476         # Path to executable is not absolute. Find it.
44477         IFS_save="$IFS"
44478         IFS=:
44479         for p in $PATH; do
44480           if test -f "$p/$path" && test -x "$p/$path"; then
44481             new_path="$p/$path"
44482             break
44483           fi
44484         done
44485         IFS="$IFS_save"
44486       else
44487         # This is an absolute path, we can use it without further modifications.
44488         new_path="$path"
44489       fi
44490 
44491       if test "x$new_path" = x; then
44492         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44493 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44494         has_space=`$ECHO "$complete" | $GREP " "`
44495         if test "x$has_space" != x; then
44496           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44497 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44498         fi
44499         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44500       fi
44501     fi
44502 
44503     # Now join together the path and the arguments once again
44504     if test "x$arguments" != xEOL; then
44505       new_complete="$new_path ${arguments% *}"
44506     else
44507       new_complete="$new_path"
44508     fi
44509 
44510     if test "x$complete" != "x$new_complete"; then
44511       BUILD_CC="$new_complete"
44512       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44513 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44514     fi
44515   fi
44516 
44517 
44518 
44519 
44520   # Publish this variable in the help.
44521 
44522 
44523   if [ -z "${BUILD_CXX+x}" ]; then
44524     # The variable is not set by user, try to locate tool using the code snippet
44525     for ac_prog in cl CC g++
44526 do
44527   # Extract the first word of "$ac_prog", so it can be a program name with args.
44528 set dummy $ac_prog; ac_word=$2
44529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44530 $as_echo_n "checking for $ac_word... " >&6; }
44531 if ${ac_cv_path_BUILD_CXX+:} false; then :
44532   $as_echo_n "(cached) " >&6
44533 else
44534   case $BUILD_CXX in
44535   [\\/]* | ?:[\\/]*)
44536   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44537   ;;
44538   *)
44539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44540 for as_dir in $PATH
44541 do
44542   IFS=$as_save_IFS
44543   test -z "$as_dir" && as_dir=.
44544     for ac_exec_ext in '' $ac_executable_extensions; do
44545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44546     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44548     break 2
44549   fi
44550 done
44551   done
44552 IFS=$as_save_IFS
44553 
44554   ;;
44555 esac
44556 fi
44557 BUILD_CXX=$ac_cv_path_BUILD_CXX
44558 if test -n "$BUILD_CXX"; then
44559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44560 $as_echo "$BUILD_CXX" >&6; }
44561 else
44562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44563 $as_echo "no" >&6; }
44564 fi
44565 
44566 
44567   test -n "$BUILD_CXX" && break
44568 done
44569 
44570   else
44571     # The variable is set, but is it from the command line or the environment?
44572 
44573     # Try to remove the string !BUILD_CXX! from our list.
44574     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44575     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44576       # If it failed, the variable was not from the command line. Ignore it,
44577       # but warn the user (except for BASH, which is always set by the calling BASH).
44578       if test "xBUILD_CXX" != xBASH; then
44579         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44580 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44581       fi
44582       # Try to locate tool using the code snippet
44583       for ac_prog in cl CC g++
44584 do
44585   # Extract the first word of "$ac_prog", so it can be a program name with args.
44586 set dummy $ac_prog; ac_word=$2
44587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44588 $as_echo_n "checking for $ac_word... " >&6; }
44589 if ${ac_cv_path_BUILD_CXX+:} false; then :
44590   $as_echo_n "(cached) " >&6
44591 else
44592   case $BUILD_CXX in
44593   [\\/]* | ?:[\\/]*)
44594   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44595   ;;
44596   *)
44597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44598 for as_dir in $PATH
44599 do
44600   IFS=$as_save_IFS
44601   test -z "$as_dir" && as_dir=.
44602     for ac_exec_ext in '' $ac_executable_extensions; do
44603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44604     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44606     break 2
44607   fi
44608 done
44609   done
44610 IFS=$as_save_IFS
44611 
44612   ;;
44613 esac
44614 fi
44615 BUILD_CXX=$ac_cv_path_BUILD_CXX
44616 if test -n "$BUILD_CXX"; then
44617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44618 $as_echo "$BUILD_CXX" >&6; }
44619 else
44620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44621 $as_echo "no" >&6; }
44622 fi
44623 
44624 
44625   test -n "$BUILD_CXX" && break
44626 done
44627 
44628     else
44629       # If it succeeded, then it was overridden by the user. We will use it
44630       # for the tool.
44631 
44632       # First remove it from the list of overridden variables, so we can test
44633       # for unknown variables in the end.
44634       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44635 
44636       # Check if we try to supply an empty value
44637       if test "x$BUILD_CXX" = x; then
44638         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44639 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44640         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44641 $as_echo_n "checking for BUILD_CXX... " >&6; }
44642         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44643 $as_echo "disabled" >&6; }
44644       else
44645         # Check if the provided tool contains a complete path.
44646         tool_specified="$BUILD_CXX"
44647         tool_basename="${tool_specified##*/}"
44648         if test "x$tool_basename" = "x$tool_specified"; then
44649           # A command without a complete path is provided, search $PATH.
44650           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44651 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44652           # Extract the first word of "$tool_basename", so it can be a program name with args.
44653 set dummy $tool_basename; ac_word=$2
44654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44655 $as_echo_n "checking for $ac_word... " >&6; }
44656 if ${ac_cv_path_BUILD_CXX+:} false; then :
44657   $as_echo_n "(cached) " >&6
44658 else
44659   case $BUILD_CXX in
44660   [\\/]* | ?:[\\/]*)
44661   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44662   ;;
44663   *)
44664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44665 for as_dir in $PATH
44666 do
44667   IFS=$as_save_IFS
44668   test -z "$as_dir" && as_dir=.
44669     for ac_exec_ext in '' $ac_executable_extensions; do
44670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44671     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44673     break 2
44674   fi
44675 done
44676   done
44677 IFS=$as_save_IFS
44678 
44679   ;;
44680 esac
44681 fi
44682 BUILD_CXX=$ac_cv_path_BUILD_CXX
44683 if test -n "$BUILD_CXX"; then
44684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44685 $as_echo "$BUILD_CXX" >&6; }
44686 else
44687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44688 $as_echo "no" >&6; }
44689 fi
44690 
44691 
44692           if test "x$BUILD_CXX" = x; then
44693             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44694           fi
44695         else
44696           # Otherwise we believe it is a complete path. Use it as it is.
44697           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44698 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44699           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44700 $as_echo_n "checking for BUILD_CXX... " >&6; }
44701           if test ! -x "$tool_specified"; then
44702             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44703 $as_echo "not found" >&6; }
44704             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44705           fi
44706           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44707 $as_echo "$tool_specified" >&6; }
44708         fi
44709       fi
44710     fi
44711 
44712   fi
44713 
44714 
44715 
44716   if test "x$BUILD_CXX" = x; then
44717     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44718   fi
44719 
44720 
44721 
44722   # Only process if variable expands to non-empty
44723 
44724   if test "x$BUILD_CXX" != x; then
44725     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44726 
44727   # First separate the path from the arguments. This will split at the first
44728   # space.
44729   complete="$BUILD_CXX"
44730   path="${complete%% *}"
44731   tmp="$complete EOL"
44732   arguments="${tmp#* }"
44733 
44734   # Input might be given as Windows format, start by converting to
44735   # unix format.
44736   new_path=`$CYGPATH -u "$path"`
44737 
44738   # Now try to locate executable using which
44739   new_path=`$WHICH "$new_path" 2> /dev/null`
44740   # bat and cmd files are not always considered executable in cygwin causing which
44741   # to not find them
44742   if test "x$new_path" = x \
44743       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44744       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44745     new_path=`$CYGPATH -u "$path"`
44746   fi
44747   if test "x$new_path" = x; then
44748     # Oops. Which didn't find the executable.
44749     # The splitting of arguments from the executable at a space might have been incorrect,
44750     # since paths with space are more likely in Windows. Give it another try with the whole
44751     # argument.
44752     path="$complete"
44753     arguments="EOL"
44754     new_path=`$CYGPATH -u "$path"`
44755     new_path=`$WHICH "$new_path" 2> /dev/null`
44756     # bat and cmd files are not always considered executable in cygwin causing which
44757     # to not find them
44758     if test "x$new_path" = x \
44759         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44760         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44761       new_path=`$CYGPATH -u "$path"`
44762     fi
44763     if test "x$new_path" = x; then
44764       # It's still not found. Now this is an unrecoverable error.
44765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44766 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44767       has_space=`$ECHO "$complete" | $GREP " "`
44768       if test "x$has_space" != x; then
44769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44771       fi
44772       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44773     fi
44774   fi
44775 
44776   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44777   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44778   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44779   # "foo.exe" is OK but "foo" is an error.
44780   #
44781   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44782   # It is also a way to make sure we got the proper file name for the real test later on.
44783   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44784   if test "x$test_shortpath" = x; then
44785     # Short path failed, file does not exist as specified.
44786     # Try adding .exe or .cmd
44787     if test -f "${new_path}.exe"; then
44788       input_to_shortpath="${new_path}.exe"
44789     elif test -f "${new_path}.cmd"; then
44790       input_to_shortpath="${new_path}.cmd"
44791     else
44792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44793 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44794       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44795 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44796       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44797     fi
44798   else
44799     input_to_shortpath="$new_path"
44800   fi
44801 
44802   # Call helper function which possibly converts this using DOS-style short mode.
44803   # If so, the updated path is stored in $new_path.
44804   new_path="$input_to_shortpath"
44805 
44806   input_path="$input_to_shortpath"
44807   # Check if we need to convert this using DOS-style short mode. If the path
44808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44809   # take no chances and rewrite it.
44810   # Note: m4 eats our [], so we need to use [ and ] instead.
44811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44812   if test "x$has_forbidden_chars" != x; then
44813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44817       # Going to short mode and back again did indeed matter. Since short mode is
44818       # case insensitive, let's make it lowercase to improve readability.
44819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44820       # Now convert it back to Unix-style (cygpath)
44821       input_path=`$CYGPATH -u "$shortmode_path"`
44822       new_path="$input_path"
44823     fi
44824   fi
44825 
44826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44827   if test "x$test_cygdrive_prefix" = x; then
44828     # As a simple fix, exclude /usr/bin since it's not a real path.
44829     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44831       # a path prefixed by /cygdrive for fixpath to work.
44832       new_path="$CYGWIN_ROOT_PATH$input_path"
44833     fi
44834   fi
44835 
44836   # remove trailing .exe if any
44837   new_path="${new_path/%.exe/}"
44838 
44839     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44840 
44841   # First separate the path from the arguments. This will split at the first
44842   # space.
44843   complete="$BUILD_CXX"
44844   path="${complete%% *}"
44845   tmp="$complete EOL"
44846   arguments="${tmp#* }"
44847 
44848   # Input might be given as Windows format, start by converting to
44849   # unix format.
44850   new_path="$path"
44851 
44852   windows_path="$new_path"
44853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44854     unix_path=`$CYGPATH -u "$windows_path"`
44855     new_path="$unix_path"
44856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44858     new_path="$unix_path"
44859   fi
44860 
44861 
44862   # Now try to locate executable using which
44863   new_path=`$WHICH "$new_path" 2> /dev/null`
44864 
44865   if test "x$new_path" = x; then
44866     # Oops. Which didn't find the executable.
44867     # The splitting of arguments from the executable at a space might have been incorrect,
44868     # since paths with space are more likely in Windows. Give it another try with the whole
44869     # argument.
44870     path="$complete"
44871     arguments="EOL"
44872     new_path="$path"
44873 
44874   windows_path="$new_path"
44875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44876     unix_path=`$CYGPATH -u "$windows_path"`
44877     new_path="$unix_path"
44878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44880     new_path="$unix_path"
44881   fi
44882 
44883 
44884     new_path=`$WHICH "$new_path" 2> /dev/null`
44885     # bat and cmd files are not always considered executable in MSYS causing which
44886     # to not find them
44887     if test "x$new_path" = x \
44888         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44889         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44890       new_path="$path"
44891 
44892   windows_path="$new_path"
44893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44894     unix_path=`$CYGPATH -u "$windows_path"`
44895     new_path="$unix_path"
44896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44898     new_path="$unix_path"
44899   fi
44900 
44901     fi
44902 
44903     if test "x$new_path" = x; then
44904       # It's still not found. Now this is an unrecoverable error.
44905       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44906 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44907       has_space=`$ECHO "$complete" | $GREP " "`
44908       if test "x$has_space" != x; then
44909         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44910 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44911       fi
44912       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44913     fi
44914   fi
44915 
44916   # Now new_path has a complete unix path to the binary
44917   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44918     # Keep paths in /bin as-is, but remove trailing .exe if any
44919     new_path="${new_path/%.exe/}"
44920     # Do not save /bin paths to all_fixpath_prefixes!
44921   else
44922     # Not in mixed or Windows style, start by that.
44923     new_path=`cmd //c echo $new_path`
44924 
44925   input_path="$new_path"
44926   # Check if we need to convert this using DOS-style short mode. If the path
44927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44928   # take no chances and rewrite it.
44929   # Note: m4 eats our [], so we need to use [ and ] instead.
44930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44931   if test "x$has_forbidden_chars" != x; then
44932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44933     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44934   fi
44935 
44936     # Output is in $new_path
44937 
44938   windows_path="$new_path"
44939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44940     unix_path=`$CYGPATH -u "$windows_path"`
44941     new_path="$unix_path"
44942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44944     new_path="$unix_path"
44945   fi
44946 
44947     # remove trailing .exe if any
44948     new_path="${new_path/%.exe/}"
44949 
44950     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44951     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44952   fi
44953 
44954     else
44955       # We're on a unix platform. Hooray! :)
44956       # First separate the path from the arguments. This will split at the first
44957       # space.
44958       complete="$BUILD_CXX"
44959       path="${complete%% *}"
44960       tmp="$complete EOL"
44961       arguments="${tmp#* }"
44962 
44963       # Cannot rely on the command "which" here since it doesn't always work.
44964       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44965       if test -z "$is_absolute_path"; then
44966         # Path to executable is not absolute. Find it.
44967         IFS_save="$IFS"
44968         IFS=:
44969         for p in $PATH; do
44970           if test -f "$p/$path" && test -x "$p/$path"; then
44971             new_path="$p/$path"
44972             break
44973           fi
44974         done
44975         IFS="$IFS_save"
44976       else
44977         # This is an absolute path, we can use it without further modifications.
44978         new_path="$path"
44979       fi
44980 
44981       if test "x$new_path" = x; then
44982         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44983 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44984         has_space=`$ECHO "$complete" | $GREP " "`
44985         if test "x$has_space" != x; then
44986           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44987 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44988         fi
44989         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44990       fi
44991     fi
44992 
44993     # Now join together the path and the arguments once again
44994     if test "x$arguments" != xEOL; then
44995       new_complete="$new_path ${arguments% *}"
44996     else
44997       new_complete="$new_path"
44998     fi
44999 
45000     if test "x$complete" != "x$new_complete"; then
45001       BUILD_CXX="$new_complete"
45002       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45003 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45004     fi
45005   fi
45006 
45007 
45008 
45009   # Publish this variable in the help.
45010 
45011 
45012   if [ -z "${BUILD_NM+x}" ]; then
45013     # The variable is not set by user, try to locate tool using the code snippet
45014     for ac_prog in nm gcc-nm
45015 do
45016   # Extract the first word of "$ac_prog", so it can be a program name with args.
45017 set dummy $ac_prog; ac_word=$2
45018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45019 $as_echo_n "checking for $ac_word... " >&6; }
45020 if ${ac_cv_path_BUILD_NM+:} false; then :
45021   $as_echo_n "(cached) " >&6
45022 else
45023   case $BUILD_NM in
45024   [\\/]* | ?:[\\/]*)
45025   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45026   ;;
45027   *)
45028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45029 for as_dir in $PATH
45030 do
45031   IFS=$as_save_IFS
45032   test -z "$as_dir" && as_dir=.
45033     for ac_exec_ext in '' $ac_executable_extensions; do
45034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45035     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45037     break 2
45038   fi
45039 done
45040   done
45041 IFS=$as_save_IFS
45042 
45043   ;;
45044 esac
45045 fi
45046 BUILD_NM=$ac_cv_path_BUILD_NM
45047 if test -n "$BUILD_NM"; then
45048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45049 $as_echo "$BUILD_NM" >&6; }
45050 else
45051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45052 $as_echo "no" >&6; }
45053 fi
45054 
45055 
45056   test -n "$BUILD_NM" && break
45057 done
45058 
45059   else
45060     # The variable is set, but is it from the command line or the environment?
45061 
45062     # Try to remove the string !BUILD_NM! from our list.
45063     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45064     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45065       # If it failed, the variable was not from the command line. Ignore it,
45066       # but warn the user (except for BASH, which is always set by the calling BASH).
45067       if test "xBUILD_NM" != xBASH; then
45068         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45069 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45070       fi
45071       # Try to locate tool using the code snippet
45072       for ac_prog in nm gcc-nm
45073 do
45074   # Extract the first word of "$ac_prog", so it can be a program name with args.
45075 set dummy $ac_prog; ac_word=$2
45076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45077 $as_echo_n "checking for $ac_word... " >&6; }
45078 if ${ac_cv_path_BUILD_NM+:} false; then :
45079   $as_echo_n "(cached) " >&6
45080 else
45081   case $BUILD_NM in
45082   [\\/]* | ?:[\\/]*)
45083   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45084   ;;
45085   *)
45086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45087 for as_dir in $PATH
45088 do
45089   IFS=$as_save_IFS
45090   test -z "$as_dir" && as_dir=.
45091     for ac_exec_ext in '' $ac_executable_extensions; do
45092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45093     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45095     break 2
45096   fi
45097 done
45098   done
45099 IFS=$as_save_IFS
45100 
45101   ;;
45102 esac
45103 fi
45104 BUILD_NM=$ac_cv_path_BUILD_NM
45105 if test -n "$BUILD_NM"; then
45106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45107 $as_echo "$BUILD_NM" >&6; }
45108 else
45109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45110 $as_echo "no" >&6; }
45111 fi
45112 
45113 
45114   test -n "$BUILD_NM" && break
45115 done
45116 
45117     else
45118       # If it succeeded, then it was overridden by the user. We will use it
45119       # for the tool.
45120 
45121       # First remove it from the list of overridden variables, so we can test
45122       # for unknown variables in the end.
45123       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45124 
45125       # Check if we try to supply an empty value
45126       if test "x$BUILD_NM" = x; then
45127         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45128 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45130 $as_echo_n "checking for BUILD_NM... " >&6; }
45131         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45132 $as_echo "disabled" >&6; }
45133       else
45134         # Check if the provided tool contains a complete path.
45135         tool_specified="$BUILD_NM"
45136         tool_basename="${tool_specified##*/}"
45137         if test "x$tool_basename" = "x$tool_specified"; then
45138           # A command without a complete path is provided, search $PATH.
45139           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45140 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45141           # Extract the first word of "$tool_basename", so it can be a program name with args.
45142 set dummy $tool_basename; ac_word=$2
45143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45144 $as_echo_n "checking for $ac_word... " >&6; }
45145 if ${ac_cv_path_BUILD_NM+:} false; then :
45146   $as_echo_n "(cached) " >&6
45147 else
45148   case $BUILD_NM in
45149   [\\/]* | ?:[\\/]*)
45150   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45151   ;;
45152   *)
45153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45154 for as_dir in $PATH
45155 do
45156   IFS=$as_save_IFS
45157   test -z "$as_dir" && as_dir=.
45158     for ac_exec_ext in '' $ac_executable_extensions; do
45159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45160     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45162     break 2
45163   fi
45164 done
45165   done
45166 IFS=$as_save_IFS
45167 
45168   ;;
45169 esac
45170 fi
45171 BUILD_NM=$ac_cv_path_BUILD_NM
45172 if test -n "$BUILD_NM"; then
45173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45174 $as_echo "$BUILD_NM" >&6; }
45175 else
45176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45177 $as_echo "no" >&6; }
45178 fi
45179 
45180 
45181           if test "x$BUILD_NM" = x; then
45182             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45183           fi
45184         else
45185           # Otherwise we believe it is a complete path. Use it as it is.
45186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45187 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45188           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45189 $as_echo_n "checking for BUILD_NM... " >&6; }
45190           if test ! -x "$tool_specified"; then
45191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45192 $as_echo "not found" >&6; }
45193             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45194           fi
45195           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45196 $as_echo "$tool_specified" >&6; }
45197         fi
45198       fi
45199     fi
45200 
45201   fi
45202 
45203 
45204 
45205   # Only process if variable expands to non-empty
45206 
45207   if test "x$BUILD_NM" != x; then
45208     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45209 
45210   # First separate the path from the arguments. This will split at the first
45211   # space.
45212   complete="$BUILD_NM"
45213   path="${complete%% *}"
45214   tmp="$complete EOL"
45215   arguments="${tmp#* }"
45216 
45217   # Input might be given as Windows format, start by converting to
45218   # unix format.
45219   new_path=`$CYGPATH -u "$path"`
45220 
45221   # Now try to locate executable using which
45222   new_path=`$WHICH "$new_path" 2> /dev/null`
45223   # bat and cmd files are not always considered executable in cygwin causing which
45224   # to not find them
45225   if test "x$new_path" = x \
45226       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45227       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45228     new_path=`$CYGPATH -u "$path"`
45229   fi
45230   if test "x$new_path" = x; then
45231     # Oops. Which didn't find the executable.
45232     # The splitting of arguments from the executable at a space might have been incorrect,
45233     # since paths with space are more likely in Windows. Give it another try with the whole
45234     # argument.
45235     path="$complete"
45236     arguments="EOL"
45237     new_path=`$CYGPATH -u "$path"`
45238     new_path=`$WHICH "$new_path" 2> /dev/null`
45239     # bat and cmd files are not always considered executable in cygwin causing which
45240     # to not find them
45241     if test "x$new_path" = x \
45242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45244       new_path=`$CYGPATH -u "$path"`
45245     fi
45246     if test "x$new_path" = x; then
45247       # It's still not found. Now this is an unrecoverable error.
45248       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45249 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45250       has_space=`$ECHO "$complete" | $GREP " "`
45251       if test "x$has_space" != x; then
45252         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45253 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45254       fi
45255       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45256     fi
45257   fi
45258 
45259   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45260   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45261   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45262   # "foo.exe" is OK but "foo" is an error.
45263   #
45264   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45265   # It is also a way to make sure we got the proper file name for the real test later on.
45266   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45267   if test "x$test_shortpath" = x; then
45268     # Short path failed, file does not exist as specified.
45269     # Try adding .exe or .cmd
45270     if test -f "${new_path}.exe"; then
45271       input_to_shortpath="${new_path}.exe"
45272     elif test -f "${new_path}.cmd"; then
45273       input_to_shortpath="${new_path}.cmd"
45274     else
45275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45276 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45277       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45278 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45279       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45280     fi
45281   else
45282     input_to_shortpath="$new_path"
45283   fi
45284 
45285   # Call helper function which possibly converts this using DOS-style short mode.
45286   # If so, the updated path is stored in $new_path.
45287   new_path="$input_to_shortpath"
45288 
45289   input_path="$input_to_shortpath"
45290   # Check if we need to convert this using DOS-style short mode. If the path
45291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45292   # take no chances and rewrite it.
45293   # Note: m4 eats our [], so we need to use [ and ] instead.
45294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45295   if test "x$has_forbidden_chars" != x; then
45296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45297     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45298     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45299     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45300       # Going to short mode and back again did indeed matter. Since short mode is
45301       # case insensitive, let's make it lowercase to improve readability.
45302       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45303       # Now convert it back to Unix-style (cygpath)
45304       input_path=`$CYGPATH -u "$shortmode_path"`
45305       new_path="$input_path"
45306     fi
45307   fi
45308 
45309   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45310   if test "x$test_cygdrive_prefix" = x; then
45311     # As a simple fix, exclude /usr/bin since it's not a real path.
45312     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45313       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45314       # a path prefixed by /cygdrive for fixpath to work.
45315       new_path="$CYGWIN_ROOT_PATH$input_path"
45316     fi
45317   fi
45318 
45319   # remove trailing .exe if any
45320   new_path="${new_path/%.exe/}"
45321 
45322     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45323 
45324   # First separate the path from the arguments. This will split at the first
45325   # space.
45326   complete="$BUILD_NM"
45327   path="${complete%% *}"
45328   tmp="$complete EOL"
45329   arguments="${tmp#* }"
45330 
45331   # Input might be given as Windows format, start by converting to
45332   # unix format.
45333   new_path="$path"
45334 
45335   windows_path="$new_path"
45336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337     unix_path=`$CYGPATH -u "$windows_path"`
45338     new_path="$unix_path"
45339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45341     new_path="$unix_path"
45342   fi
45343 
45344 
45345   # Now try to locate executable using which
45346   new_path=`$WHICH "$new_path" 2> /dev/null`
45347 
45348   if test "x$new_path" = x; then
45349     # Oops. Which didn't find the executable.
45350     # The splitting of arguments from the executable at a space might have been incorrect,
45351     # since paths with space are more likely in Windows. Give it another try with the whole
45352     # argument.
45353     path="$complete"
45354     arguments="EOL"
45355     new_path="$path"
45356 
45357   windows_path="$new_path"
45358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45359     unix_path=`$CYGPATH -u "$windows_path"`
45360     new_path="$unix_path"
45361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45363     new_path="$unix_path"
45364   fi
45365 
45366 
45367     new_path=`$WHICH "$new_path" 2> /dev/null`
45368     # bat and cmd files are not always considered executable in MSYS causing which
45369     # to not find them
45370     if test "x$new_path" = x \
45371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45373       new_path="$path"
45374 
45375   windows_path="$new_path"
45376   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45377     unix_path=`$CYGPATH -u "$windows_path"`
45378     new_path="$unix_path"
45379   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45380     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45381     new_path="$unix_path"
45382   fi
45383 
45384     fi
45385 
45386     if test "x$new_path" = x; then
45387       # It's still not found. Now this is an unrecoverable error.
45388       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45389 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45390       has_space=`$ECHO "$complete" | $GREP " "`
45391       if test "x$has_space" != x; then
45392         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45393 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45394       fi
45395       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45396     fi
45397   fi
45398 
45399   # Now new_path has a complete unix path to the binary
45400   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45401     # Keep paths in /bin as-is, but remove trailing .exe if any
45402     new_path="${new_path/%.exe/}"
45403     # Do not save /bin paths to all_fixpath_prefixes!
45404   else
45405     # Not in mixed or Windows style, start by that.
45406     new_path=`cmd //c echo $new_path`
45407 
45408   input_path="$new_path"
45409   # Check if we need to convert this using DOS-style short mode. If the path
45410   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45411   # take no chances and rewrite it.
45412   # Note: m4 eats our [], so we need to use [ and ] instead.
45413   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45414   if test "x$has_forbidden_chars" != x; then
45415     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45416     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45417   fi
45418 
45419     # Output is in $new_path
45420 
45421   windows_path="$new_path"
45422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45423     unix_path=`$CYGPATH -u "$windows_path"`
45424     new_path="$unix_path"
45425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45427     new_path="$unix_path"
45428   fi
45429 
45430     # remove trailing .exe if any
45431     new_path="${new_path/%.exe/}"
45432 
45433     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45434     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45435   fi
45436 
45437     else
45438       # We're on a unix platform. Hooray! :)
45439       # First separate the path from the arguments. This will split at the first
45440       # space.
45441       complete="$BUILD_NM"
45442       path="${complete%% *}"
45443       tmp="$complete EOL"
45444       arguments="${tmp#* }"
45445 
45446       # Cannot rely on the command "which" here since it doesn't always work.
45447       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45448       if test -z "$is_absolute_path"; then
45449         # Path to executable is not absolute. Find it.
45450         IFS_save="$IFS"
45451         IFS=:
45452         for p in $PATH; do
45453           if test -f "$p/$path" && test -x "$p/$path"; then
45454             new_path="$p/$path"
45455             break
45456           fi
45457         done
45458         IFS="$IFS_save"
45459       else
45460         # This is an absolute path, we can use it without further modifications.
45461         new_path="$path"
45462       fi
45463 
45464       if test "x$new_path" = x; then
45465         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45466 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45467         has_space=`$ECHO "$complete" | $GREP " "`
45468         if test "x$has_space" != x; then
45469           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45470 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45471         fi
45472         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45473       fi
45474     fi
45475 
45476     # Now join together the path and the arguments once again
45477     if test "x$arguments" != xEOL; then
45478       new_complete="$new_path ${arguments% *}"
45479     else
45480       new_complete="$new_path"
45481     fi
45482 
45483     if test "x$complete" != "x$new_complete"; then
45484       BUILD_NM="$new_complete"
45485       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45486 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45487     fi
45488   fi
45489 
45490 
45491 
45492   # Publish this variable in the help.
45493 
45494 
45495   if [ -z "${BUILD_AR+x}" ]; then
45496     # The variable is not set by user, try to locate tool using the code snippet
45497     for ac_prog in ar gcc-ar
45498 do
45499   # Extract the first word of "$ac_prog", so it can be a program name with args.
45500 set dummy $ac_prog; ac_word=$2
45501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45502 $as_echo_n "checking for $ac_word... " >&6; }
45503 if ${ac_cv_path_BUILD_AR+:} false; then :
45504   $as_echo_n "(cached) " >&6
45505 else
45506   case $BUILD_AR in
45507   [\\/]* | ?:[\\/]*)
45508   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45509   ;;
45510   *)
45511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45512 for as_dir in $PATH
45513 do
45514   IFS=$as_save_IFS
45515   test -z "$as_dir" && as_dir=.
45516     for ac_exec_ext in '' $ac_executable_extensions; do
45517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45518     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45520     break 2
45521   fi
45522 done
45523   done
45524 IFS=$as_save_IFS
45525 
45526   ;;
45527 esac
45528 fi
45529 BUILD_AR=$ac_cv_path_BUILD_AR
45530 if test -n "$BUILD_AR"; then
45531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45532 $as_echo "$BUILD_AR" >&6; }
45533 else
45534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45535 $as_echo "no" >&6; }
45536 fi
45537 
45538 
45539   test -n "$BUILD_AR" && break
45540 done
45541 
45542   else
45543     # The variable is set, but is it from the command line or the environment?
45544 
45545     # Try to remove the string !BUILD_AR! from our list.
45546     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45547     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45548       # If it failed, the variable was not from the command line. Ignore it,
45549       # but warn the user (except for BASH, which is always set by the calling BASH).
45550       if test "xBUILD_AR" != xBASH; then
45551         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45552 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45553       fi
45554       # Try to locate tool using the code snippet
45555       for ac_prog in ar gcc-ar
45556 do
45557   # Extract the first word of "$ac_prog", so it can be a program name with args.
45558 set dummy $ac_prog; ac_word=$2
45559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45560 $as_echo_n "checking for $ac_word... " >&6; }
45561 if ${ac_cv_path_BUILD_AR+:} false; then :
45562   $as_echo_n "(cached) " >&6
45563 else
45564   case $BUILD_AR in
45565   [\\/]* | ?:[\\/]*)
45566   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45567   ;;
45568   *)
45569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45570 for as_dir in $PATH
45571 do
45572   IFS=$as_save_IFS
45573   test -z "$as_dir" && as_dir=.
45574     for ac_exec_ext in '' $ac_executable_extensions; do
45575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45576     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45578     break 2
45579   fi
45580 done
45581   done
45582 IFS=$as_save_IFS
45583 
45584   ;;
45585 esac
45586 fi
45587 BUILD_AR=$ac_cv_path_BUILD_AR
45588 if test -n "$BUILD_AR"; then
45589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45590 $as_echo "$BUILD_AR" >&6; }
45591 else
45592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45593 $as_echo "no" >&6; }
45594 fi
45595 
45596 
45597   test -n "$BUILD_AR" && break
45598 done
45599 
45600     else
45601       # If it succeeded, then it was overridden by the user. We will use it
45602       # for the tool.
45603 
45604       # First remove it from the list of overridden variables, so we can test
45605       # for unknown variables in the end.
45606       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45607 
45608       # Check if we try to supply an empty value
45609       if test "x$BUILD_AR" = x; then
45610         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45611 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45612         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45613 $as_echo_n "checking for BUILD_AR... " >&6; }
45614         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45615 $as_echo "disabled" >&6; }
45616       else
45617         # Check if the provided tool contains a complete path.
45618         tool_specified="$BUILD_AR"
45619         tool_basename="${tool_specified##*/}"
45620         if test "x$tool_basename" = "x$tool_specified"; then
45621           # A command without a complete path is provided, search $PATH.
45622           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45623 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45624           # Extract the first word of "$tool_basename", so it can be a program name with args.
45625 set dummy $tool_basename; ac_word=$2
45626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45627 $as_echo_n "checking for $ac_word... " >&6; }
45628 if ${ac_cv_path_BUILD_AR+:} false; then :
45629   $as_echo_n "(cached) " >&6
45630 else
45631   case $BUILD_AR in
45632   [\\/]* | ?:[\\/]*)
45633   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45634   ;;
45635   *)
45636   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45637 for as_dir in $PATH
45638 do
45639   IFS=$as_save_IFS
45640   test -z "$as_dir" && as_dir=.
45641     for ac_exec_ext in '' $ac_executable_extensions; do
45642   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45643     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45645     break 2
45646   fi
45647 done
45648   done
45649 IFS=$as_save_IFS
45650 
45651   ;;
45652 esac
45653 fi
45654 BUILD_AR=$ac_cv_path_BUILD_AR
45655 if test -n "$BUILD_AR"; then
45656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45657 $as_echo "$BUILD_AR" >&6; }
45658 else
45659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45660 $as_echo "no" >&6; }
45661 fi
45662 
45663 
45664           if test "x$BUILD_AR" = x; then
45665             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45666           fi
45667         else
45668           # Otherwise we believe it is a complete path. Use it as it is.
45669           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45670 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45671           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45672 $as_echo_n "checking for BUILD_AR... " >&6; }
45673           if test ! -x "$tool_specified"; then
45674             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45675 $as_echo "not found" >&6; }
45676             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45677           fi
45678           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45679 $as_echo "$tool_specified" >&6; }
45680         fi
45681       fi
45682     fi
45683 
45684   fi
45685 
45686 
45687 
45688   # Only process if variable expands to non-empty
45689 
45690   if test "x$BUILD_AR" != x; then
45691     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45692 
45693   # First separate the path from the arguments. This will split at the first
45694   # space.
45695   complete="$BUILD_AR"
45696   path="${complete%% *}"
45697   tmp="$complete EOL"
45698   arguments="${tmp#* }"
45699 
45700   # Input might be given as Windows format, start by converting to
45701   # unix format.
45702   new_path=`$CYGPATH -u "$path"`
45703 
45704   # Now try to locate executable using which
45705   new_path=`$WHICH "$new_path" 2> /dev/null`
45706   # bat and cmd files are not always considered executable in cygwin causing which
45707   # to not find them
45708   if test "x$new_path" = x \
45709       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45710       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45711     new_path=`$CYGPATH -u "$path"`
45712   fi
45713   if test "x$new_path" = x; then
45714     # Oops. Which didn't find the executable.
45715     # The splitting of arguments from the executable at a space might have been incorrect,
45716     # since paths with space are more likely in Windows. Give it another try with the whole
45717     # argument.
45718     path="$complete"
45719     arguments="EOL"
45720     new_path=`$CYGPATH -u "$path"`
45721     new_path=`$WHICH "$new_path" 2> /dev/null`
45722     # bat and cmd files are not always considered executable in cygwin causing which
45723     # to not find them
45724     if test "x$new_path" = x \
45725         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45726         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45727       new_path=`$CYGPATH -u "$path"`
45728     fi
45729     if test "x$new_path" = x; then
45730       # It's still not found. Now this is an unrecoverable error.
45731       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45732 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45733       has_space=`$ECHO "$complete" | $GREP " "`
45734       if test "x$has_space" != x; then
45735         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45736 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45737       fi
45738       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45739     fi
45740   fi
45741 
45742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45745   # "foo.exe" is OK but "foo" is an error.
45746   #
45747   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45748   # It is also a way to make sure we got the proper file name for the real test later on.
45749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45750   if test "x$test_shortpath" = x; then
45751     # Short path failed, file does not exist as specified.
45752     # Try adding .exe or .cmd
45753     if test -f "${new_path}.exe"; then
45754       input_to_shortpath="${new_path}.exe"
45755     elif test -f "${new_path}.cmd"; then
45756       input_to_shortpath="${new_path}.cmd"
45757     else
45758       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45759 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45760       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45761 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45762       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45763     fi
45764   else
45765     input_to_shortpath="$new_path"
45766   fi
45767 
45768   # Call helper function which possibly converts this using DOS-style short mode.
45769   # If so, the updated path is stored in $new_path.
45770   new_path="$input_to_shortpath"
45771 
45772   input_path="$input_to_shortpath"
45773   # Check if we need to convert this using DOS-style short mode. If the path
45774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45775   # take no chances and rewrite it.
45776   # Note: m4 eats our [], so we need to use [ and ] instead.
45777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45778   if test "x$has_forbidden_chars" != x; then
45779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45780     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45781     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45782     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45783       # Going to short mode and back again did indeed matter. Since short mode is
45784       # case insensitive, let's make it lowercase to improve readability.
45785       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45786       # Now convert it back to Unix-style (cygpath)
45787       input_path=`$CYGPATH -u "$shortmode_path"`
45788       new_path="$input_path"
45789     fi
45790   fi
45791 
45792   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45793   if test "x$test_cygdrive_prefix" = x; then
45794     # As a simple fix, exclude /usr/bin since it's not a real path.
45795     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45796       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45797       # a path prefixed by /cygdrive for fixpath to work.
45798       new_path="$CYGWIN_ROOT_PATH$input_path"
45799     fi
45800   fi
45801 
45802   # remove trailing .exe if any
45803   new_path="${new_path/%.exe/}"
45804 
45805     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45806 
45807   # First separate the path from the arguments. This will split at the first
45808   # space.
45809   complete="$BUILD_AR"
45810   path="${complete%% *}"
45811   tmp="$complete EOL"
45812   arguments="${tmp#* }"
45813 
45814   # Input might be given as Windows format, start by converting to
45815   # unix format.
45816   new_path="$path"
45817 
45818   windows_path="$new_path"
45819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45820     unix_path=`$CYGPATH -u "$windows_path"`
45821     new_path="$unix_path"
45822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45824     new_path="$unix_path"
45825   fi
45826 
45827 
45828   # Now try to locate executable using which
45829   new_path=`$WHICH "$new_path" 2> /dev/null`
45830 
45831   if test "x$new_path" = x; then
45832     # Oops. Which didn't find the executable.
45833     # The splitting of arguments from the executable at a space might have been incorrect,
45834     # since paths with space are more likely in Windows. Give it another try with the whole
45835     # argument.
45836     path="$complete"
45837     arguments="EOL"
45838     new_path="$path"
45839 
45840   windows_path="$new_path"
45841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45842     unix_path=`$CYGPATH -u "$windows_path"`
45843     new_path="$unix_path"
45844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45846     new_path="$unix_path"
45847   fi
45848 
45849 
45850     new_path=`$WHICH "$new_path" 2> /dev/null`
45851     # bat and cmd files are not always considered executable in MSYS causing which
45852     # to not find them
45853     if test "x$new_path" = x \
45854         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45855         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45856       new_path="$path"
45857 
45858   windows_path="$new_path"
45859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45860     unix_path=`$CYGPATH -u "$windows_path"`
45861     new_path="$unix_path"
45862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45864     new_path="$unix_path"
45865   fi
45866 
45867     fi
45868 
45869     if test "x$new_path" = x; then
45870       # It's still not found. Now this is an unrecoverable error.
45871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45872 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45873       has_space=`$ECHO "$complete" | $GREP " "`
45874       if test "x$has_space" != x; then
45875         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45876 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45877       fi
45878       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45879     fi
45880   fi
45881 
45882   # Now new_path has a complete unix path to the binary
45883   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45884     # Keep paths in /bin as-is, but remove trailing .exe if any
45885     new_path="${new_path/%.exe/}"
45886     # Do not save /bin paths to all_fixpath_prefixes!
45887   else
45888     # Not in mixed or Windows style, start by that.
45889     new_path=`cmd //c echo $new_path`
45890 
45891   input_path="$new_path"
45892   # Check if we need to convert this using DOS-style short mode. If the path
45893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45894   # take no chances and rewrite it.
45895   # Note: m4 eats our [], so we need to use [ and ] instead.
45896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45897   if test "x$has_forbidden_chars" != x; then
45898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45899     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45900   fi
45901 
45902     # Output is in $new_path
45903 
45904   windows_path="$new_path"
45905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45906     unix_path=`$CYGPATH -u "$windows_path"`
45907     new_path="$unix_path"
45908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45910     new_path="$unix_path"
45911   fi
45912 
45913     # remove trailing .exe if any
45914     new_path="${new_path/%.exe/}"
45915 
45916     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45917     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45918   fi
45919 
45920     else
45921       # We're on a unix platform. Hooray! :)
45922       # First separate the path from the arguments. This will split at the first
45923       # space.
45924       complete="$BUILD_AR"
45925       path="${complete%% *}"
45926       tmp="$complete EOL"
45927       arguments="${tmp#* }"
45928 
45929       # Cannot rely on the command "which" here since it doesn't always work.
45930       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45931       if test -z "$is_absolute_path"; then
45932         # Path to executable is not absolute. Find it.
45933         IFS_save="$IFS"
45934         IFS=:
45935         for p in $PATH; do
45936           if test -f "$p/$path" && test -x "$p/$path"; then
45937             new_path="$p/$path"
45938             break
45939           fi
45940         done
45941         IFS="$IFS_save"
45942       else
45943         # This is an absolute path, we can use it without further modifications.
45944         new_path="$path"
45945       fi
45946 
45947       if test "x$new_path" = x; then
45948         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45949 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45950         has_space=`$ECHO "$complete" | $GREP " "`
45951         if test "x$has_space" != x; then
45952           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45953 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45954         fi
45955         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45956       fi
45957     fi
45958 
45959     # Now join together the path and the arguments once again
45960     if test "x$arguments" != xEOL; then
45961       new_complete="$new_path ${arguments% *}"
45962     else
45963       new_complete="$new_path"
45964     fi
45965 
45966     if test "x$complete" != "x$new_complete"; then
45967       BUILD_AR="$new_complete"
45968       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45969 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45970     fi
45971   fi
45972 
45973 
45974 
45975   # Publish this variable in the help.
45976 
45977 
45978   if [ -z "${BUILD_OBJCOPY+x}" ]; then
45979     # The variable is not set by user, try to locate tool using the code snippet
45980     for ac_prog in objcopy
45981 do
45982   # Extract the first word of "$ac_prog", so it can be a program name with args.
45983 set dummy $ac_prog; ac_word=$2
45984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45985 $as_echo_n "checking for $ac_word... " >&6; }
45986 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45987   $as_echo_n "(cached) " >&6
45988 else
45989   case $BUILD_OBJCOPY in
45990   [\\/]* | ?:[\\/]*)
45991   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45992   ;;
45993   *)
45994   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45995 for as_dir in $PATH
45996 do
45997   IFS=$as_save_IFS
45998   test -z "$as_dir" && as_dir=.
45999     for ac_exec_ext in '' $ac_executable_extensions; do
46000   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46001     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46002     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46003     break 2
46004   fi
46005 done
46006   done
46007 IFS=$as_save_IFS
46008 
46009   ;;
46010 esac
46011 fi
46012 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46013 if test -n "$BUILD_OBJCOPY"; then
46014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46015 $as_echo "$BUILD_OBJCOPY" >&6; }
46016 else
46017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46018 $as_echo "no" >&6; }
46019 fi
46020 
46021 
46022   test -n "$BUILD_OBJCOPY" && break
46023 done
46024 
46025   else
46026     # The variable is set, but is it from the command line or the environment?
46027 
46028     # Try to remove the string !BUILD_OBJCOPY! from our list.
46029     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46030     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46031       # If it failed, the variable was not from the command line. Ignore it,
46032       # but warn the user (except for BASH, which is always set by the calling BASH).
46033       if test "xBUILD_OBJCOPY" != xBASH; then
46034         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46035 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46036       fi
46037       # Try to locate tool using the code snippet
46038       for ac_prog in objcopy
46039 do
46040   # Extract the first word of "$ac_prog", so it can be a program name with args.
46041 set dummy $ac_prog; ac_word=$2
46042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46043 $as_echo_n "checking for $ac_word... " >&6; }
46044 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46045   $as_echo_n "(cached) " >&6
46046 else
46047   case $BUILD_OBJCOPY in
46048   [\\/]* | ?:[\\/]*)
46049   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46050   ;;
46051   *)
46052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46053 for as_dir in $PATH
46054 do
46055   IFS=$as_save_IFS
46056   test -z "$as_dir" && as_dir=.
46057     for ac_exec_ext in '' $ac_executable_extensions; do
46058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46059     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46061     break 2
46062   fi
46063 done
46064   done
46065 IFS=$as_save_IFS
46066 
46067   ;;
46068 esac
46069 fi
46070 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46071 if test -n "$BUILD_OBJCOPY"; then
46072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46073 $as_echo "$BUILD_OBJCOPY" >&6; }
46074 else
46075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46076 $as_echo "no" >&6; }
46077 fi
46078 
46079 
46080   test -n "$BUILD_OBJCOPY" && break
46081 done
46082 
46083     else
46084       # If it succeeded, then it was overridden by the user. We will use it
46085       # for the tool.
46086 
46087       # First remove it from the list of overridden variables, so we can test
46088       # for unknown variables in the end.
46089       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46090 
46091       # Check if we try to supply an empty value
46092       if test "x$BUILD_OBJCOPY" = x; then
46093         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46094 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46095         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46096 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46097         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46098 $as_echo "disabled" >&6; }
46099       else
46100         # Check if the provided tool contains a complete path.
46101         tool_specified="$BUILD_OBJCOPY"
46102         tool_basename="${tool_specified##*/}"
46103         if test "x$tool_basename" = "x$tool_specified"; then
46104           # A command without a complete path is provided, search $PATH.
46105           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46106 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46107           # Extract the first word of "$tool_basename", so it can be a program name with args.
46108 set dummy $tool_basename; ac_word=$2
46109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46110 $as_echo_n "checking for $ac_word... " >&6; }
46111 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46112   $as_echo_n "(cached) " >&6
46113 else
46114   case $BUILD_OBJCOPY in
46115   [\\/]* | ?:[\\/]*)
46116   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46117   ;;
46118   *)
46119   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46120 for as_dir in $PATH
46121 do
46122   IFS=$as_save_IFS
46123   test -z "$as_dir" && as_dir=.
46124     for ac_exec_ext in '' $ac_executable_extensions; do
46125   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46126     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46127     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46128     break 2
46129   fi
46130 done
46131   done
46132 IFS=$as_save_IFS
46133 
46134   ;;
46135 esac
46136 fi
46137 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46138 if test -n "$BUILD_OBJCOPY"; then
46139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46140 $as_echo "$BUILD_OBJCOPY" >&6; }
46141 else
46142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46143 $as_echo "no" >&6; }
46144 fi
46145 
46146 
46147           if test "x$BUILD_OBJCOPY" = x; then
46148             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46149           fi
46150         else
46151           # Otherwise we believe it is a complete path. Use it as it is.
46152           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46153 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46154           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46155 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46156           if test ! -x "$tool_specified"; then
46157             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46158 $as_echo "not found" >&6; }
46159             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46160           fi
46161           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46162 $as_echo "$tool_specified" >&6; }
46163         fi
46164       fi
46165     fi
46166 
46167   fi
46168 
46169 
46170 
46171   # Only process if variable expands to non-empty
46172 
46173   if test "x$BUILD_OBJCOPY" != x; then
46174     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46175 
46176   # First separate the path from the arguments. This will split at the first
46177   # space.
46178   complete="$BUILD_OBJCOPY"
46179   path="${complete%% *}"
46180   tmp="$complete EOL"
46181   arguments="${tmp#* }"
46182 
46183   # Input might be given as Windows format, start by converting to
46184   # unix format.
46185   new_path=`$CYGPATH -u "$path"`
46186 
46187   # Now try to locate executable using which
46188   new_path=`$WHICH "$new_path" 2> /dev/null`
46189   # bat and cmd files are not always considered executable in cygwin causing which
46190   # to not find them
46191   if test "x$new_path" = x \
46192       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46193       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46194     new_path=`$CYGPATH -u "$path"`
46195   fi
46196   if test "x$new_path" = x; then
46197     # Oops. Which didn't find the executable.
46198     # The splitting of arguments from the executable at a space might have been incorrect,
46199     # since paths with space are more likely in Windows. Give it another try with the whole
46200     # argument.
46201     path="$complete"
46202     arguments="EOL"
46203     new_path=`$CYGPATH -u "$path"`
46204     new_path=`$WHICH "$new_path" 2> /dev/null`
46205     # bat and cmd files are not always considered executable in cygwin causing which
46206     # to not find them
46207     if test "x$new_path" = x \
46208         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46209         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46210       new_path=`$CYGPATH -u "$path"`
46211     fi
46212     if test "x$new_path" = x; then
46213       # It's still not found. Now this is an unrecoverable error.
46214       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46215 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46216       has_space=`$ECHO "$complete" | $GREP " "`
46217       if test "x$has_space" != x; then
46218         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46219 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46220       fi
46221       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46222     fi
46223   fi
46224 
46225   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46226   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46227   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46228   # "foo.exe" is OK but "foo" is an error.
46229   #
46230   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46231   # It is also a way to make sure we got the proper file name for the real test later on.
46232   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46233   if test "x$test_shortpath" = x; then
46234     # Short path failed, file does not exist as specified.
46235     # Try adding .exe or .cmd
46236     if test -f "${new_path}.exe"; then
46237       input_to_shortpath="${new_path}.exe"
46238     elif test -f "${new_path}.cmd"; then
46239       input_to_shortpath="${new_path}.cmd"
46240     else
46241       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46242 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46243       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46244 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46245       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46246     fi
46247   else
46248     input_to_shortpath="$new_path"
46249   fi
46250 
46251   # Call helper function which possibly converts this using DOS-style short mode.
46252   # If so, the updated path is stored in $new_path.
46253   new_path="$input_to_shortpath"
46254 
46255   input_path="$input_to_shortpath"
46256   # Check if we need to convert this using DOS-style short mode. If the path
46257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46258   # take no chances and rewrite it.
46259   # Note: m4 eats our [], so we need to use [ and ] instead.
46260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46261   if test "x$has_forbidden_chars" != x; then
46262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46263     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46264     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46265     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46266       # Going to short mode and back again did indeed matter. Since short mode is
46267       # case insensitive, let's make it lowercase to improve readability.
46268       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46269       # Now convert it back to Unix-style (cygpath)
46270       input_path=`$CYGPATH -u "$shortmode_path"`
46271       new_path="$input_path"
46272     fi
46273   fi
46274 
46275   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46276   if test "x$test_cygdrive_prefix" = x; then
46277     # As a simple fix, exclude /usr/bin since it's not a real path.
46278     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46279       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46280       # a path prefixed by /cygdrive for fixpath to work.
46281       new_path="$CYGWIN_ROOT_PATH$input_path"
46282     fi
46283   fi
46284 
46285   # remove trailing .exe if any
46286   new_path="${new_path/%.exe/}"
46287 
46288     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46289 
46290   # First separate the path from the arguments. This will split at the first
46291   # space.
46292   complete="$BUILD_OBJCOPY"
46293   path="${complete%% *}"
46294   tmp="$complete EOL"
46295   arguments="${tmp#* }"
46296 
46297   # Input might be given as Windows format, start by converting to
46298   # unix format.
46299   new_path="$path"
46300 
46301   windows_path="$new_path"
46302   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46303     unix_path=`$CYGPATH -u "$windows_path"`
46304     new_path="$unix_path"
46305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46306     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46307     new_path="$unix_path"
46308   fi
46309 
46310 
46311   # Now try to locate executable using which
46312   new_path=`$WHICH "$new_path" 2> /dev/null`
46313 
46314   if test "x$new_path" = x; then
46315     # Oops. Which didn't find the executable.
46316     # The splitting of arguments from the executable at a space might have been incorrect,
46317     # since paths with space are more likely in Windows. Give it another try with the whole
46318     # argument.
46319     path="$complete"
46320     arguments="EOL"
46321     new_path="$path"
46322 
46323   windows_path="$new_path"
46324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46325     unix_path=`$CYGPATH -u "$windows_path"`
46326     new_path="$unix_path"
46327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46328     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46329     new_path="$unix_path"
46330   fi
46331 
46332 
46333     new_path=`$WHICH "$new_path" 2> /dev/null`
46334     # bat and cmd files are not always considered executable in MSYS causing which
46335     # to not find them
46336     if test "x$new_path" = x \
46337         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46338         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46339       new_path="$path"
46340 
46341   windows_path="$new_path"
46342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46343     unix_path=`$CYGPATH -u "$windows_path"`
46344     new_path="$unix_path"
46345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46347     new_path="$unix_path"
46348   fi
46349 
46350     fi
46351 
46352     if test "x$new_path" = x; then
46353       # It's still not found. Now this is an unrecoverable error.
46354       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46355 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46356       has_space=`$ECHO "$complete" | $GREP " "`
46357       if test "x$has_space" != x; then
46358         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46359 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46360       fi
46361       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46362     fi
46363   fi
46364 
46365   # Now new_path has a complete unix path to the binary
46366   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46367     # Keep paths in /bin as-is, but remove trailing .exe if any
46368     new_path="${new_path/%.exe/}"
46369     # Do not save /bin paths to all_fixpath_prefixes!
46370   else
46371     # Not in mixed or Windows style, start by that.
46372     new_path=`cmd //c echo $new_path`
46373 
46374   input_path="$new_path"
46375   # Check if we need to convert this using DOS-style short mode. If the path
46376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46377   # take no chances and rewrite it.
46378   # Note: m4 eats our [], so we need to use [ and ] instead.
46379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46380   if test "x$has_forbidden_chars" != x; then
46381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46382     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46383   fi
46384 
46385     # Output is in $new_path
46386 
46387   windows_path="$new_path"
46388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46389     unix_path=`$CYGPATH -u "$windows_path"`
46390     new_path="$unix_path"
46391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46393     new_path="$unix_path"
46394   fi
46395 
46396     # remove trailing .exe if any
46397     new_path="${new_path/%.exe/}"
46398 
46399     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46400     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46401   fi
46402 
46403     else
46404       # We're on a unix platform. Hooray! :)
46405       # First separate the path from the arguments. This will split at the first
46406       # space.
46407       complete="$BUILD_OBJCOPY"
46408       path="${complete%% *}"
46409       tmp="$complete EOL"
46410       arguments="${tmp#* }"
46411 
46412       # Cannot rely on the command "which" here since it doesn't always work.
46413       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46414       if test -z "$is_absolute_path"; then
46415         # Path to executable is not absolute. Find it.
46416         IFS_save="$IFS"
46417         IFS=:
46418         for p in $PATH; do
46419           if test -f "$p/$path" && test -x "$p/$path"; then
46420             new_path="$p/$path"
46421             break
46422           fi
46423         done
46424         IFS="$IFS_save"
46425       else
46426         # This is an absolute path, we can use it without further modifications.
46427         new_path="$path"
46428       fi
46429 
46430       if test "x$new_path" = x; then
46431         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46432 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46433         has_space=`$ECHO "$complete" | $GREP " "`
46434         if test "x$has_space" != x; then
46435           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46436 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46437         fi
46438         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46439       fi
46440     fi
46441 
46442     # Now join together the path and the arguments once again
46443     if test "x$arguments" != xEOL; then
46444       new_complete="$new_path ${arguments% *}"
46445     else
46446       new_complete="$new_path"
46447     fi
46448 
46449     if test "x$complete" != "x$new_complete"; then
46450       BUILD_OBJCOPY="$new_complete"
46451       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46452 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46453     fi
46454   fi
46455 
46456 
46457 
46458   # Publish this variable in the help.
46459 
46460 
46461   if [ -z "${BUILD_STRIP+x}" ]; then
46462     # The variable is not set by user, try to locate tool using the code snippet
46463     for ac_prog in strip
46464 do
46465   # Extract the first word of "$ac_prog", so it can be a program name with args.
46466 set dummy $ac_prog; ac_word=$2
46467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46468 $as_echo_n "checking for $ac_word... " >&6; }
46469 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46470   $as_echo_n "(cached) " >&6
46471 else
46472   case $BUILD_STRIP in
46473   [\\/]* | ?:[\\/]*)
46474   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46475   ;;
46476   *)
46477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46478 for as_dir in $PATH
46479 do
46480   IFS=$as_save_IFS
46481   test -z "$as_dir" && as_dir=.
46482     for ac_exec_ext in '' $ac_executable_extensions; do
46483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46484     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46486     break 2
46487   fi
46488 done
46489   done
46490 IFS=$as_save_IFS
46491 
46492   ;;
46493 esac
46494 fi
46495 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46496 if test -n "$BUILD_STRIP"; then
46497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46498 $as_echo "$BUILD_STRIP" >&6; }
46499 else
46500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46501 $as_echo "no" >&6; }
46502 fi
46503 
46504 
46505   test -n "$BUILD_STRIP" && break
46506 done
46507 
46508   else
46509     # The variable is set, but is it from the command line or the environment?
46510 
46511     # Try to remove the string !BUILD_STRIP! from our list.
46512     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46513     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46514       # If it failed, the variable was not from the command line. Ignore it,
46515       # but warn the user (except for BASH, which is always set by the calling BASH).
46516       if test "xBUILD_STRIP" != xBASH; then
46517         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46518 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46519       fi
46520       # Try to locate tool using the code snippet
46521       for ac_prog in strip
46522 do
46523   # Extract the first word of "$ac_prog", so it can be a program name with args.
46524 set dummy $ac_prog; ac_word=$2
46525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46526 $as_echo_n "checking for $ac_word... " >&6; }
46527 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46528   $as_echo_n "(cached) " >&6
46529 else
46530   case $BUILD_STRIP in
46531   [\\/]* | ?:[\\/]*)
46532   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46533   ;;
46534   *)
46535   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46536 for as_dir in $PATH
46537 do
46538   IFS=$as_save_IFS
46539   test -z "$as_dir" && as_dir=.
46540     for ac_exec_ext in '' $ac_executable_extensions; do
46541   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46542     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46543     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46544     break 2
46545   fi
46546 done
46547   done
46548 IFS=$as_save_IFS
46549 
46550   ;;
46551 esac
46552 fi
46553 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46554 if test -n "$BUILD_STRIP"; then
46555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46556 $as_echo "$BUILD_STRIP" >&6; }
46557 else
46558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46559 $as_echo "no" >&6; }
46560 fi
46561 
46562 
46563   test -n "$BUILD_STRIP" && break
46564 done
46565 
46566     else
46567       # If it succeeded, then it was overridden by the user. We will use it
46568       # for the tool.
46569 
46570       # First remove it from the list of overridden variables, so we can test
46571       # for unknown variables in the end.
46572       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46573 
46574       # Check if we try to supply an empty value
46575       if test "x$BUILD_STRIP" = x; then
46576         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46577 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46578         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46579 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46580         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46581 $as_echo "disabled" >&6; }
46582       else
46583         # Check if the provided tool contains a complete path.
46584         tool_specified="$BUILD_STRIP"
46585         tool_basename="${tool_specified##*/}"
46586         if test "x$tool_basename" = "x$tool_specified"; then
46587           # A command without a complete path is provided, search $PATH.
46588           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46589 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46590           # Extract the first word of "$tool_basename", so it can be a program name with args.
46591 set dummy $tool_basename; ac_word=$2
46592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46593 $as_echo_n "checking for $ac_word... " >&6; }
46594 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46595   $as_echo_n "(cached) " >&6
46596 else
46597   case $BUILD_STRIP in
46598   [\\/]* | ?:[\\/]*)
46599   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46600   ;;
46601   *)
46602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46603 for as_dir in $PATH
46604 do
46605   IFS=$as_save_IFS
46606   test -z "$as_dir" && as_dir=.
46607     for ac_exec_ext in '' $ac_executable_extensions; do
46608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46609     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46611     break 2
46612   fi
46613 done
46614   done
46615 IFS=$as_save_IFS
46616 
46617   ;;
46618 esac
46619 fi
46620 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46621 if test -n "$BUILD_STRIP"; then
46622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46623 $as_echo "$BUILD_STRIP" >&6; }
46624 else
46625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46626 $as_echo "no" >&6; }
46627 fi
46628 
46629 
46630           if test "x$BUILD_STRIP" = x; then
46631             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46632           fi
46633         else
46634           # Otherwise we believe it is a complete path. Use it as it is.
46635           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46636 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46637           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46638 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46639           if test ! -x "$tool_specified"; then
46640             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46641 $as_echo "not found" >&6; }
46642             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46643           fi
46644           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46645 $as_echo "$tool_specified" >&6; }
46646         fi
46647       fi
46648     fi
46649 
46650   fi
46651 
46652 
46653 
46654   # Only process if variable expands to non-empty
46655 
46656   if test "x$BUILD_STRIP" != x; then
46657     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46658 
46659   # First separate the path from the arguments. This will split at the first
46660   # space.
46661   complete="$BUILD_STRIP"
46662   path="${complete%% *}"
46663   tmp="$complete EOL"
46664   arguments="${tmp#* }"
46665 
46666   # Input might be given as Windows format, start by converting to
46667   # unix format.
46668   new_path=`$CYGPATH -u "$path"`
46669 
46670   # Now try to locate executable using which
46671   new_path=`$WHICH "$new_path" 2> /dev/null`
46672   # bat and cmd files are not always considered executable in cygwin causing which
46673   # to not find them
46674   if test "x$new_path" = x \
46675       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46676       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46677     new_path=`$CYGPATH -u "$path"`
46678   fi
46679   if test "x$new_path" = x; then
46680     # Oops. Which didn't find the executable.
46681     # The splitting of arguments from the executable at a space might have been incorrect,
46682     # since paths with space are more likely in Windows. Give it another try with the whole
46683     # argument.
46684     path="$complete"
46685     arguments="EOL"
46686     new_path=`$CYGPATH -u "$path"`
46687     new_path=`$WHICH "$new_path" 2> /dev/null`
46688     # bat and cmd files are not always considered executable in cygwin causing which
46689     # to not find them
46690     if test "x$new_path" = x \
46691         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46692         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46693       new_path=`$CYGPATH -u "$path"`
46694     fi
46695     if test "x$new_path" = x; then
46696       # It's still not found. Now this is an unrecoverable error.
46697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46698 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46699       has_space=`$ECHO "$complete" | $GREP " "`
46700       if test "x$has_space" != x; then
46701         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46703       fi
46704       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46705     fi
46706   fi
46707 
46708   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46709   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46710   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46711   # "foo.exe" is OK but "foo" is an error.
46712   #
46713   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46714   # It is also a way to make sure we got the proper file name for the real test later on.
46715   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46716   if test "x$test_shortpath" = x; then
46717     # Short path failed, file does not exist as specified.
46718     # Try adding .exe or .cmd
46719     if test -f "${new_path}.exe"; then
46720       input_to_shortpath="${new_path}.exe"
46721     elif test -f "${new_path}.cmd"; then
46722       input_to_shortpath="${new_path}.cmd"
46723     else
46724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46725 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46726       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46727 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46728       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46729     fi
46730   else
46731     input_to_shortpath="$new_path"
46732   fi
46733 
46734   # Call helper function which possibly converts this using DOS-style short mode.
46735   # If so, the updated path is stored in $new_path.
46736   new_path="$input_to_shortpath"
46737 
46738   input_path="$input_to_shortpath"
46739   # Check if we need to convert this using DOS-style short mode. If the path
46740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46741   # take no chances and rewrite it.
46742   # Note: m4 eats our [], so we need to use [ and ] instead.
46743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46744   if test "x$has_forbidden_chars" != x; then
46745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46749       # Going to short mode and back again did indeed matter. Since short mode is
46750       # case insensitive, let's make it lowercase to improve readability.
46751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46752       # Now convert it back to Unix-style (cygpath)
46753       input_path=`$CYGPATH -u "$shortmode_path"`
46754       new_path="$input_path"
46755     fi
46756   fi
46757 
46758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46759   if test "x$test_cygdrive_prefix" = x; then
46760     # As a simple fix, exclude /usr/bin since it's not a real path.
46761     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46763       # a path prefixed by /cygdrive for fixpath to work.
46764       new_path="$CYGWIN_ROOT_PATH$input_path"
46765     fi
46766   fi
46767 
46768   # remove trailing .exe if any
46769   new_path="${new_path/%.exe/}"
46770 
46771     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46772 
46773   # First separate the path from the arguments. This will split at the first
46774   # space.
46775   complete="$BUILD_STRIP"
46776   path="${complete%% *}"
46777   tmp="$complete EOL"
46778   arguments="${tmp#* }"
46779 
46780   # Input might be given as Windows format, start by converting to
46781   # unix format.
46782   new_path="$path"
46783 
46784   windows_path="$new_path"
46785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46786     unix_path=`$CYGPATH -u "$windows_path"`
46787     new_path="$unix_path"
46788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46790     new_path="$unix_path"
46791   fi
46792 
46793 
46794   # Now try to locate executable using which
46795   new_path=`$WHICH "$new_path" 2> /dev/null`
46796 
46797   if test "x$new_path" = x; then
46798     # Oops. Which didn't find the executable.
46799     # The splitting of arguments from the executable at a space might have been incorrect,
46800     # since paths with space are more likely in Windows. Give it another try with the whole
46801     # argument.
46802     path="$complete"
46803     arguments="EOL"
46804     new_path="$path"
46805 
46806   windows_path="$new_path"
46807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46808     unix_path=`$CYGPATH -u "$windows_path"`
46809     new_path="$unix_path"
46810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46812     new_path="$unix_path"
46813   fi
46814 
46815 
46816     new_path=`$WHICH "$new_path" 2> /dev/null`
46817     # bat and cmd files are not always considered executable in MSYS causing which
46818     # to not find them
46819     if test "x$new_path" = x \
46820         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46821         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46822       new_path="$path"
46823 
46824   windows_path="$new_path"
46825   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46826     unix_path=`$CYGPATH -u "$windows_path"`
46827     new_path="$unix_path"
46828   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46829     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46830     new_path="$unix_path"
46831   fi
46832 
46833     fi
46834 
46835     if test "x$new_path" = x; then
46836       # It's still not found. Now this is an unrecoverable error.
46837       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46838 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46839       has_space=`$ECHO "$complete" | $GREP " "`
46840       if test "x$has_space" != x; then
46841         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46842 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46843       fi
46844       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46845     fi
46846   fi
46847 
46848   # Now new_path has a complete unix path to the binary
46849   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46850     # Keep paths in /bin as-is, but remove trailing .exe if any
46851     new_path="${new_path/%.exe/}"
46852     # Do not save /bin paths to all_fixpath_prefixes!
46853   else
46854     # Not in mixed or Windows style, start by that.
46855     new_path=`cmd //c echo $new_path`
46856 
46857   input_path="$new_path"
46858   # Check if we need to convert this using DOS-style short mode. If the path
46859   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46860   # take no chances and rewrite it.
46861   # Note: m4 eats our [], so we need to use [ and ] instead.
46862   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46863   if test "x$has_forbidden_chars" != x; then
46864     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46865     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46866   fi
46867 
46868     # Output is in $new_path
46869 
46870   windows_path="$new_path"
46871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46872     unix_path=`$CYGPATH -u "$windows_path"`
46873     new_path="$unix_path"
46874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46876     new_path="$unix_path"
46877   fi
46878 
46879     # remove trailing .exe if any
46880     new_path="${new_path/%.exe/}"
46881 
46882     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46883     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46884   fi
46885 
46886     else
46887       # We're on a unix platform. Hooray! :)
46888       # First separate the path from the arguments. This will split at the first
46889       # space.
46890       complete="$BUILD_STRIP"
46891       path="${complete%% *}"
46892       tmp="$complete EOL"
46893       arguments="${tmp#* }"
46894 
46895       # Cannot rely on the command "which" here since it doesn't always work.
46896       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46897       if test -z "$is_absolute_path"; then
46898         # Path to executable is not absolute. Find it.
46899         IFS_save="$IFS"
46900         IFS=:
46901         for p in $PATH; do
46902           if test -f "$p/$path" && test -x "$p/$path"; then
46903             new_path="$p/$path"
46904             break
46905           fi
46906         done
46907         IFS="$IFS_save"
46908       else
46909         # This is an absolute path, we can use it without further modifications.
46910         new_path="$path"
46911       fi
46912 
46913       if test "x$new_path" = x; then
46914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46915 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46916         has_space=`$ECHO "$complete" | $GREP " "`
46917         if test "x$has_space" != x; then
46918           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46919 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46920         fi
46921         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46922       fi
46923     fi
46924 
46925     # Now join together the path and the arguments once again
46926     if test "x$arguments" != xEOL; then
46927       new_complete="$new_path ${arguments% *}"
46928     else
46929       new_complete="$new_path"
46930     fi
46931 
46932     if test "x$complete" != "x$new_complete"; then
46933       BUILD_STRIP="$new_complete"
46934       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46935 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46936     fi
46937   fi
46938 
46939     # Assume the C compiler is the assembler
46940     BUILD_AS="$BUILD_CC -c"
46941     # Just like for the target compiler, use the compiler as linker
46942     BUILD_LD="$BUILD_CC"
46943     BUILD_LDCXX="$BUILD_CXX"
46944 
46945     PATH="$OLDPATH"
46946 
46947 
46948   COMPILER=$BUILD_CC
46949   COMPILER_NAME=BuildC
46950 
46951   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46952     # cc -V output typically looks like
46953     #     cc: Sun C 5.12 Linux_i386 2011/11/16
46954     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46955     # Check that this is likely to be the Solaris Studio cc.
46956     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46957     if test $? -ne 0; then
46958       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46959       { $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
46960 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46961       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46962 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46963       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46964 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46965       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46966     fi
46967     # Remove usage instructions (if present), and
46968     # collapse compiler output into a single line
46969     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46970         $SED -e 's/ *[Uu]sage:.*//'`
46971     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46972         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46973   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46974     # xlc -qversion output typically looks like
46975     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46976     #     Version: 11.01.0000.0015
46977     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46978     # Check that this is likely to be the IBM XL C compiler.
46979     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46980     if test $? -ne 0; then
46981       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46982       { $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
46983 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46984       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46985 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46986       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46987 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46988       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46989     fi
46990     # Collapse compiler output into a single line
46991     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46992     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46993         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46994   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46995     # There is no specific version flag, but all output starts with a version string.
46996     # First line typically looks something like:
46997     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46998     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46999     # Check that this is likely to be Microsoft CL.EXE.
47000     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47001     if test $? -ne 0; then
47002       { $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
47003 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47004       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47005 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47006       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47007     fi
47008     # Collapse compiler output into a single line
47009     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47010     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47011         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47012   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47013     # gcc --version output typically looks like
47014     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47015     #     Copyright (C) 2013 Free Software Foundation, Inc.
47016     #     This is free software; see the source for copying conditions.  There is NO
47017     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47018     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47019     # Check that this is likely to be GCC.
47020     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47021     if test $? -ne 0; then
47022       { $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
47023 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47024       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47025 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47026       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47027     fi
47028     # Remove Copyright and legalese from version string, and
47029     # collapse into a single line
47030     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47031         $SED -e 's/ *Copyright .*//'`
47032     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47033         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47034   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47035     # clang --version output typically looks like
47036     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47037     #    clang version 3.3 (tags/RELEASE_33/final)
47038     # or
47039     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47040     #    Target: x86_64-pc-linux-gnu
47041     #    Thread model: posix
47042     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47043     # Check that this is likely to be clang
47044     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47045     if test $? -ne 0; then
47046       { $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
47047 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47048       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47049 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47050       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47051     fi
47052     # Collapse compiler output into a single line
47053     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47054     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47055         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47056   else
47057       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47058   fi
47059   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47060   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47061   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47062   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47063 
47064   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47065 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47066 
47067 
47068   COMPILER=$BUILD_CXX
47069   COMPILER_NAME=BuildC++
47070 
47071   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47072     # cc -V output typically looks like
47073     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47074     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47075     # Check that this is likely to be the Solaris Studio cc.
47076     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47077     if test $? -ne 0; then
47078       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47079       { $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
47080 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47081       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47082 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47083       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47084 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47085       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47086     fi
47087     # Remove usage instructions (if present), and
47088     # collapse compiler output into a single line
47089     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47090         $SED -e 's/ *[Uu]sage:.*//'`
47091     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47092         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47093   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47094     # xlc -qversion output typically looks like
47095     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47096     #     Version: 11.01.0000.0015
47097     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47098     # Check that this is likely to be the IBM XL C compiler.
47099     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47100     if test $? -ne 0; then
47101       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47102       { $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
47103 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47104       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47105 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47106       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47107 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47108       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47109     fi
47110     # Collapse compiler output into a single line
47111     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47112     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47113         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47114   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47115     # There is no specific version flag, but all output starts with a version string.
47116     # First line typically looks something like:
47117     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47118     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47119     # Check that this is likely to be Microsoft CL.EXE.
47120     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47121     if test $? -ne 0; then
47122       { $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
47123 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47124       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47125 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47126       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47127     fi
47128     # Collapse compiler output into a single line
47129     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47130     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47131         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47132   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47133     # gcc --version output typically looks like
47134     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47135     #     Copyright (C) 2013 Free Software Foundation, Inc.
47136     #     This is free software; see the source for copying conditions.  There is NO
47137     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47138     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47139     # Check that this is likely to be GCC.
47140     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47141     if test $? -ne 0; then
47142       { $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
47143 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47144       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47145 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47146       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47147     fi
47148     # Remove Copyright and legalese from version string, and
47149     # collapse into a single line
47150     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47151         $SED -e 's/ *Copyright .*//'`
47152     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47153         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47154   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47155     # clang --version output typically looks like
47156     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47157     #    clang version 3.3 (tags/RELEASE_33/final)
47158     # or
47159     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47160     #    Target: x86_64-pc-linux-gnu
47161     #    Thread model: posix
47162     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47163     # Check that this is likely to be clang
47164     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47165     if test $? -ne 0; then
47166       { $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
47167 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47168       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47169 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47170       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47171     fi
47172     # Collapse compiler output into a single line
47173     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47174     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47175         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47176   else
47177       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47178   fi
47179   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47180   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47181   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47182   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47183 
47184   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47185 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47186 
47187 
47188   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47189     { $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
47190 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47191     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47192 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47193   fi
47194 
47195   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47196   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47197     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47198 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47199   fi
47200 
47201   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47202     { $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
47203 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47204   fi
47205 
47206   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47207 
47208   else
47209     # If we are not cross compiling, use the normal target compilers for
47210     # building the build platform executables.
47211     BUILD_CC="$CC"
47212     BUILD_CXX="$CXX"
47213     BUILD_LD="$LD"
47214     BUILD_LDCXX="$LDCXX"
47215     BUILD_NM="$NM"
47216     BUILD_AS="$AS"
47217     BUILD_OBJCOPY="$OBJCOPY"
47218     BUILD_STRIP="$STRIP"
47219     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47220     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47221     BUILD_AR="$AR"
47222 
47223 
47224   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47225     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47226 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47227     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47228 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47229   fi
47230 
47231   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47232   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47233     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47234 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47235   fi
47236 
47237   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47238     { $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
47239 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47240   fi
47241 
47242   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47243 
47244   fi
47245 
47246 
47247 
47248 
47249 
47250 
47251 
47252 
47253 
47254 
47255 
47256 
47257   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47258     # For hotspot, we need these in Windows mixed path,
47259     # so rewrite them all. Need added .exe suffix.
47260     HOTSPOT_CXX="$CXX.exe"
47261     HOTSPOT_LD="$LD.exe"
47262     HOTSPOT_MT="$MT.exe"
47263     HOTSPOT_RC="$RC.exe"
47264 
47265   unix_path="$HOTSPOT_CXX"
47266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47267     windows_path=`$CYGPATH -m "$unix_path"`
47268     HOTSPOT_CXX="$windows_path"
47269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47270     windows_path=`cmd //c echo $unix_path`
47271     HOTSPOT_CXX="$windows_path"
47272   fi
47273 
47274 
47275   unix_path="$HOTSPOT_LD"
47276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47277     windows_path=`$CYGPATH -m "$unix_path"`
47278     HOTSPOT_LD="$windows_path"
47279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47280     windows_path=`cmd //c echo $unix_path`
47281     HOTSPOT_LD="$windows_path"
47282   fi
47283 
47284 
47285   unix_path="$HOTSPOT_MT"
47286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47287     windows_path=`$CYGPATH -m "$unix_path"`
47288     HOTSPOT_MT="$windows_path"
47289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47290     windows_path=`cmd //c echo $unix_path`
47291     HOTSPOT_MT="$windows_path"
47292   fi
47293 
47294 
47295   unix_path="$HOTSPOT_RC"
47296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47297     windows_path=`$CYGPATH -m "$unix_path"`
47298     HOTSPOT_RC="$windows_path"
47299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47300     windows_path=`cmd //c echo $unix_path`
47301     HOTSPOT_RC="$windows_path"
47302   fi
47303 
47304 
47305 
47306   else
47307     HOTSPOT_CXX="$CXX"
47308     HOTSPOT_LD="$LD"
47309   fi
47310 
47311 
47312 
47313   if test  "x$TOOLCHAIN_TYPE" = xclang; then
47314     USE_CLANG=true
47315   fi
47316 
47317 
47318 
47319 
47320 
47321   # The package path is used only on macosx?
47322   # FIXME: clean this up, and/or move it elsewhere.
47323   PACKAGE_PATH=/opt/local
47324 
47325 
47326   # Check for extra potential brokenness.
47327   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47328     # On Windows, double-check that we got the right compiler.
47329     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47330     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47331     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47332       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47333         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
47334       fi
47335     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47336       if test "x$COMPILER_CPU_TEST" != "xx64"; then
47337         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47338       fi
47339     fi
47340   fi
47341 
47342   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47343     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47344     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47345     # This is later checked when setting flags.
47346 
47347     # "-Og" suppported for GCC 4.8 and later
47348     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47349 
47350 
47351 
47352 
47353 
47354 
47355 
47356 
47357 
47358 
47359 
47360 
47361 
47362 
47363 
47364 
47365 
47366 
47367 
47368 
47369 
47370 
47371 
47372 
47373 
47374 
47375 
47376 
47377 
47378 
47379 
47380 
47381 
47382 
47383 
47384 
47385 
47386 
47387 
47388 
47389 
47390 
47391 
47392 
47393 
47394 
47395 
47396     # Execute function body
47397 
47398 
47399 
47400 
47401 
47402 
47403 
47404 
47405 
47406 
47407 
47408 
47409 
47410 
47411 
47412 
47413 
47414 
47415 
47416 
47417 
47418 
47419 
47420 
47421 
47422 
47423 
47424 
47425 
47426 
47427 
47428 
47429 
47430 
47431 
47432 
47433 
47434 
47435 
47436 
47437 
47438 
47439 
47440 
47441 
47442 
47443 
47444 
47445     # Execute function body
47446 
47447   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47448 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47449   supports=yes
47450 
47451   saved_cflags="$CFLAGS"
47452   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47453   ac_ext=c
47454 ac_cpp='$CPP $CPPFLAGS'
47455 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47456 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47457 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47458 
47459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47460 /* end confdefs.h.  */
47461 int i;
47462 _ACEOF
47463 if ac_fn_c_try_compile "$LINENO"; then :
47464 
47465 else
47466   supports=no
47467 fi
47468 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47469   ac_ext=cpp
47470 ac_cpp='$CXXCPP $CPPFLAGS'
47471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47474 
47475   CFLAGS="$saved_cflags"
47476 
47477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47478 $as_echo "$supports" >&6; }
47479   if test "x$supports" = "xyes" ; then
47480     :
47481     C_COMP_SUPPORTS="yes"
47482   else
47483     :
47484     C_COMP_SUPPORTS="no"
47485   fi
47486 
47487 
47488 
47489 
47490 
47491 
47492 
47493 
47494 
47495 
47496 
47497 
47498 
47499 
47500 
47501 
47502 
47503 
47504 
47505 
47506 
47507 
47508 
47509 
47510 
47511 
47512 
47513 
47514 
47515 
47516 
47517 
47518 
47519 
47520 
47521 
47522 
47523 
47524 
47525 
47526 
47527 
47528 
47529 
47530 
47531 
47532 
47533 
47534 
47535 
47536 
47537 
47538 
47539 
47540 
47541 
47542 
47543 
47544 
47545     # Execute function body
47546 
47547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47548 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47549   supports=yes
47550 
47551   saved_cxxflags="$CXXFLAGS"
47552   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47553   ac_ext=cpp
47554 ac_cpp='$CXXCPP $CPPFLAGS'
47555 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47556 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47557 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47558 
47559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47560 /* end confdefs.h.  */
47561 int i;
47562 _ACEOF
47563 if ac_fn_cxx_try_compile "$LINENO"; then :
47564 
47565 else
47566   supports=no
47567 fi
47568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47569   ac_ext=cpp
47570 ac_cpp='$CXXCPP $CPPFLAGS'
47571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47574 
47575   CXXFLAGS="$saved_cxxflags"
47576 
47577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47578 $as_echo "$supports" >&6; }
47579   if test "x$supports" = "xyes" ; then
47580     :
47581     CXX_COMP_SUPPORTS="yes"
47582   else
47583     :
47584     CXX_COMP_SUPPORTS="no"
47585   fi
47586 
47587 
47588 
47589 
47590 
47591 
47592 
47593 
47594 
47595 
47596 
47597 
47598 
47599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47600 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47601   supports=no
47602   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47603 
47604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47605 $as_echo "$supports" >&6; }
47606   if test "x$supports" = "xyes" ; then
47607     :
47608     HAS_CFLAG_OPTIMIZE_DEBUG=true
47609   else
47610     :
47611     HAS_CFLAG_OPTIMIZE_DEBUG=false
47612   fi
47613 
47614 
47615 
47616 
47617 
47618 
47619 
47620     # "-z relro" supported in GNU binutils 2.17 and later
47621     LINKER_RELRO_FLAG="-Wl,-z,relro"
47622 
47623 
47624 
47625 
47626 
47627 
47628 
47629 
47630 
47631 
47632 
47633 
47634 
47635 
47636 
47637 
47638 
47639 
47640 
47641 
47642 
47643 
47644 
47645 
47646 
47647 
47648 
47649 
47650 
47651 
47652 
47653 
47654 
47655 
47656 
47657 
47658 
47659 
47660 
47661 
47662 
47663 
47664 
47665 
47666 
47667 
47668 
47669     # Execute function body
47670 
47671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47672 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47673   supports=yes
47674 
47675   saved_ldflags="$LDFLAGS"
47676   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47677   ac_ext=c
47678 ac_cpp='$CPP $CPPFLAGS'
47679 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47680 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47681 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47682 
47683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47684 /* end confdefs.h.  */
47685 
47686 int
47687 main ()
47688 {
47689 
47690   ;
47691   return 0;
47692 }
47693 _ACEOF
47694 if ac_fn_c_try_link "$LINENO"; then :
47695 
47696 else
47697   supports=no
47698 fi
47699 rm -f core conftest.err conftest.$ac_objext \
47700     conftest$ac_exeext conftest.$ac_ext
47701   ac_ext=cpp
47702 ac_cpp='$CXXCPP $CPPFLAGS'
47703 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47704 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47705 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47706 
47707   LDFLAGS="$saved_ldflags"
47708 
47709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47710 $as_echo "$supports" >&6; }
47711   if test "x$supports" = "xyes" ; then
47712     :
47713     HAS_LINKER_RELRO=true
47714   else
47715     :
47716     HAS_LINKER_RELRO=false
47717   fi
47718 
47719 
47720 
47721 
47722 
47723 
47724 
47725 
47726 
47727 
47728 
47729 
47730 
47731     # "-z now" supported in GNU binutils 2.11 and later
47732     LINKER_NOW_FLAG="-Wl,-z,now"
47733 
47734 
47735 
47736 
47737 
47738 
47739 
47740 
47741 
47742 
47743 
47744 
47745 
47746 
47747 
47748 
47749 
47750 
47751 
47752 
47753 
47754 
47755 
47756 
47757 
47758 
47759 
47760 
47761 
47762 
47763 
47764 
47765 
47766 
47767 
47768 
47769 
47770 
47771 
47772 
47773 
47774 
47775 
47776 
47777 
47778 
47779 
47780     # Execute function body
47781 
47782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47783 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47784   supports=yes
47785 
47786   saved_ldflags="$LDFLAGS"
47787   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47788   ac_ext=c
47789 ac_cpp='$CPP $CPPFLAGS'
47790 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47791 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47792 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47793 
47794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47795 /* end confdefs.h.  */
47796 
47797 int
47798 main ()
47799 {
47800 
47801   ;
47802   return 0;
47803 }
47804 _ACEOF
47805 if ac_fn_c_try_link "$LINENO"; then :
47806 
47807 else
47808   supports=no
47809 fi
47810 rm -f core conftest.err conftest.$ac_objext \
47811     conftest$ac_exeext conftest.$ac_ext
47812   ac_ext=cpp
47813 ac_cpp='$CXXCPP $CPPFLAGS'
47814 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47815 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47816 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47817 
47818   LDFLAGS="$saved_ldflags"
47819 
47820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47821 $as_echo "$supports" >&6; }
47822   if test "x$supports" = "xyes" ; then
47823     :
47824     HAS_LINKER_NOW=true
47825   else
47826     :
47827     HAS_LINKER_NOW=false
47828   fi
47829 
47830 
47831 
47832 
47833 
47834 
47835 
47836 
47837 
47838 
47839 
47840 
47841   fi
47842 
47843   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47844   # in executable.'
47845   USING_BROKEN_SUSE_LD=no
47846   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47847     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47848 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47849     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47850     $ECHO "int main() { }" > main.c
47851     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47852       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47853 $as_echo "no" >&6; }
47854       USING_BROKEN_SUSE_LD=no
47855     else
47856       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47857 $as_echo "yes" >&6; }
47858       USING_BROKEN_SUSE_LD=yes
47859     fi
47860     $RM version-script.map main.c a.out
47861   fi
47862 
47863 
47864   # Setup hotspot lecagy names for toolchains
47865   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47866   if test "x$TOOLCHAIN_TYPE" = xclang; then
47867     HOTSPOT_TOOLCHAIN_TYPE=gcc
47868   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47869     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47870   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47871     HOTSPOT_TOOLCHAIN_TYPE=visCPP
47872   fi
47873 
47874 
47875 
47876 # Setup the JTReg Regression Test Harness.
47877 
47878 
47879 # Check whether --with-jtreg was given.
47880 if test "${with_jtreg+set}" = set; then :
47881   withval=$with_jtreg;
47882 else
47883   with_jtreg=no
47884 fi
47885 
47886 
47887   if test "x$with_jtreg" = xno; then
47888     # jtreg disabled
47889     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47890 $as_echo_n "checking for jtreg... " >&6; }
47891     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47892 $as_echo "no" >&6; }
47893   else
47894     if test "x$with_jtreg" != xyes; then
47895       # with path specified.
47896       JT_HOME="$with_jtreg"
47897     fi
47898 
47899     if test "x$JT_HOME" != x; then
47900       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47901 $as_echo_n "checking for jtreg... " >&6; }
47902 
47903       # use JT_HOME enviroment var.
47904 
47905   # Only process if variable expands to non-empty
47906 
47907   if test "x$JT_HOME" != x; then
47908     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47909 
47910   # Input might be given as Windows format, start by converting to
47911   # unix format.
47912   path="$JT_HOME"
47913   new_path=`$CYGPATH -u "$path"`
47914 
47915   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47916   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47917   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47918   # "foo.exe" is OK but "foo" is an error.
47919   #
47920   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47921   # It is also a way to make sure we got the proper file name for the real test later on.
47922   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47923   if test "x$test_shortpath" = x; then
47924     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47925 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47926     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47927   fi
47928 
47929   # Call helper function which possibly converts this using DOS-style short mode.
47930   # If so, the updated path is stored in $new_path.
47931 
47932   input_path="$new_path"
47933   # Check if we need to convert this using DOS-style short mode. If the path
47934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47935   # take no chances and rewrite it.
47936   # Note: m4 eats our [], so we need to use [ and ] instead.
47937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47938   if test "x$has_forbidden_chars" != x; then
47939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47940     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47941     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47942     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47943       # Going to short mode and back again did indeed matter. Since short mode is
47944       # case insensitive, let's make it lowercase to improve readability.
47945       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47946       # Now convert it back to Unix-style (cygpath)
47947       input_path=`$CYGPATH -u "$shortmode_path"`
47948       new_path="$input_path"
47949     fi
47950   fi
47951 
47952   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47953   if test "x$test_cygdrive_prefix" = x; then
47954     # As a simple fix, exclude /usr/bin since it's not a real path.
47955     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47956       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47957       # a path prefixed by /cygdrive for fixpath to work.
47958       new_path="$CYGWIN_ROOT_PATH$input_path"
47959     fi
47960   fi
47961 
47962 
47963   if test "x$path" != "x$new_path"; then
47964     JT_HOME="$new_path"
47965     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47966 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47967   fi
47968 
47969     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47970 
47971   path="$JT_HOME"
47972   has_colon=`$ECHO $path | $GREP ^.:`
47973   new_path="$path"
47974   if test "x$has_colon" = x; then
47975     # Not in mixed or Windows style, start by that.
47976     new_path=`cmd //c echo $path`
47977   fi
47978 
47979 
47980   input_path="$new_path"
47981   # Check if we need to convert this using DOS-style short mode. If the path
47982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47983   # take no chances and rewrite it.
47984   # Note: m4 eats our [], so we need to use [ and ] instead.
47985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47986   if test "x$has_forbidden_chars" != x; then
47987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47988     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47989   fi
47990 
47991 
47992   windows_path="$new_path"
47993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47994     unix_path=`$CYGPATH -u "$windows_path"`
47995     new_path="$unix_path"
47996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47998     new_path="$unix_path"
47999   fi
48000 
48001   if test "x$path" != "x$new_path"; then
48002     JT_HOME="$new_path"
48003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48004 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48005   fi
48006 
48007   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48008   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48009 
48010     else
48011       # We're on a unix platform. Hooray! :)
48012       path="$JT_HOME"
48013       has_space=`$ECHO "$path" | $GREP " "`
48014       if test "x$has_space" != x; then
48015         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48016 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48017         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48018       fi
48019 
48020       # Use eval to expand a potential ~
48021       eval path="$path"
48022       if test ! -f "$path" && test ! -d "$path"; then
48023         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48024       fi
48025 
48026       if test -d "$path"; then
48027         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48028       else
48029         dir="`$DIRNAME "$path"`"
48030         base="`$BASENAME "$path"`"
48031         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48032       fi
48033     fi
48034   fi
48035 
48036 
48037       # jtreg win32 script works for everybody
48038       JTREGEXE="$JT_HOME/bin/jtreg"
48039 
48040       if test ! -f "$JTREGEXE"; then
48041         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48042       fi
48043 
48044       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48045 $as_echo "$JTREGEXE" >&6; }
48046     else
48047       # try to find jtreg on path
48048 
48049 
48050 
48051   # Publish this variable in the help.
48052 
48053 
48054   if [ -z "${JTREGEXE+x}" ]; then
48055     # The variable is not set by user, try to locate tool using the code snippet
48056     for ac_prog in jtreg
48057 do
48058   # Extract the first word of "$ac_prog", so it can be a program name with args.
48059 set dummy $ac_prog; ac_word=$2
48060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48061 $as_echo_n "checking for $ac_word... " >&6; }
48062 if ${ac_cv_path_JTREGEXE+:} false; then :
48063   $as_echo_n "(cached) " >&6
48064 else
48065   case $JTREGEXE in
48066   [\\/]* | ?:[\\/]*)
48067   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48068   ;;
48069   *)
48070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48071 for as_dir in $PATH
48072 do
48073   IFS=$as_save_IFS
48074   test -z "$as_dir" && as_dir=.
48075     for ac_exec_ext in '' $ac_executable_extensions; do
48076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48077     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48079     break 2
48080   fi
48081 done
48082   done
48083 IFS=$as_save_IFS
48084 
48085   ;;
48086 esac
48087 fi
48088 JTREGEXE=$ac_cv_path_JTREGEXE
48089 if test -n "$JTREGEXE"; then
48090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48091 $as_echo "$JTREGEXE" >&6; }
48092 else
48093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48094 $as_echo "no" >&6; }
48095 fi
48096 
48097 
48098   test -n "$JTREGEXE" && break
48099 done
48100 
48101   else
48102     # The variable is set, but is it from the command line or the environment?
48103 
48104     # Try to remove the string !JTREGEXE! from our list.
48105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48107       # If it failed, the variable was not from the command line. Ignore it,
48108       # but warn the user (except for BASH, which is always set by the calling BASH).
48109       if test "xJTREGEXE" != xBASH; then
48110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48111 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48112       fi
48113       # Try to locate tool using the code snippet
48114       for ac_prog in jtreg
48115 do
48116   # Extract the first word of "$ac_prog", so it can be a program name with args.
48117 set dummy $ac_prog; ac_word=$2
48118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48119 $as_echo_n "checking for $ac_word... " >&6; }
48120 if ${ac_cv_path_JTREGEXE+:} false; then :
48121   $as_echo_n "(cached) " >&6
48122 else
48123   case $JTREGEXE in
48124   [\\/]* | ?:[\\/]*)
48125   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48126   ;;
48127   *)
48128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48129 for as_dir in $PATH
48130 do
48131   IFS=$as_save_IFS
48132   test -z "$as_dir" && as_dir=.
48133     for ac_exec_ext in '' $ac_executable_extensions; do
48134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48135     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48137     break 2
48138   fi
48139 done
48140   done
48141 IFS=$as_save_IFS
48142 
48143   ;;
48144 esac
48145 fi
48146 JTREGEXE=$ac_cv_path_JTREGEXE
48147 if test -n "$JTREGEXE"; then
48148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48149 $as_echo "$JTREGEXE" >&6; }
48150 else
48151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48152 $as_echo "no" >&6; }
48153 fi
48154 
48155 
48156   test -n "$JTREGEXE" && break
48157 done
48158 
48159     else
48160       # If it succeeded, then it was overridden by the user. We will use it
48161       # for the tool.
48162 
48163       # First remove it from the list of overridden variables, so we can test
48164       # for unknown variables in the end.
48165       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48166 
48167       # Check if we try to supply an empty value
48168       if test "x$JTREGEXE" = x; then
48169         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48170 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48171         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48172 $as_echo_n "checking for JTREGEXE... " >&6; }
48173         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48174 $as_echo "disabled" >&6; }
48175       else
48176         # Check if the provided tool contains a complete path.
48177         tool_specified="$JTREGEXE"
48178         tool_basename="${tool_specified##*/}"
48179         if test "x$tool_basename" = "x$tool_specified"; then
48180           # A command without a complete path is provided, search $PATH.
48181           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48182 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48183           # Extract the first word of "$tool_basename", so it can be a program name with args.
48184 set dummy $tool_basename; ac_word=$2
48185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48186 $as_echo_n "checking for $ac_word... " >&6; }
48187 if ${ac_cv_path_JTREGEXE+:} false; then :
48188   $as_echo_n "(cached) " >&6
48189 else
48190   case $JTREGEXE in
48191   [\\/]* | ?:[\\/]*)
48192   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48193   ;;
48194   *)
48195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48196 for as_dir in $PATH
48197 do
48198   IFS=$as_save_IFS
48199   test -z "$as_dir" && as_dir=.
48200     for ac_exec_ext in '' $ac_executable_extensions; do
48201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48202     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48204     break 2
48205   fi
48206 done
48207   done
48208 IFS=$as_save_IFS
48209 
48210   ;;
48211 esac
48212 fi
48213 JTREGEXE=$ac_cv_path_JTREGEXE
48214 if test -n "$JTREGEXE"; then
48215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48216 $as_echo "$JTREGEXE" >&6; }
48217 else
48218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48219 $as_echo "no" >&6; }
48220 fi
48221 
48222 
48223           if test "x$JTREGEXE" = x; then
48224             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48225           fi
48226         else
48227           # Otherwise we believe it is a complete path. Use it as it is.
48228           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48229 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48230           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48231 $as_echo_n "checking for JTREGEXE... " >&6; }
48232           if test ! -x "$tool_specified"; then
48233             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48234 $as_echo "not found" >&6; }
48235             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48236           fi
48237           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48238 $as_echo "$tool_specified" >&6; }
48239         fi
48240       fi
48241     fi
48242 
48243   fi
48244 
48245 
48246 
48247   if test "x$JTREGEXE" = x; then
48248     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48249   fi
48250 
48251 
48252       JT_HOME="`$DIRNAME $JTREGEXE`"
48253     fi
48254   fi
48255 
48256 
48257 
48258 
48259 
48260 
48261   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48262   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48263   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48264   #                              commands produced by the link step (currently AIX only)
48265   if test "x$TOOLCHAIN_TYPE" = xxlc; then
48266     COMPILER_TARGET_BITS_FLAG="-q"
48267     COMPILER_COMMAND_FILE_FLAG="-f"
48268     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48269   else
48270     COMPILER_TARGET_BITS_FLAG="-m"
48271     COMPILER_COMMAND_FILE_FLAG="@"
48272     COMPILER_BINDCMD_FILE_FLAG=""
48273 
48274     # The solstudio linker does not support @-files.
48275     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48276       COMPILER_COMMAND_FILE_FLAG=
48277     fi
48278 
48279     # Check if @file is supported by gcc
48280     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48281       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48282 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48283       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48284       $ECHO "" "--version" > command.file
48285       if $CXX @command.file 2>&5 >&5; then
48286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48287 $as_echo "yes" >&6; }
48288         COMPILER_COMMAND_FILE_FLAG="@"
48289       else
48290         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48291 $as_echo "no" >&6; }
48292         COMPILER_COMMAND_FILE_FLAG=
48293       fi
48294       $RM command.file
48295     fi
48296   fi
48297 
48298 
48299 
48300 
48301   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48302   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48303     ARFLAGS="-r"
48304   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48305     ARFLAGS="-X64"
48306   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48307     # lib.exe is used as AR to create static libraries.
48308     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48309   else
48310     ARFLAGS=""
48311   fi
48312 
48313 
48314   ## Setup strip.
48315   # FIXME: should this really be per platform, or should it be per toolchain type?
48316   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48317   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48318   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48319     STRIPFLAGS="-g"
48320   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48321     STRIPFLAGS="-x"
48322   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48323     STRIPFLAGS="-S"
48324   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48325     STRIPFLAGS="-X32_64"
48326   fi
48327 
48328 
48329 
48330   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48331     CC_OUT_OPTION=-Fo
48332     EXE_OUT_OPTION=-out:
48333     LD_OUT_OPTION=-out:
48334     AR_OUT_OPTION=-out:
48335   else
48336     # The option used to specify the target .o,.a or .so file.
48337     # When compiling, how to specify the to be created object file.
48338     CC_OUT_OPTION='-o$(SPACE)'
48339     # When linking, how to specify the to be created executable.
48340     EXE_OUT_OPTION='-o$(SPACE)'
48341     # When linking, how to specify the to be created dynamically linkable library.
48342     LD_OUT_OPTION='-o$(SPACE)'
48343     # When archiving, how to specify the to be create static archive for object files.
48344     AR_OUT_OPTION='rcs$(SPACE)'
48345   fi
48346 
48347 
48348 
48349 
48350 
48351   # On Windows, we need to set RC flags.
48352   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48353     RC_FLAGS="-nologo -l0x409"
48354     JVM_RCFLAGS="-nologo"
48355     if test "x$DEBUG_LEVEL" = xrelease; then
48356       RC_FLAGS="$RC_FLAGS -DNDEBUG"
48357       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48358     fi
48359 
48360     # The version variables used to create RC_FLAGS may be overridden
48361     # in a custom configure script, or possibly the command line.
48362     # Let those variables be expanded at make time in spec.gmk.
48363     # The \$ are escaped to the shell, and the $(...) variables
48364     # are evaluated by make.
48365     RC_FLAGS="$RC_FLAGS \
48366         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48367         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48368         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48369         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48370         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48371         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48372         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48373 
48374     JVM_RCFLAGS="$JVM_RCFLAGS \
48375         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48376         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48377         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48378         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48379         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48380         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48381         -D\"HS_FNAME=jvm.dll\" \
48382         -D\"HS_INTERNAL_NAME=jvm\""
48383   fi
48384 
48385 
48386 
48387   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48388     # silence copyright notice and other headers.
48389     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48390   fi
48391 
48392 
48393 # Now we can test some aspects on the target using configure macros.
48394 
48395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48396 $as_echo_n "checking for ANSI C header files... " >&6; }
48397 if ${ac_cv_header_stdc+:} false; then :
48398   $as_echo_n "(cached) " >&6
48399 else
48400   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48401 /* end confdefs.h.  */
48402 #include <stdlib.h>
48403 #include <stdarg.h>
48404 #include <string.h>
48405 #include <float.h>
48406 
48407 int
48408 main ()
48409 {
48410 
48411   ;
48412   return 0;
48413 }
48414 _ACEOF
48415 if ac_fn_cxx_try_compile "$LINENO"; then :
48416   ac_cv_header_stdc=yes
48417 else
48418   ac_cv_header_stdc=no
48419 fi
48420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48421 
48422 if test $ac_cv_header_stdc = yes; then
48423   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48425 /* end confdefs.h.  */
48426 #include <string.h>
48427 
48428 _ACEOF
48429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48430   $EGREP "memchr" >/dev/null 2>&1; then :
48431 
48432 else
48433   ac_cv_header_stdc=no
48434 fi
48435 rm -f conftest*
48436 
48437 fi
48438 
48439 if test $ac_cv_header_stdc = yes; then
48440   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48442 /* end confdefs.h.  */
48443 #include <stdlib.h>
48444 
48445 _ACEOF
48446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48447   $EGREP "free" >/dev/null 2>&1; then :
48448 
48449 else
48450   ac_cv_header_stdc=no
48451 fi
48452 rm -f conftest*
48453 
48454 fi
48455 
48456 if test $ac_cv_header_stdc = yes; then
48457   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48458   if test "$cross_compiling" = yes; then :
48459   :
48460 else
48461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48462 /* end confdefs.h.  */
48463 #include <ctype.h>
48464 #include <stdlib.h>
48465 #if ((' ' & 0x0FF) == 0x020)
48466 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48467 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48468 #else
48469 # define ISLOWER(c) \
48470                    (('a' <= (c) && (c) <= 'i') \
48471                      || ('j' <= (c) && (c) <= 'r') \
48472                      || ('s' <= (c) && (c) <= 'z'))
48473 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48474 #endif
48475 
48476 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48477 int
48478 main ()
48479 {
48480   int i;
48481   for (i = 0; i < 256; i++)
48482     if (XOR (islower (i), ISLOWER (i))
48483         || toupper (i) != TOUPPER (i))
48484       return 2;
48485   return 0;
48486 }
48487 _ACEOF
48488 if ac_fn_cxx_try_run "$LINENO"; then :
48489 
48490 else
48491   ac_cv_header_stdc=no
48492 fi
48493 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48494   conftest.$ac_objext conftest.beam conftest.$ac_ext
48495 fi
48496 
48497 fi
48498 fi
48499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48500 $as_echo "$ac_cv_header_stdc" >&6; }
48501 if test $ac_cv_header_stdc = yes; then
48502 
48503 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
48504 
48505 fi
48506 
48507 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
48508 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48509                   inttypes.h stdint.h unistd.h
48510 do :
48511   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48512 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48513 "
48514 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48515   cat >>confdefs.h <<_ACEOF
48516 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48517 _ACEOF
48518 
48519 fi
48520 
48521 done
48522 
48523 
48524 
48525   ###############################################################################
48526   #
48527   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48528   # (The JVM can use 32 or 64 bit Java pointers but that decision
48529   # is made at runtime.)
48530   #
48531 
48532   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48533     # Always specify -m flag on Solaris
48534     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48535 
48536   # When we add flags to the "official" CFLAGS etc, we need to
48537   # keep track of these additions in ADDED_CFLAGS etc. These
48538   # will later be checked to make sure only controlled additions
48539   # have been made to CFLAGS etc.
48540   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48541   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48542   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48543 
48544   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48545   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48546   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48547 
48548   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48549   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48550   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48551 
48552   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48553   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48554   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48555 
48556   elif test "x$COMPILE_TYPE" = xreduced; then
48557     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48558       # Specify -m if running reduced on unix platforms
48559 
48560   # When we add flags to the "official" CFLAGS etc, we need to
48561   # keep track of these additions in ADDED_CFLAGS etc. These
48562   # will later be checked to make sure only controlled additions
48563   # have been made to CFLAGS etc.
48564   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48565   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48566   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48567 
48568   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48569   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48570   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48571 
48572   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48573   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48574   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48575 
48576   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48577   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48578   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48579 
48580     fi
48581   fi
48582   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48583     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48584     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48585     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48586   fi
48587 
48588   # Make compilation sanity check
48589   for ac_header in stdio.h
48590 do :
48591   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48592 if test "x$ac_cv_header_stdio_h" = xyes; then :
48593   cat >>confdefs.h <<_ACEOF
48594 #define HAVE_STDIO_H 1
48595 _ACEOF
48596 
48597 else
48598 
48599     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48600 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48601     if test "x$COMPILE_TYPE" = xreduced; then
48602 
48603   # Print a helpful message on how to acquire the necessary build dependency.
48604   # reduced is the help tag: freetype, cups, alsa etc
48605   MISSING_DEPENDENCY=reduced
48606 
48607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48608     cygwin_help $MISSING_DEPENDENCY
48609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48610     msys_help $MISSING_DEPENDENCY
48611   else
48612     PKGHANDLER_COMMAND=
48613 
48614     case $PKGHANDLER in
48615       apt-get)
48616         apt_help     $MISSING_DEPENDENCY ;;
48617       yum)
48618         yum_help     $MISSING_DEPENDENCY ;;
48619       port)
48620         port_help    $MISSING_DEPENDENCY ;;
48621       pkgutil)
48622         pkgutil_help $MISSING_DEPENDENCY ;;
48623       pkgadd)
48624         pkgadd_help  $MISSING_DEPENDENCY ;;
48625     esac
48626 
48627     if test "x$PKGHANDLER_COMMAND" != x; then
48628       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48629     fi
48630   fi
48631 
48632       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48633 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48634     elif test "x$COMPILE_TYPE" = xcross; then
48635       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48636 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48637     fi
48638     as_fn_error $? "Cannot continue." "$LINENO" 5
48639 
48640 fi
48641 
48642 done
48643 
48644 
48645   # The cast to long int works around a bug in the HP C Compiler
48646 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48647 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48648 # This bug is HP SR number 8606223364.
48649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48650 $as_echo_n "checking size of int *... " >&6; }
48651 if ${ac_cv_sizeof_int_p+:} false; then :
48652   $as_echo_n "(cached) " >&6
48653 else
48654   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48655 
48656 else
48657   if test "$ac_cv_type_int_p" = yes; then
48658      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48659 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48660 as_fn_error 77 "cannot compute sizeof (int *)
48661 See \`config.log' for more details" "$LINENO" 5; }
48662    else
48663      ac_cv_sizeof_int_p=0
48664    fi
48665 fi
48666 
48667 fi
48668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48669 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48670 
48671 
48672 
48673 cat >>confdefs.h <<_ACEOF
48674 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48675 _ACEOF
48676 
48677 
48678 
48679   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48680   if test "x$ac_cv_sizeof_int_p" = x; then
48681     # The test failed, lets stick to the assumed value.
48682     { $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
48683 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48684   else
48685     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48686 
48687     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48688       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48689       # Let's try to implicitely set the compilers target architecture and retry the test
48690       { $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
48691 $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;}
48692       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48693 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48694 
48695   # When we add flags to the "official" CFLAGS etc, we need to
48696   # keep track of these additions in ADDED_CFLAGS etc. These
48697   # will later be checked to make sure only controlled additions
48698   # have been made to CFLAGS etc.
48699   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48700   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48701   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48702 
48703   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48704   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48705   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48706 
48707   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48708   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48709   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48710 
48711   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48712   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48713   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48714 
48715 
48716       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48717       unset ac_cv_sizeof_int_p
48718       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48719       cat >>confdefs.h <<_ACEOF
48720 #undef SIZEOF_INT_P
48721 _ACEOF
48722 
48723       # The cast to long int works around a bug in the HP C Compiler
48724 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48725 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48726 # This bug is HP SR number 8606223364.
48727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48728 $as_echo_n "checking size of int *... " >&6; }
48729 if ${ac_cv_sizeof_int_p+:} false; then :
48730   $as_echo_n "(cached) " >&6
48731 else
48732   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48733 
48734 else
48735   if test "$ac_cv_type_int_p" = yes; then
48736      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48737 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48738 as_fn_error 77 "cannot compute sizeof (int *)
48739 See \`config.log' for more details" "$LINENO" 5; }
48740    else
48741      ac_cv_sizeof_int_p=0
48742    fi
48743 fi
48744 
48745 fi
48746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48747 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48748 
48749 
48750 
48751 cat >>confdefs.h <<_ACEOF
48752 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48753 _ACEOF
48754 
48755 
48756 
48757       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48758 
48759       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48760         { $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
48761 $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;}
48762         if test "x$COMPILE_TYPE" = xreduced; then
48763 
48764   # Print a helpful message on how to acquire the necessary build dependency.
48765   # reduced is the help tag: freetype, cups, alsa etc
48766   MISSING_DEPENDENCY=reduced
48767 
48768   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48769     cygwin_help $MISSING_DEPENDENCY
48770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48771     msys_help $MISSING_DEPENDENCY
48772   else
48773     PKGHANDLER_COMMAND=
48774 
48775     case $PKGHANDLER in
48776       apt-get)
48777         apt_help     $MISSING_DEPENDENCY ;;
48778       yum)
48779         yum_help     $MISSING_DEPENDENCY ;;
48780       port)
48781         port_help    $MISSING_DEPENDENCY ;;
48782       pkgutil)
48783         pkgutil_help $MISSING_DEPENDENCY ;;
48784       pkgadd)
48785         pkgadd_help  $MISSING_DEPENDENCY ;;
48786     esac
48787 
48788     if test "x$PKGHANDLER_COMMAND" != x; then
48789       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48790     fi
48791   fi
48792 
48793           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48794 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48795         elif test "x$COMPILE_TYPE" = xcross; then
48796           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48797 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48798         fi
48799         as_fn_error $? "Cannot continue." "$LINENO" 5
48800       fi
48801     fi
48802   fi
48803 
48804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48805 $as_echo_n "checking for target address size... " >&6; }
48806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48807 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48808 
48809 
48810   ###############################################################################
48811   #
48812   # Is the target little of big endian?
48813   #
48814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48815 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48816 if ${ac_cv_c_bigendian+:} false; then :
48817   $as_echo_n "(cached) " >&6
48818 else
48819   ac_cv_c_bigendian=unknown
48820     # See if we're dealing with a universal compiler.
48821     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48822 /* end confdefs.h.  */
48823 #ifndef __APPLE_CC__
48824                not a universal capable compiler
48825              #endif
48826              typedef int dummy;
48827 
48828 _ACEOF
48829 if ac_fn_cxx_try_compile "$LINENO"; then :
48830 
48831         # Check for potential -arch flags.  It is not universal unless
48832         # there are at least two -arch flags with different values.
48833         ac_arch=
48834         ac_prev=
48835         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48836          if test -n "$ac_prev"; then
48837            case $ac_word in
48838              i?86 | x86_64 | ppc | ppc64)
48839                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48840                  ac_arch=$ac_word
48841                else
48842                  ac_cv_c_bigendian=universal
48843                  break
48844                fi
48845                ;;
48846            esac
48847            ac_prev=
48848          elif test "x$ac_word" = "x-arch"; then
48849            ac_prev=arch
48850          fi
48851        done
48852 fi
48853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48854     if test $ac_cv_c_bigendian = unknown; then
48855       # See if sys/param.h defines the BYTE_ORDER macro.
48856       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48857 /* end confdefs.h.  */
48858 #include <sys/types.h>
48859              #include <sys/param.h>
48860 
48861 int
48862 main ()
48863 {
48864 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48865                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48866                      && LITTLE_ENDIAN)
48867               bogus endian macros
48868              #endif
48869 
48870   ;
48871   return 0;
48872 }
48873 _ACEOF
48874 if ac_fn_cxx_try_compile "$LINENO"; then :
48875   # It does; now see whether it defined to BIG_ENDIAN or not.
48876          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48877 /* end confdefs.h.  */
48878 #include <sys/types.h>
48879                 #include <sys/param.h>
48880 
48881 int
48882 main ()
48883 {
48884 #if BYTE_ORDER != BIG_ENDIAN
48885                  not big endian
48886                 #endif
48887 
48888   ;
48889   return 0;
48890 }
48891 _ACEOF
48892 if ac_fn_cxx_try_compile "$LINENO"; then :
48893   ac_cv_c_bigendian=yes
48894 else
48895   ac_cv_c_bigendian=no
48896 fi
48897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48898 fi
48899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48900     fi
48901     if test $ac_cv_c_bigendian = unknown; then
48902       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48903       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48904 /* end confdefs.h.  */
48905 #include <limits.h>
48906 
48907 int
48908 main ()
48909 {
48910 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48911               bogus endian macros
48912              #endif
48913 
48914   ;
48915   return 0;
48916 }
48917 _ACEOF
48918 if ac_fn_cxx_try_compile "$LINENO"; then :
48919   # It does; now see whether it defined to _BIG_ENDIAN or not.
48920          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48921 /* end confdefs.h.  */
48922 #include <limits.h>
48923 
48924 int
48925 main ()
48926 {
48927 #ifndef _BIG_ENDIAN
48928                  not big endian
48929                 #endif
48930 
48931   ;
48932   return 0;
48933 }
48934 _ACEOF
48935 if ac_fn_cxx_try_compile "$LINENO"; then :
48936   ac_cv_c_bigendian=yes
48937 else
48938   ac_cv_c_bigendian=no
48939 fi
48940 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48941 fi
48942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48943     fi
48944     if test $ac_cv_c_bigendian = unknown; then
48945       # Compile a test program.
48946       if test "$cross_compiling" = yes; then :
48947   # Try to guess by grepping values from an object file.
48948          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48949 /* end confdefs.h.  */
48950 short int ascii_mm[] =
48951                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48952                 short int ascii_ii[] =
48953                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48954                 int use_ascii (int i) {
48955                   return ascii_mm[i] + ascii_ii[i];
48956                 }
48957                 short int ebcdic_ii[] =
48958                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48959                 short int ebcdic_mm[] =
48960                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48961                 int use_ebcdic (int i) {
48962                   return ebcdic_mm[i] + ebcdic_ii[i];
48963                 }
48964                 extern int foo;
48965 
48966 int
48967 main ()
48968 {
48969 return use_ascii (foo) == use_ebcdic (foo);
48970   ;
48971   return 0;
48972 }
48973 _ACEOF
48974 if ac_fn_cxx_try_compile "$LINENO"; then :
48975   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48976               ac_cv_c_bigendian=yes
48977             fi
48978             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48979               if test "$ac_cv_c_bigendian" = unknown; then
48980                 ac_cv_c_bigendian=no
48981               else
48982                 # finding both strings is unlikely to happen, but who knows?
48983                 ac_cv_c_bigendian=unknown
48984               fi
48985             fi
48986 fi
48987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48988 else
48989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48990 /* end confdefs.h.  */
48991 $ac_includes_default
48992 int
48993 main ()
48994 {
48995 
48996              /* Are we little or big endian?  From Harbison&Steele.  */
48997              union
48998              {
48999                long int l;
49000                char c[sizeof (long int)];
49001              } u;
49002              u.l = 1;
49003              return u.c[sizeof (long int) - 1] == 1;
49004 
49005   ;
49006   return 0;
49007 }
49008 _ACEOF
49009 if ac_fn_cxx_try_run "$LINENO"; then :
49010   ac_cv_c_bigendian=no
49011 else
49012   ac_cv_c_bigendian=yes
49013 fi
49014 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49015   conftest.$ac_objext conftest.beam conftest.$ac_ext
49016 fi
49017 
49018     fi
49019 fi
49020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49021 $as_echo "$ac_cv_c_bigendian" >&6; }
49022  case $ac_cv_c_bigendian in #(
49023    yes)
49024      ENDIAN="big";; #(
49025    no)
49026      ENDIAN="little" ;; #(
49027    universal)
49028      ENDIAN="universal_endianness"
49029      ;; #(
49030    *)
49031      ENDIAN="unknown" ;;
49032  esac
49033 
49034 
49035   if test "x$ENDIAN" = xuniversal_endianness; then
49036     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49037   fi
49038   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49039     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
49040   fi
49041 
49042 
49043 # Configure flags for the tools
49044 
49045   ###############################################################################
49046   #
49047   # How to compile shared libraries.
49048   #
49049 
49050   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49051     PICFLAG="-fPIC"
49052     C_FLAG_REORDER=''
49053     CXX_FLAG_REORDER=''
49054 
49055     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49056       # Linking is different on MacOSX
49057       if test "x$STATIC_BUILD" = xtrue; then
49058         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49059       else
49060         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49061         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49062       fi
49063       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49064       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49065       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49066       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49067     else
49068       # Default works for linux, might work on other platforms as well.
49069       SHARED_LIBRARY_FLAGS='-shared'
49070       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49071       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49072       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49073       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49074     fi
49075   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49076     C_FLAG_REORDER=''
49077     CXX_FLAG_REORDER=''
49078 
49079     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49080       # Linking is different on MacOSX
49081       PICFLAG=''
49082       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49083       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49084       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49085       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49086       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49087 
49088       if test "x$STATIC_BUILD" = xfalse; then
49089         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49090       fi
49091     else
49092       # Default works for linux, might work on other platforms as well.
49093       PICFLAG='-fPIC'
49094       SHARED_LIBRARY_FLAGS='-shared'
49095       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49096       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49097       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49098       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49099     fi
49100   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49101     PICFLAG="-KPIC"
49102     C_FLAG_REORDER='-xF'
49103     CXX_FLAG_REORDER='-xF'
49104     SHARED_LIBRARY_FLAGS="-G"
49105     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49106     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49107     SET_SHARED_LIBRARY_NAME='-h $1'
49108     SET_SHARED_LIBRARY_MAPFILE='-M$1'
49109   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49110     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49111     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49112     # will have to patch this single instruction with a call to some out-of-order code which
49113     # does the load from the TOC. This is of course slow. But in that case we also would have
49114     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49115     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49116     # can be patched directly by the linker and does not require a jump to out-of-order code.
49117     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49118     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49119     # loads for accessing a global variable). But there are rumors that this may be seen as a
49120     # 'performance feature' because of improved code locality of the symbols used in a
49121     # compilation unit.
49122     PICFLAG="-qpic"
49123     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49124     C_FLAG_REORDER=''
49125     CXX_FLAG_REORDER=''
49126     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49127     SET_EXECUTABLE_ORIGIN=""
49128     SET_SHARED_LIBRARY_ORIGIN=''
49129     SET_SHARED_LIBRARY_NAME=''
49130     SET_SHARED_LIBRARY_MAPFILE=''
49131   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49132     PICFLAG=""
49133     C_FLAG_REORDER=''
49134     CXX_FLAG_REORDER=''
49135     SHARED_LIBRARY_FLAGS="-dll"
49136     SET_EXECUTABLE_ORIGIN=''
49137     SET_SHARED_LIBRARY_ORIGIN=''
49138     SET_SHARED_LIBRARY_NAME=''
49139     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49140   fi
49141 
49142 
49143 
49144 
49145 
49146 
49147 
49148 
49149 
49150   # The (cross) compiler is now configured, we can now test capabilities
49151   # of the target platform.
49152 
49153 
49154 
49155   ###############################################################################
49156   #
49157   # Setup the opt flags for different compilers
49158   # and different operating systems.
49159   #
49160 
49161   # FIXME: this was indirectly the old default, but just inherited.
49162   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49163   #   C_FLAG_DEPS="-MMD -MF"
49164   # fi
49165 
49166   # Generate make dependency files
49167   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49168     C_FLAG_DEPS="-MMD -MF"
49169   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49170     C_FLAG_DEPS="-MMD -MF"
49171   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49172     C_FLAG_DEPS="-xMMD -xMF"
49173   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49174     C_FLAG_DEPS="-qmakedep=gcc -MF"
49175   fi
49176   CXX_FLAG_DEPS="$C_FLAG_DEPS"
49177 
49178 
49179 
49180   # Debug symbols
49181   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49182     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49183       # reduce from default "-g2" option to save space
49184       CFLAGS_DEBUG_SYMBOLS="-g1"
49185       CXXFLAGS_DEBUG_SYMBOLS="-g1"
49186     else
49187       CFLAGS_DEBUG_SYMBOLS="-g"
49188       CXXFLAGS_DEBUG_SYMBOLS="-g"
49189     fi
49190   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49191     CFLAGS_DEBUG_SYMBOLS="-g"
49192     CXXFLAGS_DEBUG_SYMBOLS="-g"
49193   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49194     CFLAGS_DEBUG_SYMBOLS="-g -xs"
49195     # -g0 enables debug symbols without disabling inlining.
49196     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49197   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49198     CFLAGS_DEBUG_SYMBOLS="-g"
49199     CXXFLAGS_DEBUG_SYMBOLS="-g"
49200   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49201     CFLAGS_DEBUG_SYMBOLS="-Zi"
49202     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49203   fi
49204 
49205 
49206 
49207   # Debug symbols for JVM_CFLAGS
49208   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49209     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49210     if test "x$DEBUG_LEVEL" = xslowdebug; then
49211       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49212     else
49213       # -g0 does not disable inlining, which -g does.
49214       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49215     fi
49216   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49217     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49218   else
49219     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49220   fi
49221 
49222 
49223   # bounds, memory and behavior checking options
49224   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49225     case $DEBUG_LEVEL in
49226     release )
49227       # no adjustment
49228       ;;
49229     fastdebug )
49230       # no adjustment
49231       ;;
49232     slowdebug )
49233       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49234       # get's added conditionally on whether we produce debug symbols or not.
49235       # This is most likely not really correct.
49236 
49237       # Add runtime stack smashing and undefined behavior checks.
49238       # Not all versions of gcc support -fstack-protector
49239       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49240 
49241 
49242 
49243 
49244 
49245 
49246 
49247 
49248 
49249 
49250 
49251 
49252 
49253 
49254 
49255 
49256 
49257 
49258 
49259 
49260 
49261 
49262 
49263 
49264 
49265 
49266 
49267 
49268 
49269 
49270 
49271 
49272 
49273 
49274 
49275 
49276 
49277 
49278 
49279 
49280 
49281 
49282     # Execute function body
49283 
49284 
49285 
49286 
49287 
49288 
49289 
49290 
49291 
49292 
49293 
49294 
49295 
49296 
49297 
49298 
49299 
49300 
49301 
49302 
49303 
49304 
49305 
49306 
49307 
49308 
49309 
49310 
49311 
49312 
49313 
49314 
49315 
49316 
49317 
49318 
49319 
49320 
49321 
49322 
49323 
49324 
49325 
49326 
49327 
49328 
49329 
49330 
49331     # Execute function body
49332 
49333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49334 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49335   supports=yes
49336 
49337   saved_cflags="$CFLAGS"
49338   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49339   ac_ext=c
49340 ac_cpp='$CPP $CPPFLAGS'
49341 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49342 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49343 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49344 
49345   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49346 /* end confdefs.h.  */
49347 int i;
49348 _ACEOF
49349 if ac_fn_c_try_compile "$LINENO"; then :
49350 
49351 else
49352   supports=no
49353 fi
49354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49355   ac_ext=cpp
49356 ac_cpp='$CXXCPP $CPPFLAGS'
49357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49358 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49360 
49361   CFLAGS="$saved_cflags"
49362 
49363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49364 $as_echo "$supports" >&6; }
49365   if test "x$supports" = "xyes" ; then
49366     :
49367     C_COMP_SUPPORTS="yes"
49368   else
49369     :
49370     C_COMP_SUPPORTS="no"
49371   fi
49372 
49373 
49374 
49375 
49376 
49377 
49378 
49379 
49380 
49381 
49382 
49383 
49384 
49385 
49386 
49387 
49388 
49389 
49390 
49391 
49392 
49393 
49394 
49395 
49396 
49397 
49398 
49399 
49400 
49401 
49402 
49403 
49404 
49405 
49406 
49407 
49408 
49409 
49410 
49411 
49412 
49413 
49414 
49415 
49416 
49417 
49418 
49419 
49420 
49421 
49422 
49423 
49424 
49425 
49426 
49427 
49428 
49429 
49430 
49431     # Execute function body
49432 
49433   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49434 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49435   supports=yes
49436 
49437   saved_cxxflags="$CXXFLAGS"
49438   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49439   ac_ext=cpp
49440 ac_cpp='$CXXCPP $CPPFLAGS'
49441 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49442 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49443 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49444 
49445   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49446 /* end confdefs.h.  */
49447 int i;
49448 _ACEOF
49449 if ac_fn_cxx_try_compile "$LINENO"; then :
49450 
49451 else
49452   supports=no
49453 fi
49454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49455   ac_ext=cpp
49456 ac_cpp='$CXXCPP $CPPFLAGS'
49457 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49458 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49459 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49460 
49461   CXXFLAGS="$saved_cxxflags"
49462 
49463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49464 $as_echo "$supports" >&6; }
49465   if test "x$supports" = "xyes" ; then
49466     :
49467     CXX_COMP_SUPPORTS="yes"
49468   else
49469     :
49470     CXX_COMP_SUPPORTS="no"
49471   fi
49472 
49473 
49474 
49475 
49476 
49477 
49478 
49479 
49480 
49481 
49482 
49483 
49484 
49485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49486 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49487   supports=no
49488   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49489 
49490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49491 $as_echo "$supports" >&6; }
49492   if test "x$supports" = "xyes" ; then
49493     :
49494 
49495   else
49496     :
49497     STACK_PROTECTOR_CFLAG=""
49498   fi
49499 
49500 
49501 
49502 
49503 
49504 
49505 
49506       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49507       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49508       if test "x$STACK_PROTECTOR_CFLAG" != x; then
49509         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49510       fi
49511       ;;
49512     esac
49513   fi
49514 
49515   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49516     if test "x$DEBUG_LEVEL" != xrelease; then
49517       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49518         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49519       fi
49520     fi
49521   fi
49522 
49523   # Optimization levels
49524   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49525     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49526 
49527     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49528       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49529       C_O_FLAG_HIGHEST_JVM="-xO4"
49530       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49531       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49532       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49533       C_O_FLAG_DEBUG="-xregs=no%frameptr"
49534       C_O_FLAG_DEBUG_JVM=""
49535       C_O_FLAG_NONE="-xregs=no%frameptr"
49536       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49537       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49538       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49539       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49540       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49541       CXX_O_FLAG_DEBUG_JVM=""
49542       CXX_O_FLAG_NONE="-xregs=no%frameptr"
49543       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49544         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49545         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49546       fi
49547     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49548       C_O_FLAG_HIGHEST_JVM="-xO4"
49549       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49550       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49551       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49552       C_O_FLAG_DEBUG=""
49553       C_O_FLAG_DEBUG_JVM=""
49554       C_O_FLAG_NONE=""
49555       CXX_O_FLAG_HIGHEST_JVM="-xO4"
49556       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49557       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49558       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49559       CXX_O_FLAG_DEBUG=""
49560       CXX_O_FLAG_DEBUG_JVM=""
49561       CXX_O_FLAG_NONE=""
49562     fi
49563   else
49564     # The remaining toolchains share opt flags between CC and CXX;
49565     # setup for C and duplicate afterwards.
49566     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49567       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49568         # On MacOSX we optimize for size, something
49569         # we should do for all platforms?
49570         C_O_FLAG_HIGHEST_JVM="-Os"
49571         C_O_FLAG_HIGHEST="-Os"
49572         C_O_FLAG_HI="-Os"
49573         C_O_FLAG_NORM="-Os"
49574         C_O_FLAG_SIZE="-Os"
49575       else
49576         C_O_FLAG_HIGHEST_JVM="-O3"
49577         C_O_FLAG_HIGHEST="-O3"
49578         C_O_FLAG_HI="-O3"
49579         C_O_FLAG_NORM="-O2"
49580         C_O_FLAG_SIZE="-Os"
49581       fi
49582       C_O_FLAG_DEBUG="-O0"
49583       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49584         C_O_FLAG_DEBUG_JVM=""
49585       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49586         C_O_FLAG_DEBUG_JVM="-O0"
49587       fi
49588       C_O_FLAG_NONE="-O0"
49589     elif test "x$TOOLCHAIN_TYPE" = xclang; then
49590       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49591         # On MacOSX we optimize for size, something
49592         # we should do for all platforms?
49593         C_O_FLAG_HIGHEST_JVM="-Os"
49594         C_O_FLAG_HIGHEST="-Os"
49595         C_O_FLAG_HI="-Os"
49596         C_O_FLAG_NORM="-Os"
49597         C_O_FLAG_SIZE="-Os"
49598       else
49599         C_O_FLAG_HIGHEST_JVM="-O3"
49600         C_O_FLAG_HIGHEST="-O3"
49601         C_O_FLAG_HI="-O3"
49602         C_O_FLAG_NORM="-O2"
49603         C_O_FLAG_SIZE="-Os"
49604       fi
49605       C_O_FLAG_DEBUG="-O0"
49606       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49607         C_O_FLAG_DEBUG_JVM=""
49608       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49609         C_O_FLAG_DEBUG_JVM="-O0"
49610       fi
49611       C_O_FLAG_NONE="-O0"
49612     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49613       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49614       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49615       C_O_FLAG_HI="-O3 -qinline -qinlglue"
49616       C_O_FLAG_NORM="-O2"
49617       C_O_FLAG_DEBUG="-qnoopt"
49618       # FIXME: Value below not verified.
49619       C_O_FLAG_DEBUG_JVM=""
49620       C_O_FLAG_NONE="-qnoopt"
49621     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49622       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49623       C_O_FLAG_HIGHEST="-O2"
49624       C_O_FLAG_HI="-O1"
49625       C_O_FLAG_NORM="-O1"
49626       C_O_FLAG_DEBUG="-Od"
49627       C_O_FLAG_DEBUG_JVM=""
49628       C_O_FLAG_NONE="-Od"
49629       C_O_FLAG_SIZE="-Os"
49630     fi
49631     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49632     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49633     CXX_O_FLAG_HI="$C_O_FLAG_HI"
49634     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49635     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49636     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49637     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49638     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49639   fi
49640 
49641   # Adjust optimization flags according to debug level.
49642   case $DEBUG_LEVEL in
49643     release )
49644       # no adjustment
49645       ;;
49646     fastdebug )
49647       # Not quite so much optimization
49648       C_O_FLAG_HI="$C_O_FLAG_NORM"
49649       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49650       ;;
49651     slowdebug )
49652       # Disable optimization
49653       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49654       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49655       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49656       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49657       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49658       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49659       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49660       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49661       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49662       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49663       ;;
49664   esac
49665 
49666 
49667 
49668 
49669 
49670 
49671 
49672 
49673 
49674 
49675 
49676 
49677 
49678 
49679 
49680 
49681 
49682 
49683 
49684   # Special extras...
49685   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49686     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49687       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49688       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49689     fi
49690     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49691     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49692   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49693     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49694     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49695   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49696     CXXSTD_CXXFLAG="-std=gnu++98"
49697 
49698 
49699 
49700 
49701 
49702 
49703 
49704 
49705 
49706 
49707 
49708 
49709 
49710 
49711 
49712 
49713 
49714 
49715 
49716 
49717 
49718 
49719 
49720 
49721 
49722 
49723 
49724 
49725 
49726 
49727 
49728 
49729 
49730 
49731 
49732 
49733 
49734 
49735 
49736 
49737 
49738 
49739     # Execute function body
49740 
49741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49742 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49743   supports=yes
49744 
49745   saved_cxxflags="$CXXFLAGS"
49746   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49747   ac_ext=cpp
49748 ac_cpp='$CXXCPP $CPPFLAGS'
49749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49752 
49753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49754 /* end confdefs.h.  */
49755 int i;
49756 _ACEOF
49757 if ac_fn_cxx_try_compile "$LINENO"; then :
49758 
49759 else
49760   supports=no
49761 fi
49762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49763   ac_ext=cpp
49764 ac_cpp='$CXXCPP $CPPFLAGS'
49765 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49766 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49767 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49768 
49769   CXXFLAGS="$saved_cxxflags"
49770 
49771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49772 $as_echo "$supports" >&6; }
49773   if test "x$supports" = "xyes" ; then
49774     :
49775 
49776   else
49777     :
49778     CXXSTD_CXXFLAG=""
49779   fi
49780 
49781 
49782 
49783 
49784 
49785 
49786 
49787 
49788 
49789 
49790 
49791 
49792     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49793     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49794 
49795   fi
49796   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49797     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49798     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49799   fi
49800 
49801   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49802     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49803     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49804   fi
49805 
49806   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49807   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49808   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49809 
49810   ###############################################################################
49811   #
49812   # Now setup the CFLAGS and LDFLAGS for the JDK build.
49813   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49814   #
49815 
49816   # Setup compiler/platform specific flags into
49817   #    CFLAGS_JDK    - C Compiler flags
49818   #    CXXFLAGS_JDK  - C++ Compiler flags
49819   #    COMMON_CCXXFLAGS_JDK - common to C and C++
49820   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49821     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49822     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49823     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49824     if test "x$OPENJDK_TARGET_CPU" = xx86; then
49825       # Force compatibility with i586 on 32 bit intel platforms.
49826       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49827       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49828     fi
49829     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49830         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49831     case $OPENJDK_TARGET_CPU_ARCH in
49832       arm )
49833         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49834         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49835         ;;
49836       ppc )
49837         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49838         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49839         ;;
49840       s390 )
49841         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49842         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49843         ;;
49844       * )
49845         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49846         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49847         ;;
49848     esac
49849 
49850 
49851 
49852 
49853 
49854 
49855 
49856 
49857 
49858 
49859 
49860 
49861 
49862 
49863 
49864 
49865 
49866 
49867 
49868 
49869 
49870 
49871 
49872 
49873 
49874 
49875 
49876 
49877 
49878 
49879 
49880 
49881 
49882 
49883 
49884 
49885 
49886 
49887 
49888 
49889 
49890 
49891 
49892 
49893 
49894 
49895 
49896 
49897 
49898 
49899 
49900 
49901 
49902 
49903     # Execute function body
49904 
49905   # Need to assign to a variable since m4 is blocked from modifying parts in [].
49906   REFERENCE_VERSION=6
49907 
49908   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49909     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49910   fi
49911 
49912   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49913     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49914   fi
49915 
49916   # Version comparison method inspired by http://stackoverflow.com/a/24067243
49917   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49918 
49919   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49920     :
49921 
49922   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49923   # runs afoul of the more aggressive versions of these optimisations.
49924   # Notably, value range propagation now assumes that the this pointer of C++
49925   # member functions is non-null.
49926   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49927         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49928         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49929 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49930   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49931   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49932 
49933   else
49934     :
49935 
49936   fi
49937 
49938 
49939 
49940 
49941 
49942 
49943 
49944 
49945 
49946 
49947 
49948 
49949 
49950 
49951   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49952     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49953 
49954     # Restrict the debug information created by Clang to avoid
49955     # too big object files and speed the build up a little bit
49956     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49957     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49958     if test "x$OPENJDK_TARGET_OS" = xlinux; then
49959       if test "x$OPENJDK_TARGET_CPU" = xx86; then
49960         # Force compatibility with i586 on 32 bit intel platforms.
49961         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49962         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49963       fi
49964       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49965       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49966           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49967       case $OPENJDK_TARGET_CPU_ARCH in
49968         ppc )
49969           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49970           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49971           ;;
49972         * )
49973           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49974           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49975           ;;
49976       esac
49977     fi
49978   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49979     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49980     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49981     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49982       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49983     fi
49984 
49985     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49986     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49987   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49988     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49989     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49990     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49991   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49992     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49993         -MD -Zc:wchar_t- -W3 -wd4800 \
49994         -DWIN32_LEAN_AND_MEAN \
49995         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49996         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49997         -DWIN32 -DIAL"
49998     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49999       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50000     else
50001       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50002     fi
50003     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50004     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50005     # studio.
50006     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50007       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50008       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50009       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50010     fi
50011   fi
50012 
50013   ###############################################################################
50014 
50015   # Adjust flags according to debug level.
50016   case $DEBUG_LEVEL in
50017     fastdebug | slowdebug )
50018       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50019       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50020       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50021       ;;
50022     release )
50023       ;;
50024     * )
50025       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50026       ;;
50027   esac
50028 
50029   # Set some common defines. These works for all compilers, but assume
50030   # -D is universally accepted.
50031 
50032   # Setup endianness
50033   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50034     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50035     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50036     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50037     #   Note: -Dmacro         is the same as    #define macro 1
50038     #         -Dmacro=        is the same as    #define macro
50039     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50040       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50041     else
50042       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50043     fi
50044   else
50045     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50046     # are defined in the system?
50047     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50048       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50049     else
50050       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50051     fi
50052   fi
50053 
50054   # Setup target OS define. Use OS target name but in upper case.
50055   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50056   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50057 
50058   # Setup target CPU
50059   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50060       $OPENJDK_TARGET_ADD_LP64 \
50061       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50062 
50063   # Setup debug/release defines
50064   if test "x$DEBUG_LEVEL" = xrelease; then
50065     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50066     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50067       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50068     fi
50069   else
50070     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50071   fi
50072 
50073   # Set some additional per-OS defines.
50074   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50075     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50076     JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50077         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50078   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50079     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50080     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50081         -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50082   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50083     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50084     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50085     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50086     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50087         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50088         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50089         -fno-omit-frame-pointer"
50090   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50091     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50092     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50093     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50094         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50095         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50096   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50097     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50098   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50099     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50100     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50101   fi
50102 
50103   # Set some additional per-CPU defines.
50104   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50105     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50106   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50107     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50108   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50109     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50110       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50111       # fixes `relocation truncated to fit' error for gcc 4.1.
50112       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50113       # Use ppc64 instructions, but schedule for power5
50114       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50115     elif test "x$OPENJDK_TARGET_OS" = xaix; then
50116       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50117     fi
50118   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50119     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50120       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50121       # Little endian machine uses ELFv2 ABI.
50122       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50123       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50124       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50125     fi
50126   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50127     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50128       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50129     fi
50130   fi
50131 
50132   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50133     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50134   fi
50135 
50136   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50137     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50138       # Solaris does not have _LP64=1 in the old build.
50139       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50140       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50141     fi
50142   fi
50143 
50144   # Set JVM_CFLAGS warning handling
50145   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50146     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50147         -Wunused-value -Woverloaded-virtual"
50148 
50149     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50150 
50151 
50152 
50153 
50154 
50155 
50156 
50157 
50158 
50159 
50160 
50161 
50162 
50163 
50164 
50165 
50166 
50167 
50168 
50169 
50170 
50171 
50172 
50173 
50174 
50175 
50176 
50177 
50178 
50179 
50180 
50181 
50182 
50183 
50184 
50185 
50186 
50187 
50188 
50189 
50190 
50191 
50192 
50193 
50194 
50195 
50196 
50197 
50198 
50199 
50200 
50201 
50202 
50203 
50204     # Execute function body
50205 
50206   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50207   REFERENCE_VERSION=4.8
50208 
50209   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50210     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50211   fi
50212 
50213   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50214     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50215   fi
50216 
50217   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50218   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50219 
50220   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50221     :
50222 
50223             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50224             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50225 
50226 
50227   else
50228     :
50229 
50230   fi
50231 
50232 
50233 
50234 
50235 
50236 
50237 
50238 
50239 
50240 
50241 
50242 
50243 
50244 
50245     fi
50246     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50247       # Non-zero builds have stricter warnings
50248       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50249     else
50250       if test "x$TOOLCHAIN_TYPE" = xclang; then
50251         # Some versions of llvm do not like -Wundef
50252         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50253       fi
50254     fi
50255   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50256     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50257         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50258   fi
50259 
50260   # Additional macosx handling
50261   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50262     # Setting these parameters makes it an error to link to macosx APIs that are
50263     # newer than the given OS version and makes the linked binaries compatible
50264     # even if built on a newer version of the OS.
50265     # The expected format is X.Y.Z
50266     MACOSX_VERSION_MIN=10.7.0
50267 
50268 
50269     # The macro takes the version with no dots, ex: 1070
50270     # Let the flags variables get resolved in make for easier override on make
50271     # command line.
50272     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50273     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50274   fi
50275 
50276   # Setup some hard coded includes
50277   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50278       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50279       -I${JDK_TOPDIR}/src/java.base/share/native/include \
50280       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50281       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50282       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50283       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50284 
50285   # The shared libraries are compiled using the picflag.
50286   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50287       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50288   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50289       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50290 
50291   # Executable flags
50292   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50293   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50294 
50295 
50296 
50297 
50298 
50299 
50300   # Setup LDFLAGS et al.
50301   #
50302 
50303   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50304     LDFLAGS_MICROSOFT="-nologo -opt:ref"
50305     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50306     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50307     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50308       LDFLAGS_SAFESH="-safeseh"
50309       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50310       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50311       # NOTE: Old build added -machine. Probably not needed.
50312       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50313     else
50314       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50315     fi
50316   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50317       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50318       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50319         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50320         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50321     fi
50322   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50323     # If this is a --hash-style=gnu system, use --hash-style=both, why?
50324     # We have previously set HAS_GNU_HASH if this is the case
50325     if test -n "$HAS_GNU_HASH"; then
50326       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50327       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50328       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50329     fi
50330       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50331         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50332     fi
50333     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50334       # And since we now know that the linker is gnu, then add -z defs, to forbid
50335       # undefined symbols in object files.
50336       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50337       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50338       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50339       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50340       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50341       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50342         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50343       fi
50344       case $DEBUG_LEVEL in
50345         release )
50346           # tell linker to optimize libraries.
50347           # Should this be supplied to the OSS linker as well?
50348           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50349           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50350           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50351           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50352             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50353           fi
50354           ;;
50355         slowdebug )
50356           # Hotspot always let the linker optimize
50357           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50358           if test "x$HAS_LINKER_NOW" = "xtrue"; then
50359             # do relocations at load
50360             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50361             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50362             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50363           fi
50364           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50365             # mark relocations read only
50366             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50367             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50368             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50369           fi
50370           ;;
50371         fastdebug )
50372           # Hotspot always let the linker optimize
50373           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50374           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50375             # mark relocations read only
50376             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50377             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50378             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50379           fi
50380           ;;
50381         * )
50382           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50383           ;;
50384         esac
50385     fi
50386   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50387     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50388     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50389     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50390     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50391     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50392     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50393       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50394     fi
50395   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50396     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50397     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50398     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50399   fi
50400 
50401   # Customize LDFLAGS for executables
50402 
50403   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50404 
50405   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50406     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50407       LDFLAGS_STACK_SIZE=1048576
50408     else
50409       LDFLAGS_STACK_SIZE=327680
50410     fi
50411     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50412   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50413     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50414   fi
50415 
50416   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50417 
50418   # Customize LDFLAGS for libs
50419   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50420 
50421   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50422   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50423     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50424         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50425     JDKLIB_LIBS=""
50426   else
50427     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50428         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50429 
50430     if test "xTARGET" = "xTARGET"; then
50431       # On some platforms (mac) the linker warns about non existing -L dirs.
50432       # For any of the variants server, client or minimal, the dir matches the
50433       # variant name. The "main" variant should be used for linking. For the
50434       # rest, the dir is just server.
50435       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50436           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50437         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50438             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
50439       else
50440         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50441             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50442       fi
50443     elif test "xTARGET" = "xBUILD"; then
50444       # When building a buildjdk, it's always only the server variant
50445       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50446           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50447     fi
50448 
50449     JDKLIB_LIBS="-ljava -ljvm"
50450     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50451       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50452     fi
50453 
50454   fi
50455 
50456 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50457 
50458   # Set JVM_LIBS (per os)
50459   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50460     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50461   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50462     # FIXME: This hard-coded path is not really proper.
50463     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50464       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50465     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50466       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50467     fi
50468     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50469         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50470   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50471     JVM_LIBS="$JVM_LIBS -lm"
50472   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50473     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50474   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50475     JVM_LIBS="$JVM_LIBS -lm"
50476   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50477     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50478         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50479         wsock32.lib winmm.lib version.lib psapi.lib"
50480     fi
50481 
50482   # Set JVM_ASFLAGS
50483   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50484     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50485       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50486     fi
50487   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50488     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50489   fi
50490 
50491   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50492 
50493 
50494 
50495 
50496 
50497 
50498 
50499 
50500 
50501 
50502 
50503 
50504 
50505 
50506 
50507   # Special extras...
50508   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50509     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50510       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50511       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50512     fi
50513     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50514     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50515   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50516     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50517     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50518   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50519     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50520 
50521 
50522 
50523 
50524 
50525 
50526 
50527 
50528 
50529 
50530 
50531 
50532 
50533 
50534 
50535 
50536 
50537 
50538 
50539 
50540 
50541 
50542 
50543 
50544 
50545 
50546 
50547 
50548 
50549 
50550 
50551 
50552 
50553 
50554 
50555 
50556 
50557 
50558 
50559 
50560 
50561 
50562     # Execute function body
50563 
50564   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50565 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50566   supports=yes
50567 
50568   saved_cxxflags="$CXXFLAGS"
50569   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50570   ac_ext=cpp
50571 ac_cpp='$CXXCPP $CPPFLAGS'
50572 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50573 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50574 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50575 
50576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50577 /* end confdefs.h.  */
50578 int i;
50579 _ACEOF
50580 if ac_fn_cxx_try_compile "$LINENO"; then :
50581 
50582 else
50583   supports=no
50584 fi
50585 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50586   ac_ext=cpp
50587 ac_cpp='$CXXCPP $CPPFLAGS'
50588 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50589 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50590 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50591 
50592   CXXFLAGS="$saved_cxxflags"
50593 
50594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50595 $as_echo "$supports" >&6; }
50596   if test "x$supports" = "xyes" ; then
50597     :
50598 
50599   else
50600     :
50601     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50602   fi
50603 
50604 
50605 
50606 
50607 
50608 
50609 
50610 
50611 
50612 
50613 
50614 
50615     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50616     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50617 
50618   fi
50619   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50620     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50621     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50622   fi
50623 
50624   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50625     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50626     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50627   fi
50628 
50629   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50630   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50631   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50632 
50633   ###############################################################################
50634   #
50635   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50636   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50637   #
50638 
50639   # Setup compiler/platform specific flags into
50640   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50641   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50642   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50643   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50644     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50645     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50646     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50647     if test "x$OPENJDK_BUILD_CPU" = xx86; then
50648       # Force compatibility with i586 on 32 bit intel platforms.
50649       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50650       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50651     fi
50652     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50653         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50654     case $OPENJDK_BUILD_CPU_ARCH in
50655       arm )
50656         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50657         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50658         ;;
50659       ppc )
50660         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50661         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50662         ;;
50663       s390 )
50664         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50665         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50666         ;;
50667       * )
50668         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50669         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50670         ;;
50671     esac
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 
50713 
50714 
50715 
50716 
50717 
50718 
50719 
50720 
50721 
50722 
50723 
50724 
50725 
50726     # Execute function body
50727 
50728   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50729   REFERENCE_VERSION=6
50730 
50731   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50732     as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50733   fi
50734 
50735   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50736     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50737   fi
50738 
50739   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50740   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50741 
50742   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50743     :
50744 
50745   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50746   # runs afoul of the more aggressive versions of these optimisations.
50747   # Notably, value range propagation now assumes that the this pointer of C++
50748   # member functions is non-null.
50749   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50750         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50751         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50752 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50753   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50754   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50755 
50756   else
50757     :
50758 
50759   fi
50760 
50761 
50762 
50763 
50764 
50765 
50766 
50767 
50768 
50769 
50770 
50771 
50772 
50773 
50774   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50775     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50776 
50777     # Restrict the debug information created by Clang to avoid
50778     # too big object files and speed the build up a little bit
50779     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50780     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50781     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50782       if test "x$OPENJDK_BUILD_CPU" = xx86; then
50783         # Force compatibility with i586 on 32 bit intel platforms.
50784         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50785         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50786       fi
50787       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50788       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50789           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50790       case $OPENJDK_BUILD_CPU_ARCH in
50791         ppc )
50792           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50793           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50794           ;;
50795         * )
50796           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50797           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50798           ;;
50799       esac
50800     fi
50801   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50802     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50803     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50804     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50805       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50806     fi
50807 
50808     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50809     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50810   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50811     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50812     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50813     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50814   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50815     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50816         -MD -Zc:wchar_t- -W3 -wd4800 \
50817         -DWIN32_LEAN_AND_MEAN \
50818         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50819         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50820         -DWIN32 -DIAL"
50821     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50822       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50823     else
50824       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50825     fi
50826     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50827     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50828     # studio.
50829     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50830       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50831       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50832       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50833     fi
50834   fi
50835 
50836   ###############################################################################
50837 
50838   # Adjust flags according to debug level.
50839   case $DEBUG_LEVEL in
50840     fastdebug | slowdebug )
50841       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50842       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50843       JAVAC_FLAGS="$JAVAC_FLAGS -g"
50844       ;;
50845     release )
50846       ;;
50847     * )
50848       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50849       ;;
50850   esac
50851 
50852   # Set some common defines. These works for all compilers, but assume
50853   # -D is universally accepted.
50854 
50855   # Setup endianness
50856   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50857     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50858     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50859     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50860     #   Note: -Dmacro         is the same as    #define macro 1
50861     #         -Dmacro=        is the same as    #define macro
50862     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50863       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50864     else
50865       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50866     fi
50867   else
50868     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50869     # are defined in the system?
50870     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50871       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50872     else
50873       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50874     fi
50875   fi
50876 
50877   # Setup target OS define. Use OS target name but in upper case.
50878   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50879   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50880 
50881   # Setup target CPU
50882   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50883       $OPENJDK_BUILD_ADD_LP64 \
50884       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50885 
50886   # Setup debug/release defines
50887   if test "x$DEBUG_LEVEL" = xrelease; then
50888     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50889     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50890       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50891     fi
50892   else
50893     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50894   fi
50895 
50896   # Set some additional per-OS defines.
50897   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50898     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50899     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50900         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50901   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50902     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50903     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50904         -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50905   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50906     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50907     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50908     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50909     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50910         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50911         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50912         -fno-omit-frame-pointer"
50913   elif test "x$OPENJDK_BUILD_OS" = xaix; then
50914     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50915     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50916     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50917         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50918         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50919   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50920     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50921   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50922     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50923     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50924   fi
50925 
50926   # Set some additional per-CPU defines.
50927   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50928     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50929   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50930     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50931   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50932     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50933       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50934       # fixes `relocation truncated to fit' error for gcc 4.1.
50935       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50936       # Use ppc64 instructions, but schedule for power5
50937       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50938     elif test "x$OPENJDK_BUILD_OS" = xaix; then
50939       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50940     fi
50941   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50942     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50943       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50944       # Little endian machine uses ELFv2 ABI.
50945       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50946       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50947       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50948     fi
50949   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50950     if test "x$OPENJDK_BUILD_OS" = xlinux; then
50951       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50952     fi
50953   fi
50954 
50955   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50956     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50957   fi
50958 
50959   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50960     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50961       # Solaris does not have _LP64=1 in the old build.
50962       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50963       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50964     fi
50965   fi
50966 
50967   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50968   if test "x$OPENJDK_BUILD_OS" = xlinux; then
50969     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50970         -Wunused-value -Woverloaded-virtual"
50971 
50972     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50973 
50974 
50975 
50976 
50977 
50978 
50979 
50980 
50981 
50982 
50983 
50984 
50985 
50986 
50987 
50988 
50989 
50990 
50991 
50992 
50993 
50994 
50995 
50996 
50997 
50998 
50999 
51000 
51001 
51002 
51003 
51004 
51005 
51006 
51007 
51008 
51009 
51010 
51011 
51012 
51013 
51014 
51015 
51016 
51017 
51018 
51019 
51020 
51021 
51022 
51023 
51024 
51025 
51026 
51027     # Execute function body
51028 
51029   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51030   REFERENCE_VERSION=4.8
51031 
51032   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51033     as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51034   fi
51035 
51036   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51037     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51038   fi
51039 
51040   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51041   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51042 
51043   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51044     :
51045 
51046             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51047             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51048 
51049 
51050   else
51051     :
51052 
51053   fi
51054 
51055 
51056 
51057 
51058 
51059 
51060 
51061 
51062 
51063 
51064 
51065 
51066 
51067 
51068     fi
51069     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51070       # Non-zero builds have stricter warnings
51071       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51072     else
51073       if test "x$TOOLCHAIN_TYPE" = xclang; then
51074         # Some versions of llvm do not like -Wundef
51075         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51076       fi
51077     fi
51078   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51079     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51080         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51081   fi
51082 
51083   # Additional macosx handling
51084   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51085     # Setting these parameters makes it an error to link to macosx APIs that are
51086     # newer than the given OS version and makes the linked binaries compatible
51087     # even if built on a newer version of the OS.
51088     # The expected format is X.Y.Z
51089     MACOSX_VERSION_MIN=10.7.0
51090 
51091 
51092     # The macro takes the version with no dots, ex: 1070
51093     # Let the flags variables get resolved in make for easier override on make
51094     # command line.
51095     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51096     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51097   fi
51098 
51099   # Setup some hard coded includes
51100   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51101       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51102       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51103       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51104       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51105       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51106       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51107 
51108   # The shared libraries are compiled using the picflag.
51109   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51110       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51111   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51112       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51113 
51114   # Executable flags
51115   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51116   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51117 
51118 
51119 
51120 
51121 
51122 
51123   # Setup LDFLAGS et al.
51124   #
51125 
51126   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51127     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51128     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51129     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51130     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51131       LDFLAGS_SAFESH="-safeseh"
51132       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51133       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51134       # NOTE: Old build added -machine. Probably not needed.
51135       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51136     else
51137       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51138     fi
51139   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51140       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51141       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51142         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51143         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51144     fi
51145   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51146     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51147     # We have previously set HAS_GNU_HASH if this is the case
51148     if test -n "$HAS_GNU_HASH"; then
51149       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51150       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51151       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51152     fi
51153       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51154         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51155     fi
51156     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51157       # And since we now know that the linker is gnu, then add -z defs, to forbid
51158       # undefined symbols in object files.
51159       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51160       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51161       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51162       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51163       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51164       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51165         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51166       fi
51167       case $DEBUG_LEVEL in
51168         release )
51169           # tell linker to optimize libraries.
51170           # Should this be supplied to the OSS linker as well?
51171           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51172           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51173           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51174           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51175             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51176           fi
51177           ;;
51178         slowdebug )
51179           # Hotspot always let the linker optimize
51180           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51181           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51182             # do relocations at load
51183             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51184             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51185             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51186           fi
51187           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51188             # mark relocations read only
51189             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51190             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51191             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51192           fi
51193           ;;
51194         fastdebug )
51195           # Hotspot always let the linker optimize
51196           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51197           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51198             # mark relocations read only
51199             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51200             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51201             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51202           fi
51203           ;;
51204         * )
51205           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51206           ;;
51207         esac
51208     fi
51209   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51210     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51211     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51212     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51213     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51214     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51215     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51216       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51217     fi
51218   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51219     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51220     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51221     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51222   fi
51223 
51224   # Customize LDFLAGS for executables
51225 
51226   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51227 
51228   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51229     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51230       LDFLAGS_STACK_SIZE=1048576
51231     else
51232       LDFLAGS_STACK_SIZE=327680
51233     fi
51234     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51235   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51236     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51237   fi
51238 
51239   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51240 
51241   # Customize LDFLAGS for libs
51242   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51243 
51244   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51245   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51246     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51247         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51248     OPENJDK_BUILD_JDKLIB_LIBS=""
51249   else
51250     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51251         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51252 
51253     if test "xBUILD" = "xTARGET"; then
51254       # On some platforms (mac) the linker warns about non existing -L dirs.
51255       # For any of the variants server, client or minimal, the dir matches the
51256       # variant name. The "main" variant should be used for linking. For the
51257       # rest, the dir is just server.
51258       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51259           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51260         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51261             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/$JVM_VARIANT_MAIN"
51262       else
51263         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51264             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51265       fi
51266     elif test "xBUILD" = "xBUILD"; then
51267       # When building a buildjdk, it's always only the server variant
51268       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51269           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51270     fi
51271 
51272     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51273     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51274       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51275     fi
51276 
51277   fi
51278 
51279 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51280 
51281   # Set OPENJDK_BUILD_JVM_LIBS (per os)
51282   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51283     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51284   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51285     # FIXME: This hard-coded path is not really proper.
51286     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51287       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51288     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51289       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51290     fi
51291     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51292         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51293   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51294     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51295   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51296     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51297   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51298     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51299   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51300     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51301         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51302         wsock32.lib winmm.lib version.lib psapi.lib"
51303     fi
51304 
51305   # Set OPENJDK_BUILD_JVM_ASFLAGS
51306   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51307     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51308       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51309     fi
51310   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51311     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51312   fi
51313 
51314   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51315 
51316 
51317 
51318 
51319 
51320 
51321 
51322 
51323 
51324 
51325 
51326 
51327 
51328 
51329 
51330   # Tests are only ever compiled for TARGET
51331   # Flags for compiling test libraries
51332   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51333   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51334 
51335   # Flags for compiling test executables
51336   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51337   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51338 
51339 
51340 
51341 
51342 
51343 
51344   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51345   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51346 
51347 
51348 
51349 
51350 
51351 
51352   # Some Zero and Shark settings.
51353   # ZERO_ARCHFLAG tells the compiler which mode to build for
51354   case "${OPENJDK_TARGET_CPU}" in
51355     s390)
51356       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51357       ;;
51358     *)
51359       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51360   esac
51361 
51362 
51363 
51364 
51365 
51366 
51367 
51368 
51369 
51370 
51371 
51372 
51373 
51374 
51375 
51376 
51377 
51378 
51379 
51380 
51381 
51382 
51383 
51384 
51385 
51386 
51387 
51388 
51389 
51390 
51391 
51392 
51393 
51394 
51395 
51396 
51397 
51398 
51399 
51400 
51401 
51402 
51403     # Execute function body
51404 
51405 
51406 
51407 
51408 
51409 
51410 
51411 
51412 
51413 
51414 
51415 
51416 
51417 
51418 
51419 
51420 
51421 
51422 
51423 
51424 
51425 
51426 
51427 
51428 
51429 
51430 
51431 
51432 
51433 
51434 
51435 
51436 
51437 
51438 
51439 
51440 
51441 
51442 
51443 
51444 
51445 
51446 
51447 
51448 
51449 
51450 
51451 
51452     # Execute function body
51453 
51454   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51455 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51456   supports=yes
51457 
51458   saved_cflags="$CFLAGS"
51459   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51460   ac_ext=c
51461 ac_cpp='$CPP $CPPFLAGS'
51462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51465 
51466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51467 /* end confdefs.h.  */
51468 int i;
51469 _ACEOF
51470 if ac_fn_c_try_compile "$LINENO"; then :
51471 
51472 else
51473   supports=no
51474 fi
51475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51476   ac_ext=cpp
51477 ac_cpp='$CXXCPP $CPPFLAGS'
51478 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51479 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51480 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51481 
51482   CFLAGS="$saved_cflags"
51483 
51484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51485 $as_echo "$supports" >&6; }
51486   if test "x$supports" = "xyes" ; then
51487     :
51488     C_COMP_SUPPORTS="yes"
51489   else
51490     :
51491     C_COMP_SUPPORTS="no"
51492   fi
51493 
51494 
51495 
51496 
51497 
51498 
51499 
51500 
51501 
51502 
51503 
51504 
51505 
51506 
51507 
51508 
51509 
51510 
51511 
51512 
51513 
51514 
51515 
51516 
51517 
51518 
51519 
51520 
51521 
51522 
51523 
51524 
51525 
51526 
51527 
51528 
51529 
51530 
51531 
51532 
51533 
51534 
51535 
51536 
51537 
51538 
51539 
51540 
51541 
51542 
51543 
51544 
51545 
51546 
51547 
51548 
51549 
51550 
51551 
51552     # Execute function body
51553 
51554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51555 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51556   supports=yes
51557 
51558   saved_cxxflags="$CXXFLAGS"
51559   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51560   ac_ext=cpp
51561 ac_cpp='$CXXCPP $CPPFLAGS'
51562 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51563 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51564 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51565 
51566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51567 /* end confdefs.h.  */
51568 int i;
51569 _ACEOF
51570 if ac_fn_cxx_try_compile "$LINENO"; then :
51571 
51572 else
51573   supports=no
51574 fi
51575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51576   ac_ext=cpp
51577 ac_cpp='$CXXCPP $CPPFLAGS'
51578 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51579 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51580 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51581 
51582   CXXFLAGS="$saved_cxxflags"
51583 
51584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51585 $as_echo "$supports" >&6; }
51586   if test "x$supports" = "xyes" ; then
51587     :
51588     CXX_COMP_SUPPORTS="yes"
51589   else
51590     :
51591     CXX_COMP_SUPPORTS="no"
51592   fi
51593 
51594 
51595 
51596 
51597 
51598 
51599 
51600 
51601 
51602 
51603 
51604 
51605 
51606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51607 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51608   supports=no
51609   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51610 
51611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51612 $as_echo "$supports" >&6; }
51613   if test "x$supports" = "xyes" ; then
51614     :
51615 
51616   else
51617     :
51618     ZERO_ARCHFLAG=""
51619   fi
51620 
51621 
51622 
51623 
51624 
51625 
51626 
51627 
51628   # Check that the compiler supports -mX (or -qX on AIX) flags
51629   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51630 
51631 
51632 
51633 
51634 
51635 
51636 
51637 
51638 
51639 
51640 
51641 
51642 
51643 
51644 
51645 
51646 
51647 
51648 
51649 
51650 
51651 
51652 
51653 
51654 
51655 
51656 
51657 
51658 
51659 
51660 
51661 
51662 
51663 
51664 
51665 
51666 
51667 
51668 
51669 
51670 
51671 
51672 
51673 
51674 
51675 
51676 
51677     # Execute function body
51678 
51679 
51680 
51681 
51682 
51683 
51684 
51685 
51686 
51687 
51688 
51689 
51690 
51691 
51692 
51693 
51694 
51695 
51696 
51697 
51698 
51699 
51700 
51701 
51702 
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712 
51713 
51714 
51715 
51716 
51717 
51718 
51719 
51720 
51721 
51722 
51723 
51724 
51725 
51726     # Execute function body
51727 
51728   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51729 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51730   supports=yes
51731 
51732   saved_cflags="$CFLAGS"
51733   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51734   ac_ext=c
51735 ac_cpp='$CPP $CPPFLAGS'
51736 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51737 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51738 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51739 
51740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51741 /* end confdefs.h.  */
51742 int i;
51743 _ACEOF
51744 if ac_fn_c_try_compile "$LINENO"; then :
51745 
51746 else
51747   supports=no
51748 fi
51749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51750   ac_ext=cpp
51751 ac_cpp='$CXXCPP $CPPFLAGS'
51752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51755 
51756   CFLAGS="$saved_cflags"
51757 
51758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51759 $as_echo "$supports" >&6; }
51760   if test "x$supports" = "xyes" ; then
51761     :
51762     C_COMP_SUPPORTS="yes"
51763   else
51764     :
51765     C_COMP_SUPPORTS="no"
51766   fi
51767 
51768 
51769 
51770 
51771 
51772 
51773 
51774 
51775 
51776 
51777 
51778 
51779 
51780 
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791 
51792 
51793 
51794 
51795 
51796 
51797 
51798 
51799 
51800 
51801 
51802 
51803 
51804 
51805 
51806 
51807 
51808 
51809 
51810 
51811 
51812 
51813 
51814 
51815 
51816 
51817 
51818 
51819 
51820 
51821 
51822 
51823 
51824 
51825 
51826     # Execute function body
51827 
51828   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51829 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51830   supports=yes
51831 
51832   saved_cxxflags="$CXXFLAGS"
51833   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51834   ac_ext=cpp
51835 ac_cpp='$CXXCPP $CPPFLAGS'
51836 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51837 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51838 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51839 
51840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51841 /* end confdefs.h.  */
51842 int i;
51843 _ACEOF
51844 if ac_fn_cxx_try_compile "$LINENO"; then :
51845 
51846 else
51847   supports=no
51848 fi
51849 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51850   ac_ext=cpp
51851 ac_cpp='$CXXCPP $CPPFLAGS'
51852 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51853 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51854 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51855 
51856   CXXFLAGS="$saved_cxxflags"
51857 
51858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51859 $as_echo "$supports" >&6; }
51860   if test "x$supports" = "xyes" ; then
51861     :
51862     CXX_COMP_SUPPORTS="yes"
51863   else
51864     :
51865     CXX_COMP_SUPPORTS="no"
51866   fi
51867 
51868 
51869 
51870 
51871 
51872 
51873 
51874 
51875 
51876 
51877 
51878 
51879 
51880   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51881 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51882   supports=no
51883   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51884 
51885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51886 $as_echo "$supports" >&6; }
51887   if test "x$supports" = "xyes" ; then
51888     :
51889     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51890   else
51891     :
51892     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51893   fi
51894 
51895 
51896 
51897 
51898 
51899 
51900 
51901 
51902   # Check whether --enable-warnings-as-errors was given.
51903 if test "${enable_warnings_as_errors+set}" = set; then :
51904   enableval=$enable_warnings_as_errors;
51905 fi
51906 
51907 
51908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51909 $as_echo_n "checking if native warnings are errors... " >&6; }
51910   if test "x$enable_warnings_as_errors" = "xyes"; then
51911     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51912 $as_echo "yes (explicitely set)" >&6; }
51913     WARNINGS_AS_ERRORS=true
51914   elif test "x$enable_warnings_as_errors" = "xno"; then
51915     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51916 $as_echo "no" >&6; }
51917     WARNINGS_AS_ERRORS=false
51918   elif test "x$enable_warnings_as_errors" = "x"; then
51919     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51920 $as_echo "yes (default)" >&6; }
51921     WARNINGS_AS_ERRORS=true
51922   else
51923     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51924   fi
51925 
51926   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51927     # Set legacy hotspot variable
51928     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51929   else
51930     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51931   fi
51932 
51933 
51934 
51935 
51936   case "${TOOLCHAIN_TYPE}" in
51937     microsoft)
51938       DISABLE_WARNING_PREFIX="-wd"
51939       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51940       ;;
51941     solstudio)
51942       DISABLE_WARNING_PREFIX="-erroff="
51943       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51944       ;;
51945     gcc)
51946       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51947 
51948 
51949 
51950 
51951 
51952 
51953 
51954 
51955 
51956 
51957 
51958 
51959 
51960 
51961 
51962 
51963 
51964 
51965 
51966 
51967 
51968 
51969 
51970 
51971 
51972 
51973 
51974 
51975 
51976 
51977 
51978 
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986 
51987 
51988 
51989 
51990 
51991 
51992 
51993 
51994     # Execute function body
51995 
51996 
51997 
51998 
51999 
52000 
52001 
52002 
52003 
52004 
52005 
52006 
52007 
52008 
52009 
52010 
52011 
52012 
52013 
52014 
52015 
52016 
52017 
52018 
52019 
52020 
52021 
52022 
52023 
52024 
52025 
52026 
52027 
52028 
52029 
52030 
52031 
52032 
52033 
52034 
52035 
52036 
52037 
52038 
52039 
52040 
52041 
52042 
52043     # Execute function body
52044 
52045   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52046 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52047   supports=yes
52048 
52049   saved_cflags="$CFLAGS"
52050   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52051   ac_ext=c
52052 ac_cpp='$CPP $CPPFLAGS'
52053 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52054 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52055 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52056 
52057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52058 /* end confdefs.h.  */
52059 int i;
52060 _ACEOF
52061 if ac_fn_c_try_compile "$LINENO"; then :
52062 
52063 else
52064   supports=no
52065 fi
52066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52067   ac_ext=cpp
52068 ac_cpp='$CXXCPP $CPPFLAGS'
52069 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52070 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52071 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52072 
52073   CFLAGS="$saved_cflags"
52074 
52075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52076 $as_echo "$supports" >&6; }
52077   if test "x$supports" = "xyes" ; then
52078     :
52079     C_COMP_SUPPORTS="yes"
52080   else
52081     :
52082     C_COMP_SUPPORTS="no"
52083   fi
52084 
52085 
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096 
52097 
52098 
52099 
52100 
52101 
52102 
52103 
52104 
52105 
52106 
52107 
52108 
52109 
52110 
52111 
52112 
52113 
52114 
52115 
52116 
52117 
52118 
52119 
52120 
52121 
52122 
52123 
52124 
52125 
52126 
52127 
52128 
52129 
52130 
52131 
52132 
52133 
52134 
52135 
52136 
52137 
52138 
52139 
52140 
52141 
52142 
52143     # Execute function body
52144 
52145   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52146 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52147   supports=yes
52148 
52149   saved_cxxflags="$CXXFLAGS"
52150   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52151   ac_ext=cpp
52152 ac_cpp='$CXXCPP $CPPFLAGS'
52153 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52154 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52155 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52156 
52157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52158 /* end confdefs.h.  */
52159 int i;
52160 _ACEOF
52161 if ac_fn_cxx_try_compile "$LINENO"; then :
52162 
52163 else
52164   supports=no
52165 fi
52166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52167   ac_ext=cpp
52168 ac_cpp='$CXXCPP $CPPFLAGS'
52169 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52170 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52171 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52172 
52173   CXXFLAGS="$saved_cxxflags"
52174 
52175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52176 $as_echo "$supports" >&6; }
52177   if test "x$supports" = "xyes" ; then
52178     :
52179     CXX_COMP_SUPPORTS="yes"
52180   else
52181     :
52182     CXX_COMP_SUPPORTS="no"
52183   fi
52184 
52185 
52186 
52187 
52188 
52189 
52190 
52191 
52192 
52193 
52194 
52195 
52196 
52197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52198 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52199   supports=no
52200   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52201 
52202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52203 $as_echo "$supports" >&6; }
52204   if test "x$supports" = "xyes" ; then
52205     :
52206     GCC_CAN_DISABLE_WARNINGS=true
52207   else
52208     :
52209     GCC_CAN_DISABLE_WARNINGS=false
52210 
52211   fi
52212 
52213 
52214 
52215 
52216 
52217 
52218       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52219         DISABLE_WARNING_PREFIX="-Wno-"
52220       else
52221         DISABLE_WARNING_PREFIX=
52222       fi
52223       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52224       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52225       # CFLAGS since any target specific flags will likely not work with the
52226       # build compiler
52227       CC_OLD="$CC"
52228       CXX_OLD="$CXX"
52229       CC="$BUILD_CC"
52230       CXX="$BUILD_CXX"
52231       CFLAGS_OLD="$CFLAGS"
52232       CFLAGS=""
52233 
52234 
52235 
52236 
52237 
52238 
52239 
52240 
52241 
52242 
52243 
52244 
52245 
52246 
52247 
52248 
52249 
52250 
52251 
52252 
52253 
52254 
52255 
52256 
52257 
52258 
52259 
52260 
52261 
52262 
52263 
52264 
52265 
52266 
52267 
52268 
52269 
52270 
52271 
52272 
52273 
52274 
52275 
52276 
52277 
52278 
52279 
52280     # Execute function body
52281 
52282 
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     # Execute function body
52330 
52331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52332 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52333   supports=yes
52334 
52335   saved_cflags="$CFLAGS"
52336   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52337   ac_ext=c
52338 ac_cpp='$CPP $CPPFLAGS'
52339 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52340 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52341 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52342 
52343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52344 /* end confdefs.h.  */
52345 int i;
52346 _ACEOF
52347 if ac_fn_c_try_compile "$LINENO"; then :
52348 
52349 else
52350   supports=no
52351 fi
52352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52353   ac_ext=cpp
52354 ac_cpp='$CXXCPP $CPPFLAGS'
52355 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52356 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52357 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52358 
52359   CFLAGS="$saved_cflags"
52360 
52361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52362 $as_echo "$supports" >&6; }
52363   if test "x$supports" = "xyes" ; then
52364     :
52365     C_COMP_SUPPORTS="yes"
52366   else
52367     :
52368     C_COMP_SUPPORTS="no"
52369   fi
52370 
52371 
52372 
52373 
52374 
52375 
52376 
52377 
52378 
52379 
52380 
52381 
52382 
52383 
52384 
52385 
52386 
52387 
52388 
52389 
52390 
52391 
52392 
52393 
52394 
52395 
52396 
52397 
52398 
52399 
52400 
52401 
52402 
52403 
52404 
52405 
52406 
52407 
52408 
52409 
52410 
52411 
52412 
52413 
52414 
52415 
52416 
52417 
52418 
52419 
52420 
52421 
52422 
52423 
52424 
52425 
52426 
52427 
52428 
52429     # Execute function body
52430 
52431   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52432 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52433   supports=yes
52434 
52435   saved_cxxflags="$CXXFLAGS"
52436   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52437   ac_ext=cpp
52438 ac_cpp='$CXXCPP $CPPFLAGS'
52439 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52440 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52441 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52442 
52443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52444 /* end confdefs.h.  */
52445 int i;
52446 _ACEOF
52447 if ac_fn_cxx_try_compile "$LINENO"; then :
52448 
52449 else
52450   supports=no
52451 fi
52452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52453   ac_ext=cpp
52454 ac_cpp='$CXXCPP $CPPFLAGS'
52455 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52456 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52457 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52458 
52459   CXXFLAGS="$saved_cxxflags"
52460 
52461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52462 $as_echo "$supports" >&6; }
52463   if test "x$supports" = "xyes" ; then
52464     :
52465     CXX_COMP_SUPPORTS="yes"
52466   else
52467     :
52468     CXX_COMP_SUPPORTS="no"
52469   fi
52470 
52471 
52472 
52473 
52474 
52475 
52476 
52477 
52478 
52479 
52480 
52481 
52482 
52483   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52484 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52485   supports=no
52486   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52487 
52488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52489 $as_echo "$supports" >&6; }
52490   if test "x$supports" = "xyes" ; then
52491     :
52492     BUILD_CC_CAN_DISABLE_WARNINGS=true
52493   else
52494     :
52495     BUILD_CC_CAN_DISABLE_WARNINGS=false
52496 
52497   fi
52498 
52499 
52500 
52501 
52502 
52503 
52504       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52505         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52506       else
52507         BUILD_CC_DISABLE_WARNING_PREFIX=
52508       fi
52509       CC="$CC_OLD"
52510       CXX="$CXX_OLD"
52511       CFLAGS="$CFLAGS_OLD"
52512       ;;
52513     clang)
52514       DISABLE_WARNING_PREFIX="-Wno-"
52515       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52516       ;;
52517     xlc)
52518       DISABLE_WARNING_PREFIX="-qsuppress="
52519       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52520       ;;
52521   esac
52522 
52523 
52524 
52525 
52526 
52527 # Setup debug symbols (need objcopy from the toolchain for that)
52528 
52529   #
52530   # NATIVE_DEBUG_SYMBOLS
52531   # This must be done after the toolchain is setup, since we're looking at objcopy.
52532   #
52533   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52534 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52535 
52536 # Check whether --with-native-debug-symbols was given.
52537 if test "${with_native_debug_symbols+set}" = set; then :
52538   withval=$with_native_debug_symbols;
52539         if test "x$OPENJDK_TARGET_OS" = xaix; then
52540           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52541             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52542           fi
52543         fi
52544 
52545 else
52546 
52547         if test "x$OPENJDK_TARGET_OS" = xaix; then
52548           # AIX doesn't support 'zipped' so use 'internal' as default
52549           with_native_debug_symbols="internal"
52550         else
52551           if test "x$STATIC_BUILD" = xtrue; then
52552             with_native_debug_symbols="none"
52553           else
52554             with_native_debug_symbols="zipped"
52555           fi
52556         fi
52557 
52558 fi
52559 
52560   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52562 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52563 
52564   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52565 
52566     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52567       if test "x$OBJCOPY" = x; then
52568         # enabling of enable-debug-symbols and can't find objcopy
52569         # this is an error
52570         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52571       fi
52572     fi
52573 
52574     COMPILE_WITH_DEBUG_SYMBOLS=true
52575     COPY_DEBUG_SYMBOLS=true
52576     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52577 
52578     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52579     DEBUG_BINARIES=false
52580     STRIP_POLICY=min_strip
52581 
52582   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52583     COMPILE_WITH_DEBUG_SYMBOLS=false
52584     COPY_DEBUG_SYMBOLS=false
52585     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52586 
52587     DEBUG_BINARIES=false
52588     STRIP_POLICY=no_strip
52589   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52590     COMPILE_WITH_DEBUG_SYMBOLS=true
52591     COPY_DEBUG_SYMBOLS=false
52592     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52593 
52594     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52595     DEBUG_BINARIES=true
52596     STRIP_POLICY=no_strip
52597     STRIP=""
52598 
52599   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52600 
52601     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52602       if test "x$OBJCOPY" = x; then
52603         # enabling of enable-debug-symbols and can't find objcopy
52604         # this is an error
52605         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52606       fi
52607     fi
52608 
52609     COMPILE_WITH_DEBUG_SYMBOLS=true
52610     COPY_DEBUG_SYMBOLS=true
52611     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52612 
52613     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52614     DEBUG_BINARIES=false
52615     STRIP_POLICY=min_strip
52616   else
52617     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52618   fi
52619 
52620   # --enable-debug-symbols is deprecated.
52621   # Please use --with-native-debug-symbols=[internal,external,zipped] .
52622 
52623   # Check whether --enable-debug-symbols was given.
52624 if test "${enable_debug_symbols+set}" = set; then :
52625   enableval=$enable_debug_symbols;
52626 fi
52627 
52628   if test "x$enable_debug_symbols" != x; then
52629     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52630 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52631 
52632     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52633       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52634 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52635     fi
52636 
52637   fi
52638 
52639 
52640   # --enable-zip-debug-info is deprecated.
52641   # Please use --with-native-debug-symbols=zipped .
52642 
52643   # Check whether --enable-zip-debug-info was given.
52644 if test "${enable_zip_debug_info+set}" = set; then :
52645   enableval=$enable_zip_debug_info;
52646 fi
52647 
52648   if test "x$enable_zip_debug_info" != x; then
52649     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52650 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52651 
52652     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52653       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52654 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52655     fi
52656 
52657   fi
52658 
52659 
52660 
52661 
52662 
52663 
52664   # Legacy values
52665 
52666 
52667 
52668 
52669   # Check whether --enable-native-coverage was given.
52670 if test "${enable_native_coverage+set}" = set; then :
52671   enableval=$enable_native_coverage;
52672 fi
52673 
52674   GCOV_ENABLED="false"
52675   if test "x$enable_native_coverage" = "xyes"; then
52676     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52677       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52678 $as_echo_n "checking if native coverage is enabled... " >&6; }
52679       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52680 $as_echo "yes" >&6; }
52681       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52682       GCOV_LDFLAGS="-fprofile-arcs"
52683       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52684       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52685       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52686       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52687       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52688       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52689       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52690       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52691       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52692       GCOV_ENABLED="true"
52693     else
52694       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52695     fi
52696   elif test "x$enable_native_coverage" = "xno"; then
52697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52698 $as_echo_n "checking if native coverage is enabled... " >&6; }
52699     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52700 $as_echo "no" >&6; }
52701   elif test "x$enable_native_coverage" != "x"; then
52702     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52703   fi
52704 
52705 
52706 
52707 
52708 # Need toolchain to setup dtrace
52709 
52710   # Test for dtrace dependencies
52711   # Check whether --enable-dtrace was given.
52712 if test "${enable_dtrace+set}" = set; then :
52713   enableval=$enable_dtrace;
52714 fi
52715 
52716 
52717   DTRACE_DEP_MISSING=false
52718 
52719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52720 $as_echo_n "checking for dtrace tool... " >&6; }
52721   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52723 $as_echo "$DTRACE" >&6; }
52724   else
52725     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52726 $as_echo "not found, cannot build dtrace" >&6; }
52727     DTRACE_DEP_MISSING=true
52728   fi
52729 
52730   for ac_header in sys/sdt.h
52731 do :
52732   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52733 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52734   cat >>confdefs.h <<_ACEOF
52735 #define HAVE_SYS_SDT_H 1
52736 _ACEOF
52737  DTRACE_HEADERS_OK=yes
52738 else
52739   DTRACE_HEADERS_OK=no
52740 fi
52741 
52742 done
52743 
52744   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52745     DTRACE_DEP_MISSING=true
52746   fi
52747 
52748   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52749 $as_echo_n "checking if dtrace should be built... " >&6; }
52750   if test "x$enable_dtrace" = "xyes"; then
52751     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52752       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52753 $as_echo "no, missing dependencies" >&6; }
52754 
52755   # Print a helpful message on how to acquire the necessary build dependency.
52756   # dtrace is the help tag: freetype, cups, alsa etc
52757   MISSING_DEPENDENCY=dtrace
52758 
52759   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52760     cygwin_help $MISSING_DEPENDENCY
52761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52762     msys_help $MISSING_DEPENDENCY
52763   else
52764     PKGHANDLER_COMMAND=
52765 
52766     case $PKGHANDLER in
52767       apt-get)
52768         apt_help     $MISSING_DEPENDENCY ;;
52769       yum)
52770         yum_help     $MISSING_DEPENDENCY ;;
52771       port)
52772         port_help    $MISSING_DEPENDENCY ;;
52773       pkgutil)
52774         pkgutil_help $MISSING_DEPENDENCY ;;
52775       pkgadd)
52776         pkgadd_help  $MISSING_DEPENDENCY ;;
52777     esac
52778 
52779     if test "x$PKGHANDLER_COMMAND" != x; then
52780       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52781     fi
52782   fi
52783 
52784       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52785     else
52786       INCLUDE_DTRACE=true
52787       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52788 $as_echo "yes, forced" >&6; }
52789     fi
52790   elif test "x$enable_dtrace" = "xno"; then
52791     INCLUDE_DTRACE=false
52792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52793 $as_echo "no, forced" >&6; }
52794   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52795     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52796       INCLUDE_DTRACE=false
52797       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52798 $as_echo "no, missing dependencies" >&6; }
52799     else
52800       INCLUDE_DTRACE=true
52801       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52802 $as_echo "yes, dependencies present" >&6; }
52803     fi
52804   else
52805     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52806   fi
52807 
52808 
52809 
52810   # The user can in some cases supply additional jvm features. For the custom
52811   # variant, this defines the entire variant.
52812 
52813 # Check whether --with-jvm-features was given.
52814 if test "${with_jvm_features+set}" = set; then :
52815   withval=$with_jvm_features;
52816 fi
52817 
52818   if test "x$with_jvm_features" != x; then
52819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52820 $as_echo_n "checking additional JVM features... " >&6; }
52821     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52822     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52823 $as_echo "$JVM_FEATURES" >&6; }
52824   fi
52825 
52826   # Verify that dependencies are met for explicitly set features.
52827   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52828     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52829   fi
52830 
52831   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52832     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52833   fi
52834 
52835   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52836     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52837   fi
52838 
52839   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52840     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52841   fi
52842 
52843   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52844     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52845   fi
52846 
52847   # Turn on additional features based on other parts of configure
52848   if test "x$INCLUDE_DTRACE" = "xtrue"; then
52849     JVM_FEATURES="$JVM_FEATURES dtrace"
52850   else
52851     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52852       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52853     fi
52854   fi
52855 
52856   if test "x$STATIC_BUILD" = "xtrue"; then
52857     JVM_FEATURES="$JVM_FEATURES static-build"
52858   else
52859     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52860       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52861     fi
52862   fi
52863 
52864   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52865     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52866       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52867     fi
52868   fi
52869 
52870   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52871     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52872       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52873     fi
52874   fi
52875 
52876   # Only enable jvmci on x86_64, sparcv9 and aarch64.
52877   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52878       test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52879       test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52880     JVM_FEATURES_jvmci="jvmci"
52881   else
52882     JVM_FEATURES_jvmci=""
52883   fi
52884 
52885   # All variants but minimal (and custom) get these features
52886   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52887 
52888   # Enable features depending on variant.
52889   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52890   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52891   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52892   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52893   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52894   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52895   JVM_FEATURES_custom="$JVM_FEATURES"
52896 
52897 
52898 
52899 
52900 
52901 
52902 
52903 
52904 
52905   # Used for verification of Makefiles by check-jvm-feature
52906 
52907 
52908   # We don't support --with-jvm-interpreter anymore, use zero instead.
52909 
52910 
52911 # Check whether --with-jvm-interpreter was given.
52912 if test "${with_jvm_interpreter+set}" = set; then :
52913   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52914 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52915 fi
52916 
52917 
52918 
52919 
52920   # Check whether --enable-hotspot-gtest was given.
52921 if test "${enable_hotspot_gtest+set}" = set; then :
52922   enableval=$enable_hotspot_gtest;
52923 fi
52924 
52925 
52926   if test -e "$HOTSPOT_TOPDIR/test/native"; then
52927     GTEST_DIR_EXISTS="true"
52928   else
52929     GTEST_DIR_EXISTS="false"
52930   fi
52931 
52932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52933 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52934   if test "x$enable_hotspot_gtest" = "xyes"; then
52935     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52936       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52937 $as_echo "yes, forced" >&6; }
52938       BUILD_GTEST="true"
52939     else
52940       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52941     fi
52942   elif test "x$enable_hotspot_gtest" = "xno"; then
52943     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52944 $as_echo "no, forced" >&6; }
52945     BUILD_GTEST="false"
52946   elif test "x$enable_hotspot_gtest" = "x"; then
52947     if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52948       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52949 $as_echo "yes" >&6; }
52950       BUILD_GTEST="true"
52951     else
52952       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52953 $as_echo "no" >&6; }
52954       BUILD_GTEST="false"
52955     fi
52956   else
52957     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52958   fi
52959 
52960 
52961 
52962 
52963 ###############################################################################
52964 #
52965 # Check dependencies for external and internal libraries.
52966 #
52967 ###############################################################################
52968 
52969 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52970 
52971   # When using cygwin or msys, we need a wrapper binary that renames
52972   # /cygdrive/c/ arguments into c:/ arguments and peeks into
52973   # @files and rewrites these too! This wrapper binary is
52974   # called fixpath.
52975   FIXPATH=
52976   if test "x$OPENJDK_BUILD_OS" = xwindows; then
52977     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52978 $as_echo_n "checking if fixpath can be created... " >&6; }
52979     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52980     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52981     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52982     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52983       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52984       FIXPATH="$FIXPATH_BIN -c"
52985     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52986       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52987       # @ was chosen as separator to minimize risk of other tools messing around with it
52988       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52989           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52990       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52991       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52992     fi
52993     FIXPATH_SRC_W="$FIXPATH_SRC"
52994     FIXPATH_BIN_W="$FIXPATH_BIN"
52995 
52996   unix_path="$FIXPATH_SRC_W"
52997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52998     windows_path=`$CYGPATH -m "$unix_path"`
52999     FIXPATH_SRC_W="$windows_path"
53000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53001     windows_path=`cmd //c echo $unix_path`
53002     FIXPATH_SRC_W="$windows_path"
53003   fi
53004 
53005 
53006   unix_path="$FIXPATH_BIN_W"
53007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53008     windows_path=`$CYGPATH -m "$unix_path"`
53009     FIXPATH_BIN_W="$windows_path"
53010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53011     windows_path=`cmd //c echo $unix_path`
53012     FIXPATH_BIN_W="$windows_path"
53013   fi
53014 
53015     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53016     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53017     cd $FIXPATH_DIR
53018     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53019     cd $CURDIR
53020 
53021     if test ! -x $FIXPATH_BIN; then
53022       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53023 $as_echo "no" >&6; }
53024       cat $FIXPATH_DIR/fixpath1.log
53025       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53026     fi
53027     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53028 $as_echo "yes" >&6; }
53029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53030 $as_echo_n "checking if fixpath.exe works... " >&6; }
53031     cd $FIXPATH_DIR
53032     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53033         > $FIXPATH_DIR/fixpath2.log 2>&1
53034     cd $CURDIR
53035     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53036       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53037 $as_echo "no" >&6; }
53038       cat $FIXPATH_DIR/fixpath2.log
53039       as_fn_error $? "fixpath did not work!" "$LINENO" 5
53040     fi
53041     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53042 $as_echo "yes" >&6; }
53043 
53044     FIXPATH_DETACH_FLAG="--detach"
53045   fi
53046 
53047 
53048 
53049 
53050 
53051 
53052   # Check if X11 is needed
53053   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53054     # No X11 support on windows or macosx
53055     NEEDS_LIB_X11=false
53056   else
53057     # All other instances need X11, even if building headless only, libawt still
53058     # needs X11 headers.
53059     NEEDS_LIB_X11=true
53060   fi
53061 
53062   # Check if cups is needed
53063   if test "x$OPENJDK_TARGET_OS" = xwindows; then
53064     # Windows have a separate print system
53065     NEEDS_LIB_CUPS=false
53066   else
53067     NEEDS_LIB_CUPS=true
53068   fi
53069 
53070   # A custom hook may have set this already
53071   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53072     NEEDS_LIB_FREETYPE=true
53073   fi
53074 
53075   # Check if alsa is needed
53076   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53077     NEEDS_LIB_ALSA=true
53078   else
53079     NEEDS_LIB_ALSA=false
53080   fi
53081 
53082   # Check if ffi is needed
53083   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53084     NEEDS_LIB_FFI=true
53085   else
53086     NEEDS_LIB_FFI=false
53087   fi
53088 
53089 
53090   # statically link libstdc++ before C++ ABI is stablized on Linux unless
53091   # dynamic build is configured on command line.
53092 
53093 # Check whether --with-stdc++lib was given.
53094 if test "${with_stdc__lib+set}" = set; then :
53095   withval=$with_stdc__lib;
53096         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53097                 && test "x$with_stdc__lib" != xdefault; then
53098           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53099         fi
53100 
53101 else
53102   with_stdc__lib=default
53103 
53104 fi
53105 
53106 
53107   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53108     # Test if stdc++ can be linked statically.
53109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53110 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53111     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53112     ac_ext=cpp
53113 ac_cpp='$CXXCPP $CPPFLAGS'
53114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53117 
53118     OLD_LIBS="$LIBS"
53119     LIBS="$STATIC_STDCXX_FLAGS"
53120     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53121 /* end confdefs.h.  */
53122 
53123 int
53124 main ()
53125 {
53126 return 0;
53127   ;
53128   return 0;
53129 }
53130 _ACEOF
53131 if ac_fn_cxx_try_link "$LINENO"; then :
53132   has_static_libstdcxx=yes
53133 else
53134   has_static_libstdcxx=no
53135 fi
53136 rm -f core conftest.err conftest.$ac_objext \
53137     conftest$ac_exeext conftest.$ac_ext
53138     LIBS="$OLD_LIBS"
53139     ac_ext=cpp
53140 ac_cpp='$CXXCPP $CPPFLAGS'
53141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53144 
53145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53146 $as_echo "$has_static_libstdcxx" >&6; }
53147 
53148     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53149       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53150     fi
53151 
53152     # If dynamic was requested, it's available since it would fail above otherwise.
53153     # If dynamic wasn't requested, go with static unless it isn't available.
53154     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53155 $as_echo_n "checking how to link with libstdc++... " >&6; }
53156     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53157         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53158       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53159 $as_echo "dynamic" >&6; }
53160     else
53161       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53162       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53163       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53164       # just use the same setting as for the TARGET toolchain.
53165       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53166       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53167 $as_echo "static" >&6; }
53168     fi
53169   fi
53170 
53171   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53172   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53173     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53174   fi
53175 
53176 
53177 
53178   # Setup Windows runtime dlls
53179   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53180 
53181 
53182 # Check whether --with-msvcr-dll was given.
53183 if test "${with_msvcr_dll+set}" = set; then :
53184   withval=$with_msvcr_dll;
53185 fi
53186 
53187 
53188   if test "x$with_msvcr_dll" != x; then
53189     # If given explicitely by user, do not probe. If not present, fail directly.
53190 
53191   DLL_NAME="$MSVCR_NAME"
53192   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53193   METHOD="--with-msvcr-dll"
53194   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53195     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53196 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53197 
53198     # Need to check if the found msvcr is correct architecture
53199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53200 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53201     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53202     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53203       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53204       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53205       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53206         CORRECT_MSVCR_ARCH="PE32 executable"
53207       else
53208         CORRECT_MSVCR_ARCH="PE32+ executable"
53209       fi
53210     else
53211       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53212         CORRECT_MSVCR_ARCH=386
53213       else
53214         CORRECT_MSVCR_ARCH=x86-64
53215       fi
53216     fi
53217     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53218       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53219 $as_echo "ok" >&6; }
53220       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53221 
53222   # Only process if variable expands to non-empty
53223 
53224   if test "x$MSVC_DLL" != x; then
53225     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53226 
53227   # Input might be given as Windows format, start by converting to
53228   # unix format.
53229   path="$MSVC_DLL"
53230   new_path=`$CYGPATH -u "$path"`
53231 
53232   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53233   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53234   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53235   # "foo.exe" is OK but "foo" is an error.
53236   #
53237   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53238   # It is also a way to make sure we got the proper file name for the real test later on.
53239   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53240   if test "x$test_shortpath" = x; then
53241     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53242 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53243     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53244   fi
53245 
53246   # Call helper function which possibly converts this using DOS-style short mode.
53247   # If so, the updated path is stored in $new_path.
53248 
53249   input_path="$new_path"
53250   # Check if we need to convert this using DOS-style short mode. If the path
53251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53252   # take no chances and rewrite it.
53253   # Note: m4 eats our [], so we need to use [ and ] instead.
53254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53255   if test "x$has_forbidden_chars" != x; then
53256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53257     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53258     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53259     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53260       # Going to short mode and back again did indeed matter. Since short mode is
53261       # case insensitive, let's make it lowercase to improve readability.
53262       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53263       # Now convert it back to Unix-style (cygpath)
53264       input_path=`$CYGPATH -u "$shortmode_path"`
53265       new_path="$input_path"
53266     fi
53267   fi
53268 
53269   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53270   if test "x$test_cygdrive_prefix" = x; then
53271     # As a simple fix, exclude /usr/bin since it's not a real path.
53272     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53273       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53274       # a path prefixed by /cygdrive for fixpath to work.
53275       new_path="$CYGWIN_ROOT_PATH$input_path"
53276     fi
53277   fi
53278 
53279 
53280   if test "x$path" != "x$new_path"; then
53281     MSVC_DLL="$new_path"
53282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53283 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53284   fi
53285 
53286     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53287 
53288   path="$MSVC_DLL"
53289   has_colon=`$ECHO $path | $GREP ^.:`
53290   new_path="$path"
53291   if test "x$has_colon" = x; then
53292     # Not in mixed or Windows style, start by that.
53293     new_path=`cmd //c echo $path`
53294   fi
53295 
53296 
53297   input_path="$new_path"
53298   # Check if we need to convert this using DOS-style short mode. If the path
53299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53300   # take no chances and rewrite it.
53301   # Note: m4 eats our [], so we need to use [ and ] instead.
53302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53303   if test "x$has_forbidden_chars" != x; then
53304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53305     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53306   fi
53307 
53308 
53309   windows_path="$new_path"
53310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53311     unix_path=`$CYGPATH -u "$windows_path"`
53312     new_path="$unix_path"
53313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53315     new_path="$unix_path"
53316   fi
53317 
53318   if test "x$path" != "x$new_path"; then
53319     MSVC_DLL="$new_path"
53320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53321 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53322   fi
53323 
53324   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53325   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53326 
53327     else
53328       # We're on a unix platform. Hooray! :)
53329       path="$MSVC_DLL"
53330       has_space=`$ECHO "$path" | $GREP " "`
53331       if test "x$has_space" != x; then
53332         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53333 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53334         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53335       fi
53336 
53337       # Use eval to expand a potential ~
53338       eval path="$path"
53339       if test ! -f "$path" && test ! -d "$path"; then
53340         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53341       fi
53342 
53343       if test -d "$path"; then
53344         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53345       else
53346         dir="`$DIRNAME "$path"`"
53347         base="`$BASENAME "$path"`"
53348         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53349       fi
53350     fi
53351   fi
53352 
53353       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53354 $as_echo_n "checking for $DLL_NAME... " >&6; }
53355       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53356 $as_echo "$MSVC_DLL" >&6; }
53357     else
53358       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53359 $as_echo "incorrect, ignoring" >&6; }
53360       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53361 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53362     fi
53363   fi
53364 
53365     if test "x$MSVC_DLL" = x; then
53366       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53367     fi
53368     MSVCR_DLL="$MSVC_DLL"
53369   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53370 
53371   DLL_NAME="$MSVCR_NAME"
53372   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53373   METHOD="devkit"
53374   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53375     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53376 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53377 
53378     # Need to check if the found msvcr is correct architecture
53379     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53380 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53381     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53382     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53383       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53384       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53385       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53386         CORRECT_MSVCR_ARCH="PE32 executable"
53387       else
53388         CORRECT_MSVCR_ARCH="PE32+ executable"
53389       fi
53390     else
53391       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53392         CORRECT_MSVCR_ARCH=386
53393       else
53394         CORRECT_MSVCR_ARCH=x86-64
53395       fi
53396     fi
53397     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53398       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53399 $as_echo "ok" >&6; }
53400       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53401 
53402   # Only process if variable expands to non-empty
53403 
53404   if test "x$MSVC_DLL" != x; then
53405     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53406 
53407   # Input might be given as Windows format, start by converting to
53408   # unix format.
53409   path="$MSVC_DLL"
53410   new_path=`$CYGPATH -u "$path"`
53411 
53412   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53413   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53414   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53415   # "foo.exe" is OK but "foo" is an error.
53416   #
53417   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53418   # It is also a way to make sure we got the proper file name for the real test later on.
53419   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53420   if test "x$test_shortpath" = x; then
53421     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53422 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53423     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53424   fi
53425 
53426   # Call helper function which possibly converts this using DOS-style short mode.
53427   # If so, the updated path is stored in $new_path.
53428 
53429   input_path="$new_path"
53430   # Check if we need to convert this using DOS-style short mode. If the path
53431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53432   # take no chances and rewrite it.
53433   # Note: m4 eats our [], so we need to use [ and ] instead.
53434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53435   if test "x$has_forbidden_chars" != x; then
53436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53437     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53438     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53439     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53440       # Going to short mode and back again did indeed matter. Since short mode is
53441       # case insensitive, let's make it lowercase to improve readability.
53442       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53443       # Now convert it back to Unix-style (cygpath)
53444       input_path=`$CYGPATH -u "$shortmode_path"`
53445       new_path="$input_path"
53446     fi
53447   fi
53448 
53449   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53450   if test "x$test_cygdrive_prefix" = x; then
53451     # As a simple fix, exclude /usr/bin since it's not a real path.
53452     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53453       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53454       # a path prefixed by /cygdrive for fixpath to work.
53455       new_path="$CYGWIN_ROOT_PATH$input_path"
53456     fi
53457   fi
53458 
53459 
53460   if test "x$path" != "x$new_path"; then
53461     MSVC_DLL="$new_path"
53462     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53463 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53464   fi
53465 
53466     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53467 
53468   path="$MSVC_DLL"
53469   has_colon=`$ECHO $path | $GREP ^.:`
53470   new_path="$path"
53471   if test "x$has_colon" = x; then
53472     # Not in mixed or Windows style, start by that.
53473     new_path=`cmd //c echo $path`
53474   fi
53475 
53476 
53477   input_path="$new_path"
53478   # Check if we need to convert this using DOS-style short mode. If the path
53479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53480   # take no chances and rewrite it.
53481   # Note: m4 eats our [], so we need to use [ and ] instead.
53482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53483   if test "x$has_forbidden_chars" != x; then
53484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53485     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53486   fi
53487 
53488 
53489   windows_path="$new_path"
53490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53491     unix_path=`$CYGPATH -u "$windows_path"`
53492     new_path="$unix_path"
53493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53495     new_path="$unix_path"
53496   fi
53497 
53498   if test "x$path" != "x$new_path"; then
53499     MSVC_DLL="$new_path"
53500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53501 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53502   fi
53503 
53504   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53505   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53506 
53507     else
53508       # We're on a unix platform. Hooray! :)
53509       path="$MSVC_DLL"
53510       has_space=`$ECHO "$path" | $GREP " "`
53511       if test "x$has_space" != x; then
53512         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53513 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53514         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53515       fi
53516 
53517       # Use eval to expand a potential ~
53518       eval path="$path"
53519       if test ! -f "$path" && test ! -d "$path"; then
53520         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53521       fi
53522 
53523       if test -d "$path"; then
53524         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53525       else
53526         dir="`$DIRNAME "$path"`"
53527         base="`$BASENAME "$path"`"
53528         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53529       fi
53530     fi
53531   fi
53532 
53533       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53534 $as_echo_n "checking for $DLL_NAME... " >&6; }
53535       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53536 $as_echo "$MSVC_DLL" >&6; }
53537     else
53538       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53539 $as_echo "incorrect, ignoring" >&6; }
53540       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53541 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53542     fi
53543   fi
53544 
53545     if test "x$MSVC_DLL" = x; then
53546       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53547     fi
53548     MSVCR_DLL="$MSVC_DLL"
53549   else
53550 
53551   DLL_NAME="${MSVCR_NAME}"
53552   MSVC_DLL=
53553 
53554   if test "x$MSVC_DLL" = x; then
53555     # Probe: Using well-known location from Visual Studio 10.0
53556     if test "x$VCINSTALLDIR" != x; then
53557       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53558 
53559   windows_path="$CYGWIN_VC_INSTALL_DIR"
53560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53561     unix_path=`$CYGPATH -u "$windows_path"`
53562     CYGWIN_VC_INSTALL_DIR="$unix_path"
53563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53565     CYGWIN_VC_INSTALL_DIR="$unix_path"
53566   fi
53567 
53568       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53569         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53570       else
53571         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53572       fi
53573       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53574 
53575   DLL_NAME="$DLL_NAME"
53576   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53577   METHOD="well-known location in VCINSTALLDIR"
53578   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53579     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53580 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53581 
53582     # Need to check if the found msvcr is correct architecture
53583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53584 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53585     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53586     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53587       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53588       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53589       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53590         CORRECT_MSVCR_ARCH="PE32 executable"
53591       else
53592         CORRECT_MSVCR_ARCH="PE32+ executable"
53593       fi
53594     else
53595       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53596         CORRECT_MSVCR_ARCH=386
53597       else
53598         CORRECT_MSVCR_ARCH=x86-64
53599       fi
53600     fi
53601     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53602       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53603 $as_echo "ok" >&6; }
53604       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53605 
53606   # Only process if variable expands to non-empty
53607 
53608   if test "x$MSVC_DLL" != x; then
53609     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53610 
53611   # Input might be given as Windows format, start by converting to
53612   # unix format.
53613   path="$MSVC_DLL"
53614   new_path=`$CYGPATH -u "$path"`
53615 
53616   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53617   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53618   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53619   # "foo.exe" is OK but "foo" is an error.
53620   #
53621   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53622   # It is also a way to make sure we got the proper file name for the real test later on.
53623   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53624   if test "x$test_shortpath" = x; then
53625     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53626 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53627     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53628   fi
53629 
53630   # Call helper function which possibly converts this using DOS-style short mode.
53631   # If so, the updated path is stored in $new_path.
53632 
53633   input_path="$new_path"
53634   # Check if we need to convert this using DOS-style short mode. If the path
53635   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53636   # take no chances and rewrite it.
53637   # Note: m4 eats our [], so we need to use [ and ] instead.
53638   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53639   if test "x$has_forbidden_chars" != x; then
53640     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53641     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53642     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53643     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53644       # Going to short mode and back again did indeed matter. Since short mode is
53645       # case insensitive, let's make it lowercase to improve readability.
53646       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53647       # Now convert it back to Unix-style (cygpath)
53648       input_path=`$CYGPATH -u "$shortmode_path"`
53649       new_path="$input_path"
53650     fi
53651   fi
53652 
53653   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53654   if test "x$test_cygdrive_prefix" = x; then
53655     # As a simple fix, exclude /usr/bin since it's not a real path.
53656     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53657       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53658       # a path prefixed by /cygdrive for fixpath to work.
53659       new_path="$CYGWIN_ROOT_PATH$input_path"
53660     fi
53661   fi
53662 
53663 
53664   if test "x$path" != "x$new_path"; then
53665     MSVC_DLL="$new_path"
53666     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53667 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53668   fi
53669 
53670     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53671 
53672   path="$MSVC_DLL"
53673   has_colon=`$ECHO $path | $GREP ^.:`
53674   new_path="$path"
53675   if test "x$has_colon" = x; then
53676     # Not in mixed or Windows style, start by that.
53677     new_path=`cmd //c echo $path`
53678   fi
53679 
53680 
53681   input_path="$new_path"
53682   # Check if we need to convert this using DOS-style short mode. If the path
53683   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53684   # take no chances and rewrite it.
53685   # Note: m4 eats our [], so we need to use [ and ] instead.
53686   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53687   if test "x$has_forbidden_chars" != x; then
53688     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53689     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53690   fi
53691 
53692 
53693   windows_path="$new_path"
53694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53695     unix_path=`$CYGPATH -u "$windows_path"`
53696     new_path="$unix_path"
53697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53699     new_path="$unix_path"
53700   fi
53701 
53702   if test "x$path" != "x$new_path"; then
53703     MSVC_DLL="$new_path"
53704     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53705 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53706   fi
53707 
53708   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53709   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53710 
53711     else
53712       # We're on a unix platform. Hooray! :)
53713       path="$MSVC_DLL"
53714       has_space=`$ECHO "$path" | $GREP " "`
53715       if test "x$has_space" != x; then
53716         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53717 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53718         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53719       fi
53720 
53721       # Use eval to expand a potential ~
53722       eval path="$path"
53723       if test ! -f "$path" && test ! -d "$path"; then
53724         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53725       fi
53726 
53727       if test -d "$path"; then
53728         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53729       else
53730         dir="`$DIRNAME "$path"`"
53731         base="`$BASENAME "$path"`"
53732         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53733       fi
53734     fi
53735   fi
53736 
53737       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53738 $as_echo_n "checking for $DLL_NAME... " >&6; }
53739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53740 $as_echo "$MSVC_DLL" >&6; }
53741     else
53742       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53743 $as_echo "incorrect, ignoring" >&6; }
53744       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53745 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53746     fi
53747   fi
53748 
53749     fi
53750   fi
53751 
53752   if test "x$MSVC_DLL" = x; then
53753     # Probe: Check in the Boot JDK directory.
53754     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53755 
53756   DLL_NAME="$DLL_NAME"
53757   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53758   METHOD="well-known location in Boot JDK"
53759   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53760     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53761 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53762 
53763     # Need to check if the found msvcr is correct architecture
53764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53765 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53766     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53768       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53769       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53770       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53771         CORRECT_MSVCR_ARCH="PE32 executable"
53772       else
53773         CORRECT_MSVCR_ARCH="PE32+ executable"
53774       fi
53775     else
53776       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53777         CORRECT_MSVCR_ARCH=386
53778       else
53779         CORRECT_MSVCR_ARCH=x86-64
53780       fi
53781     fi
53782     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53783       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53784 $as_echo "ok" >&6; }
53785       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53786 
53787   # Only process if variable expands to non-empty
53788 
53789   if test "x$MSVC_DLL" != x; then
53790     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53791 
53792   # Input might be given as Windows format, start by converting to
53793   # unix format.
53794   path="$MSVC_DLL"
53795   new_path=`$CYGPATH -u "$path"`
53796 
53797   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53798   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53799   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53800   # "foo.exe" is OK but "foo" is an error.
53801   #
53802   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53803   # It is also a way to make sure we got the proper file name for the real test later on.
53804   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53805   if test "x$test_shortpath" = x; then
53806     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53807 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53808     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53809   fi
53810 
53811   # Call helper function which possibly converts this using DOS-style short mode.
53812   # If so, the updated path is stored in $new_path.
53813 
53814   input_path="$new_path"
53815   # Check if we need to convert this using DOS-style short mode. If the path
53816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53817   # take no chances and rewrite it.
53818   # Note: m4 eats our [], so we need to use [ and ] instead.
53819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53820   if test "x$has_forbidden_chars" != x; then
53821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53822     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53823     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53824     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53825       # Going to short mode and back again did indeed matter. Since short mode is
53826       # case insensitive, let's make it lowercase to improve readability.
53827       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53828       # Now convert it back to Unix-style (cygpath)
53829       input_path=`$CYGPATH -u "$shortmode_path"`
53830       new_path="$input_path"
53831     fi
53832   fi
53833 
53834   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53835   if test "x$test_cygdrive_prefix" = x; then
53836     # As a simple fix, exclude /usr/bin since it's not a real path.
53837     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53838       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53839       # a path prefixed by /cygdrive for fixpath to work.
53840       new_path="$CYGWIN_ROOT_PATH$input_path"
53841     fi
53842   fi
53843 
53844 
53845   if test "x$path" != "x$new_path"; then
53846     MSVC_DLL="$new_path"
53847     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53848 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53849   fi
53850 
53851     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53852 
53853   path="$MSVC_DLL"
53854   has_colon=`$ECHO $path | $GREP ^.:`
53855   new_path="$path"
53856   if test "x$has_colon" = x; then
53857     # Not in mixed or Windows style, start by that.
53858     new_path=`cmd //c echo $path`
53859   fi
53860 
53861 
53862   input_path="$new_path"
53863   # Check if we need to convert this using DOS-style short mode. If the path
53864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53865   # take no chances and rewrite it.
53866   # Note: m4 eats our [], so we need to use [ and ] instead.
53867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53868   if test "x$has_forbidden_chars" != x; then
53869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53871   fi
53872 
53873 
53874   windows_path="$new_path"
53875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53876     unix_path=`$CYGPATH -u "$windows_path"`
53877     new_path="$unix_path"
53878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53880     new_path="$unix_path"
53881   fi
53882 
53883   if test "x$path" != "x$new_path"; then
53884     MSVC_DLL="$new_path"
53885     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53886 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53887   fi
53888 
53889   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53890   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53891 
53892     else
53893       # We're on a unix platform. Hooray! :)
53894       path="$MSVC_DLL"
53895       has_space=`$ECHO "$path" | $GREP " "`
53896       if test "x$has_space" != x; then
53897         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53898 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53899         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53900       fi
53901 
53902       # Use eval to expand a potential ~
53903       eval path="$path"
53904       if test ! -f "$path" && test ! -d "$path"; then
53905         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53906       fi
53907 
53908       if test -d "$path"; then
53909         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53910       else
53911         dir="`$DIRNAME "$path"`"
53912         base="`$BASENAME "$path"`"
53913         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53914       fi
53915     fi
53916   fi
53917 
53918       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53919 $as_echo_n "checking for $DLL_NAME... " >&6; }
53920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53921 $as_echo "$MSVC_DLL" >&6; }
53922     else
53923       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53924 $as_echo "incorrect, ignoring" >&6; }
53925       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53926 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53927     fi
53928   fi
53929 
53930   fi
53931 
53932   if test "x$MSVC_DLL" = x; then
53933     # Probe: Look in the Windows system32 directory
53934     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53935 
53936   windows_path="$CYGWIN_SYSTEMROOT"
53937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53938     unix_path=`$CYGPATH -u "$windows_path"`
53939     CYGWIN_SYSTEMROOT="$unix_path"
53940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53942     CYGWIN_SYSTEMROOT="$unix_path"
53943   fi
53944 
53945     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53946 
53947   DLL_NAME="$DLL_NAME"
53948   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53949   METHOD="well-known location in SYSTEMROOT"
53950   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53951     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53952 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53953 
53954     # Need to check if the found msvcr is correct architecture
53955     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53956 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53957     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53958     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53959       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53960       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53961       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53962         CORRECT_MSVCR_ARCH="PE32 executable"
53963       else
53964         CORRECT_MSVCR_ARCH="PE32+ executable"
53965       fi
53966     else
53967       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53968         CORRECT_MSVCR_ARCH=386
53969       else
53970         CORRECT_MSVCR_ARCH=x86-64
53971       fi
53972     fi
53973     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53974       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53975 $as_echo "ok" >&6; }
53976       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53977 
53978   # Only process if variable expands to non-empty
53979 
53980   if test "x$MSVC_DLL" != x; then
53981     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53982 
53983   # Input might be given as Windows format, start by converting to
53984   # unix format.
53985   path="$MSVC_DLL"
53986   new_path=`$CYGPATH -u "$path"`
53987 
53988   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53989   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53990   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53991   # "foo.exe" is OK but "foo" is an error.
53992   #
53993   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53994   # It is also a way to make sure we got the proper file name for the real test later on.
53995   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53996   if test "x$test_shortpath" = x; then
53997     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53998 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53999     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54000   fi
54001 
54002   # Call helper function which possibly converts this using DOS-style short mode.
54003   # If so, the updated path is stored in $new_path.
54004 
54005   input_path="$new_path"
54006   # Check if we need to convert this using DOS-style short mode. If the path
54007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54008   # take no chances and rewrite it.
54009   # Note: m4 eats our [], so we need to use [ and ] instead.
54010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54011   if test "x$has_forbidden_chars" != x; then
54012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54013     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54014     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54015     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54016       # Going to short mode and back again did indeed matter. Since short mode is
54017       # case insensitive, let's make it lowercase to improve readability.
54018       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54019       # Now convert it back to Unix-style (cygpath)
54020       input_path=`$CYGPATH -u "$shortmode_path"`
54021       new_path="$input_path"
54022     fi
54023   fi
54024 
54025   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54026   if test "x$test_cygdrive_prefix" = x; then
54027     # As a simple fix, exclude /usr/bin since it's not a real path.
54028     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54029       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54030       # a path prefixed by /cygdrive for fixpath to work.
54031       new_path="$CYGWIN_ROOT_PATH$input_path"
54032     fi
54033   fi
54034 
54035 
54036   if test "x$path" != "x$new_path"; then
54037     MSVC_DLL="$new_path"
54038     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54039 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54040   fi
54041 
54042     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54043 
54044   path="$MSVC_DLL"
54045   has_colon=`$ECHO $path | $GREP ^.:`
54046   new_path="$path"
54047   if test "x$has_colon" = x; then
54048     # Not in mixed or Windows style, start by that.
54049     new_path=`cmd //c echo $path`
54050   fi
54051 
54052 
54053   input_path="$new_path"
54054   # Check if we need to convert this using DOS-style short mode. If the path
54055   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54056   # take no chances and rewrite it.
54057   # Note: m4 eats our [], so we need to use [ and ] instead.
54058   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54059   if test "x$has_forbidden_chars" != x; then
54060     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54061     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54062   fi
54063 
54064 
54065   windows_path="$new_path"
54066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54067     unix_path=`$CYGPATH -u "$windows_path"`
54068     new_path="$unix_path"
54069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54071     new_path="$unix_path"
54072   fi
54073 
54074   if test "x$path" != "x$new_path"; then
54075     MSVC_DLL="$new_path"
54076     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54077 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54078   fi
54079 
54080   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54081   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54082 
54083     else
54084       # We're on a unix platform. Hooray! :)
54085       path="$MSVC_DLL"
54086       has_space=`$ECHO "$path" | $GREP " "`
54087       if test "x$has_space" != x; then
54088         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54089 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54090         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54091       fi
54092 
54093       # Use eval to expand a potential ~
54094       eval path="$path"
54095       if test ! -f "$path" && test ! -d "$path"; then
54096         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54097       fi
54098 
54099       if test -d "$path"; then
54100         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54101       else
54102         dir="`$DIRNAME "$path"`"
54103         base="`$BASENAME "$path"`"
54104         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54105       fi
54106     fi
54107   fi
54108 
54109       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54110 $as_echo_n "checking for $DLL_NAME... " >&6; }
54111       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54112 $as_echo "$MSVC_DLL" >&6; }
54113     else
54114       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54115 $as_echo "incorrect, ignoring" >&6; }
54116       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54117 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54118     fi
54119   fi
54120 
54121   fi
54122 
54123   if test "x$MSVC_DLL" = x; then
54124     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54125     if test "x$VS100COMNTOOLS" != x; then
54126       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54127 
54128   windows_path="$CYGWIN_VS_TOOLS_DIR"
54129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54130     unix_path=`$CYGPATH -u "$windows_path"`
54131     CYGWIN_VS_TOOLS_DIR="$unix_path"
54132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54134     CYGWIN_VS_TOOLS_DIR="$unix_path"
54135   fi
54136 
54137       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54138         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54139             | $GREP -i /x64/ | $HEAD --lines 1`
54140       else
54141         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54142             | $GREP -i /x86/ | $HEAD --lines 1`
54143       fi
54144 
54145   DLL_NAME="$DLL_NAME"
54146   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54147   METHOD="search of VS100COMNTOOLS"
54148   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54149     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54150 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54151 
54152     # Need to check if the found msvcr is correct architecture
54153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54154 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54155     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54156     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54157       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54158       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54159       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54160         CORRECT_MSVCR_ARCH="PE32 executable"
54161       else
54162         CORRECT_MSVCR_ARCH="PE32+ executable"
54163       fi
54164     else
54165       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54166         CORRECT_MSVCR_ARCH=386
54167       else
54168         CORRECT_MSVCR_ARCH=x86-64
54169       fi
54170     fi
54171     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54172       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54173 $as_echo "ok" >&6; }
54174       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54175 
54176   # Only process if variable expands to non-empty
54177 
54178   if test "x$MSVC_DLL" != x; then
54179     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54180 
54181   # Input might be given as Windows format, start by converting to
54182   # unix format.
54183   path="$MSVC_DLL"
54184   new_path=`$CYGPATH -u "$path"`
54185 
54186   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54187   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54188   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54189   # "foo.exe" is OK but "foo" is an error.
54190   #
54191   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54192   # It is also a way to make sure we got the proper file name for the real test later on.
54193   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54194   if test "x$test_shortpath" = x; then
54195     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54196 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54197     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54198   fi
54199 
54200   # Call helper function which possibly converts this using DOS-style short mode.
54201   # If so, the updated path is stored in $new_path.
54202 
54203   input_path="$new_path"
54204   # Check if we need to convert this using DOS-style short mode. If the path
54205   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54206   # take no chances and rewrite it.
54207   # Note: m4 eats our [], so we need to use [ and ] instead.
54208   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54209   if test "x$has_forbidden_chars" != x; then
54210     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54211     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54212     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54213     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54214       # Going to short mode and back again did indeed matter. Since short mode is
54215       # case insensitive, let's make it lowercase to improve readability.
54216       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54217       # Now convert it back to Unix-style (cygpath)
54218       input_path=`$CYGPATH -u "$shortmode_path"`
54219       new_path="$input_path"
54220     fi
54221   fi
54222 
54223   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54224   if test "x$test_cygdrive_prefix" = x; then
54225     # As a simple fix, exclude /usr/bin since it's not a real path.
54226     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54227       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54228       # a path prefixed by /cygdrive for fixpath to work.
54229       new_path="$CYGWIN_ROOT_PATH$input_path"
54230     fi
54231   fi
54232 
54233 
54234   if test "x$path" != "x$new_path"; then
54235     MSVC_DLL="$new_path"
54236     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54237 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54238   fi
54239 
54240     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54241 
54242   path="$MSVC_DLL"
54243   has_colon=`$ECHO $path | $GREP ^.:`
54244   new_path="$path"
54245   if test "x$has_colon" = x; then
54246     # Not in mixed or Windows style, start by that.
54247     new_path=`cmd //c echo $path`
54248   fi
54249 
54250 
54251   input_path="$new_path"
54252   # Check if we need to convert this using DOS-style short mode. If the path
54253   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54254   # take no chances and rewrite it.
54255   # Note: m4 eats our [], so we need to use [ and ] instead.
54256   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54257   if test "x$has_forbidden_chars" != x; then
54258     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54259     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54260   fi
54261 
54262 
54263   windows_path="$new_path"
54264   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54265     unix_path=`$CYGPATH -u "$windows_path"`
54266     new_path="$unix_path"
54267   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54268     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54269     new_path="$unix_path"
54270   fi
54271 
54272   if test "x$path" != "x$new_path"; then
54273     MSVC_DLL="$new_path"
54274     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54275 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54276   fi
54277 
54278   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54279   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54280 
54281     else
54282       # We're on a unix platform. Hooray! :)
54283       path="$MSVC_DLL"
54284       has_space=`$ECHO "$path" | $GREP " "`
54285       if test "x$has_space" != x; then
54286         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54287 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54288         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54289       fi
54290 
54291       # Use eval to expand a potential ~
54292       eval path="$path"
54293       if test ! -f "$path" && test ! -d "$path"; then
54294         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54295       fi
54296 
54297       if test -d "$path"; then
54298         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54299       else
54300         dir="`$DIRNAME "$path"`"
54301         base="`$BASENAME "$path"`"
54302         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54303       fi
54304     fi
54305   fi
54306 
54307       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54308 $as_echo_n "checking for $DLL_NAME... " >&6; }
54309       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54310 $as_echo "$MSVC_DLL" >&6; }
54311     else
54312       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54313 $as_echo "incorrect, ignoring" >&6; }
54314       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54315 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54316     fi
54317   fi
54318 
54319     fi
54320   fi
54321 
54322   if test "x$MSVC_DLL" = x; then
54323     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54324     # (This was the original behaviour; kept since it might turn something up)
54325     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54326       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54327         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54328             | $GREP x64 | $HEAD --lines 1`
54329       else
54330         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54331             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54332         if test "x$POSSIBLE_MSVC_DLL" = x; then
54333           # We're grasping at straws now...
54334           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54335               | $HEAD --lines 1`
54336         fi
54337       fi
54338 
54339 
54340   DLL_NAME="$DLL_NAME"
54341   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54342   METHOD="search of VCINSTALLDIR"
54343   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54344     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54345 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54346 
54347     # Need to check if the found msvcr is correct architecture
54348     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54349 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54350     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54351     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54352       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54353       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54354       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54355         CORRECT_MSVCR_ARCH="PE32 executable"
54356       else
54357         CORRECT_MSVCR_ARCH="PE32+ executable"
54358       fi
54359     else
54360       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54361         CORRECT_MSVCR_ARCH=386
54362       else
54363         CORRECT_MSVCR_ARCH=x86-64
54364       fi
54365     fi
54366     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54367       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54368 $as_echo "ok" >&6; }
54369       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54370 
54371   # Only process if variable expands to non-empty
54372 
54373   if test "x$MSVC_DLL" != x; then
54374     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54375 
54376   # Input might be given as Windows format, start by converting to
54377   # unix format.
54378   path="$MSVC_DLL"
54379   new_path=`$CYGPATH -u "$path"`
54380 
54381   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54382   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54383   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54384   # "foo.exe" is OK but "foo" is an error.
54385   #
54386   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54387   # It is also a way to make sure we got the proper file name for the real test later on.
54388   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54389   if test "x$test_shortpath" = x; then
54390     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54391 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54392     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54393   fi
54394 
54395   # Call helper function which possibly converts this using DOS-style short mode.
54396   # If so, the updated path is stored in $new_path.
54397 
54398   input_path="$new_path"
54399   # Check if we need to convert this using DOS-style short mode. If the path
54400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54401   # take no chances and rewrite it.
54402   # Note: m4 eats our [], so we need to use [ and ] instead.
54403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54404   if test "x$has_forbidden_chars" != x; then
54405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54406     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54407     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54408     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54409       # Going to short mode and back again did indeed matter. Since short mode is
54410       # case insensitive, let's make it lowercase to improve readability.
54411       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54412       # Now convert it back to Unix-style (cygpath)
54413       input_path=`$CYGPATH -u "$shortmode_path"`
54414       new_path="$input_path"
54415     fi
54416   fi
54417 
54418   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54419   if test "x$test_cygdrive_prefix" = x; then
54420     # As a simple fix, exclude /usr/bin since it's not a real path.
54421     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54422       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54423       # a path prefixed by /cygdrive for fixpath to work.
54424       new_path="$CYGWIN_ROOT_PATH$input_path"
54425     fi
54426   fi
54427 
54428 
54429   if test "x$path" != "x$new_path"; then
54430     MSVC_DLL="$new_path"
54431     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54432 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54433   fi
54434 
54435     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54436 
54437   path="$MSVC_DLL"
54438   has_colon=`$ECHO $path | $GREP ^.:`
54439   new_path="$path"
54440   if test "x$has_colon" = x; then
54441     # Not in mixed or Windows style, start by that.
54442     new_path=`cmd //c echo $path`
54443   fi
54444 
54445 
54446   input_path="$new_path"
54447   # Check if we need to convert this using DOS-style short mode. If the path
54448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54449   # take no chances and rewrite it.
54450   # Note: m4 eats our [], so we need to use [ and ] instead.
54451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54452   if test "x$has_forbidden_chars" != x; then
54453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54454     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54455   fi
54456 
54457 
54458   windows_path="$new_path"
54459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54460     unix_path=`$CYGPATH -u "$windows_path"`
54461     new_path="$unix_path"
54462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54464     new_path="$unix_path"
54465   fi
54466 
54467   if test "x$path" != "x$new_path"; then
54468     MSVC_DLL="$new_path"
54469     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54470 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54471   fi
54472 
54473   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54474   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54475 
54476     else
54477       # We're on a unix platform. Hooray! :)
54478       path="$MSVC_DLL"
54479       has_space=`$ECHO "$path" | $GREP " "`
54480       if test "x$has_space" != x; then
54481         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54482 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54483         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54484       fi
54485 
54486       # Use eval to expand a potential ~
54487       eval path="$path"
54488       if test ! -f "$path" && test ! -d "$path"; then
54489         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54490       fi
54491 
54492       if test -d "$path"; then
54493         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54494       else
54495         dir="`$DIRNAME "$path"`"
54496         base="`$BASENAME "$path"`"
54497         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54498       fi
54499     fi
54500   fi
54501 
54502       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54503 $as_echo_n "checking for $DLL_NAME... " >&6; }
54504       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54505 $as_echo "$MSVC_DLL" >&6; }
54506     else
54507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54508 $as_echo "incorrect, ignoring" >&6; }
54509       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54510 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54511     fi
54512   fi
54513 
54514     fi
54515   fi
54516 
54517   if test "x$MSVC_DLL" = x; then
54518     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54519 $as_echo_n "checking for $DLL_NAME... " >&6; }
54520     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54521 $as_echo "no" >&6; }
54522     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54523   fi
54524 
54525     MSVCR_DLL="$MSVC_DLL"
54526   fi
54527 
54528 
54529 
54530 # Check whether --with-msvcp-dll was given.
54531 if test "${with_msvcp_dll+set}" = set; then :
54532   withval=$with_msvcp_dll;
54533 fi
54534 
54535 
54536   if test "x$MSVCP_NAME" != "x"; then
54537     if test "x$with_msvcp_dll" != x; then
54538       # If given explicitely by user, do not probe. If not present, fail directly.
54539 
54540   DLL_NAME="$MSVCP_NAME"
54541   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54542   METHOD="--with-msvcp-dll"
54543   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54544     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54545 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54546 
54547     # Need to check if the found msvcr is correct architecture
54548     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54549 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54550     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54551     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54552       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54553       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54554       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54555         CORRECT_MSVCR_ARCH="PE32 executable"
54556       else
54557         CORRECT_MSVCR_ARCH="PE32+ executable"
54558       fi
54559     else
54560       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54561         CORRECT_MSVCR_ARCH=386
54562       else
54563         CORRECT_MSVCR_ARCH=x86-64
54564       fi
54565     fi
54566     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54568 $as_echo "ok" >&6; }
54569       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54570 
54571   # Only process if variable expands to non-empty
54572 
54573   if test "x$MSVC_DLL" != x; then
54574     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54575 
54576   # Input might be given as Windows format, start by converting to
54577   # unix format.
54578   path="$MSVC_DLL"
54579   new_path=`$CYGPATH -u "$path"`
54580 
54581   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54582   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54583   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54584   # "foo.exe" is OK but "foo" is an error.
54585   #
54586   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54587   # It is also a way to make sure we got the proper file name for the real test later on.
54588   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54589   if test "x$test_shortpath" = x; then
54590     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54591 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54592     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54593   fi
54594 
54595   # Call helper function which possibly converts this using DOS-style short mode.
54596   # If so, the updated path is stored in $new_path.
54597 
54598   input_path="$new_path"
54599   # Check if we need to convert this using DOS-style short mode. If the path
54600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54601   # take no chances and rewrite it.
54602   # Note: m4 eats our [], so we need to use [ and ] instead.
54603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54604   if test "x$has_forbidden_chars" != x; then
54605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54606     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54607     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54608     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54609       # Going to short mode and back again did indeed matter. Since short mode is
54610       # case insensitive, let's make it lowercase to improve readability.
54611       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54612       # Now convert it back to Unix-style (cygpath)
54613       input_path=`$CYGPATH -u "$shortmode_path"`
54614       new_path="$input_path"
54615     fi
54616   fi
54617 
54618   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54619   if test "x$test_cygdrive_prefix" = x; then
54620     # As a simple fix, exclude /usr/bin since it's not a real path.
54621     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54622       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54623       # a path prefixed by /cygdrive for fixpath to work.
54624       new_path="$CYGWIN_ROOT_PATH$input_path"
54625     fi
54626   fi
54627 
54628 
54629   if test "x$path" != "x$new_path"; then
54630     MSVC_DLL="$new_path"
54631     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54632 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54633   fi
54634 
54635     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54636 
54637   path="$MSVC_DLL"
54638   has_colon=`$ECHO $path | $GREP ^.:`
54639   new_path="$path"
54640   if test "x$has_colon" = x; then
54641     # Not in mixed or Windows style, start by that.
54642     new_path=`cmd //c echo $path`
54643   fi
54644 
54645 
54646   input_path="$new_path"
54647   # Check if we need to convert this using DOS-style short mode. If the path
54648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54649   # take no chances and rewrite it.
54650   # Note: m4 eats our [], so we need to use [ and ] instead.
54651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54652   if test "x$has_forbidden_chars" != x; then
54653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54654     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54655   fi
54656 
54657 
54658   windows_path="$new_path"
54659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54660     unix_path=`$CYGPATH -u "$windows_path"`
54661     new_path="$unix_path"
54662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54664     new_path="$unix_path"
54665   fi
54666 
54667   if test "x$path" != "x$new_path"; then
54668     MSVC_DLL="$new_path"
54669     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54670 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54671   fi
54672 
54673   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54674   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54675 
54676     else
54677       # We're on a unix platform. Hooray! :)
54678       path="$MSVC_DLL"
54679       has_space=`$ECHO "$path" | $GREP " "`
54680       if test "x$has_space" != x; then
54681         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54682 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54683         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54684       fi
54685 
54686       # Use eval to expand a potential ~
54687       eval path="$path"
54688       if test ! -f "$path" && test ! -d "$path"; then
54689         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54690       fi
54691 
54692       if test -d "$path"; then
54693         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54694       else
54695         dir="`$DIRNAME "$path"`"
54696         base="`$BASENAME "$path"`"
54697         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54698       fi
54699     fi
54700   fi
54701 
54702       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54703 $as_echo_n "checking for $DLL_NAME... " >&6; }
54704       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54705 $as_echo "$MSVC_DLL" >&6; }
54706     else
54707       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54708 $as_echo "incorrect, ignoring" >&6; }
54709       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54710 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54711     fi
54712   fi
54713 
54714       if test "x$MSVC_DLL" = x; then
54715         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54716       fi
54717       MSVCP_DLL="$MSVC_DLL"
54718     elif test "x$DEVKIT_MSVCP_DLL" != x; then
54719 
54720   DLL_NAME="$MSVCP_NAME"
54721   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54722   METHOD="devkit"
54723   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54724     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54725 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54726 
54727     # Need to check if the found msvcr is correct architecture
54728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54729 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54730     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54731     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54732       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54733       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54734       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54735         CORRECT_MSVCR_ARCH="PE32 executable"
54736       else
54737         CORRECT_MSVCR_ARCH="PE32+ executable"
54738       fi
54739     else
54740       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54741         CORRECT_MSVCR_ARCH=386
54742       else
54743         CORRECT_MSVCR_ARCH=x86-64
54744       fi
54745     fi
54746     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54747       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54748 $as_echo "ok" >&6; }
54749       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54750 
54751   # Only process if variable expands to non-empty
54752 
54753   if test "x$MSVC_DLL" != x; then
54754     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54755 
54756   # Input might be given as Windows format, start by converting to
54757   # unix format.
54758   path="$MSVC_DLL"
54759   new_path=`$CYGPATH -u "$path"`
54760 
54761   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54762   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54763   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54764   # "foo.exe" is OK but "foo" is an error.
54765   #
54766   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54767   # It is also a way to make sure we got the proper file name for the real test later on.
54768   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54769   if test "x$test_shortpath" = x; then
54770     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54771 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54772     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54773   fi
54774 
54775   # Call helper function which possibly converts this using DOS-style short mode.
54776   # If so, the updated path is stored in $new_path.
54777 
54778   input_path="$new_path"
54779   # Check if we need to convert this using DOS-style short mode. If the path
54780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54781   # take no chances and rewrite it.
54782   # Note: m4 eats our [], so we need to use [ and ] instead.
54783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54784   if test "x$has_forbidden_chars" != x; then
54785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54789       # Going to short mode and back again did indeed matter. Since short mode is
54790       # case insensitive, let's make it lowercase to improve readability.
54791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54792       # Now convert it back to Unix-style (cygpath)
54793       input_path=`$CYGPATH -u "$shortmode_path"`
54794       new_path="$input_path"
54795     fi
54796   fi
54797 
54798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54799   if test "x$test_cygdrive_prefix" = x; then
54800     # As a simple fix, exclude /usr/bin since it's not a real path.
54801     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54803       # a path prefixed by /cygdrive for fixpath to work.
54804       new_path="$CYGWIN_ROOT_PATH$input_path"
54805     fi
54806   fi
54807 
54808 
54809   if test "x$path" != "x$new_path"; then
54810     MSVC_DLL="$new_path"
54811     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54812 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54813   fi
54814 
54815     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54816 
54817   path="$MSVC_DLL"
54818   has_colon=`$ECHO $path | $GREP ^.:`
54819   new_path="$path"
54820   if test "x$has_colon" = x; then
54821     # Not in mixed or Windows style, start by that.
54822     new_path=`cmd //c echo $path`
54823   fi
54824 
54825 
54826   input_path="$new_path"
54827   # Check if we need to convert this using DOS-style short mode. If the path
54828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54829   # take no chances and rewrite it.
54830   # Note: m4 eats our [], so we need to use [ and ] instead.
54831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54832   if test "x$has_forbidden_chars" != x; then
54833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54835   fi
54836 
54837 
54838   windows_path="$new_path"
54839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54840     unix_path=`$CYGPATH -u "$windows_path"`
54841     new_path="$unix_path"
54842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54844     new_path="$unix_path"
54845   fi
54846 
54847   if test "x$path" != "x$new_path"; then
54848     MSVC_DLL="$new_path"
54849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54850 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54851   fi
54852 
54853   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54854   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54855 
54856     else
54857       # We're on a unix platform. Hooray! :)
54858       path="$MSVC_DLL"
54859       has_space=`$ECHO "$path" | $GREP " "`
54860       if test "x$has_space" != x; then
54861         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54862 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54863         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54864       fi
54865 
54866       # Use eval to expand a potential ~
54867       eval path="$path"
54868       if test ! -f "$path" && test ! -d "$path"; then
54869         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54870       fi
54871 
54872       if test -d "$path"; then
54873         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54874       else
54875         dir="`$DIRNAME "$path"`"
54876         base="`$BASENAME "$path"`"
54877         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54878       fi
54879     fi
54880   fi
54881 
54882       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54883 $as_echo_n "checking for $DLL_NAME... " >&6; }
54884       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54885 $as_echo "$MSVC_DLL" >&6; }
54886     else
54887       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54888 $as_echo "incorrect, ignoring" >&6; }
54889       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54890 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54891     fi
54892   fi
54893 
54894       if test "x$MSVC_DLL" = x; then
54895         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54896       fi
54897       MSVCP_DLL="$MSVC_DLL"
54898     else
54899 
54900   DLL_NAME="${MSVCP_NAME}"
54901   MSVC_DLL=
54902 
54903   if test "x$MSVC_DLL" = x; then
54904     # Probe: Using well-known location from Visual Studio 10.0
54905     if test "x$VCINSTALLDIR" != x; then
54906       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54907 
54908   windows_path="$CYGWIN_VC_INSTALL_DIR"
54909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54910     unix_path=`$CYGPATH -u "$windows_path"`
54911     CYGWIN_VC_INSTALL_DIR="$unix_path"
54912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54914     CYGWIN_VC_INSTALL_DIR="$unix_path"
54915   fi
54916 
54917       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54918         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54919       else
54920         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54921       fi
54922       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54923 
54924   DLL_NAME="$DLL_NAME"
54925   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54926   METHOD="well-known location in VCINSTALLDIR"
54927   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54928     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54929 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54930 
54931     # Need to check if the found msvcr is correct architecture
54932     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54933 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54934     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54935     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54936       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54937       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54938       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54939         CORRECT_MSVCR_ARCH="PE32 executable"
54940       else
54941         CORRECT_MSVCR_ARCH="PE32+ executable"
54942       fi
54943     else
54944       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54945         CORRECT_MSVCR_ARCH=386
54946       else
54947         CORRECT_MSVCR_ARCH=x86-64
54948       fi
54949     fi
54950     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54951       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54952 $as_echo "ok" >&6; }
54953       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54954 
54955   # Only process if variable expands to non-empty
54956 
54957   if test "x$MSVC_DLL" != x; then
54958     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54959 
54960   # Input might be given as Windows format, start by converting to
54961   # unix format.
54962   path="$MSVC_DLL"
54963   new_path=`$CYGPATH -u "$path"`
54964 
54965   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54966   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54967   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54968   # "foo.exe" is OK but "foo" is an error.
54969   #
54970   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54971   # It is also a way to make sure we got the proper file name for the real test later on.
54972   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54973   if test "x$test_shortpath" = x; then
54974     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54975 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54976     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54977   fi
54978 
54979   # Call helper function which possibly converts this using DOS-style short mode.
54980   # If so, the updated path is stored in $new_path.
54981 
54982   input_path="$new_path"
54983   # Check if we need to convert this using DOS-style short mode. If the path
54984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54985   # take no chances and rewrite it.
54986   # Note: m4 eats our [], so we need to use [ and ] instead.
54987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54988   if test "x$has_forbidden_chars" != x; then
54989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54990     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54991     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54992     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54993       # Going to short mode and back again did indeed matter. Since short mode is
54994       # case insensitive, let's make it lowercase to improve readability.
54995       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54996       # Now convert it back to Unix-style (cygpath)
54997       input_path=`$CYGPATH -u "$shortmode_path"`
54998       new_path="$input_path"
54999     fi
55000   fi
55001 
55002   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55003   if test "x$test_cygdrive_prefix" = x; then
55004     # As a simple fix, exclude /usr/bin since it's not a real path.
55005     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55006       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55007       # a path prefixed by /cygdrive for fixpath to work.
55008       new_path="$CYGWIN_ROOT_PATH$input_path"
55009     fi
55010   fi
55011 
55012 
55013   if test "x$path" != "x$new_path"; then
55014     MSVC_DLL="$new_path"
55015     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55016 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55017   fi
55018 
55019     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55020 
55021   path="$MSVC_DLL"
55022   has_colon=`$ECHO $path | $GREP ^.:`
55023   new_path="$path"
55024   if test "x$has_colon" = x; then
55025     # Not in mixed or Windows style, start by that.
55026     new_path=`cmd //c echo $path`
55027   fi
55028 
55029 
55030   input_path="$new_path"
55031   # Check if we need to convert this using DOS-style short mode. If the path
55032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55033   # take no chances and rewrite it.
55034   # Note: m4 eats our [], so we need to use [ and ] instead.
55035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55036   if test "x$has_forbidden_chars" != x; then
55037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55038     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55039   fi
55040 
55041 
55042   windows_path="$new_path"
55043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55044     unix_path=`$CYGPATH -u "$windows_path"`
55045     new_path="$unix_path"
55046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55048     new_path="$unix_path"
55049   fi
55050 
55051   if test "x$path" != "x$new_path"; then
55052     MSVC_DLL="$new_path"
55053     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55054 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55055   fi
55056 
55057   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55058   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55059 
55060     else
55061       # We're on a unix platform. Hooray! :)
55062       path="$MSVC_DLL"
55063       has_space=`$ECHO "$path" | $GREP " "`
55064       if test "x$has_space" != x; then
55065         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55066 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55067         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55068       fi
55069 
55070       # Use eval to expand a potential ~
55071       eval path="$path"
55072       if test ! -f "$path" && test ! -d "$path"; then
55073         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55074       fi
55075 
55076       if test -d "$path"; then
55077         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55078       else
55079         dir="`$DIRNAME "$path"`"
55080         base="`$BASENAME "$path"`"
55081         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55082       fi
55083     fi
55084   fi
55085 
55086       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55087 $as_echo_n "checking for $DLL_NAME... " >&6; }
55088       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55089 $as_echo "$MSVC_DLL" >&6; }
55090     else
55091       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55092 $as_echo "incorrect, ignoring" >&6; }
55093       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55094 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55095     fi
55096   fi
55097 
55098     fi
55099   fi
55100 
55101   if test "x$MSVC_DLL" = x; then
55102     # Probe: Check in the Boot JDK directory.
55103     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55104 
55105   DLL_NAME="$DLL_NAME"
55106   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55107   METHOD="well-known location in Boot JDK"
55108   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55109     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55110 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55111 
55112     # Need to check if the found msvcr is correct architecture
55113     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55114 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55115     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55116     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55117       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55118       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55119       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55120         CORRECT_MSVCR_ARCH="PE32 executable"
55121       else
55122         CORRECT_MSVCR_ARCH="PE32+ executable"
55123       fi
55124     else
55125       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55126         CORRECT_MSVCR_ARCH=386
55127       else
55128         CORRECT_MSVCR_ARCH=x86-64
55129       fi
55130     fi
55131     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55132       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55133 $as_echo "ok" >&6; }
55134       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55135 
55136   # Only process if variable expands to non-empty
55137 
55138   if test "x$MSVC_DLL" != x; then
55139     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55140 
55141   # Input might be given as Windows format, start by converting to
55142   # unix format.
55143   path="$MSVC_DLL"
55144   new_path=`$CYGPATH -u "$path"`
55145 
55146   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55147   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55148   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55149   # "foo.exe" is OK but "foo" is an error.
55150   #
55151   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55152   # It is also a way to make sure we got the proper file name for the real test later on.
55153   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55154   if test "x$test_shortpath" = x; then
55155     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55156 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55157     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55158   fi
55159 
55160   # Call helper function which possibly converts this using DOS-style short mode.
55161   # If so, the updated path is stored in $new_path.
55162 
55163   input_path="$new_path"
55164   # Check if we need to convert this using DOS-style short mode. If the path
55165   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55166   # take no chances and rewrite it.
55167   # Note: m4 eats our [], so we need to use [ and ] instead.
55168   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55169   if test "x$has_forbidden_chars" != x; then
55170     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55171     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55172     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55173     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55174       # Going to short mode and back again did indeed matter. Since short mode is
55175       # case insensitive, let's make it lowercase to improve readability.
55176       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55177       # Now convert it back to Unix-style (cygpath)
55178       input_path=`$CYGPATH -u "$shortmode_path"`
55179       new_path="$input_path"
55180     fi
55181   fi
55182 
55183   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55184   if test "x$test_cygdrive_prefix" = x; then
55185     # As a simple fix, exclude /usr/bin since it's not a real path.
55186     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55187       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55188       # a path prefixed by /cygdrive for fixpath to work.
55189       new_path="$CYGWIN_ROOT_PATH$input_path"
55190     fi
55191   fi
55192 
55193 
55194   if test "x$path" != "x$new_path"; then
55195     MSVC_DLL="$new_path"
55196     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55197 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55198   fi
55199 
55200     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55201 
55202   path="$MSVC_DLL"
55203   has_colon=`$ECHO $path | $GREP ^.:`
55204   new_path="$path"
55205   if test "x$has_colon" = x; then
55206     # Not in mixed or Windows style, start by that.
55207     new_path=`cmd //c echo $path`
55208   fi
55209 
55210 
55211   input_path="$new_path"
55212   # Check if we need to convert this using DOS-style short mode. If the path
55213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55214   # take no chances and rewrite it.
55215   # Note: m4 eats our [], so we need to use [ and ] instead.
55216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55217   if test "x$has_forbidden_chars" != x; then
55218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55219     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55220   fi
55221 
55222 
55223   windows_path="$new_path"
55224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55225     unix_path=`$CYGPATH -u "$windows_path"`
55226     new_path="$unix_path"
55227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55229     new_path="$unix_path"
55230   fi
55231 
55232   if test "x$path" != "x$new_path"; then
55233     MSVC_DLL="$new_path"
55234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55235 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55236   fi
55237 
55238   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55239   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55240 
55241     else
55242       # We're on a unix platform. Hooray! :)
55243       path="$MSVC_DLL"
55244       has_space=`$ECHO "$path" | $GREP " "`
55245       if test "x$has_space" != x; then
55246         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55247 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55248         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55249       fi
55250 
55251       # Use eval to expand a potential ~
55252       eval path="$path"
55253       if test ! -f "$path" && test ! -d "$path"; then
55254         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55255       fi
55256 
55257       if test -d "$path"; then
55258         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55259       else
55260         dir="`$DIRNAME "$path"`"
55261         base="`$BASENAME "$path"`"
55262         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55263       fi
55264     fi
55265   fi
55266 
55267       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55268 $as_echo_n "checking for $DLL_NAME... " >&6; }
55269       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55270 $as_echo "$MSVC_DLL" >&6; }
55271     else
55272       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55273 $as_echo "incorrect, ignoring" >&6; }
55274       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55275 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55276     fi
55277   fi
55278 
55279   fi
55280 
55281   if test "x$MSVC_DLL" = x; then
55282     # Probe: Look in the Windows system32 directory
55283     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55284 
55285   windows_path="$CYGWIN_SYSTEMROOT"
55286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55287     unix_path=`$CYGPATH -u "$windows_path"`
55288     CYGWIN_SYSTEMROOT="$unix_path"
55289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55291     CYGWIN_SYSTEMROOT="$unix_path"
55292   fi
55293 
55294     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55295 
55296   DLL_NAME="$DLL_NAME"
55297   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55298   METHOD="well-known location in SYSTEMROOT"
55299   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55300     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55301 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55302 
55303     # Need to check if the found msvcr is correct architecture
55304     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55305 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55306     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55307     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55308       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55309       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55310       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55311         CORRECT_MSVCR_ARCH="PE32 executable"
55312       else
55313         CORRECT_MSVCR_ARCH="PE32+ executable"
55314       fi
55315     else
55316       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55317         CORRECT_MSVCR_ARCH=386
55318       else
55319         CORRECT_MSVCR_ARCH=x86-64
55320       fi
55321     fi
55322     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55323       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55324 $as_echo "ok" >&6; }
55325       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55326 
55327   # Only process if variable expands to non-empty
55328 
55329   if test "x$MSVC_DLL" != x; then
55330     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55331 
55332   # Input might be given as Windows format, start by converting to
55333   # unix format.
55334   path="$MSVC_DLL"
55335   new_path=`$CYGPATH -u "$path"`
55336 
55337   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55338   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55339   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55340   # "foo.exe" is OK but "foo" is an error.
55341   #
55342   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55343   # It is also a way to make sure we got the proper file name for the real test later on.
55344   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55345   if test "x$test_shortpath" = x; then
55346     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55347 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55348     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55349   fi
55350 
55351   # Call helper function which possibly converts this using DOS-style short mode.
55352   # If so, the updated path is stored in $new_path.
55353 
55354   input_path="$new_path"
55355   # Check if we need to convert this using DOS-style short mode. If the path
55356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55357   # take no chances and rewrite it.
55358   # Note: m4 eats our [], so we need to use [ and ] instead.
55359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55360   if test "x$has_forbidden_chars" != x; then
55361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55365       # Going to short mode and back again did indeed matter. Since short mode is
55366       # case insensitive, let's make it lowercase to improve readability.
55367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55368       # Now convert it back to Unix-style (cygpath)
55369       input_path=`$CYGPATH -u "$shortmode_path"`
55370       new_path="$input_path"
55371     fi
55372   fi
55373 
55374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55375   if test "x$test_cygdrive_prefix" = x; then
55376     # As a simple fix, exclude /usr/bin since it's not a real path.
55377     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55379       # a path prefixed by /cygdrive for fixpath to work.
55380       new_path="$CYGWIN_ROOT_PATH$input_path"
55381     fi
55382   fi
55383 
55384 
55385   if test "x$path" != "x$new_path"; then
55386     MSVC_DLL="$new_path"
55387     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55388 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55389   fi
55390 
55391     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55392 
55393   path="$MSVC_DLL"
55394   has_colon=`$ECHO $path | $GREP ^.:`
55395   new_path="$path"
55396   if test "x$has_colon" = x; then
55397     # Not in mixed or Windows style, start by that.
55398     new_path=`cmd //c echo $path`
55399   fi
55400 
55401 
55402   input_path="$new_path"
55403   # Check if we need to convert this using DOS-style short mode. If the path
55404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55405   # take no chances and rewrite it.
55406   # Note: m4 eats our [], so we need to use [ and ] instead.
55407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55408   if test "x$has_forbidden_chars" != x; then
55409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55410     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55411   fi
55412 
55413 
55414   windows_path="$new_path"
55415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55416     unix_path=`$CYGPATH -u "$windows_path"`
55417     new_path="$unix_path"
55418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55420     new_path="$unix_path"
55421   fi
55422 
55423   if test "x$path" != "x$new_path"; then
55424     MSVC_DLL="$new_path"
55425     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55426 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55427   fi
55428 
55429   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55430   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55431 
55432     else
55433       # We're on a unix platform. Hooray! :)
55434       path="$MSVC_DLL"
55435       has_space=`$ECHO "$path" | $GREP " "`
55436       if test "x$has_space" != x; then
55437         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55438 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55439         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55440       fi
55441 
55442       # Use eval to expand a potential ~
55443       eval path="$path"
55444       if test ! -f "$path" && test ! -d "$path"; then
55445         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55446       fi
55447 
55448       if test -d "$path"; then
55449         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55450       else
55451         dir="`$DIRNAME "$path"`"
55452         base="`$BASENAME "$path"`"
55453         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55454       fi
55455     fi
55456   fi
55457 
55458       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55459 $as_echo_n "checking for $DLL_NAME... " >&6; }
55460       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55461 $as_echo "$MSVC_DLL" >&6; }
55462     else
55463       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55464 $as_echo "incorrect, ignoring" >&6; }
55465       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55466 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55467     fi
55468   fi
55469 
55470   fi
55471 
55472   if test "x$MSVC_DLL" = x; then
55473     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55474     if test "x$VS100COMNTOOLS" != x; then
55475       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55476 
55477   windows_path="$CYGWIN_VS_TOOLS_DIR"
55478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55479     unix_path=`$CYGPATH -u "$windows_path"`
55480     CYGWIN_VS_TOOLS_DIR="$unix_path"
55481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55482     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55483     CYGWIN_VS_TOOLS_DIR="$unix_path"
55484   fi
55485 
55486       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55487         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55488             | $GREP -i /x64/ | $HEAD --lines 1`
55489       else
55490         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55491             | $GREP -i /x86/ | $HEAD --lines 1`
55492       fi
55493 
55494   DLL_NAME="$DLL_NAME"
55495   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55496   METHOD="search of VS100COMNTOOLS"
55497   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55498     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55499 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55500 
55501     # Need to check if the found msvcr is correct architecture
55502     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55503 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55504     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55505     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55506       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55507       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55508       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55509         CORRECT_MSVCR_ARCH="PE32 executable"
55510       else
55511         CORRECT_MSVCR_ARCH="PE32+ executable"
55512       fi
55513     else
55514       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55515         CORRECT_MSVCR_ARCH=386
55516       else
55517         CORRECT_MSVCR_ARCH=x86-64
55518       fi
55519     fi
55520     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55521       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55522 $as_echo "ok" >&6; }
55523       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55524 
55525   # Only process if variable expands to non-empty
55526 
55527   if test "x$MSVC_DLL" != x; then
55528     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55529 
55530   # Input might be given as Windows format, start by converting to
55531   # unix format.
55532   path="$MSVC_DLL"
55533   new_path=`$CYGPATH -u "$path"`
55534 
55535   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55536   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55537   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55538   # "foo.exe" is OK but "foo" is an error.
55539   #
55540   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55541   # It is also a way to make sure we got the proper file name for the real test later on.
55542   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55543   if test "x$test_shortpath" = x; then
55544     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55545 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55546     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55547   fi
55548 
55549   # Call helper function which possibly converts this using DOS-style short mode.
55550   # If so, the updated path is stored in $new_path.
55551 
55552   input_path="$new_path"
55553   # Check if we need to convert this using DOS-style short mode. If the path
55554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55555   # take no chances and rewrite it.
55556   # Note: m4 eats our [], so we need to use [ and ] instead.
55557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55558   if test "x$has_forbidden_chars" != x; then
55559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55560     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55561     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55562     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55563       # Going to short mode and back again did indeed matter. Since short mode is
55564       # case insensitive, let's make it lowercase to improve readability.
55565       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55566       # Now convert it back to Unix-style (cygpath)
55567       input_path=`$CYGPATH -u "$shortmode_path"`
55568       new_path="$input_path"
55569     fi
55570   fi
55571 
55572   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55573   if test "x$test_cygdrive_prefix" = x; then
55574     # As a simple fix, exclude /usr/bin since it's not a real path.
55575     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55576       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55577       # a path prefixed by /cygdrive for fixpath to work.
55578       new_path="$CYGWIN_ROOT_PATH$input_path"
55579     fi
55580   fi
55581 
55582 
55583   if test "x$path" != "x$new_path"; then
55584     MSVC_DLL="$new_path"
55585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55586 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55587   fi
55588 
55589     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55590 
55591   path="$MSVC_DLL"
55592   has_colon=`$ECHO $path | $GREP ^.:`
55593   new_path="$path"
55594   if test "x$has_colon" = x; then
55595     # Not in mixed or Windows style, start by that.
55596     new_path=`cmd //c echo $path`
55597   fi
55598 
55599 
55600   input_path="$new_path"
55601   # Check if we need to convert this using DOS-style short mode. If the path
55602   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55603   # take no chances and rewrite it.
55604   # Note: m4 eats our [], so we need to use [ and ] instead.
55605   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55606   if test "x$has_forbidden_chars" != x; then
55607     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55608     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55609   fi
55610 
55611 
55612   windows_path="$new_path"
55613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55614     unix_path=`$CYGPATH -u "$windows_path"`
55615     new_path="$unix_path"
55616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55618     new_path="$unix_path"
55619   fi
55620 
55621   if test "x$path" != "x$new_path"; then
55622     MSVC_DLL="$new_path"
55623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55624 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55625   fi
55626 
55627   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55628   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55629 
55630     else
55631       # We're on a unix platform. Hooray! :)
55632       path="$MSVC_DLL"
55633       has_space=`$ECHO "$path" | $GREP " "`
55634       if test "x$has_space" != x; then
55635         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55636 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55637         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55638       fi
55639 
55640       # Use eval to expand a potential ~
55641       eval path="$path"
55642       if test ! -f "$path" && test ! -d "$path"; then
55643         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55644       fi
55645 
55646       if test -d "$path"; then
55647         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55648       else
55649         dir="`$DIRNAME "$path"`"
55650         base="`$BASENAME "$path"`"
55651         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55652       fi
55653     fi
55654   fi
55655 
55656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55657 $as_echo_n "checking for $DLL_NAME... " >&6; }
55658       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55659 $as_echo "$MSVC_DLL" >&6; }
55660     else
55661       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55662 $as_echo "incorrect, ignoring" >&6; }
55663       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55664 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55665     fi
55666   fi
55667 
55668     fi
55669   fi
55670 
55671   if test "x$MSVC_DLL" = x; then
55672     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55673     # (This was the original behaviour; kept since it might turn something up)
55674     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55675       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55676         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55677             | $GREP x64 | $HEAD --lines 1`
55678       else
55679         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55680             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55681         if test "x$POSSIBLE_MSVC_DLL" = x; then
55682           # We're grasping at straws now...
55683           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55684               | $HEAD --lines 1`
55685         fi
55686       fi
55687 
55688 
55689   DLL_NAME="$DLL_NAME"
55690   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55691   METHOD="search of VCINSTALLDIR"
55692   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55693     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55694 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55695 
55696     # Need to check if the found msvcr is correct architecture
55697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55698 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55699     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55700     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55701       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55702       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55703       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55704         CORRECT_MSVCR_ARCH="PE32 executable"
55705       else
55706         CORRECT_MSVCR_ARCH="PE32+ executable"
55707       fi
55708     else
55709       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55710         CORRECT_MSVCR_ARCH=386
55711       else
55712         CORRECT_MSVCR_ARCH=x86-64
55713       fi
55714     fi
55715     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55716       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55717 $as_echo "ok" >&6; }
55718       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55719 
55720   # Only process if variable expands to non-empty
55721 
55722   if test "x$MSVC_DLL" != x; then
55723     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55724 
55725   # Input might be given as Windows format, start by converting to
55726   # unix format.
55727   path="$MSVC_DLL"
55728   new_path=`$CYGPATH -u "$path"`
55729 
55730   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55731   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55732   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55733   # "foo.exe" is OK but "foo" is an error.
55734   #
55735   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55736   # It is also a way to make sure we got the proper file name for the real test later on.
55737   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55738   if test "x$test_shortpath" = x; then
55739     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55740 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55741     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55742   fi
55743 
55744   # Call helper function which possibly converts this using DOS-style short mode.
55745   # If so, the updated path is stored in $new_path.
55746 
55747   input_path="$new_path"
55748   # Check if we need to convert this using DOS-style short mode. If the path
55749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55750   # take no chances and rewrite it.
55751   # Note: m4 eats our [], so we need to use [ and ] instead.
55752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55753   if test "x$has_forbidden_chars" != x; then
55754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55755     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55756     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55757     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55758       # Going to short mode and back again did indeed matter. Since short mode is
55759       # case insensitive, let's make it lowercase to improve readability.
55760       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55761       # Now convert it back to Unix-style (cygpath)
55762       input_path=`$CYGPATH -u "$shortmode_path"`
55763       new_path="$input_path"
55764     fi
55765   fi
55766 
55767   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55768   if test "x$test_cygdrive_prefix" = x; then
55769     # As a simple fix, exclude /usr/bin since it's not a real path.
55770     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55771       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55772       # a path prefixed by /cygdrive for fixpath to work.
55773       new_path="$CYGWIN_ROOT_PATH$input_path"
55774     fi
55775   fi
55776 
55777 
55778   if test "x$path" != "x$new_path"; then
55779     MSVC_DLL="$new_path"
55780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55781 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55782   fi
55783 
55784     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55785 
55786   path="$MSVC_DLL"
55787   has_colon=`$ECHO $path | $GREP ^.:`
55788   new_path="$path"
55789   if test "x$has_colon" = x; then
55790     # Not in mixed or Windows style, start by that.
55791     new_path=`cmd //c echo $path`
55792   fi
55793 
55794 
55795   input_path="$new_path"
55796   # Check if we need to convert this using DOS-style short mode. If the path
55797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55798   # take no chances and rewrite it.
55799   # Note: m4 eats our [], so we need to use [ and ] instead.
55800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55801   if test "x$has_forbidden_chars" != x; then
55802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55803     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55804   fi
55805 
55806 
55807   windows_path="$new_path"
55808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55809     unix_path=`$CYGPATH -u "$windows_path"`
55810     new_path="$unix_path"
55811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55813     new_path="$unix_path"
55814   fi
55815 
55816   if test "x$path" != "x$new_path"; then
55817     MSVC_DLL="$new_path"
55818     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55819 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55820   fi
55821 
55822   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55823   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55824 
55825     else
55826       # We're on a unix platform. Hooray! :)
55827       path="$MSVC_DLL"
55828       has_space=`$ECHO "$path" | $GREP " "`
55829       if test "x$has_space" != x; then
55830         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55831 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55832         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55833       fi
55834 
55835       # Use eval to expand a potential ~
55836       eval path="$path"
55837       if test ! -f "$path" && test ! -d "$path"; then
55838         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55839       fi
55840 
55841       if test -d "$path"; then
55842         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55843       else
55844         dir="`$DIRNAME "$path"`"
55845         base="`$BASENAME "$path"`"
55846         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55847       fi
55848     fi
55849   fi
55850 
55851       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55852 $as_echo_n "checking for $DLL_NAME... " >&6; }
55853       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55854 $as_echo "$MSVC_DLL" >&6; }
55855     else
55856       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55857 $as_echo "incorrect, ignoring" >&6; }
55858       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55859 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55860     fi
55861   fi
55862 
55863     fi
55864   fi
55865 
55866   if test "x$MSVC_DLL" = x; then
55867     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55868 $as_echo_n "checking for $DLL_NAME... " >&6; }
55869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55870 $as_echo "no" >&6; }
55871     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55872   fi
55873 
55874       MSVCP_DLL="$MSVC_DLL"
55875     fi
55876 
55877   fi
55878 
55879   fi
55880 
55881 
55882   if test "x$NEEDS_LIB_X11" = xfalse; then
55883     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55884       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55885 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55886     fi
55887     X_CFLAGS=
55888     X_LIBS=
55889   else
55890 
55891     if test "x${with_x}" = xno; then
55892       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55893     fi
55894 
55895     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55896       # The user has specified a X11 base directory. Use it for includes and
55897       # libraries, unless explicitely overridden.
55898       if test "x$x_includes" = xNONE; then
55899         x_includes="${with_x}/include"
55900       fi
55901       if test "x$x_libraries" = xNONE; then
55902         x_libraries="${with_x}/lib"
55903       fi
55904     else
55905       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55906       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55907       # --x-libraries for the sysroot, if that seems to be correct.
55908       if test "x$SYSROOT" != "x"; then
55909         if test "x$x_includes" = xNONE; then
55910           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55911             x_includes="$SYSROOT/usr/X11R6/include"
55912           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55913             x_includes="$SYSROOT/usr/include"
55914           fi
55915         fi
55916         if test "x$x_libraries" = xNONE; then
55917           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55918             x_libraries="$SYSROOT/usr/X11R6/lib"
55919           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55920             x_libraries="$SYSROOT/usr/lib64"
55921           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55922             x_libraries="$SYSROOT/usr/lib"
55923           fi
55924         fi
55925       fi
55926     fi
55927 
55928     # Now let autoconf do it's magic
55929     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55930 $as_echo_n "checking for X... " >&6; }
55931 
55932 
55933 # Check whether --with-x was given.
55934 if test "${with_x+set}" = set; then :
55935   withval=$with_x;
55936 fi
55937 
55938 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55939 if test "x$with_x" = xno; then
55940   # The user explicitly disabled X.
55941   have_x=disabled
55942 else
55943   case $x_includes,$x_libraries in #(
55944     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55945     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55946   $as_echo_n "(cached) " >&6
55947 else
55948   # One or both of the vars are not set, and there is no cached value.
55949 ac_x_includes=no ac_x_libraries=no
55950 rm -f -r conftest.dir
55951 if mkdir conftest.dir; then
55952   cd conftest.dir
55953   cat >Imakefile <<'_ACEOF'
55954 incroot:
55955         @echo incroot='${INCROOT}'
55956 usrlibdir:
55957         @echo usrlibdir='${USRLIBDIR}'
55958 libdir:
55959         @echo libdir='${LIBDIR}'
55960 _ACEOF
55961   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55962     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55963     for ac_var in incroot usrlibdir libdir; do
55964       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55965     done
55966     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55967     for ac_extension in a so sl dylib la dll; do
55968       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55969          test -f "$ac_im_libdir/libX11.$ac_extension"; then
55970         ac_im_usrlibdir=$ac_im_libdir; break
55971       fi
55972     done
55973     # Screen out bogus values from the imake configuration.  They are
55974     # bogus both because they are the default anyway, and because
55975     # using them would break gcc on systems where it needs fixed includes.
55976     case $ac_im_incroot in
55977         /usr/include) ac_x_includes= ;;
55978         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55979     esac
55980     case $ac_im_usrlibdir in
55981         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
55982         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55983     esac
55984   fi
55985   cd ..
55986   rm -f -r conftest.dir
55987 fi
55988 
55989 # Standard set of common directories for X headers.
55990 # Check X11 before X11Rn because it is often a symlink to the current release.
55991 ac_x_header_dirs='
55992 /usr/X11/include
55993 /usr/X11R7/include
55994 /usr/X11R6/include
55995 /usr/X11R5/include
55996 /usr/X11R4/include
55997 
55998 /usr/include/X11
55999 /usr/include/X11R7
56000 /usr/include/X11R6
56001 /usr/include/X11R5
56002 /usr/include/X11R4
56003 
56004 /usr/local/X11/include
56005 /usr/local/X11R7/include
56006 /usr/local/X11R6/include
56007 /usr/local/X11R5/include
56008 /usr/local/X11R4/include
56009 
56010 /usr/local/include/X11
56011 /usr/local/include/X11R7
56012 /usr/local/include/X11R6
56013 /usr/local/include/X11R5
56014 /usr/local/include/X11R4
56015 
56016 /usr/X386/include
56017 /usr/x386/include
56018 /usr/XFree86/include/X11
56019 
56020 /usr/include
56021 /usr/local/include
56022 /usr/unsupported/include
56023 /usr/athena/include
56024 /usr/local/x11r5/include
56025 /usr/lpp/Xamples/include
56026 
56027 /usr/openwin/include
56028 /usr/openwin/share/include'
56029 
56030 if test "$ac_x_includes" = no; then
56031   # Guess where to find include files, by looking for Xlib.h.
56032   # First, try using that file with no special directory specified.
56033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56034 /* end confdefs.h.  */
56035 #include <X11/Xlib.h>
56036 _ACEOF
56037 if ac_fn_cxx_try_cpp "$LINENO"; then :
56038   # We can compile using X headers with no special include directory.
56039 ac_x_includes=
56040 else
56041   for ac_dir in $ac_x_header_dirs; do
56042   if test -r "$ac_dir/X11/Xlib.h"; then
56043     ac_x_includes=$ac_dir
56044     break
56045   fi
56046 done
56047 fi
56048 rm -f conftest.err conftest.i conftest.$ac_ext
56049 fi # $ac_x_includes = no
56050 
56051 if test "$ac_x_libraries" = no; then
56052   # Check for the libraries.
56053   # See if we find them without any special options.
56054   # Don't add to $LIBS permanently.
56055   ac_save_LIBS=$LIBS
56056   LIBS="-lX11 $LIBS"
56057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56058 /* end confdefs.h.  */
56059 #include <X11/Xlib.h>
56060 int
56061 main ()
56062 {
56063 XrmInitialize ()
56064   ;
56065   return 0;
56066 }
56067 _ACEOF
56068 if ac_fn_cxx_try_link "$LINENO"; then :
56069   LIBS=$ac_save_LIBS
56070 # We can link X programs with no special library path.
56071 ac_x_libraries=
56072 else
56073   LIBS=$ac_save_LIBS
56074 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56075 do
56076   # Don't even attempt the hair of trying to link an X program!
56077   for ac_extension in a so sl dylib la dll; do
56078     if test -r "$ac_dir/libX11.$ac_extension"; then
56079       ac_x_libraries=$ac_dir
56080       break 2
56081     fi
56082   done
56083 done
56084 fi
56085 rm -f core conftest.err conftest.$ac_objext \
56086     conftest$ac_exeext conftest.$ac_ext
56087 fi # $ac_x_libraries = no
56088 
56089 case $ac_x_includes,$ac_x_libraries in #(
56090   no,* | *,no | *\'*)
56091     # Didn't find X, or a directory has "'" in its name.
56092     ac_cv_have_x="have_x=no";; #(
56093   *)
56094     # Record where we found X for the cache.
56095     ac_cv_have_x="have_x=yes\
56096         ac_x_includes='$ac_x_includes'\
56097         ac_x_libraries='$ac_x_libraries'"
56098 esac
56099 fi
56100 ;; #(
56101     *) have_x=yes;;
56102   esac
56103   eval "$ac_cv_have_x"
56104 fi # $with_x != no
56105 
56106 if test "$have_x" != yes; then
56107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56108 $as_echo "$have_x" >&6; }
56109   no_x=yes
56110 else
56111   # If each of the values was on the command line, it overrides each guess.
56112   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56113   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56114   # Update the cache value to reflect the command line values.
56115   ac_cv_have_x="have_x=yes\
56116         ac_x_includes='$x_includes'\
56117         ac_x_libraries='$x_libraries'"
56118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56119 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56120 fi
56121 
56122     if test "$no_x" = yes; then
56123   # Not all programs may use this symbol, but it does not hurt to define it.
56124 
56125 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56126 
56127   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56128 else
56129   if test -n "$x_includes"; then
56130     X_CFLAGS="$X_CFLAGS -I$x_includes"
56131   fi
56132 
56133   # It would also be nice to do this for all -L options, not just this one.
56134   if test -n "$x_libraries"; then
56135     X_LIBS="$X_LIBS -L$x_libraries"
56136     # For Solaris; some versions of Sun CC require a space after -R and
56137     # others require no space.  Words are not sufficient . . . .
56138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56139 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56140     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56141     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56142     ac_cxx_werror_flag=yes
56143     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56144 /* end confdefs.h.  */
56145 
56146 int
56147 main ()
56148 {
56149 
56150   ;
56151   return 0;
56152 }
56153 _ACEOF
56154 if ac_fn_cxx_try_link "$LINENO"; then :
56155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56156 $as_echo "no" >&6; }
56157        X_LIBS="$X_LIBS -R$x_libraries"
56158 else
56159   LIBS="$ac_xsave_LIBS -R $x_libraries"
56160        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56161 /* end confdefs.h.  */
56162 
56163 int
56164 main ()
56165 {
56166 
56167   ;
56168   return 0;
56169 }
56170 _ACEOF
56171 if ac_fn_cxx_try_link "$LINENO"; then :
56172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56173 $as_echo "yes" >&6; }
56174           X_LIBS="$X_LIBS -R $x_libraries"
56175 else
56176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56177 $as_echo "neither works" >&6; }
56178 fi
56179 rm -f core conftest.err conftest.$ac_objext \
56180     conftest$ac_exeext conftest.$ac_ext
56181 fi
56182 rm -f core conftest.err conftest.$ac_objext \
56183     conftest$ac_exeext conftest.$ac_ext
56184     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56185     LIBS=$ac_xsave_LIBS
56186   fi
56187 
56188   # Check for system-dependent libraries X programs must link with.
56189   # Do this before checking for the system-independent R6 libraries
56190   # (-lICE), since we may need -lsocket or whatever for X linking.
56191 
56192   if test "$ISC" = yes; then
56193     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56194   else
56195     # Martyn Johnson says this is needed for Ultrix, if the X
56196     # libraries were built with DECnet support.  And Karl Berry says
56197     # the Alpha needs dnet_stub (dnet does not exist).
56198     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56199     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56200 /* end confdefs.h.  */
56201 
56202 /* Override any GCC internal prototype to avoid an error.
56203    Use char because int might match the return type of a GCC
56204    builtin and then its argument prototype would still apply.  */
56205 #ifdef __cplusplus
56206 extern "C"
56207 #endif
56208 char XOpenDisplay ();
56209 int
56210 main ()
56211 {
56212 return XOpenDisplay ();
56213   ;
56214   return 0;
56215 }
56216 _ACEOF
56217 if ac_fn_cxx_try_link "$LINENO"; then :
56218 
56219 else
56220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56221 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56222 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56223   $as_echo_n "(cached) " >&6
56224 else
56225   ac_check_lib_save_LIBS=$LIBS
56226 LIBS="-ldnet  $LIBS"
56227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56228 /* end confdefs.h.  */
56229 
56230 /* Override any GCC internal prototype to avoid an error.
56231    Use char because int might match the return type of a GCC
56232    builtin and then its argument prototype would still apply.  */
56233 #ifdef __cplusplus
56234 extern "C"
56235 #endif
56236 char dnet_ntoa ();
56237 int
56238 main ()
56239 {
56240 return dnet_ntoa ();
56241   ;
56242   return 0;
56243 }
56244 _ACEOF
56245 if ac_fn_cxx_try_link "$LINENO"; then :
56246   ac_cv_lib_dnet_dnet_ntoa=yes
56247 else
56248   ac_cv_lib_dnet_dnet_ntoa=no
56249 fi
56250 rm -f core conftest.err conftest.$ac_objext \
56251     conftest$ac_exeext conftest.$ac_ext
56252 LIBS=$ac_check_lib_save_LIBS
56253 fi
56254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56255 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56256 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56257   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56258 fi
56259 
56260     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56261       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56262 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56263 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56264   $as_echo_n "(cached) " >&6
56265 else
56266   ac_check_lib_save_LIBS=$LIBS
56267 LIBS="-ldnet_stub  $LIBS"
56268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56269 /* end confdefs.h.  */
56270 
56271 /* Override any GCC internal prototype to avoid an error.
56272    Use char because int might match the return type of a GCC
56273    builtin and then its argument prototype would still apply.  */
56274 #ifdef __cplusplus
56275 extern "C"
56276 #endif
56277 char dnet_ntoa ();
56278 int
56279 main ()
56280 {
56281 return dnet_ntoa ();
56282   ;
56283   return 0;
56284 }
56285 _ACEOF
56286 if ac_fn_cxx_try_link "$LINENO"; then :
56287   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56288 else
56289   ac_cv_lib_dnet_stub_dnet_ntoa=no
56290 fi
56291 rm -f core conftest.err conftest.$ac_objext \
56292     conftest$ac_exeext conftest.$ac_ext
56293 LIBS=$ac_check_lib_save_LIBS
56294 fi
56295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56296 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56297 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56298   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56299 fi
56300 
56301     fi
56302 fi
56303 rm -f core conftest.err conftest.$ac_objext \
56304     conftest$ac_exeext conftest.$ac_ext
56305     LIBS="$ac_xsave_LIBS"
56306 
56307     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56308     # to get the SysV transport functions.
56309     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56310     # needs -lnsl.
56311     # The nsl library prevents programs from opening the X display
56312     # on Irix 5.2, according to T.E. Dickey.
56313     # The functions gethostbyname, getservbyname, and inet_addr are
56314     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56315     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56316 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56317 
56318 fi
56319 
56320     if test $ac_cv_func_gethostbyname = no; then
56321       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56322 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56323 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56324   $as_echo_n "(cached) " >&6
56325 else
56326   ac_check_lib_save_LIBS=$LIBS
56327 LIBS="-lnsl  $LIBS"
56328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56329 /* end confdefs.h.  */
56330 
56331 /* Override any GCC internal prototype to avoid an error.
56332    Use char because int might match the return type of a GCC
56333    builtin and then its argument prototype would still apply.  */
56334 #ifdef __cplusplus
56335 extern "C"
56336 #endif
56337 char gethostbyname ();
56338 int
56339 main ()
56340 {
56341 return gethostbyname ();
56342   ;
56343   return 0;
56344 }
56345 _ACEOF
56346 if ac_fn_cxx_try_link "$LINENO"; then :
56347   ac_cv_lib_nsl_gethostbyname=yes
56348 else
56349   ac_cv_lib_nsl_gethostbyname=no
56350 fi
56351 rm -f core conftest.err conftest.$ac_objext \
56352     conftest$ac_exeext conftest.$ac_ext
56353 LIBS=$ac_check_lib_save_LIBS
56354 fi
56355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56356 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56357 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56358   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56359 fi
56360 
56361       if test $ac_cv_lib_nsl_gethostbyname = no; then
56362         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56363 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56364 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56365   $as_echo_n "(cached) " >&6
56366 else
56367   ac_check_lib_save_LIBS=$LIBS
56368 LIBS="-lbsd  $LIBS"
56369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56370 /* end confdefs.h.  */
56371 
56372 /* Override any GCC internal prototype to avoid an error.
56373    Use char because int might match the return type of a GCC
56374    builtin and then its argument prototype would still apply.  */
56375 #ifdef __cplusplus
56376 extern "C"
56377 #endif
56378 char gethostbyname ();
56379 int
56380 main ()
56381 {
56382 return gethostbyname ();
56383   ;
56384   return 0;
56385 }
56386 _ACEOF
56387 if ac_fn_cxx_try_link "$LINENO"; then :
56388   ac_cv_lib_bsd_gethostbyname=yes
56389 else
56390   ac_cv_lib_bsd_gethostbyname=no
56391 fi
56392 rm -f core conftest.err conftest.$ac_objext \
56393     conftest$ac_exeext conftest.$ac_ext
56394 LIBS=$ac_check_lib_save_LIBS
56395 fi
56396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56397 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56398 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56399   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56400 fi
56401 
56402       fi
56403     fi
56404 
56405     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56406     # socket/setsockopt and other routines are undefined under SCO ODT
56407     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56408     # on later versions), says Simon Leinen: it contains gethostby*
56409     # variants that don't use the name server (or something).  -lsocket
56410     # must be given before -lnsl if both are needed.  We assume that
56411     # if connect needs -lnsl, so does gethostbyname.
56412     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56413 if test "x$ac_cv_func_connect" = xyes; then :
56414 
56415 fi
56416 
56417     if test $ac_cv_func_connect = no; then
56418       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56419 $as_echo_n "checking for connect in -lsocket... " >&6; }
56420 if ${ac_cv_lib_socket_connect+:} false; then :
56421   $as_echo_n "(cached) " >&6
56422 else
56423   ac_check_lib_save_LIBS=$LIBS
56424 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56426 /* end confdefs.h.  */
56427 
56428 /* Override any GCC internal prototype to avoid an error.
56429    Use char because int might match the return type of a GCC
56430    builtin and then its argument prototype would still apply.  */
56431 #ifdef __cplusplus
56432 extern "C"
56433 #endif
56434 char connect ();
56435 int
56436 main ()
56437 {
56438 return connect ();
56439   ;
56440   return 0;
56441 }
56442 _ACEOF
56443 if ac_fn_cxx_try_link "$LINENO"; then :
56444   ac_cv_lib_socket_connect=yes
56445 else
56446   ac_cv_lib_socket_connect=no
56447 fi
56448 rm -f core conftest.err conftest.$ac_objext \
56449     conftest$ac_exeext conftest.$ac_ext
56450 LIBS=$ac_check_lib_save_LIBS
56451 fi
56452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56453 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56454 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56455   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56456 fi
56457 
56458     fi
56459 
56460     # Guillermo Gomez says -lposix is necessary on A/UX.
56461     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56462 if test "x$ac_cv_func_remove" = xyes; then :
56463 
56464 fi
56465 
56466     if test $ac_cv_func_remove = no; then
56467       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56468 $as_echo_n "checking for remove in -lposix... " >&6; }
56469 if ${ac_cv_lib_posix_remove+:} false; then :
56470   $as_echo_n "(cached) " >&6
56471 else
56472   ac_check_lib_save_LIBS=$LIBS
56473 LIBS="-lposix  $LIBS"
56474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56475 /* end confdefs.h.  */
56476 
56477 /* Override any GCC internal prototype to avoid an error.
56478    Use char because int might match the return type of a GCC
56479    builtin and then its argument prototype would still apply.  */
56480 #ifdef __cplusplus
56481 extern "C"
56482 #endif
56483 char remove ();
56484 int
56485 main ()
56486 {
56487 return remove ();
56488   ;
56489   return 0;
56490 }
56491 _ACEOF
56492 if ac_fn_cxx_try_link "$LINENO"; then :
56493   ac_cv_lib_posix_remove=yes
56494 else
56495   ac_cv_lib_posix_remove=no
56496 fi
56497 rm -f core conftest.err conftest.$ac_objext \
56498     conftest$ac_exeext conftest.$ac_ext
56499 LIBS=$ac_check_lib_save_LIBS
56500 fi
56501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56502 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56503 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56504   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56505 fi
56506 
56507     fi
56508 
56509     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56510     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56511 if test "x$ac_cv_func_shmat" = xyes; then :
56512 
56513 fi
56514 
56515     if test $ac_cv_func_shmat = no; then
56516       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56517 $as_echo_n "checking for shmat in -lipc... " >&6; }
56518 if ${ac_cv_lib_ipc_shmat+:} false; then :
56519   $as_echo_n "(cached) " >&6
56520 else
56521   ac_check_lib_save_LIBS=$LIBS
56522 LIBS="-lipc  $LIBS"
56523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56524 /* end confdefs.h.  */
56525 
56526 /* Override any GCC internal prototype to avoid an error.
56527    Use char because int might match the return type of a GCC
56528    builtin and then its argument prototype would still apply.  */
56529 #ifdef __cplusplus
56530 extern "C"
56531 #endif
56532 char shmat ();
56533 int
56534 main ()
56535 {
56536 return shmat ();
56537   ;
56538   return 0;
56539 }
56540 _ACEOF
56541 if ac_fn_cxx_try_link "$LINENO"; then :
56542   ac_cv_lib_ipc_shmat=yes
56543 else
56544   ac_cv_lib_ipc_shmat=no
56545 fi
56546 rm -f core conftest.err conftest.$ac_objext \
56547     conftest$ac_exeext conftest.$ac_ext
56548 LIBS=$ac_check_lib_save_LIBS
56549 fi
56550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56551 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56552 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56553   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56554 fi
56555 
56556     fi
56557   fi
56558 
56559   # Check for libraries that X11R6 Xt/Xaw programs need.
56560   ac_save_LDFLAGS=$LDFLAGS
56561   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56562   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56563   # check for ICE first), but we must link in the order -lSM -lICE or
56564   # we get undefined symbols.  So assume we have SM if we have ICE.
56565   # These have to be linked with before -lX11, unlike the other
56566   # libraries we check for below, so use a different variable.
56567   # John Interrante, Karl Berry
56568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56569 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56570 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56571   $as_echo_n "(cached) " >&6
56572 else
56573   ac_check_lib_save_LIBS=$LIBS
56574 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56576 /* end confdefs.h.  */
56577 
56578 /* Override any GCC internal prototype to avoid an error.
56579    Use char because int might match the return type of a GCC
56580    builtin and then its argument prototype would still apply.  */
56581 #ifdef __cplusplus
56582 extern "C"
56583 #endif
56584 char IceConnectionNumber ();
56585 int
56586 main ()
56587 {
56588 return IceConnectionNumber ();
56589   ;
56590   return 0;
56591 }
56592 _ACEOF
56593 if ac_fn_cxx_try_link "$LINENO"; then :
56594   ac_cv_lib_ICE_IceConnectionNumber=yes
56595 else
56596   ac_cv_lib_ICE_IceConnectionNumber=no
56597 fi
56598 rm -f core conftest.err conftest.$ac_objext \
56599     conftest$ac_exeext conftest.$ac_ext
56600 LIBS=$ac_check_lib_save_LIBS
56601 fi
56602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56603 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56604 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56605   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56606 fi
56607 
56608   LDFLAGS=$ac_save_LDFLAGS
56609 
56610 fi
56611 
56612 
56613     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56614     # this doesn't make sense so we remove it.
56615     if test "x$COMPILE_TYPE" = xcross; then
56616       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56617     fi
56618 
56619     if test "x$no_x" = xyes; then
56620 
56621   # Print a helpful message on how to acquire the necessary build dependency.
56622   # x11 is the help tag: freetype, cups, alsa etc
56623   MISSING_DEPENDENCY=x11
56624 
56625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56626     cygwin_help $MISSING_DEPENDENCY
56627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56628     msys_help $MISSING_DEPENDENCY
56629   else
56630     PKGHANDLER_COMMAND=
56631 
56632     case $PKGHANDLER in
56633       apt-get)
56634         apt_help     $MISSING_DEPENDENCY ;;
56635       yum)
56636         yum_help     $MISSING_DEPENDENCY ;;
56637       port)
56638         port_help    $MISSING_DEPENDENCY ;;
56639       pkgutil)
56640         pkgutil_help $MISSING_DEPENDENCY ;;
56641       pkgadd)
56642         pkgadd_help  $MISSING_DEPENDENCY ;;
56643     esac
56644 
56645     if test "x$PKGHANDLER_COMMAND" != x; then
56646       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56647     fi
56648   fi
56649 
56650       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56651     fi
56652 
56653     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56654       OPENWIN_HOME="/usr/openwin"
56655       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56656       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56657           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56658     fi
56659 
56660     ac_ext=c
56661 ac_cpp='$CPP $CPPFLAGS'
56662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56665 
56666     OLD_CFLAGS="$CFLAGS"
56667     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56668 
56669     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56670     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56671 do :
56672   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56673 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56674           # include <X11/Xlib.h>
56675           # include <X11/Xutil.h>
56676 
56677 
56678 "
56679 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56680   cat >>confdefs.h <<_ACEOF
56681 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56682 _ACEOF
56683  X11_HEADERS_OK=yes
56684 else
56685   X11_HEADERS_OK=no; break
56686 fi
56687 
56688 done
56689 
56690 
56691     if test "x$X11_HEADERS_OK" = xno; then
56692 
56693   # Print a helpful message on how to acquire the necessary build dependency.
56694   # x11 is the help tag: freetype, cups, alsa etc
56695   MISSING_DEPENDENCY=x11
56696 
56697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56698     cygwin_help $MISSING_DEPENDENCY
56699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56700     msys_help $MISSING_DEPENDENCY
56701   else
56702     PKGHANDLER_COMMAND=
56703 
56704     case $PKGHANDLER in
56705       apt-get)
56706         apt_help     $MISSING_DEPENDENCY ;;
56707       yum)
56708         yum_help     $MISSING_DEPENDENCY ;;
56709       port)
56710         port_help    $MISSING_DEPENDENCY ;;
56711       pkgutil)
56712         pkgutil_help $MISSING_DEPENDENCY ;;
56713       pkgadd)
56714         pkgadd_help  $MISSING_DEPENDENCY ;;
56715     esac
56716 
56717     if test "x$PKGHANDLER_COMMAND" != x; then
56718       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56719     fi
56720   fi
56721 
56722       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56723     fi
56724 
56725     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56726     # defined in libawt_xawt.
56727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56728 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56729     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56730 /* end confdefs.h.  */
56731 #include <X11/extensions/Xrender.h>
56732 int
56733 main ()
56734 {
56735 XLinearGradient x;
56736   ;
56737   return 0;
56738 }
56739 _ACEOF
56740 if ac_fn_c_try_compile "$LINENO"; then :
56741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56742 $as_echo "yes" >&6; }
56743 else
56744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56745 $as_echo "no" >&6; }
56746          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56747 fi
56748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56749 
56750     CFLAGS="$OLD_CFLAGS"
56751     ac_ext=cpp
56752 ac_cpp='$CXXCPP $CPPFLAGS'
56753 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56754 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56755 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56756 
56757   fi # NEEDS_LIB_X11
56758 
56759 
56760 
56761 
56762 
56763 
56764 # Check whether --with-cups was given.
56765 if test "${with_cups+set}" = set; then :
56766   withval=$with_cups;
56767 fi
56768 
56769 
56770 # Check whether --with-cups-include was given.
56771 if test "${with_cups_include+set}" = set; then :
56772   withval=$with_cups_include;
56773 fi
56774 
56775 
56776   if test "x$NEEDS_LIB_CUPS" = xfalse; then
56777     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56778         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56779       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56780 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56781     fi
56782     CUPS_CFLAGS=
56783   else
56784     CUPS_FOUND=no
56785 
56786     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56787       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56788     fi
56789 
56790     if test "x${with_cups}" != x; then
56791       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56792 $as_echo_n "checking for cups headers... " >&6; }
56793       if test -s "${with_cups}/include/cups/cups.h"; then
56794         CUPS_CFLAGS="-I${with_cups}/include"
56795         CUPS_FOUND=yes
56796         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56797 $as_echo "$CUPS_FOUND" >&6; }
56798       else
56799         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56800       fi
56801     fi
56802     if test "x${with_cups_include}" != x; then
56803       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56804 $as_echo_n "checking for cups headers... " >&6; }
56805       if test -s "${with_cups_include}/cups/cups.h"; then
56806         CUPS_CFLAGS="-I${with_cups_include}"
56807         CUPS_FOUND=yes
56808         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56809 $as_echo "$CUPS_FOUND" >&6; }
56810       else
56811         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56812       fi
56813     fi
56814     if test "x$CUPS_FOUND" = xno; then
56815       # Are the cups headers installed in the default /usr/include location?
56816       for ac_header in cups/cups.h cups/ppd.h
56817 do :
56818   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56819 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56820 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56821   cat >>confdefs.h <<_ACEOF
56822 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56823 _ACEOF
56824 
56825           CUPS_FOUND=yes
56826           CUPS_CFLAGS=
56827           DEFAULT_CUPS=yes
56828 
56829 fi
56830 
56831 done
56832 
56833     fi
56834     if test "x$CUPS_FOUND" = xno; then
56835 
56836   # Print a helpful message on how to acquire the necessary build dependency.
56837   # cups is the help tag: freetype, cups, alsa etc
56838   MISSING_DEPENDENCY=cups
56839 
56840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56841     cygwin_help $MISSING_DEPENDENCY
56842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56843     msys_help $MISSING_DEPENDENCY
56844   else
56845     PKGHANDLER_COMMAND=
56846 
56847     case $PKGHANDLER in
56848       apt-get)
56849         apt_help     $MISSING_DEPENDENCY ;;
56850       yum)
56851         yum_help     $MISSING_DEPENDENCY ;;
56852       port)
56853         port_help    $MISSING_DEPENDENCY ;;
56854       pkgutil)
56855         pkgutil_help $MISSING_DEPENDENCY ;;
56856       pkgadd)
56857         pkgadd_help  $MISSING_DEPENDENCY ;;
56858     esac
56859 
56860     if test "x$PKGHANDLER_COMMAND" != x; then
56861       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56862     fi
56863   fi
56864 
56865       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56866     fi
56867   fi
56868 
56869 
56870 
56871 
56872 
56873 # Check whether --with-freetype was given.
56874 if test "${with_freetype+set}" = set; then :
56875   withval=$with_freetype;
56876 fi
56877 
56878 
56879 # Check whether --with-freetype-include was given.
56880 if test "${with_freetype_include+set}" = set; then :
56881   withval=$with_freetype_include;
56882 fi
56883 
56884 
56885 # Check whether --with-freetype-lib was given.
56886 if test "${with_freetype_lib+set}" = set; then :
56887   withval=$with_freetype_lib;
56888 fi
56889 
56890 
56891 # Check whether --with-freetype-src was given.
56892 if test "${with_freetype_src+set}" = set; then :
56893   withval=$with_freetype_src;
56894 fi
56895 
56896   # Check whether --enable-freetype-bundling was given.
56897 if test "${enable_freetype_bundling+set}" = set; then :
56898   enableval=$enable_freetype_bundling;
56899 fi
56900 
56901 
56902   # Need to specify explicitly since it needs to be overridden on some versions of macosx
56903   FREETYPE_BASE_NAME=freetype
56904   FREETYPE_CFLAGS=
56905   FREETYPE_LIBS=
56906   FREETYPE_BUNDLE_LIB_PATH=
56907 
56908   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56909     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56910         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56911         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56912         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56913       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56914 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56915     fi
56916     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56917       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56918 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56919     fi
56920   else
56921     # freetype is needed to build; go get it!
56922 
56923     BUNDLE_FREETYPE="$enable_freetype_bundling"
56924 
56925     if  test "x$with_freetype_src" != x; then
56926       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56927         # Try to build freetype if --with-freetype-src was given on Windows
56928 
56929   FREETYPE_SRC_PATH="$with_freetype_src"
56930   BUILD_FREETYPE=yes
56931 
56932   # Check if the freetype sources are acessible..
56933   if ! test -d $FREETYPE_SRC_PATH; then
56934     { $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
56935 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56936     BUILD_FREETYPE=no
56937   fi
56938   # ..and contain a vc2010 project file
56939   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56940   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56941     { $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
56942 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56943     BUILD_FREETYPE=no
56944   fi
56945   # Now check if configure found a version of 'msbuild.exe'
56946   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56947     { $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
56948 $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;}
56949     BUILD_FREETYPE=no
56950   fi
56951 
56952   # Ready to go..
56953   if test "x$BUILD_FREETYPE" = xyes; then
56954     # msbuild requires trailing slashes for output directories
56955     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56956     freetype_lib_path_unix="$freetype_lib_path"
56957     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56958 
56959   unix_path="$vcxproj_path"
56960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56961     windows_path=`$CYGPATH -m "$unix_path"`
56962     vcxproj_path="$windows_path"
56963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56964     windows_path=`cmd //c echo $unix_path`
56965     vcxproj_path="$windows_path"
56966   fi
56967 
56968 
56969   unix_path="$freetype_lib_path"
56970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56971     windows_path=`$CYGPATH -m "$unix_path"`
56972     freetype_lib_path="$windows_path"
56973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56974     windows_path=`cmd //c echo $unix_path`
56975     freetype_lib_path="$windows_path"
56976   fi
56977 
56978 
56979   unix_path="$freetype_obj_path"
56980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56981     windows_path=`$CYGPATH -m "$unix_path"`
56982     freetype_obj_path="$windows_path"
56983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56984     windows_path=`cmd //c echo $unix_path`
56985     freetype_obj_path="$windows_path"
56986   fi
56987 
56988     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56989       freetype_platform=x64
56990     else
56991       freetype_platform=win32
56992     fi
56993 
56994     # The original freetype project file is for VS 2010 (i.e. 'v100'),
56995     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56996     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56997     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56998     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56999 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57000 
57001     # First we try to build the freetype.dll
57002     $ECHO -e "@echo off\n"\
57003         "$MSBUILD $vcxproj_path "\
57004         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57005         "/p:Configuration=\"Release Multithreaded\" "\
57006         "/p:Platform=$freetype_platform "\
57007         "/p:ConfigurationType=DynamicLibrary "\
57008         "/p:TargetName=freetype "\
57009         "/p:OutDir=\"$freetype_lib_path\" "\
57010         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57011     cmd /c freetype.bat
57012 
57013     if test -s "$freetype_lib_path_unix/freetype.dll"; then
57014       # If that succeeds we also build freetype.lib
57015       $ECHO -e "@echo off\n"\
57016           "$MSBUILD $vcxproj_path "\
57017           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57018           "/p:Configuration=\"Release Multithreaded\" "\
57019           "/p:Platform=$freetype_platform "\
57020           "/p:ConfigurationType=StaticLibrary "\
57021           "/p:TargetName=freetype "\
57022           "/p:OutDir=\"$freetype_lib_path\" "\
57023           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57024       cmd /c freetype.bat
57025 
57026       if test -s "$freetype_lib_path_unix/freetype.lib"; then
57027         # Once we build both, lib and dll, set freetype lib and include path appropriately
57028         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57029         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57030         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57031 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57032       else
57033         BUILD_FREETYPE=no
57034       fi
57035     else
57036       BUILD_FREETYPE=no
57037     fi
57038   fi
57039 
57040         if test "x$BUILD_FREETYPE" = xyes; then
57041           # Okay, we built it. Check that it works.
57042 
57043   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57044   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57045   METHOD="--with-freetype-src"
57046 
57047   # Let's start with an optimistic view of the world :-)
57048   FOUND_FREETYPE=yes
57049 
57050   # First look for the canonical freetype main include file ft2build.h.
57051   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57052     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57053     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57054     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57055       # Fail.
57056       FOUND_FREETYPE=no
57057     fi
57058   fi
57059 
57060   if test "x$FOUND_FREETYPE" = xyes; then
57061     # Include file found, let's continue the sanity check.
57062     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57063 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57064 
57065     # Reset to default value
57066     FREETYPE_BASE_NAME=freetype
57067     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57068     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57069       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57070           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57071         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57072         # for the .6 version explicitly.
57073         FREETYPE_BASE_NAME=freetype.6
57074         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57075         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57076 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57077       else
57078         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57079 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57080         FOUND_FREETYPE=no
57081       fi
57082     else
57083       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57084         # On Windows, we will need both .lib and .dll file.
57085         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57086           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57087 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57088           FOUND_FREETYPE=no
57089         fi
57090       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57091           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57092         # Found lib in isa dir, use that instead.
57093         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57094         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57095 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57096       fi
57097     fi
57098   fi
57099 
57100   if test "x$FOUND_FREETYPE" = xyes; then
57101 
57102   # Only process if variable expands to non-empty
57103 
57104   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57105     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57106 
57107   # Input might be given as Windows format, start by converting to
57108   # unix format.
57109   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57110   new_path=`$CYGPATH -u "$path"`
57111 
57112   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57113   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57114   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57115   # "foo.exe" is OK but "foo" is an error.
57116   #
57117   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57118   # It is also a way to make sure we got the proper file name for the real test later on.
57119   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57120   if test "x$test_shortpath" = x; then
57121     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57122 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57123     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57124   fi
57125 
57126   # Call helper function which possibly converts this using DOS-style short mode.
57127   # If so, the updated path is stored in $new_path.
57128 
57129   input_path="$new_path"
57130   # Check if we need to convert this using DOS-style short mode. If the path
57131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57132   # take no chances and rewrite it.
57133   # Note: m4 eats our [], so we need to use [ and ] instead.
57134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57135   if test "x$has_forbidden_chars" != x; then
57136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57137     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57138     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57139     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57140       # Going to short mode and back again did indeed matter. Since short mode is
57141       # case insensitive, let's make it lowercase to improve readability.
57142       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57143       # Now convert it back to Unix-style (cygpath)
57144       input_path=`$CYGPATH -u "$shortmode_path"`
57145       new_path="$input_path"
57146     fi
57147   fi
57148 
57149   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57150   if test "x$test_cygdrive_prefix" = x; then
57151     # As a simple fix, exclude /usr/bin since it's not a real path.
57152     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57153       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57154       # a path prefixed by /cygdrive for fixpath to work.
57155       new_path="$CYGWIN_ROOT_PATH$input_path"
57156     fi
57157   fi
57158 
57159 
57160   if test "x$path" != "x$new_path"; then
57161     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57163 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57164   fi
57165 
57166     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57167 
57168   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57169   has_colon=`$ECHO $path | $GREP ^.:`
57170   new_path="$path"
57171   if test "x$has_colon" = x; then
57172     # Not in mixed or Windows style, start by that.
57173     new_path=`cmd //c echo $path`
57174   fi
57175 
57176 
57177   input_path="$new_path"
57178   # Check if we need to convert this using DOS-style short mode. If the path
57179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57180   # take no chances and rewrite it.
57181   # Note: m4 eats our [], so we need to use [ and ] instead.
57182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57183   if test "x$has_forbidden_chars" != x; then
57184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57185     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57186   fi
57187 
57188 
57189   windows_path="$new_path"
57190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57191     unix_path=`$CYGPATH -u "$windows_path"`
57192     new_path="$unix_path"
57193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57195     new_path="$unix_path"
57196   fi
57197 
57198   if test "x$path" != "x$new_path"; then
57199     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57201 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57202   fi
57203 
57204   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57205   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57206 
57207     else
57208       # We're on a unix platform. Hooray! :)
57209       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57210       has_space=`$ECHO "$path" | $GREP " "`
57211       if test "x$has_space" != x; then
57212         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57213 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57214         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57215       fi
57216 
57217       # Use eval to expand a potential ~
57218       eval path="$path"
57219       if test ! -f "$path" && test ! -d "$path"; then
57220         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57221       fi
57222 
57223       if test -d "$path"; then
57224         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57225       else
57226         dir="`$DIRNAME "$path"`"
57227         base="`$BASENAME "$path"`"
57228         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57229       fi
57230     fi
57231   fi
57232 
57233 
57234   # Only process if variable expands to non-empty
57235 
57236   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57237     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57238 
57239   # Input might be given as Windows format, start by converting to
57240   # unix format.
57241   path="$POTENTIAL_FREETYPE_LIB_PATH"
57242   new_path=`$CYGPATH -u "$path"`
57243 
57244   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57245   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57246   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57247   # "foo.exe" is OK but "foo" is an error.
57248   #
57249   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57250   # It is also a way to make sure we got the proper file name for the real test later on.
57251   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57252   if test "x$test_shortpath" = x; then
57253     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57254 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57255     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57256   fi
57257 
57258   # Call helper function which possibly converts this using DOS-style short mode.
57259   # If so, the updated path is stored in $new_path.
57260 
57261   input_path="$new_path"
57262   # Check if we need to convert this using DOS-style short mode. If the path
57263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57264   # take no chances and rewrite it.
57265   # Note: m4 eats our [], so we need to use [ and ] instead.
57266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57267   if test "x$has_forbidden_chars" != x; then
57268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57272       # Going to short mode and back again did indeed matter. Since short mode is
57273       # case insensitive, let's make it lowercase to improve readability.
57274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57275       # Now convert it back to Unix-style (cygpath)
57276       input_path=`$CYGPATH -u "$shortmode_path"`
57277       new_path="$input_path"
57278     fi
57279   fi
57280 
57281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57282   if test "x$test_cygdrive_prefix" = x; then
57283     # As a simple fix, exclude /usr/bin since it's not a real path.
57284     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57286       # a path prefixed by /cygdrive for fixpath to work.
57287       new_path="$CYGWIN_ROOT_PATH$input_path"
57288     fi
57289   fi
57290 
57291 
57292   if test "x$path" != "x$new_path"; then
57293     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57295 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57296   fi
57297 
57298     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57299 
57300   path="$POTENTIAL_FREETYPE_LIB_PATH"
57301   has_colon=`$ECHO $path | $GREP ^.:`
57302   new_path="$path"
57303   if test "x$has_colon" = x; then
57304     # Not in mixed or Windows style, start by that.
57305     new_path=`cmd //c echo $path`
57306   fi
57307 
57308 
57309   input_path="$new_path"
57310   # Check if we need to convert this using DOS-style short mode. If the path
57311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57312   # take no chances and rewrite it.
57313   # Note: m4 eats our [], so we need to use [ and ] instead.
57314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57315   if test "x$has_forbidden_chars" != x; then
57316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57317     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57318   fi
57319 
57320 
57321   windows_path="$new_path"
57322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57323     unix_path=`$CYGPATH -u "$windows_path"`
57324     new_path="$unix_path"
57325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57327     new_path="$unix_path"
57328   fi
57329 
57330   if test "x$path" != "x$new_path"; then
57331     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57333 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57334   fi
57335 
57336   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57337   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57338 
57339     else
57340       # We're on a unix platform. Hooray! :)
57341       path="$POTENTIAL_FREETYPE_LIB_PATH"
57342       has_space=`$ECHO "$path" | $GREP " "`
57343       if test "x$has_space" != x; then
57344         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57345 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57346         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57347       fi
57348 
57349       # Use eval to expand a potential ~
57350       eval path="$path"
57351       if test ! -f "$path" && test ! -d "$path"; then
57352         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57353       fi
57354 
57355       if test -d "$path"; then
57356         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57357       else
57358         dir="`$DIRNAME "$path"`"
57359         base="`$BASENAME "$path"`"
57360         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57361       fi
57362     fi
57363   fi
57364 
57365 
57366     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57367     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57368 $as_echo_n "checking for freetype includes... " >&6; }
57369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57370 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57371     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57372     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57373 $as_echo_n "checking for freetype libraries... " >&6; }
57374     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57375 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57376   fi
57377 
57378           if test "x$FOUND_FREETYPE" != xyes; then
57379             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57380           fi
57381         else
57382           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57383 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57384           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57385         fi
57386       else
57387         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57388 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57389       fi
57390     fi
57391 
57392     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57393       # User has specified settings
57394 
57395       if test "x$BUNDLE_FREETYPE" = x; then
57396         # If not specified, default is to bundle freetype
57397         BUNDLE_FREETYPE=yes
57398       fi
57399 
57400       if test "x$with_freetype" != x; then
57401         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57402         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57403       fi
57404 
57405       # Allow --with-freetype-lib and --with-freetype-include to override
57406       if test "x$with_freetype_include" != x; then
57407         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57408       fi
57409       if test "x$with_freetype_lib" != x; then
57410         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57411       fi
57412 
57413       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57414         # Okay, we got it. Check that it works.
57415 
57416   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57417   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57418   METHOD="--with-freetype"
57419 
57420   # Let's start with an optimistic view of the world :-)
57421   FOUND_FREETYPE=yes
57422 
57423   # First look for the canonical freetype main include file ft2build.h.
57424   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57425     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57426     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57427     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57428       # Fail.
57429       FOUND_FREETYPE=no
57430     fi
57431   fi
57432 
57433   if test "x$FOUND_FREETYPE" = xyes; then
57434     # Include file found, let's continue the sanity check.
57435     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57436 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57437 
57438     # Reset to default value
57439     FREETYPE_BASE_NAME=freetype
57440     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57441     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57442       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57443           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57444         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57445         # for the .6 version explicitly.
57446         FREETYPE_BASE_NAME=freetype.6
57447         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57448         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57449 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57450       else
57451         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57452 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57453         FOUND_FREETYPE=no
57454       fi
57455     else
57456       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57457         # On Windows, we will need both .lib and .dll file.
57458         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57459           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57460 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57461           FOUND_FREETYPE=no
57462         fi
57463       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57464           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57465         # Found lib in isa dir, use that instead.
57466         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57467         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57468 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57469       fi
57470     fi
57471   fi
57472 
57473   if test "x$FOUND_FREETYPE" = xyes; then
57474 
57475   # Only process if variable expands to non-empty
57476 
57477   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57478     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57479 
57480   # Input might be given as Windows format, start by converting to
57481   # unix format.
57482   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57483   new_path=`$CYGPATH -u "$path"`
57484 
57485   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57486   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57487   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57488   # "foo.exe" is OK but "foo" is an error.
57489   #
57490   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57491   # It is also a way to make sure we got the proper file name for the real test later on.
57492   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57493   if test "x$test_shortpath" = x; then
57494     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57495 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57496     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57497   fi
57498 
57499   # Call helper function which possibly converts this using DOS-style short mode.
57500   # If so, the updated path is stored in $new_path.
57501 
57502   input_path="$new_path"
57503   # Check if we need to convert this using DOS-style short mode. If the path
57504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57505   # take no chances and rewrite it.
57506   # Note: m4 eats our [], so we need to use [ and ] instead.
57507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57508   if test "x$has_forbidden_chars" != x; then
57509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57513       # Going to short mode and back again did indeed matter. Since short mode is
57514       # case insensitive, let's make it lowercase to improve readability.
57515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57516       # Now convert it back to Unix-style (cygpath)
57517       input_path=`$CYGPATH -u "$shortmode_path"`
57518       new_path="$input_path"
57519     fi
57520   fi
57521 
57522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57523   if test "x$test_cygdrive_prefix" = x; then
57524     # As a simple fix, exclude /usr/bin since it's not a real path.
57525     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57527       # a path prefixed by /cygdrive for fixpath to work.
57528       new_path="$CYGWIN_ROOT_PATH$input_path"
57529     fi
57530   fi
57531 
57532 
57533   if test "x$path" != "x$new_path"; then
57534     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57536 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57537   fi
57538 
57539     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57540 
57541   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57542   has_colon=`$ECHO $path | $GREP ^.:`
57543   new_path="$path"
57544   if test "x$has_colon" = x; then
57545     # Not in mixed or Windows style, start by that.
57546     new_path=`cmd //c echo $path`
57547   fi
57548 
57549 
57550   input_path="$new_path"
57551   # Check if we need to convert this using DOS-style short mode. If the path
57552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57553   # take no chances and rewrite it.
57554   # Note: m4 eats our [], so we need to use [ and ] instead.
57555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57556   if test "x$has_forbidden_chars" != x; then
57557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57559   fi
57560 
57561 
57562   windows_path="$new_path"
57563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57564     unix_path=`$CYGPATH -u "$windows_path"`
57565     new_path="$unix_path"
57566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57568     new_path="$unix_path"
57569   fi
57570 
57571   if test "x$path" != "x$new_path"; then
57572     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57573     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57574 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57575   fi
57576 
57577   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57578   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57579 
57580     else
57581       # We're on a unix platform. Hooray! :)
57582       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57583       has_space=`$ECHO "$path" | $GREP " "`
57584       if test "x$has_space" != x; then
57585         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57586 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57587         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57588       fi
57589 
57590       # Use eval to expand a potential ~
57591       eval path="$path"
57592       if test ! -f "$path" && test ! -d "$path"; then
57593         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57594       fi
57595 
57596       if test -d "$path"; then
57597         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57598       else
57599         dir="`$DIRNAME "$path"`"
57600         base="`$BASENAME "$path"`"
57601         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57602       fi
57603     fi
57604   fi
57605 
57606 
57607   # Only process if variable expands to non-empty
57608 
57609   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57610     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57611 
57612   # Input might be given as Windows format, start by converting to
57613   # unix format.
57614   path="$POTENTIAL_FREETYPE_LIB_PATH"
57615   new_path=`$CYGPATH -u "$path"`
57616 
57617   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57618   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57619   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57620   # "foo.exe" is OK but "foo" is an error.
57621   #
57622   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57623   # It is also a way to make sure we got the proper file name for the real test later on.
57624   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57625   if test "x$test_shortpath" = x; then
57626     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57627 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57628     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57629   fi
57630 
57631   # Call helper function which possibly converts this using DOS-style short mode.
57632   # If so, the updated path is stored in $new_path.
57633 
57634   input_path="$new_path"
57635   # Check if we need to convert this using DOS-style short mode. If the path
57636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57637   # take no chances and rewrite it.
57638   # Note: m4 eats our [], so we need to use [ and ] instead.
57639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57640   if test "x$has_forbidden_chars" != x; then
57641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57642     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57643     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57644     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57645       # Going to short mode and back again did indeed matter. Since short mode is
57646       # case insensitive, let's make it lowercase to improve readability.
57647       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57648       # Now convert it back to Unix-style (cygpath)
57649       input_path=`$CYGPATH -u "$shortmode_path"`
57650       new_path="$input_path"
57651     fi
57652   fi
57653 
57654   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57655   if test "x$test_cygdrive_prefix" = x; then
57656     # As a simple fix, exclude /usr/bin since it's not a real path.
57657     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57658       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57659       # a path prefixed by /cygdrive for fixpath to work.
57660       new_path="$CYGWIN_ROOT_PATH$input_path"
57661     fi
57662   fi
57663 
57664 
57665   if test "x$path" != "x$new_path"; then
57666     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57668 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57669   fi
57670 
57671     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57672 
57673   path="$POTENTIAL_FREETYPE_LIB_PATH"
57674   has_colon=`$ECHO $path | $GREP ^.:`
57675   new_path="$path"
57676   if test "x$has_colon" = x; then
57677     # Not in mixed or Windows style, start by that.
57678     new_path=`cmd //c echo $path`
57679   fi
57680 
57681 
57682   input_path="$new_path"
57683   # Check if we need to convert this using DOS-style short mode. If the path
57684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57685   # take no chances and rewrite it.
57686   # Note: m4 eats our [], so we need to use [ and ] instead.
57687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57688   if test "x$has_forbidden_chars" != x; then
57689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57691   fi
57692 
57693 
57694   windows_path="$new_path"
57695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57696     unix_path=`$CYGPATH -u "$windows_path"`
57697     new_path="$unix_path"
57698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57700     new_path="$unix_path"
57701   fi
57702 
57703   if test "x$path" != "x$new_path"; then
57704     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57706 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57707   fi
57708 
57709   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57710   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57711 
57712     else
57713       # We're on a unix platform. Hooray! :)
57714       path="$POTENTIAL_FREETYPE_LIB_PATH"
57715       has_space=`$ECHO "$path" | $GREP " "`
57716       if test "x$has_space" != x; then
57717         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57718 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57719         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57720       fi
57721 
57722       # Use eval to expand a potential ~
57723       eval path="$path"
57724       if test ! -f "$path" && test ! -d "$path"; then
57725         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57726       fi
57727 
57728       if test -d "$path"; then
57729         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57730       else
57731         dir="`$DIRNAME "$path"`"
57732         base="`$BASENAME "$path"`"
57733         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57734       fi
57735     fi
57736   fi
57737 
57738 
57739     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57740     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57741 $as_echo_n "checking for freetype includes... " >&6; }
57742     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57743 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57744     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57745     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57746 $as_echo_n "checking for freetype libraries... " >&6; }
57747     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57748 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57749   fi
57750 
57751         if test "x$FOUND_FREETYPE" != xyes; then
57752           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57753         fi
57754       else
57755         # User specified only one of lib or include. This is an error.
57756         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57757           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57758 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57759           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57760         else
57761           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57762 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57763           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57764         fi
57765       fi
57766     else
57767       # User did not specify settings, but we need freetype. Try to locate it.
57768 
57769       if test "x$BUNDLE_FREETYPE" = x; then
57770         # If not specified, default is to bundle freetype only on windows
57771         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57772           BUNDLE_FREETYPE=yes
57773         else
57774           BUNDLE_FREETYPE=no
57775         fi
57776       fi
57777 
57778       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57779       if test "x$SYSROOT" = x; then
57780         if test "x$FOUND_FREETYPE" != xyes; then
57781           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57782           if test "x$PKG_CONFIG" != x; then
57783 
57784 pkg_failed=no
57785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57786 $as_echo_n "checking for FREETYPE... " >&6; }
57787 
57788 if test -n "$FREETYPE_CFLAGS"; then
57789     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57790  elif test -n "$PKG_CONFIG"; then
57791     if test -n "$PKG_CONFIG" && \
57792     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57793   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57794   ac_status=$?
57795   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57796   test $ac_status = 0; }; then
57797   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57798 else
57799   pkg_failed=yes
57800 fi
57801  else
57802     pkg_failed=untried
57803 fi
57804 if test -n "$FREETYPE_LIBS"; then
57805     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57806  elif test -n "$PKG_CONFIG"; then
57807     if test -n "$PKG_CONFIG" && \
57808     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57809   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57810   ac_status=$?
57811   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57812   test $ac_status = 0; }; then
57813   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57814 else
57815   pkg_failed=yes
57816 fi
57817  else
57818     pkg_failed=untried
57819 fi
57820 
57821 
57822 
57823 if test $pkg_failed = yes; then
57824 
57825 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57826         _pkg_short_errors_supported=yes
57827 else
57828         _pkg_short_errors_supported=no
57829 fi
57830         if test $_pkg_short_errors_supported = yes; then
57831                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57832         else
57833                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57834         fi
57835         # Put the nasty error message in config.log where it belongs
57836         echo "$FREETYPE_PKG_ERRORS" >&5
57837 
57838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57839 $as_echo "no" >&6; }
57840                 FOUND_FREETYPE=no
57841 elif test $pkg_failed = untried; then
57842         FOUND_FREETYPE=no
57843 else
57844         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57845         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57846         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57847 $as_echo "yes" >&6; }
57848         FOUND_FREETYPE=yes
57849 fi
57850             if test "x$FOUND_FREETYPE" = xyes; then
57851               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57852               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57853               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57854               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57855                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57856               fi
57857               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57858               if test "x$BUNDLE_FREETYPE" = xyes; then
57859                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57860 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57861                 FOUND_FREETYPE=no
57862               else
57863                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57864 $as_echo_n "checking for freetype... " >&6; }
57865                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57866 $as_echo "yes (using pkg-config)" >&6; }
57867               fi
57868             fi
57869           fi
57870         fi
57871       fi
57872 
57873       if test "x$FOUND_FREETYPE" != xyes; then
57874         # Check in well-known locations
57875         if test "x$OPENJDK_TARGET_OS" = xwindows; then
57876           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57877 
57878   windows_path="$FREETYPE_BASE_DIR"
57879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57880     unix_path=`$CYGPATH -u "$windows_path"`
57881     FREETYPE_BASE_DIR="$unix_path"
57882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57884     FREETYPE_BASE_DIR="$unix_path"
57885   fi
57886 
57887 
57888   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57889   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57890   METHOD="well-known location"
57891 
57892   # Let's start with an optimistic view of the world :-)
57893   FOUND_FREETYPE=yes
57894 
57895   # First look for the canonical freetype main include file ft2build.h.
57896   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57897     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57898     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57899     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57900       # Fail.
57901       FOUND_FREETYPE=no
57902     fi
57903   fi
57904 
57905   if test "x$FOUND_FREETYPE" = xyes; then
57906     # Include file found, let's continue the sanity check.
57907     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57908 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57909 
57910     # Reset to default value
57911     FREETYPE_BASE_NAME=freetype
57912     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57913     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57914       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57915           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57916         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57917         # for the .6 version explicitly.
57918         FREETYPE_BASE_NAME=freetype.6
57919         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57920         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57921 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57922       else
57923         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57924 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57925         FOUND_FREETYPE=no
57926       fi
57927     else
57928       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57929         # On Windows, we will need both .lib and .dll file.
57930         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57931           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57932 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57933           FOUND_FREETYPE=no
57934         fi
57935       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57936           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57937         # Found lib in isa dir, use that instead.
57938         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57939         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57940 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57941       fi
57942     fi
57943   fi
57944 
57945   if test "x$FOUND_FREETYPE" = xyes; then
57946 
57947   # Only process if variable expands to non-empty
57948 
57949   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57950     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57951 
57952   # Input might be given as Windows format, start by converting to
57953   # unix format.
57954   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57955   new_path=`$CYGPATH -u "$path"`
57956 
57957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57960   # "foo.exe" is OK but "foo" is an error.
57961   #
57962   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57963   # It is also a way to make sure we got the proper file name for the real test later on.
57964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57965   if test "x$test_shortpath" = x; then
57966     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57967 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57968     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57969   fi
57970 
57971   # Call helper function which possibly converts this using DOS-style short mode.
57972   # If so, the updated path is stored in $new_path.
57973 
57974   input_path="$new_path"
57975   # Check if we need to convert this using DOS-style short mode. If the path
57976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57977   # take no chances and rewrite it.
57978   # Note: m4 eats our [], so we need to use [ and ] instead.
57979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57980   if test "x$has_forbidden_chars" != x; then
57981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57985       # Going to short mode and back again did indeed matter. Since short mode is
57986       # case insensitive, let's make it lowercase to improve readability.
57987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57988       # Now convert it back to Unix-style (cygpath)
57989       input_path=`$CYGPATH -u "$shortmode_path"`
57990       new_path="$input_path"
57991     fi
57992   fi
57993 
57994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57995   if test "x$test_cygdrive_prefix" = x; then
57996     # As a simple fix, exclude /usr/bin since it's not a real path.
57997     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57999       # a path prefixed by /cygdrive for fixpath to work.
58000       new_path="$CYGWIN_ROOT_PATH$input_path"
58001     fi
58002   fi
58003 
58004 
58005   if test "x$path" != "x$new_path"; then
58006     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58008 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58009   fi
58010 
58011     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58012 
58013   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58014   has_colon=`$ECHO $path | $GREP ^.:`
58015   new_path="$path"
58016   if test "x$has_colon" = x; then
58017     # Not in mixed or Windows style, start by that.
58018     new_path=`cmd //c echo $path`
58019   fi
58020 
58021 
58022   input_path="$new_path"
58023   # Check if we need to convert this using DOS-style short mode. If the path
58024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58025   # take no chances and rewrite it.
58026   # Note: m4 eats our [], so we need to use [ and ] instead.
58027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58028   if test "x$has_forbidden_chars" != x; then
58029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58030     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58031   fi
58032 
58033 
58034   windows_path="$new_path"
58035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58036     unix_path=`$CYGPATH -u "$windows_path"`
58037     new_path="$unix_path"
58038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58040     new_path="$unix_path"
58041   fi
58042 
58043   if test "x$path" != "x$new_path"; then
58044     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58046 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58047   fi
58048 
58049   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58050   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58051 
58052     else
58053       # We're on a unix platform. Hooray! :)
58054       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58055       has_space=`$ECHO "$path" | $GREP " "`
58056       if test "x$has_space" != x; then
58057         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58058 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58059         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58060       fi
58061 
58062       # Use eval to expand a potential ~
58063       eval path="$path"
58064       if test ! -f "$path" && test ! -d "$path"; then
58065         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58066       fi
58067 
58068       if test -d "$path"; then
58069         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58070       else
58071         dir="`$DIRNAME "$path"`"
58072         base="`$BASENAME "$path"`"
58073         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58074       fi
58075     fi
58076   fi
58077 
58078 
58079   # Only process if variable expands to non-empty
58080 
58081   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58082     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58083 
58084   # Input might be given as Windows format, start by converting to
58085   # unix format.
58086   path="$POTENTIAL_FREETYPE_LIB_PATH"
58087   new_path=`$CYGPATH -u "$path"`
58088 
58089   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58090   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58091   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58092   # "foo.exe" is OK but "foo" is an error.
58093   #
58094   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58095   # It is also a way to make sure we got the proper file name for the real test later on.
58096   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58097   if test "x$test_shortpath" = x; then
58098     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58099 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58100     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58101   fi
58102 
58103   # Call helper function which possibly converts this using DOS-style short mode.
58104   # If so, the updated path is stored in $new_path.
58105 
58106   input_path="$new_path"
58107   # Check if we need to convert this using DOS-style short mode. If the path
58108   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58109   # take no chances and rewrite it.
58110   # Note: m4 eats our [], so we need to use [ and ] instead.
58111   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58112   if test "x$has_forbidden_chars" != x; then
58113     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58114     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58115     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58116     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58117       # Going to short mode and back again did indeed matter. Since short mode is
58118       # case insensitive, let's make it lowercase to improve readability.
58119       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58120       # Now convert it back to Unix-style (cygpath)
58121       input_path=`$CYGPATH -u "$shortmode_path"`
58122       new_path="$input_path"
58123     fi
58124   fi
58125 
58126   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58127   if test "x$test_cygdrive_prefix" = x; then
58128     # As a simple fix, exclude /usr/bin since it's not a real path.
58129     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58130       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58131       # a path prefixed by /cygdrive for fixpath to work.
58132       new_path="$CYGWIN_ROOT_PATH$input_path"
58133     fi
58134   fi
58135 
58136 
58137   if test "x$path" != "x$new_path"; then
58138     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58139     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58140 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58141   fi
58142 
58143     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58144 
58145   path="$POTENTIAL_FREETYPE_LIB_PATH"
58146   has_colon=`$ECHO $path | $GREP ^.:`
58147   new_path="$path"
58148   if test "x$has_colon" = x; then
58149     # Not in mixed or Windows style, start by that.
58150     new_path=`cmd //c echo $path`
58151   fi
58152 
58153 
58154   input_path="$new_path"
58155   # Check if we need to convert this using DOS-style short mode. If the path
58156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58157   # take no chances and rewrite it.
58158   # Note: m4 eats our [], so we need to use [ and ] instead.
58159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58160   if test "x$has_forbidden_chars" != x; then
58161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58162     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58163   fi
58164 
58165 
58166   windows_path="$new_path"
58167   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58168     unix_path=`$CYGPATH -u "$windows_path"`
58169     new_path="$unix_path"
58170   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58171     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58172     new_path="$unix_path"
58173   fi
58174 
58175   if test "x$path" != "x$new_path"; then
58176     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58177     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58178 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58179   fi
58180 
58181   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58182   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58183 
58184     else
58185       # We're on a unix platform. Hooray! :)
58186       path="$POTENTIAL_FREETYPE_LIB_PATH"
58187       has_space=`$ECHO "$path" | $GREP " "`
58188       if test "x$has_space" != x; then
58189         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58190 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58191         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58192       fi
58193 
58194       # Use eval to expand a potential ~
58195       eval path="$path"
58196       if test ! -f "$path" && test ! -d "$path"; then
58197         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58198       fi
58199 
58200       if test -d "$path"; then
58201         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58202       else
58203         dir="`$DIRNAME "$path"`"
58204         base="`$BASENAME "$path"`"
58205         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58206       fi
58207     fi
58208   fi
58209 
58210 
58211     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58212     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58213 $as_echo_n "checking for freetype includes... " >&6; }
58214     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58215 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58216     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58217     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58218 $as_echo_n "checking for freetype libraries... " >&6; }
58219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58220 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58221   fi
58222 
58223           if test "x$FOUND_FREETYPE" != xyes; then
58224             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58225 
58226   windows_path="$FREETYPE_BASE_DIR"
58227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58228     unix_path=`$CYGPATH -u "$windows_path"`
58229     FREETYPE_BASE_DIR="$unix_path"
58230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58232     FREETYPE_BASE_DIR="$unix_path"
58233   fi
58234 
58235 
58236   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58237   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58238   METHOD="well-known location"
58239 
58240   # Let's start with an optimistic view of the world :-)
58241   FOUND_FREETYPE=yes
58242 
58243   # First look for the canonical freetype main include file ft2build.h.
58244   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58245     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58246     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58247     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58248       # Fail.
58249       FOUND_FREETYPE=no
58250     fi
58251   fi
58252 
58253   if test "x$FOUND_FREETYPE" = xyes; then
58254     # Include file found, let's continue the sanity check.
58255     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58256 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58257 
58258     # Reset to default value
58259     FREETYPE_BASE_NAME=freetype
58260     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58261     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58262       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58263           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58264         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58265         # for the .6 version explicitly.
58266         FREETYPE_BASE_NAME=freetype.6
58267         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58268         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58269 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58270       else
58271         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58272 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58273         FOUND_FREETYPE=no
58274       fi
58275     else
58276       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58277         # On Windows, we will need both .lib and .dll file.
58278         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58279           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58280 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58281           FOUND_FREETYPE=no
58282         fi
58283       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58284           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58285         # Found lib in isa dir, use that instead.
58286         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58287         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58288 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58289       fi
58290     fi
58291   fi
58292 
58293   if test "x$FOUND_FREETYPE" = xyes; then
58294 
58295   # Only process if variable expands to non-empty
58296 
58297   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58298     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58299 
58300   # Input might be given as Windows format, start by converting to
58301   # unix format.
58302   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58303   new_path=`$CYGPATH -u "$path"`
58304 
58305   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58306   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58307   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58308   # "foo.exe" is OK but "foo" is an error.
58309   #
58310   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58311   # It is also a way to make sure we got the proper file name for the real test later on.
58312   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58313   if test "x$test_shortpath" = x; then
58314     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58315 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58316     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58317   fi
58318 
58319   # Call helper function which possibly converts this using DOS-style short mode.
58320   # If so, the updated path is stored in $new_path.
58321 
58322   input_path="$new_path"
58323   # Check if we need to convert this using DOS-style short mode. If the path
58324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58325   # take no chances and rewrite it.
58326   # Note: m4 eats our [], so we need to use [ and ] instead.
58327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58328   if test "x$has_forbidden_chars" != x; then
58329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58330     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58331     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58332     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58333       # Going to short mode and back again did indeed matter. Since short mode is
58334       # case insensitive, let's make it lowercase to improve readability.
58335       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58336       # Now convert it back to Unix-style (cygpath)
58337       input_path=`$CYGPATH -u "$shortmode_path"`
58338       new_path="$input_path"
58339     fi
58340   fi
58341 
58342   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58343   if test "x$test_cygdrive_prefix" = x; then
58344     # As a simple fix, exclude /usr/bin since it's not a real path.
58345     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58346       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58347       # a path prefixed by /cygdrive for fixpath to work.
58348       new_path="$CYGWIN_ROOT_PATH$input_path"
58349     fi
58350   fi
58351 
58352 
58353   if test "x$path" != "x$new_path"; then
58354     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58355     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58356 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58357   fi
58358 
58359     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58360 
58361   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58362   has_colon=`$ECHO $path | $GREP ^.:`
58363   new_path="$path"
58364   if test "x$has_colon" = x; then
58365     # Not in mixed or Windows style, start by that.
58366     new_path=`cmd //c echo $path`
58367   fi
58368 
58369 
58370   input_path="$new_path"
58371   # Check if we need to convert this using DOS-style short mode. If the path
58372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58373   # take no chances and rewrite it.
58374   # Note: m4 eats our [], so we need to use [ and ] instead.
58375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58376   if test "x$has_forbidden_chars" != x; then
58377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58378     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58379   fi
58380 
58381 
58382   windows_path="$new_path"
58383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58384     unix_path=`$CYGPATH -u "$windows_path"`
58385     new_path="$unix_path"
58386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58388     new_path="$unix_path"
58389   fi
58390 
58391   if test "x$path" != "x$new_path"; then
58392     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58394 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58395   fi
58396 
58397   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58398   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58399 
58400     else
58401       # We're on a unix platform. Hooray! :)
58402       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58403       has_space=`$ECHO "$path" | $GREP " "`
58404       if test "x$has_space" != x; then
58405         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58406 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58407         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58408       fi
58409 
58410       # Use eval to expand a potential ~
58411       eval path="$path"
58412       if test ! -f "$path" && test ! -d "$path"; then
58413         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58414       fi
58415 
58416       if test -d "$path"; then
58417         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58418       else
58419         dir="`$DIRNAME "$path"`"
58420         base="`$BASENAME "$path"`"
58421         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58422       fi
58423     fi
58424   fi
58425 
58426 
58427   # Only process if variable expands to non-empty
58428 
58429   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58430     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58431 
58432   # Input might be given as Windows format, start by converting to
58433   # unix format.
58434   path="$POTENTIAL_FREETYPE_LIB_PATH"
58435   new_path=`$CYGPATH -u "$path"`
58436 
58437   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58438   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58439   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58440   # "foo.exe" is OK but "foo" is an error.
58441   #
58442   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58443   # It is also a way to make sure we got the proper file name for the real test later on.
58444   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58445   if test "x$test_shortpath" = x; then
58446     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58447 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58448     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58449   fi
58450 
58451   # Call helper function which possibly converts this using DOS-style short mode.
58452   # If so, the updated path is stored in $new_path.
58453 
58454   input_path="$new_path"
58455   # Check if we need to convert this using DOS-style short mode. If the path
58456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58457   # take no chances and rewrite it.
58458   # Note: m4 eats our [], so we need to use [ and ] instead.
58459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58460   if test "x$has_forbidden_chars" != x; then
58461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58462     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58463     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58464     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58465       # Going to short mode and back again did indeed matter. Since short mode is
58466       # case insensitive, let's make it lowercase to improve readability.
58467       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58468       # Now convert it back to Unix-style (cygpath)
58469       input_path=`$CYGPATH -u "$shortmode_path"`
58470       new_path="$input_path"
58471     fi
58472   fi
58473 
58474   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58475   if test "x$test_cygdrive_prefix" = x; then
58476     # As a simple fix, exclude /usr/bin since it's not a real path.
58477     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58478       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58479       # a path prefixed by /cygdrive for fixpath to work.
58480       new_path="$CYGWIN_ROOT_PATH$input_path"
58481     fi
58482   fi
58483 
58484 
58485   if test "x$path" != "x$new_path"; then
58486     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58487     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58488 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58489   fi
58490 
58491     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58492 
58493   path="$POTENTIAL_FREETYPE_LIB_PATH"
58494   has_colon=`$ECHO $path | $GREP ^.:`
58495   new_path="$path"
58496   if test "x$has_colon" = x; then
58497     # Not in mixed or Windows style, start by that.
58498     new_path=`cmd //c echo $path`
58499   fi
58500 
58501 
58502   input_path="$new_path"
58503   # Check if we need to convert this using DOS-style short mode. If the path
58504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58505   # take no chances and rewrite it.
58506   # Note: m4 eats our [], so we need to use [ and ] instead.
58507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58508   if test "x$has_forbidden_chars" != x; then
58509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58510     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58511   fi
58512 
58513 
58514   windows_path="$new_path"
58515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58516     unix_path=`$CYGPATH -u "$windows_path"`
58517     new_path="$unix_path"
58518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58520     new_path="$unix_path"
58521   fi
58522 
58523   if test "x$path" != "x$new_path"; then
58524     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58526 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58527   fi
58528 
58529   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58530   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58531 
58532     else
58533       # We're on a unix platform. Hooray! :)
58534       path="$POTENTIAL_FREETYPE_LIB_PATH"
58535       has_space=`$ECHO "$path" | $GREP " "`
58536       if test "x$has_space" != x; then
58537         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58538 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58539         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58540       fi
58541 
58542       # Use eval to expand a potential ~
58543       eval path="$path"
58544       if test ! -f "$path" && test ! -d "$path"; then
58545         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58546       fi
58547 
58548       if test -d "$path"; then
58549         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58550       else
58551         dir="`$DIRNAME "$path"`"
58552         base="`$BASENAME "$path"`"
58553         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58554       fi
58555     fi
58556   fi
58557 
58558 
58559     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58560     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58561 $as_echo_n "checking for freetype includes... " >&6; }
58562     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58563 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58564     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58565     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58566 $as_echo_n "checking for freetype libraries... " >&6; }
58567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58568 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58569   fi
58570 
58571           fi
58572           if test "x$FOUND_FREETYPE" != xyes; then
58573             FREETYPE_BASE_DIR="$HOME/freetype"
58574 
58575   windows_path="$FREETYPE_BASE_DIR"
58576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58577     unix_path=`$CYGPATH -u "$windows_path"`
58578     FREETYPE_BASE_DIR="$unix_path"
58579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58581     FREETYPE_BASE_DIR="$unix_path"
58582   fi
58583 
58584             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58585 
58586   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58587   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58588   METHOD="well-known location"
58589 
58590   # Let's start with an optimistic view of the world :-)
58591   FOUND_FREETYPE=yes
58592 
58593   # First look for the canonical freetype main include file ft2build.h.
58594   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58595     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58596     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58597     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58598       # Fail.
58599       FOUND_FREETYPE=no
58600     fi
58601   fi
58602 
58603   if test "x$FOUND_FREETYPE" = xyes; then
58604     # Include file found, let's continue the sanity check.
58605     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58606 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58607 
58608     # Reset to default value
58609     FREETYPE_BASE_NAME=freetype
58610     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58611     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58612       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58613           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58614         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58615         # for the .6 version explicitly.
58616         FREETYPE_BASE_NAME=freetype.6
58617         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58618         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58619 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58620       else
58621         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58622 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58623         FOUND_FREETYPE=no
58624       fi
58625     else
58626       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58627         # On Windows, we will need both .lib and .dll file.
58628         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58629           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58630 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58631           FOUND_FREETYPE=no
58632         fi
58633       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58634           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58635         # Found lib in isa dir, use that instead.
58636         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58637         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58638 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58639       fi
58640     fi
58641   fi
58642 
58643   if test "x$FOUND_FREETYPE" = xyes; then
58644 
58645   # Only process if variable expands to non-empty
58646 
58647   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58648     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58649 
58650   # Input might be given as Windows format, start by converting to
58651   # unix format.
58652   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58653   new_path=`$CYGPATH -u "$path"`
58654 
58655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58658   # "foo.exe" is OK but "foo" is an error.
58659   #
58660   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58661   # It is also a way to make sure we got the proper file name for the real test later on.
58662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58663   if test "x$test_shortpath" = x; then
58664     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58665 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58666     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58667   fi
58668 
58669   # Call helper function which possibly converts this using DOS-style short mode.
58670   # If so, the updated path is stored in $new_path.
58671 
58672   input_path="$new_path"
58673   # Check if we need to convert this using DOS-style short mode. If the path
58674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58675   # take no chances and rewrite it.
58676   # Note: m4 eats our [], so we need to use [ and ] instead.
58677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58678   if test "x$has_forbidden_chars" != x; then
58679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58683       # Going to short mode and back again did indeed matter. Since short mode is
58684       # case insensitive, let's make it lowercase to improve readability.
58685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58686       # Now convert it back to Unix-style (cygpath)
58687       input_path=`$CYGPATH -u "$shortmode_path"`
58688       new_path="$input_path"
58689     fi
58690   fi
58691 
58692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58693   if test "x$test_cygdrive_prefix" = x; then
58694     # As a simple fix, exclude /usr/bin since it's not a real path.
58695     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58697       # a path prefixed by /cygdrive for fixpath to work.
58698       new_path="$CYGWIN_ROOT_PATH$input_path"
58699     fi
58700   fi
58701 
58702 
58703   if test "x$path" != "x$new_path"; then
58704     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58706 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58707   fi
58708 
58709     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58710 
58711   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58712   has_colon=`$ECHO $path | $GREP ^.:`
58713   new_path="$path"
58714   if test "x$has_colon" = x; then
58715     # Not in mixed or Windows style, start by that.
58716     new_path=`cmd //c echo $path`
58717   fi
58718 
58719 
58720   input_path="$new_path"
58721   # Check if we need to convert this using DOS-style short mode. If the path
58722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58723   # take no chances and rewrite it.
58724   # Note: m4 eats our [], so we need to use [ and ] instead.
58725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58726   if test "x$has_forbidden_chars" != x; then
58727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58729   fi
58730 
58731 
58732   windows_path="$new_path"
58733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58734     unix_path=`$CYGPATH -u "$windows_path"`
58735     new_path="$unix_path"
58736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58738     new_path="$unix_path"
58739   fi
58740 
58741   if test "x$path" != "x$new_path"; then
58742     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58744 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58745   fi
58746 
58747   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58748   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58749 
58750     else
58751       # We're on a unix platform. Hooray! :)
58752       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58753       has_space=`$ECHO "$path" | $GREP " "`
58754       if test "x$has_space" != x; then
58755         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58756 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58757         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58758       fi
58759 
58760       # Use eval to expand a potential ~
58761       eval path="$path"
58762       if test ! -f "$path" && test ! -d "$path"; then
58763         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58764       fi
58765 
58766       if test -d "$path"; then
58767         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58768       else
58769         dir="`$DIRNAME "$path"`"
58770         base="`$BASENAME "$path"`"
58771         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58772       fi
58773     fi
58774   fi
58775 
58776 
58777   # Only process if variable expands to non-empty
58778 
58779   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58780     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58781 
58782   # Input might be given as Windows format, start by converting to
58783   # unix format.
58784   path="$POTENTIAL_FREETYPE_LIB_PATH"
58785   new_path=`$CYGPATH -u "$path"`
58786 
58787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58790   # "foo.exe" is OK but "foo" is an error.
58791   #
58792   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58793   # It is also a way to make sure we got the proper file name for the real test later on.
58794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58795   if test "x$test_shortpath" = x; then
58796     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58797 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58798     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58799   fi
58800 
58801   # Call helper function which possibly converts this using DOS-style short mode.
58802   # If so, the updated path is stored in $new_path.
58803 
58804   input_path="$new_path"
58805   # Check if we need to convert this using DOS-style short mode. If the path
58806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58807   # take no chances and rewrite it.
58808   # Note: m4 eats our [], so we need to use [ and ] instead.
58809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58810   if test "x$has_forbidden_chars" != x; then
58811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58815       # Going to short mode and back again did indeed matter. Since short mode is
58816       # case insensitive, let's make it lowercase to improve readability.
58817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58818       # Now convert it back to Unix-style (cygpath)
58819       input_path=`$CYGPATH -u "$shortmode_path"`
58820       new_path="$input_path"
58821     fi
58822   fi
58823 
58824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58825   if test "x$test_cygdrive_prefix" = x; then
58826     # As a simple fix, exclude /usr/bin since it's not a real path.
58827     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58829       # a path prefixed by /cygdrive for fixpath to work.
58830       new_path="$CYGWIN_ROOT_PATH$input_path"
58831     fi
58832   fi
58833 
58834 
58835   if test "x$path" != "x$new_path"; then
58836     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58838 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58839   fi
58840 
58841     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58842 
58843   path="$POTENTIAL_FREETYPE_LIB_PATH"
58844   has_colon=`$ECHO $path | $GREP ^.:`
58845   new_path="$path"
58846   if test "x$has_colon" = x; then
58847     # Not in mixed or Windows style, start by that.
58848     new_path=`cmd //c echo $path`
58849   fi
58850 
58851 
58852   input_path="$new_path"
58853   # Check if we need to convert this using DOS-style short mode. If the path
58854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58855   # take no chances and rewrite it.
58856   # Note: m4 eats our [], so we need to use [ and ] instead.
58857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58858   if test "x$has_forbidden_chars" != x; then
58859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58861   fi
58862 
58863 
58864   windows_path="$new_path"
58865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58866     unix_path=`$CYGPATH -u "$windows_path"`
58867     new_path="$unix_path"
58868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58870     new_path="$unix_path"
58871   fi
58872 
58873   if test "x$path" != "x$new_path"; then
58874     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58876 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58877   fi
58878 
58879   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58880   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58881 
58882     else
58883       # We're on a unix platform. Hooray! :)
58884       path="$POTENTIAL_FREETYPE_LIB_PATH"
58885       has_space=`$ECHO "$path" | $GREP " "`
58886       if test "x$has_space" != x; then
58887         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58888 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58889         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58890       fi
58891 
58892       # Use eval to expand a potential ~
58893       eval path="$path"
58894       if test ! -f "$path" && test ! -d "$path"; then
58895         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58896       fi
58897 
58898       if test -d "$path"; then
58899         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58900       else
58901         dir="`$DIRNAME "$path"`"
58902         base="`$BASENAME "$path"`"
58903         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58904       fi
58905     fi
58906   fi
58907 
58908 
58909     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58910     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58911 $as_echo_n "checking for freetype includes... " >&6; }
58912     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58913 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58914     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58915     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58916 $as_echo_n "checking for freetype libraries... " >&6; }
58917     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58918 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58919   fi
58920 
58921             else
58922 
58923   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58924   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58925   METHOD="well-known location"
58926 
58927   # Let's start with an optimistic view of the world :-)
58928   FOUND_FREETYPE=yes
58929 
58930   # First look for the canonical freetype main include file ft2build.h.
58931   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58932     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58933     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58934     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58935       # Fail.
58936       FOUND_FREETYPE=no
58937     fi
58938   fi
58939 
58940   if test "x$FOUND_FREETYPE" = xyes; then
58941     # Include file found, let's continue the sanity check.
58942     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58943 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58944 
58945     # Reset to default value
58946     FREETYPE_BASE_NAME=freetype
58947     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58948     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58949       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58950           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58951         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58952         # for the .6 version explicitly.
58953         FREETYPE_BASE_NAME=freetype.6
58954         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58955         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58956 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58957       else
58958         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58959 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58960         FOUND_FREETYPE=no
58961       fi
58962     else
58963       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58964         # On Windows, we will need both .lib and .dll file.
58965         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58966           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58967 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58968           FOUND_FREETYPE=no
58969         fi
58970       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58971           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58972         # Found lib in isa dir, use that instead.
58973         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58974         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58975 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58976       fi
58977     fi
58978   fi
58979 
58980   if test "x$FOUND_FREETYPE" = xyes; then
58981 
58982   # Only process if variable expands to non-empty
58983 
58984   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58985     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58986 
58987   # Input might be given as Windows format, start by converting to
58988   # unix format.
58989   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58990   new_path=`$CYGPATH -u "$path"`
58991 
58992   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58993   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58994   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58995   # "foo.exe" is OK but "foo" is an error.
58996   #
58997   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58998   # It is also a way to make sure we got the proper file name for the real test later on.
58999   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59000   if test "x$test_shortpath" = x; then
59001     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59002 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59003     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59004   fi
59005 
59006   # Call helper function which possibly converts this using DOS-style short mode.
59007   # If so, the updated path is stored in $new_path.
59008 
59009   input_path="$new_path"
59010   # Check if we need to convert this using DOS-style short mode. If the path
59011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59012   # take no chances and rewrite it.
59013   # Note: m4 eats our [], so we need to use [ and ] instead.
59014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59015   if test "x$has_forbidden_chars" != x; then
59016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59017     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59018     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59019     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59020       # Going to short mode and back again did indeed matter. Since short mode is
59021       # case insensitive, let's make it lowercase to improve readability.
59022       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59023       # Now convert it back to Unix-style (cygpath)
59024       input_path=`$CYGPATH -u "$shortmode_path"`
59025       new_path="$input_path"
59026     fi
59027   fi
59028 
59029   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59030   if test "x$test_cygdrive_prefix" = x; then
59031     # As a simple fix, exclude /usr/bin since it's not a real path.
59032     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59033       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59034       # a path prefixed by /cygdrive for fixpath to work.
59035       new_path="$CYGWIN_ROOT_PATH$input_path"
59036     fi
59037   fi
59038 
59039 
59040   if test "x$path" != "x$new_path"; then
59041     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59042     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59043 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59044   fi
59045 
59046     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59047 
59048   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59049   has_colon=`$ECHO $path | $GREP ^.:`
59050   new_path="$path"
59051   if test "x$has_colon" = x; then
59052     # Not in mixed or Windows style, start by that.
59053     new_path=`cmd //c echo $path`
59054   fi
59055 
59056 
59057   input_path="$new_path"
59058   # Check if we need to convert this using DOS-style short mode. If the path
59059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59060   # take no chances and rewrite it.
59061   # Note: m4 eats our [], so we need to use [ and ] instead.
59062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59063   if test "x$has_forbidden_chars" != x; then
59064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59065     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59066   fi
59067 
59068 
59069   windows_path="$new_path"
59070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59071     unix_path=`$CYGPATH -u "$windows_path"`
59072     new_path="$unix_path"
59073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59074     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59075     new_path="$unix_path"
59076   fi
59077 
59078   if test "x$path" != "x$new_path"; then
59079     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59081 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59082   fi
59083 
59084   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59085   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59086 
59087     else
59088       # We're on a unix platform. Hooray! :)
59089       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59090       has_space=`$ECHO "$path" | $GREP " "`
59091       if test "x$has_space" != x; then
59092         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59093 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59094         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59095       fi
59096 
59097       # Use eval to expand a potential ~
59098       eval path="$path"
59099       if test ! -f "$path" && test ! -d "$path"; then
59100         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59101       fi
59102 
59103       if test -d "$path"; then
59104         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59105       else
59106         dir="`$DIRNAME "$path"`"
59107         base="`$BASENAME "$path"`"
59108         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59109       fi
59110     fi
59111   fi
59112 
59113 
59114   # Only process if variable expands to non-empty
59115 
59116   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59117     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59118 
59119   # Input might be given as Windows format, start by converting to
59120   # unix format.
59121   path="$POTENTIAL_FREETYPE_LIB_PATH"
59122   new_path=`$CYGPATH -u "$path"`
59123 
59124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59127   # "foo.exe" is OK but "foo" is an error.
59128   #
59129   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59130   # It is also a way to make sure we got the proper file name for the real test later on.
59131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59132   if test "x$test_shortpath" = x; then
59133     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59134 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59135     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59136   fi
59137 
59138   # Call helper function which possibly converts this using DOS-style short mode.
59139   # If so, the updated path is stored in $new_path.
59140 
59141   input_path="$new_path"
59142   # Check if we need to convert this using DOS-style short mode. If the path
59143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59144   # take no chances and rewrite it.
59145   # Note: m4 eats our [], so we need to use [ and ] instead.
59146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59147   if test "x$has_forbidden_chars" != x; then
59148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59149     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59150     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59151     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59152       # Going to short mode and back again did indeed matter. Since short mode is
59153       # case insensitive, let's make it lowercase to improve readability.
59154       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59155       # Now convert it back to Unix-style (cygpath)
59156       input_path=`$CYGPATH -u "$shortmode_path"`
59157       new_path="$input_path"
59158     fi
59159   fi
59160 
59161   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59162   if test "x$test_cygdrive_prefix" = x; then
59163     # As a simple fix, exclude /usr/bin since it's not a real path.
59164     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59165       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59166       # a path prefixed by /cygdrive for fixpath to work.
59167       new_path="$CYGWIN_ROOT_PATH$input_path"
59168     fi
59169   fi
59170 
59171 
59172   if test "x$path" != "x$new_path"; then
59173     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59175 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59176   fi
59177 
59178     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59179 
59180   path="$POTENTIAL_FREETYPE_LIB_PATH"
59181   has_colon=`$ECHO $path | $GREP ^.:`
59182   new_path="$path"
59183   if test "x$has_colon" = x; then
59184     # Not in mixed or Windows style, start by that.
59185     new_path=`cmd //c echo $path`
59186   fi
59187 
59188 
59189   input_path="$new_path"
59190   # Check if we need to convert this using DOS-style short mode. If the path
59191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59192   # take no chances and rewrite it.
59193   # Note: m4 eats our [], so we need to use [ and ] instead.
59194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59195   if test "x$has_forbidden_chars" != x; then
59196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59197     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59198   fi
59199 
59200 
59201   windows_path="$new_path"
59202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59203     unix_path=`$CYGPATH -u "$windows_path"`
59204     new_path="$unix_path"
59205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59207     new_path="$unix_path"
59208   fi
59209 
59210   if test "x$path" != "x$new_path"; then
59211     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59213 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59214   fi
59215 
59216   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59217   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59218 
59219     else
59220       # We're on a unix platform. Hooray! :)
59221       path="$POTENTIAL_FREETYPE_LIB_PATH"
59222       has_space=`$ECHO "$path" | $GREP " "`
59223       if test "x$has_space" != x; then
59224         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59225 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59226         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59227       fi
59228 
59229       # Use eval to expand a potential ~
59230       eval path="$path"
59231       if test ! -f "$path" && test ! -d "$path"; then
59232         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59233       fi
59234 
59235       if test -d "$path"; then
59236         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59237       else
59238         dir="`$DIRNAME "$path"`"
59239         base="`$BASENAME "$path"`"
59240         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59241       fi
59242     fi
59243   fi
59244 
59245 
59246     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59247     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59248 $as_echo_n "checking for freetype includes... " >&6; }
59249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59250 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59251     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59252     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59253 $as_echo_n "checking for freetype libraries... " >&6; }
59254     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59255 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59256   fi
59257 
59258             fi
59259             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59260                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59261               # Source is available, as a last resort try to build freetype in default location
59262 
59263   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59264   BUILD_FREETYPE=yes
59265 
59266   # Check if the freetype sources are acessible..
59267   if ! test -d $FREETYPE_SRC_PATH; then
59268     { $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
59269 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59270     BUILD_FREETYPE=no
59271   fi
59272   # ..and contain a vc2010 project file
59273   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59274   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59275     { $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
59276 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59277     BUILD_FREETYPE=no
59278   fi
59279   # Now check if configure found a version of 'msbuild.exe'
59280   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59281     { $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
59282 $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;}
59283     BUILD_FREETYPE=no
59284   fi
59285 
59286   # Ready to go..
59287   if test "x$BUILD_FREETYPE" = xyes; then
59288     # msbuild requires trailing slashes for output directories
59289     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59290     freetype_lib_path_unix="$freetype_lib_path"
59291     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59292 
59293   unix_path="$vcxproj_path"
59294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59295     windows_path=`$CYGPATH -m "$unix_path"`
59296     vcxproj_path="$windows_path"
59297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59298     windows_path=`cmd //c echo $unix_path`
59299     vcxproj_path="$windows_path"
59300   fi
59301 
59302 
59303   unix_path="$freetype_lib_path"
59304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59305     windows_path=`$CYGPATH -m "$unix_path"`
59306     freetype_lib_path="$windows_path"
59307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59308     windows_path=`cmd //c echo $unix_path`
59309     freetype_lib_path="$windows_path"
59310   fi
59311 
59312 
59313   unix_path="$freetype_obj_path"
59314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59315     windows_path=`$CYGPATH -m "$unix_path"`
59316     freetype_obj_path="$windows_path"
59317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59318     windows_path=`cmd //c echo $unix_path`
59319     freetype_obj_path="$windows_path"
59320   fi
59321 
59322     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59323       freetype_platform=x64
59324     else
59325       freetype_platform=win32
59326     fi
59327 
59328     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59329     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59330     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59331     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59332     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59333 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59334 
59335     # First we try to build the freetype.dll
59336     $ECHO -e "@echo off\n"\
59337         "$MSBUILD $vcxproj_path "\
59338         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59339         "/p:Configuration=\"Release Multithreaded\" "\
59340         "/p:Platform=$freetype_platform "\
59341         "/p:ConfigurationType=DynamicLibrary "\
59342         "/p:TargetName=freetype "\
59343         "/p:OutDir=\"$freetype_lib_path\" "\
59344         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59345     cmd /c freetype.bat
59346 
59347     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59348       # If that succeeds we also build freetype.lib
59349       $ECHO -e "@echo off\n"\
59350           "$MSBUILD $vcxproj_path "\
59351           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59352           "/p:Configuration=\"Release Multithreaded\" "\
59353           "/p:Platform=$freetype_platform "\
59354           "/p:ConfigurationType=StaticLibrary "\
59355           "/p:TargetName=freetype "\
59356           "/p:OutDir=\"$freetype_lib_path\" "\
59357           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59358       cmd /c freetype.bat
59359 
59360       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59361         # Once we build both, lib and dll, set freetype lib and include path appropriately
59362         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59363         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59364         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59365 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59366       else
59367         BUILD_FREETYPE=no
59368       fi
59369     else
59370       BUILD_FREETYPE=no
59371     fi
59372   fi
59373 
59374               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59375 
59376   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59377   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59378   METHOD="well-known location"
59379 
59380   # Let's start with an optimistic view of the world :-)
59381   FOUND_FREETYPE=yes
59382 
59383   # First look for the canonical freetype main include file ft2build.h.
59384   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59385     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59386     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59387     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59388       # Fail.
59389       FOUND_FREETYPE=no
59390     fi
59391   fi
59392 
59393   if test "x$FOUND_FREETYPE" = xyes; then
59394     # Include file found, let's continue the sanity check.
59395     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59396 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59397 
59398     # Reset to default value
59399     FREETYPE_BASE_NAME=freetype
59400     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59401     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59402       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59403           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59404         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59405         # for the .6 version explicitly.
59406         FREETYPE_BASE_NAME=freetype.6
59407         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59408         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59409 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59410       else
59411         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59412 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59413         FOUND_FREETYPE=no
59414       fi
59415     else
59416       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59417         # On Windows, we will need both .lib and .dll file.
59418         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59419           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59420 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59421           FOUND_FREETYPE=no
59422         fi
59423       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59424           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59425         # Found lib in isa dir, use that instead.
59426         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59427         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59428 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59429       fi
59430     fi
59431   fi
59432 
59433   if test "x$FOUND_FREETYPE" = xyes; then
59434 
59435   # Only process if variable expands to non-empty
59436 
59437   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59438     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59439 
59440   # Input might be given as Windows format, start by converting to
59441   # unix format.
59442   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59443   new_path=`$CYGPATH -u "$path"`
59444 
59445   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59446   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59447   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59448   # "foo.exe" is OK but "foo" is an error.
59449   #
59450   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59451   # It is also a way to make sure we got the proper file name for the real test later on.
59452   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59453   if test "x$test_shortpath" = x; then
59454     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59455 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59456     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59457   fi
59458 
59459   # Call helper function which possibly converts this using DOS-style short mode.
59460   # If so, the updated path is stored in $new_path.
59461 
59462   input_path="$new_path"
59463   # Check if we need to convert this using DOS-style short mode. If the path
59464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59465   # take no chances and rewrite it.
59466   # Note: m4 eats our [], so we need to use [ and ] instead.
59467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59468   if test "x$has_forbidden_chars" != x; then
59469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59470     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59471     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59472     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59473       # Going to short mode and back again did indeed matter. Since short mode is
59474       # case insensitive, let's make it lowercase to improve readability.
59475       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59476       # Now convert it back to Unix-style (cygpath)
59477       input_path=`$CYGPATH -u "$shortmode_path"`
59478       new_path="$input_path"
59479     fi
59480   fi
59481 
59482   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59483   if test "x$test_cygdrive_prefix" = x; then
59484     # As a simple fix, exclude /usr/bin since it's not a real path.
59485     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59486       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59487       # a path prefixed by /cygdrive for fixpath to work.
59488       new_path="$CYGWIN_ROOT_PATH$input_path"
59489     fi
59490   fi
59491 
59492 
59493   if test "x$path" != "x$new_path"; then
59494     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59496 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59497   fi
59498 
59499     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59500 
59501   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59502   has_colon=`$ECHO $path | $GREP ^.:`
59503   new_path="$path"
59504   if test "x$has_colon" = x; then
59505     # Not in mixed or Windows style, start by that.
59506     new_path=`cmd //c echo $path`
59507   fi
59508 
59509 
59510   input_path="$new_path"
59511   # Check if we need to convert this using DOS-style short mode. If the path
59512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59513   # take no chances and rewrite it.
59514   # Note: m4 eats our [], so we need to use [ and ] instead.
59515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59516   if test "x$has_forbidden_chars" != x; then
59517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59518     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59519   fi
59520 
59521 
59522   windows_path="$new_path"
59523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59524     unix_path=`$CYGPATH -u "$windows_path"`
59525     new_path="$unix_path"
59526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59528     new_path="$unix_path"
59529   fi
59530 
59531   if test "x$path" != "x$new_path"; then
59532     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59534 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59535   fi
59536 
59537   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59538   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59539 
59540     else
59541       # We're on a unix platform. Hooray! :)
59542       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59543       has_space=`$ECHO "$path" | $GREP " "`
59544       if test "x$has_space" != x; then
59545         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59546 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59547         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59548       fi
59549 
59550       # Use eval to expand a potential ~
59551       eval path="$path"
59552       if test ! -f "$path" && test ! -d "$path"; then
59553         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59554       fi
59555 
59556       if test -d "$path"; then
59557         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59558       else
59559         dir="`$DIRNAME "$path"`"
59560         base="`$BASENAME "$path"`"
59561         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59562       fi
59563     fi
59564   fi
59565 
59566 
59567   # Only process if variable expands to non-empty
59568 
59569   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59570     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59571 
59572   # Input might be given as Windows format, start by converting to
59573   # unix format.
59574   path="$POTENTIAL_FREETYPE_LIB_PATH"
59575   new_path=`$CYGPATH -u "$path"`
59576 
59577   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59578   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59579   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59580   # "foo.exe" is OK but "foo" is an error.
59581   #
59582   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59583   # It is also a way to make sure we got the proper file name for the real test later on.
59584   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59585   if test "x$test_shortpath" = x; then
59586     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59587 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59588     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59589   fi
59590 
59591   # Call helper function which possibly converts this using DOS-style short mode.
59592   # If so, the updated path is stored in $new_path.
59593 
59594   input_path="$new_path"
59595   # Check if we need to convert this using DOS-style short mode. If the path
59596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59597   # take no chances and rewrite it.
59598   # Note: m4 eats our [], so we need to use [ and ] instead.
59599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59600   if test "x$has_forbidden_chars" != x; then
59601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59602     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59603     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59604     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59605       # Going to short mode and back again did indeed matter. Since short mode is
59606       # case insensitive, let's make it lowercase to improve readability.
59607       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59608       # Now convert it back to Unix-style (cygpath)
59609       input_path=`$CYGPATH -u "$shortmode_path"`
59610       new_path="$input_path"
59611     fi
59612   fi
59613 
59614   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59615   if test "x$test_cygdrive_prefix" = x; then
59616     # As a simple fix, exclude /usr/bin since it's not a real path.
59617     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59618       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59619       # a path prefixed by /cygdrive for fixpath to work.
59620       new_path="$CYGWIN_ROOT_PATH$input_path"
59621     fi
59622   fi
59623 
59624 
59625   if test "x$path" != "x$new_path"; then
59626     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59627     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59628 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59629   fi
59630 
59631     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59632 
59633   path="$POTENTIAL_FREETYPE_LIB_PATH"
59634   has_colon=`$ECHO $path | $GREP ^.:`
59635   new_path="$path"
59636   if test "x$has_colon" = x; then
59637     # Not in mixed or Windows style, start by that.
59638     new_path=`cmd //c echo $path`
59639   fi
59640 
59641 
59642   input_path="$new_path"
59643   # Check if we need to convert this using DOS-style short mode. If the path
59644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59645   # take no chances and rewrite it.
59646   # Note: m4 eats our [], so we need to use [ and ] instead.
59647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59648   if test "x$has_forbidden_chars" != x; then
59649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59650     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59651   fi
59652 
59653 
59654   windows_path="$new_path"
59655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59656     unix_path=`$CYGPATH -u "$windows_path"`
59657     new_path="$unix_path"
59658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59660     new_path="$unix_path"
59661   fi
59662 
59663   if test "x$path" != "x$new_path"; then
59664     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59666 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59667   fi
59668 
59669   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59670   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59671 
59672     else
59673       # We're on a unix platform. Hooray! :)
59674       path="$POTENTIAL_FREETYPE_LIB_PATH"
59675       has_space=`$ECHO "$path" | $GREP " "`
59676       if test "x$has_space" != x; then
59677         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59678 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59679         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59680       fi
59681 
59682       # Use eval to expand a potential ~
59683       eval path="$path"
59684       if test ! -f "$path" && test ! -d "$path"; then
59685         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59686       fi
59687 
59688       if test -d "$path"; then
59689         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59690       else
59691         dir="`$DIRNAME "$path"`"
59692         base="`$BASENAME "$path"`"
59693         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59694       fi
59695     fi
59696   fi
59697 
59698 
59699     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59701 $as_echo_n "checking for freetype includes... " >&6; }
59702     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59703 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59704     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59705     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59706 $as_echo_n "checking for freetype libraries... " >&6; }
59707     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59708 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59709   fi
59710 
59711               else
59712 
59713   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59714   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59715   METHOD="well-known location"
59716 
59717   # Let's start with an optimistic view of the world :-)
59718   FOUND_FREETYPE=yes
59719 
59720   # First look for the canonical freetype main include file ft2build.h.
59721   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59722     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59723     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59724     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59725       # Fail.
59726       FOUND_FREETYPE=no
59727     fi
59728   fi
59729 
59730   if test "x$FOUND_FREETYPE" = xyes; then
59731     # Include file found, let's continue the sanity check.
59732     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59733 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59734 
59735     # Reset to default value
59736     FREETYPE_BASE_NAME=freetype
59737     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59738     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59739       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59740           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59741         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59742         # for the .6 version explicitly.
59743         FREETYPE_BASE_NAME=freetype.6
59744         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59745         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59746 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59747       else
59748         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59749 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59750         FOUND_FREETYPE=no
59751       fi
59752     else
59753       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59754         # On Windows, we will need both .lib and .dll file.
59755         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59756           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59757 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59758           FOUND_FREETYPE=no
59759         fi
59760       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59761           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59762         # Found lib in isa dir, use that instead.
59763         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59764         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59765 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59766       fi
59767     fi
59768   fi
59769 
59770   if test "x$FOUND_FREETYPE" = xyes; then
59771 
59772   # Only process if variable expands to non-empty
59773 
59774   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59775     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59776 
59777   # Input might be given as Windows format, start by converting to
59778   # unix format.
59779   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59780   new_path=`$CYGPATH -u "$path"`
59781 
59782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59785   # "foo.exe" is OK but "foo" is an error.
59786   #
59787   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59788   # It is also a way to make sure we got the proper file name for the real test later on.
59789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59790   if test "x$test_shortpath" = x; then
59791     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59792 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59793     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59794   fi
59795 
59796   # Call helper function which possibly converts this using DOS-style short mode.
59797   # If so, the updated path is stored in $new_path.
59798 
59799   input_path="$new_path"
59800   # Check if we need to convert this using DOS-style short mode. If the path
59801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59802   # take no chances and rewrite it.
59803   # Note: m4 eats our [], so we need to use [ and ] instead.
59804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59805   if test "x$has_forbidden_chars" != x; then
59806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59810       # Going to short mode and back again did indeed matter. Since short mode is
59811       # case insensitive, let's make it lowercase to improve readability.
59812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59813       # Now convert it back to Unix-style (cygpath)
59814       input_path=`$CYGPATH -u "$shortmode_path"`
59815       new_path="$input_path"
59816     fi
59817   fi
59818 
59819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59820   if test "x$test_cygdrive_prefix" = x; then
59821     # As a simple fix, exclude /usr/bin since it's not a real path.
59822     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59824       # a path prefixed by /cygdrive for fixpath to work.
59825       new_path="$CYGWIN_ROOT_PATH$input_path"
59826     fi
59827   fi
59828 
59829 
59830   if test "x$path" != "x$new_path"; then
59831     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59833 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59834   fi
59835 
59836     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59837 
59838   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59839   has_colon=`$ECHO $path | $GREP ^.:`
59840   new_path="$path"
59841   if test "x$has_colon" = x; then
59842     # Not in mixed or Windows style, start by that.
59843     new_path=`cmd //c echo $path`
59844   fi
59845 
59846 
59847   input_path="$new_path"
59848   # Check if we need to convert this using DOS-style short mode. If the path
59849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59850   # take no chances and rewrite it.
59851   # Note: m4 eats our [], so we need to use [ and ] instead.
59852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59853   if test "x$has_forbidden_chars" != x; then
59854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59856   fi
59857 
59858 
59859   windows_path="$new_path"
59860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59861     unix_path=`$CYGPATH -u "$windows_path"`
59862     new_path="$unix_path"
59863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59865     new_path="$unix_path"
59866   fi
59867 
59868   if test "x$path" != "x$new_path"; then
59869     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59871 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59872   fi
59873 
59874   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59875   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59876 
59877     else
59878       # We're on a unix platform. Hooray! :)
59879       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59880       has_space=`$ECHO "$path" | $GREP " "`
59881       if test "x$has_space" != x; then
59882         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59883 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59884         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59885       fi
59886 
59887       # Use eval to expand a potential ~
59888       eval path="$path"
59889       if test ! -f "$path" && test ! -d "$path"; then
59890         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59891       fi
59892 
59893       if test -d "$path"; then
59894         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59895       else
59896         dir="`$DIRNAME "$path"`"
59897         base="`$BASENAME "$path"`"
59898         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59899       fi
59900     fi
59901   fi
59902 
59903 
59904   # Only process if variable expands to non-empty
59905 
59906   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59907     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59908 
59909   # Input might be given as Windows format, start by converting to
59910   # unix format.
59911   path="$POTENTIAL_FREETYPE_LIB_PATH"
59912   new_path=`$CYGPATH -u "$path"`
59913 
59914   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59915   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59916   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59917   # "foo.exe" is OK but "foo" is an error.
59918   #
59919   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59920   # It is also a way to make sure we got the proper file name for the real test later on.
59921   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59922   if test "x$test_shortpath" = x; then
59923     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59924 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59925     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59926   fi
59927 
59928   # Call helper function which possibly converts this using DOS-style short mode.
59929   # If so, the updated path is stored in $new_path.
59930 
59931   input_path="$new_path"
59932   # Check if we need to convert this using DOS-style short mode. If the path
59933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59934   # take no chances and rewrite it.
59935   # Note: m4 eats our [], so we need to use [ and ] instead.
59936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59937   if test "x$has_forbidden_chars" != x; then
59938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59939     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59940     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59941     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59942       # Going to short mode and back again did indeed matter. Since short mode is
59943       # case insensitive, let's make it lowercase to improve readability.
59944       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59945       # Now convert it back to Unix-style (cygpath)
59946       input_path=`$CYGPATH -u "$shortmode_path"`
59947       new_path="$input_path"
59948     fi
59949   fi
59950 
59951   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59952   if test "x$test_cygdrive_prefix" = x; then
59953     # As a simple fix, exclude /usr/bin since it's not a real path.
59954     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59955       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59956       # a path prefixed by /cygdrive for fixpath to work.
59957       new_path="$CYGWIN_ROOT_PATH$input_path"
59958     fi
59959   fi
59960 
59961 
59962   if test "x$path" != "x$new_path"; then
59963     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59964     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59965 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59966   fi
59967 
59968     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59969 
59970   path="$POTENTIAL_FREETYPE_LIB_PATH"
59971   has_colon=`$ECHO $path | $GREP ^.:`
59972   new_path="$path"
59973   if test "x$has_colon" = x; then
59974     # Not in mixed or Windows style, start by that.
59975     new_path=`cmd //c echo $path`
59976   fi
59977 
59978 
59979   input_path="$new_path"
59980   # Check if we need to convert this using DOS-style short mode. If the path
59981   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59982   # take no chances and rewrite it.
59983   # Note: m4 eats our [], so we need to use [ and ] instead.
59984   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59985   if test "x$has_forbidden_chars" != x; then
59986     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59987     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59988   fi
59989 
59990 
59991   windows_path="$new_path"
59992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59993     unix_path=`$CYGPATH -u "$windows_path"`
59994     new_path="$unix_path"
59995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59997     new_path="$unix_path"
59998   fi
59999 
60000   if test "x$path" != "x$new_path"; then
60001     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60003 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60004   fi
60005 
60006   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60007   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60008 
60009     else
60010       # We're on a unix platform. Hooray! :)
60011       path="$POTENTIAL_FREETYPE_LIB_PATH"
60012       has_space=`$ECHO "$path" | $GREP " "`
60013       if test "x$has_space" != x; then
60014         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60015 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60016         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60017       fi
60018 
60019       # Use eval to expand a potential ~
60020       eval path="$path"
60021       if test ! -f "$path" && test ! -d "$path"; then
60022         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60023       fi
60024 
60025       if test -d "$path"; then
60026         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60027       else
60028         dir="`$DIRNAME "$path"`"
60029         base="`$BASENAME "$path"`"
60030         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60031       fi
60032     fi
60033   fi
60034 
60035 
60036     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60037     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60038 $as_echo_n "checking for freetype includes... " >&6; }
60039     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60040 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60041     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60042     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60043 $as_echo_n "checking for freetype libraries... " >&6; }
60044     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60045 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60046   fi
60047 
60048               fi
60049             fi
60050           fi
60051         else
60052           FREETYPE_BASE_DIR="$SYSROOT/usr"
60053 
60054   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60055   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60056   METHOD="well-known location"
60057 
60058   # Let's start with an optimistic view of the world :-)
60059   FOUND_FREETYPE=yes
60060 
60061   # First look for the canonical freetype main include file ft2build.h.
60062   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60063     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60064     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60065     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60066       # Fail.
60067       FOUND_FREETYPE=no
60068     fi
60069   fi
60070 
60071   if test "x$FOUND_FREETYPE" = xyes; then
60072     # Include file found, let's continue the sanity check.
60073     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60074 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60075 
60076     # Reset to default value
60077     FREETYPE_BASE_NAME=freetype
60078     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60079     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60080       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60081           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60082         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60083         # for the .6 version explicitly.
60084         FREETYPE_BASE_NAME=freetype.6
60085         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60086         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60087 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60088       else
60089         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60090 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60091         FOUND_FREETYPE=no
60092       fi
60093     else
60094       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60095         # On Windows, we will need both .lib and .dll file.
60096         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60097           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60098 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60099           FOUND_FREETYPE=no
60100         fi
60101       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60102           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60103         # Found lib in isa dir, use that instead.
60104         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60105         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60106 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60107       fi
60108     fi
60109   fi
60110 
60111   if test "x$FOUND_FREETYPE" = xyes; then
60112 
60113   # Only process if variable expands to non-empty
60114 
60115   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60116     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60117 
60118   # Input might be given as Windows format, start by converting to
60119   # unix format.
60120   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60121   new_path=`$CYGPATH -u "$path"`
60122 
60123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60126   # "foo.exe" is OK but "foo" is an error.
60127   #
60128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60129   # It is also a way to make sure we got the proper file name for the real test later on.
60130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60131   if test "x$test_shortpath" = x; then
60132     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60133 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60134     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60135   fi
60136 
60137   # Call helper function which possibly converts this using DOS-style short mode.
60138   # If so, the updated path is stored in $new_path.
60139 
60140   input_path="$new_path"
60141   # Check if we need to convert this using DOS-style short mode. If the path
60142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60143   # take no chances and rewrite it.
60144   # Note: m4 eats our [], so we need to use [ and ] instead.
60145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60146   if test "x$has_forbidden_chars" != x; then
60147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60148     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60149     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60150     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60151       # Going to short mode and back again did indeed matter. Since short mode is
60152       # case insensitive, let's make it lowercase to improve readability.
60153       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60154       # Now convert it back to Unix-style (cygpath)
60155       input_path=`$CYGPATH -u "$shortmode_path"`
60156       new_path="$input_path"
60157     fi
60158   fi
60159 
60160   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60161   if test "x$test_cygdrive_prefix" = x; then
60162     # As a simple fix, exclude /usr/bin since it's not a real path.
60163     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60164       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60165       # a path prefixed by /cygdrive for fixpath to work.
60166       new_path="$CYGWIN_ROOT_PATH$input_path"
60167     fi
60168   fi
60169 
60170 
60171   if test "x$path" != "x$new_path"; then
60172     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60174 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60175   fi
60176 
60177     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60178 
60179   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60180   has_colon=`$ECHO $path | $GREP ^.:`
60181   new_path="$path"
60182   if test "x$has_colon" = x; then
60183     # Not in mixed or Windows style, start by that.
60184     new_path=`cmd //c echo $path`
60185   fi
60186 
60187 
60188   input_path="$new_path"
60189   # Check if we need to convert this using DOS-style short mode. If the path
60190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60191   # take no chances and rewrite it.
60192   # Note: m4 eats our [], so we need to use [ and ] instead.
60193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60194   if test "x$has_forbidden_chars" != x; then
60195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60196     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60197   fi
60198 
60199 
60200   windows_path="$new_path"
60201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60202     unix_path=`$CYGPATH -u "$windows_path"`
60203     new_path="$unix_path"
60204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60206     new_path="$unix_path"
60207   fi
60208 
60209   if test "x$path" != "x$new_path"; then
60210     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60212 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60213   fi
60214 
60215   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60216   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60217 
60218     else
60219       # We're on a unix platform. Hooray! :)
60220       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60221       has_space=`$ECHO "$path" | $GREP " "`
60222       if test "x$has_space" != x; then
60223         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60224 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60225         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60226       fi
60227 
60228       # Use eval to expand a potential ~
60229       eval path="$path"
60230       if test ! -f "$path" && test ! -d "$path"; then
60231         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60232       fi
60233 
60234       if test -d "$path"; then
60235         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60236       else
60237         dir="`$DIRNAME "$path"`"
60238         base="`$BASENAME "$path"`"
60239         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60240       fi
60241     fi
60242   fi
60243 
60244 
60245   # Only process if variable expands to non-empty
60246 
60247   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60248     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60249 
60250   # Input might be given as Windows format, start by converting to
60251   # unix format.
60252   path="$POTENTIAL_FREETYPE_LIB_PATH"
60253   new_path=`$CYGPATH -u "$path"`
60254 
60255   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60256   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60257   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60258   # "foo.exe" is OK but "foo" is an error.
60259   #
60260   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60261   # It is also a way to make sure we got the proper file name for the real test later on.
60262   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60263   if test "x$test_shortpath" = x; then
60264     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60265 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60266     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60267   fi
60268 
60269   # Call helper function which possibly converts this using DOS-style short mode.
60270   # If so, the updated path is stored in $new_path.
60271 
60272   input_path="$new_path"
60273   # Check if we need to convert this using DOS-style short mode. If the path
60274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60275   # take no chances and rewrite it.
60276   # Note: m4 eats our [], so we need to use [ and ] instead.
60277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60278   if test "x$has_forbidden_chars" != x; then
60279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60283       # Going to short mode and back again did indeed matter. Since short mode is
60284       # case insensitive, let's make it lowercase to improve readability.
60285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60286       # Now convert it back to Unix-style (cygpath)
60287       input_path=`$CYGPATH -u "$shortmode_path"`
60288       new_path="$input_path"
60289     fi
60290   fi
60291 
60292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60293   if test "x$test_cygdrive_prefix" = x; then
60294     # As a simple fix, exclude /usr/bin since it's not a real path.
60295     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60297       # a path prefixed by /cygdrive for fixpath to work.
60298       new_path="$CYGWIN_ROOT_PATH$input_path"
60299     fi
60300   fi
60301 
60302 
60303   if test "x$path" != "x$new_path"; then
60304     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60305     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60306 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60307   fi
60308 
60309     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60310 
60311   path="$POTENTIAL_FREETYPE_LIB_PATH"
60312   has_colon=`$ECHO $path | $GREP ^.:`
60313   new_path="$path"
60314   if test "x$has_colon" = x; then
60315     # Not in mixed or Windows style, start by that.
60316     new_path=`cmd //c echo $path`
60317   fi
60318 
60319 
60320   input_path="$new_path"
60321   # Check if we need to convert this using DOS-style short mode. If the path
60322   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60323   # take no chances and rewrite it.
60324   # Note: m4 eats our [], so we need to use [ and ] instead.
60325   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60326   if test "x$has_forbidden_chars" != x; then
60327     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60328     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60329   fi
60330 
60331 
60332   windows_path="$new_path"
60333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60334     unix_path=`$CYGPATH -u "$windows_path"`
60335     new_path="$unix_path"
60336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60338     new_path="$unix_path"
60339   fi
60340 
60341   if test "x$path" != "x$new_path"; then
60342     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60343     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60344 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60345   fi
60346 
60347   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60348   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60349 
60350     else
60351       # We're on a unix platform. Hooray! :)
60352       path="$POTENTIAL_FREETYPE_LIB_PATH"
60353       has_space=`$ECHO "$path" | $GREP " "`
60354       if test "x$has_space" != x; then
60355         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60356 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60357         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60358       fi
60359 
60360       # Use eval to expand a potential ~
60361       eval path="$path"
60362       if test ! -f "$path" && test ! -d "$path"; then
60363         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60364       fi
60365 
60366       if test -d "$path"; then
60367         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60368       else
60369         dir="`$DIRNAME "$path"`"
60370         base="`$BASENAME "$path"`"
60371         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60372       fi
60373     fi
60374   fi
60375 
60376 
60377     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60378     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60379 $as_echo_n "checking for freetype includes... " >&6; }
60380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60381 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60382     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60384 $as_echo_n "checking for freetype libraries... " >&6; }
60385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60386 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60387   fi
60388 
60389 
60390           if test "x$FOUND_FREETYPE" != xyes; then
60391             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60392 
60393   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60394   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60395   METHOD="well-known location"
60396 
60397   # Let's start with an optimistic view of the world :-)
60398   FOUND_FREETYPE=yes
60399 
60400   # First look for the canonical freetype main include file ft2build.h.
60401   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60402     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60403     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60404     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60405       # Fail.
60406       FOUND_FREETYPE=no
60407     fi
60408   fi
60409 
60410   if test "x$FOUND_FREETYPE" = xyes; then
60411     # Include file found, let's continue the sanity check.
60412     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60413 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60414 
60415     # Reset to default value
60416     FREETYPE_BASE_NAME=freetype
60417     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60418     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60419       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60420           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60421         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60422         # for the .6 version explicitly.
60423         FREETYPE_BASE_NAME=freetype.6
60424         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60425         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60426 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60427       else
60428         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60429 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60430         FOUND_FREETYPE=no
60431       fi
60432     else
60433       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60434         # On Windows, we will need both .lib and .dll file.
60435         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60436           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60437 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60438           FOUND_FREETYPE=no
60439         fi
60440       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60441           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60442         # Found lib in isa dir, use that instead.
60443         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60444         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60445 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60446       fi
60447     fi
60448   fi
60449 
60450   if test "x$FOUND_FREETYPE" = xyes; then
60451 
60452   # Only process if variable expands to non-empty
60453 
60454   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60455     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60456 
60457   # Input might be given as Windows format, start by converting to
60458   # unix format.
60459   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60460   new_path=`$CYGPATH -u "$path"`
60461 
60462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60465   # "foo.exe" is OK but "foo" is an error.
60466   #
60467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60468   # It is also a way to make sure we got the proper file name for the real test later on.
60469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60470   if test "x$test_shortpath" = x; then
60471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60472 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60473     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60474   fi
60475 
60476   # Call helper function which possibly converts this using DOS-style short mode.
60477   # If so, the updated path is stored in $new_path.
60478 
60479   input_path="$new_path"
60480   # Check if we need to convert this using DOS-style short mode. If the path
60481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60482   # take no chances and rewrite it.
60483   # Note: m4 eats our [], so we need to use [ and ] instead.
60484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60485   if test "x$has_forbidden_chars" != x; then
60486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60490       # Going to short mode and back again did indeed matter. Since short mode is
60491       # case insensitive, let's make it lowercase to improve readability.
60492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60493       # Now convert it back to Unix-style (cygpath)
60494       input_path=`$CYGPATH -u "$shortmode_path"`
60495       new_path="$input_path"
60496     fi
60497   fi
60498 
60499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60500   if test "x$test_cygdrive_prefix" = x; then
60501     # As a simple fix, exclude /usr/bin since it's not a real path.
60502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60504       # a path prefixed by /cygdrive for fixpath to work.
60505       new_path="$CYGWIN_ROOT_PATH$input_path"
60506     fi
60507   fi
60508 
60509 
60510   if test "x$path" != "x$new_path"; then
60511     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60513 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60514   fi
60515 
60516     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60517 
60518   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60519   has_colon=`$ECHO $path | $GREP ^.:`
60520   new_path="$path"
60521   if test "x$has_colon" = x; then
60522     # Not in mixed or Windows style, start by that.
60523     new_path=`cmd //c echo $path`
60524   fi
60525 
60526 
60527   input_path="$new_path"
60528   # Check if we need to convert this using DOS-style short mode. If the path
60529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60530   # take no chances and rewrite it.
60531   # Note: m4 eats our [], so we need to use [ and ] instead.
60532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60533   if test "x$has_forbidden_chars" != x; then
60534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60536   fi
60537 
60538 
60539   windows_path="$new_path"
60540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60541     unix_path=`$CYGPATH -u "$windows_path"`
60542     new_path="$unix_path"
60543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60545     new_path="$unix_path"
60546   fi
60547 
60548   if test "x$path" != "x$new_path"; then
60549     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60551 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60552   fi
60553 
60554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60556 
60557     else
60558       # We're on a unix platform. Hooray! :)
60559       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60560       has_space=`$ECHO "$path" | $GREP " "`
60561       if test "x$has_space" != x; then
60562         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60563 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60564         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60565       fi
60566 
60567       # Use eval to expand a potential ~
60568       eval path="$path"
60569       if test ! -f "$path" && test ! -d "$path"; then
60570         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60571       fi
60572 
60573       if test -d "$path"; then
60574         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60575       else
60576         dir="`$DIRNAME "$path"`"
60577         base="`$BASENAME "$path"`"
60578         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60579       fi
60580     fi
60581   fi
60582 
60583 
60584   # Only process if variable expands to non-empty
60585 
60586   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60587     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60588 
60589   # Input might be given as Windows format, start by converting to
60590   # unix format.
60591   path="$POTENTIAL_FREETYPE_LIB_PATH"
60592   new_path=`$CYGPATH -u "$path"`
60593 
60594   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60595   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60596   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60597   # "foo.exe" is OK but "foo" is an error.
60598   #
60599   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60600   # It is also a way to make sure we got the proper file name for the real test later on.
60601   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60602   if test "x$test_shortpath" = x; then
60603     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60604 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60605     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60606   fi
60607 
60608   # Call helper function which possibly converts this using DOS-style short mode.
60609   # If so, the updated path is stored in $new_path.
60610 
60611   input_path="$new_path"
60612   # Check if we need to convert this using DOS-style short mode. If the path
60613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60614   # take no chances and rewrite it.
60615   # Note: m4 eats our [], so we need to use [ and ] instead.
60616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60617   if test "x$has_forbidden_chars" != x; then
60618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60619     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60620     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60621     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60622       # Going to short mode and back again did indeed matter. Since short mode is
60623       # case insensitive, let's make it lowercase to improve readability.
60624       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60625       # Now convert it back to Unix-style (cygpath)
60626       input_path=`$CYGPATH -u "$shortmode_path"`
60627       new_path="$input_path"
60628     fi
60629   fi
60630 
60631   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60632   if test "x$test_cygdrive_prefix" = x; then
60633     # As a simple fix, exclude /usr/bin since it's not a real path.
60634     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60635       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60636       # a path prefixed by /cygdrive for fixpath to work.
60637       new_path="$CYGWIN_ROOT_PATH$input_path"
60638     fi
60639   fi
60640 
60641 
60642   if test "x$path" != "x$new_path"; then
60643     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60645 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60646   fi
60647 
60648     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60649 
60650   path="$POTENTIAL_FREETYPE_LIB_PATH"
60651   has_colon=`$ECHO $path | $GREP ^.:`
60652   new_path="$path"
60653   if test "x$has_colon" = x; then
60654     # Not in mixed or Windows style, start by that.
60655     new_path=`cmd //c echo $path`
60656   fi
60657 
60658 
60659   input_path="$new_path"
60660   # Check if we need to convert this using DOS-style short mode. If the path
60661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60662   # take no chances and rewrite it.
60663   # Note: m4 eats our [], so we need to use [ and ] instead.
60664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60665   if test "x$has_forbidden_chars" != x; then
60666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60667     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60668   fi
60669 
60670 
60671   windows_path="$new_path"
60672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60673     unix_path=`$CYGPATH -u "$windows_path"`
60674     new_path="$unix_path"
60675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60677     new_path="$unix_path"
60678   fi
60679 
60680   if test "x$path" != "x$new_path"; then
60681     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60683 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60684   fi
60685 
60686   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60687   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60688 
60689     else
60690       # We're on a unix platform. Hooray! :)
60691       path="$POTENTIAL_FREETYPE_LIB_PATH"
60692       has_space=`$ECHO "$path" | $GREP " "`
60693       if test "x$has_space" != x; then
60694         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60695 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60696         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60697       fi
60698 
60699       # Use eval to expand a potential ~
60700       eval path="$path"
60701       if test ! -f "$path" && test ! -d "$path"; then
60702         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60703       fi
60704 
60705       if test -d "$path"; then
60706         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60707       else
60708         dir="`$DIRNAME "$path"`"
60709         base="`$BASENAME "$path"`"
60710         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60711       fi
60712     fi
60713   fi
60714 
60715 
60716     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60717     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60718 $as_echo_n "checking for freetype includes... " >&6; }
60719     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60720 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60721     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60722     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60723 $as_echo_n "checking for freetype libraries... " >&6; }
60724     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60725 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60726   fi
60727 
60728           fi
60729 
60730           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60731             if test "x$FOUND_FREETYPE" != xyes; then
60732               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60733               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60734 
60735   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60736   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60737   METHOD="well-known location"
60738 
60739   # Let's start with an optimistic view of the world :-)
60740   FOUND_FREETYPE=yes
60741 
60742   # First look for the canonical freetype main include file ft2build.h.
60743   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60744     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60745     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60746     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60747       # Fail.
60748       FOUND_FREETYPE=no
60749     fi
60750   fi
60751 
60752   if test "x$FOUND_FREETYPE" = xyes; then
60753     # Include file found, let's continue the sanity check.
60754     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60755 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60756 
60757     # Reset to default value
60758     FREETYPE_BASE_NAME=freetype
60759     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60760     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60761       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60762           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60763         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60764         # for the .6 version explicitly.
60765         FREETYPE_BASE_NAME=freetype.6
60766         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60767         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60768 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60769       else
60770         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60771 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60772         FOUND_FREETYPE=no
60773       fi
60774     else
60775       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60776         # On Windows, we will need both .lib and .dll file.
60777         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60778           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60779 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60780           FOUND_FREETYPE=no
60781         fi
60782       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60783           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60784         # Found lib in isa dir, use that instead.
60785         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60786         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60787 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60788       fi
60789     fi
60790   fi
60791 
60792   if test "x$FOUND_FREETYPE" = xyes; then
60793 
60794   # Only process if variable expands to non-empty
60795 
60796   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60797     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60798 
60799   # Input might be given as Windows format, start by converting to
60800   # unix format.
60801   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60802   new_path=`$CYGPATH -u "$path"`
60803 
60804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60807   # "foo.exe" is OK but "foo" is an error.
60808   #
60809   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60810   # It is also a way to make sure we got the proper file name for the real test later on.
60811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60812   if test "x$test_shortpath" = x; then
60813     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60814 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60815     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60816   fi
60817 
60818   # Call helper function which possibly converts this using DOS-style short mode.
60819   # If so, the updated path is stored in $new_path.
60820 
60821   input_path="$new_path"
60822   # Check if we need to convert this using DOS-style short mode. If the path
60823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60824   # take no chances and rewrite it.
60825   # Note: m4 eats our [], so we need to use [ and ] instead.
60826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60827   if test "x$has_forbidden_chars" != x; then
60828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60829     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60830     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60831     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60832       # Going to short mode and back again did indeed matter. Since short mode is
60833       # case insensitive, let's make it lowercase to improve readability.
60834       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60835       # Now convert it back to Unix-style (cygpath)
60836       input_path=`$CYGPATH -u "$shortmode_path"`
60837       new_path="$input_path"
60838     fi
60839   fi
60840 
60841   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60842   if test "x$test_cygdrive_prefix" = x; then
60843     # As a simple fix, exclude /usr/bin since it's not a real path.
60844     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60845       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60846       # a path prefixed by /cygdrive for fixpath to work.
60847       new_path="$CYGWIN_ROOT_PATH$input_path"
60848     fi
60849   fi
60850 
60851 
60852   if test "x$path" != "x$new_path"; then
60853     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60855 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60856   fi
60857 
60858     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60859 
60860   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60861   has_colon=`$ECHO $path | $GREP ^.:`
60862   new_path="$path"
60863   if test "x$has_colon" = x; then
60864     # Not in mixed or Windows style, start by that.
60865     new_path=`cmd //c echo $path`
60866   fi
60867 
60868 
60869   input_path="$new_path"
60870   # Check if we need to convert this using DOS-style short mode. If the path
60871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60872   # take no chances and rewrite it.
60873   # Note: m4 eats our [], so we need to use [ and ] instead.
60874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60875   if test "x$has_forbidden_chars" != x; then
60876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60877     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60878   fi
60879 
60880 
60881   windows_path="$new_path"
60882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60883     unix_path=`$CYGPATH -u "$windows_path"`
60884     new_path="$unix_path"
60885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60887     new_path="$unix_path"
60888   fi
60889 
60890   if test "x$path" != "x$new_path"; then
60891     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60893 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60894   fi
60895 
60896   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60897   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60898 
60899     else
60900       # We're on a unix platform. Hooray! :)
60901       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60902       has_space=`$ECHO "$path" | $GREP " "`
60903       if test "x$has_space" != x; then
60904         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60905 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60906         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60907       fi
60908 
60909       # Use eval to expand a potential ~
60910       eval path="$path"
60911       if test ! -f "$path" && test ! -d "$path"; then
60912         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60913       fi
60914 
60915       if test -d "$path"; then
60916         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60917       else
60918         dir="`$DIRNAME "$path"`"
60919         base="`$BASENAME "$path"`"
60920         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60921       fi
60922     fi
60923   fi
60924 
60925 
60926   # Only process if variable expands to non-empty
60927 
60928   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60929     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60930 
60931   # Input might be given as Windows format, start by converting to
60932   # unix format.
60933   path="$POTENTIAL_FREETYPE_LIB_PATH"
60934   new_path=`$CYGPATH -u "$path"`
60935 
60936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60939   # "foo.exe" is OK but "foo" is an error.
60940   #
60941   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60942   # It is also a way to make sure we got the proper file name for the real test later on.
60943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60944   if test "x$test_shortpath" = x; then
60945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60946 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60947     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60948   fi
60949 
60950   # Call helper function which possibly converts this using DOS-style short mode.
60951   # If so, the updated path is stored in $new_path.
60952 
60953   input_path="$new_path"
60954   # Check if we need to convert this using DOS-style short mode. If the path
60955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60956   # take no chances and rewrite it.
60957   # Note: m4 eats our [], so we need to use [ and ] instead.
60958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60959   if test "x$has_forbidden_chars" != x; then
60960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60961     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60962     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60963     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60964       # Going to short mode and back again did indeed matter. Since short mode is
60965       # case insensitive, let's make it lowercase to improve readability.
60966       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60967       # Now convert it back to Unix-style (cygpath)
60968       input_path=`$CYGPATH -u "$shortmode_path"`
60969       new_path="$input_path"
60970     fi
60971   fi
60972 
60973   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60974   if test "x$test_cygdrive_prefix" = x; then
60975     # As a simple fix, exclude /usr/bin since it's not a real path.
60976     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60977       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60978       # a path prefixed by /cygdrive for fixpath to work.
60979       new_path="$CYGWIN_ROOT_PATH$input_path"
60980     fi
60981   fi
60982 
60983 
60984   if test "x$path" != "x$new_path"; then
60985     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60987 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60988   fi
60989 
60990     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60991 
60992   path="$POTENTIAL_FREETYPE_LIB_PATH"
60993   has_colon=`$ECHO $path | $GREP ^.:`
60994   new_path="$path"
60995   if test "x$has_colon" = x; then
60996     # Not in mixed or Windows style, start by that.
60997     new_path=`cmd //c echo $path`
60998   fi
60999 
61000 
61001   input_path="$new_path"
61002   # Check if we need to convert this using DOS-style short mode. If the path
61003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61004   # take no chances and rewrite it.
61005   # Note: m4 eats our [], so we need to use [ and ] instead.
61006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61007   if test "x$has_forbidden_chars" != x; then
61008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61010   fi
61011 
61012 
61013   windows_path="$new_path"
61014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61015     unix_path=`$CYGPATH -u "$windows_path"`
61016     new_path="$unix_path"
61017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61019     new_path="$unix_path"
61020   fi
61021 
61022   if test "x$path" != "x$new_path"; then
61023     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61025 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61026   fi
61027 
61028   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61029   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61030 
61031     else
61032       # We're on a unix platform. Hooray! :)
61033       path="$POTENTIAL_FREETYPE_LIB_PATH"
61034       has_space=`$ECHO "$path" | $GREP " "`
61035       if test "x$has_space" != x; then
61036         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61037 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61038         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61039       fi
61040 
61041       # Use eval to expand a potential ~
61042       eval path="$path"
61043       if test ! -f "$path" && test ! -d "$path"; then
61044         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61045       fi
61046 
61047       if test -d "$path"; then
61048         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61049       else
61050         dir="`$DIRNAME "$path"`"
61051         base="`$BASENAME "$path"`"
61052         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61053       fi
61054     fi
61055   fi
61056 
61057 
61058     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61060 $as_echo_n "checking for freetype includes... " >&6; }
61061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61062 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61063     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61064     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61065 $as_echo_n "checking for freetype libraries... " >&6; }
61066     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61067 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61068   fi
61069 
61070             fi
61071           fi
61072 
61073           if test "x$FOUND_FREETYPE" != xyes; then
61074             FREETYPE_BASE_DIR="$SYSROOT/usr"
61075             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61076 
61077   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61078   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61079   METHOD="well-known location"
61080 
61081   # Let's start with an optimistic view of the world :-)
61082   FOUND_FREETYPE=yes
61083 
61084   # First look for the canonical freetype main include file ft2build.h.
61085   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61086     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61087     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61088     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61089       # Fail.
61090       FOUND_FREETYPE=no
61091     fi
61092   fi
61093 
61094   if test "x$FOUND_FREETYPE" = xyes; then
61095     # Include file found, let's continue the sanity check.
61096     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61097 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61098 
61099     # Reset to default value
61100     FREETYPE_BASE_NAME=freetype
61101     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61102     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61103       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61104           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61105         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61106         # for the .6 version explicitly.
61107         FREETYPE_BASE_NAME=freetype.6
61108         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61109         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61110 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61111       else
61112         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61113 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61114         FOUND_FREETYPE=no
61115       fi
61116     else
61117       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61118         # On Windows, we will need both .lib and .dll file.
61119         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61120           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61121 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61122           FOUND_FREETYPE=no
61123         fi
61124       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61125           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61126         # Found lib in isa dir, use that instead.
61127         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61128         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61129 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61130       fi
61131     fi
61132   fi
61133 
61134   if test "x$FOUND_FREETYPE" = xyes; then
61135 
61136   # Only process if variable expands to non-empty
61137 
61138   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61139     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61140 
61141   # Input might be given as Windows format, start by converting to
61142   # unix format.
61143   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61144   new_path=`$CYGPATH -u "$path"`
61145 
61146   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61147   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61148   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61149   # "foo.exe" is OK but "foo" is an error.
61150   #
61151   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61152   # It is also a way to make sure we got the proper file name for the real test later on.
61153   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61154   if test "x$test_shortpath" = x; then
61155     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61156 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61157     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61158   fi
61159 
61160   # Call helper function which possibly converts this using DOS-style short mode.
61161   # If so, the updated path is stored in $new_path.
61162 
61163   input_path="$new_path"
61164   # Check if we need to convert this using DOS-style short mode. If the path
61165   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61166   # take no chances and rewrite it.
61167   # Note: m4 eats our [], so we need to use [ and ] instead.
61168   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61169   if test "x$has_forbidden_chars" != x; then
61170     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61171     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61172     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61173     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61174       # Going to short mode and back again did indeed matter. Since short mode is
61175       # case insensitive, let's make it lowercase to improve readability.
61176       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61177       # Now convert it back to Unix-style (cygpath)
61178       input_path=`$CYGPATH -u "$shortmode_path"`
61179       new_path="$input_path"
61180     fi
61181   fi
61182 
61183   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61184   if test "x$test_cygdrive_prefix" = x; then
61185     # As a simple fix, exclude /usr/bin since it's not a real path.
61186     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61187       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61188       # a path prefixed by /cygdrive for fixpath to work.
61189       new_path="$CYGWIN_ROOT_PATH$input_path"
61190     fi
61191   fi
61192 
61193 
61194   if test "x$path" != "x$new_path"; then
61195     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61196     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61197 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61198   fi
61199 
61200     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61201 
61202   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61203   has_colon=`$ECHO $path | $GREP ^.:`
61204   new_path="$path"
61205   if test "x$has_colon" = x; then
61206     # Not in mixed or Windows style, start by that.
61207     new_path=`cmd //c echo $path`
61208   fi
61209 
61210 
61211   input_path="$new_path"
61212   # Check if we need to convert this using DOS-style short mode. If the path
61213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61214   # take no chances and rewrite it.
61215   # Note: m4 eats our [], so we need to use [ and ] instead.
61216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61217   if test "x$has_forbidden_chars" != x; then
61218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61219     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61220   fi
61221 
61222 
61223   windows_path="$new_path"
61224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61225     unix_path=`$CYGPATH -u "$windows_path"`
61226     new_path="$unix_path"
61227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61229     new_path="$unix_path"
61230   fi
61231 
61232   if test "x$path" != "x$new_path"; then
61233     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61235 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61236   fi
61237 
61238   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61239   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61240 
61241     else
61242       # We're on a unix platform. Hooray! :)
61243       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61244       has_space=`$ECHO "$path" | $GREP " "`
61245       if test "x$has_space" != x; then
61246         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61247 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61248         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61249       fi
61250 
61251       # Use eval to expand a potential ~
61252       eval path="$path"
61253       if test ! -f "$path" && test ! -d "$path"; then
61254         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61255       fi
61256 
61257       if test -d "$path"; then
61258         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61259       else
61260         dir="`$DIRNAME "$path"`"
61261         base="`$BASENAME "$path"`"
61262         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61263       fi
61264     fi
61265   fi
61266 
61267 
61268   # Only process if variable expands to non-empty
61269 
61270   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61271     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61272 
61273   # Input might be given as Windows format, start by converting to
61274   # unix format.
61275   path="$POTENTIAL_FREETYPE_LIB_PATH"
61276   new_path=`$CYGPATH -u "$path"`
61277 
61278   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61279   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61280   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61281   # "foo.exe" is OK but "foo" is an error.
61282   #
61283   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61284   # It is also a way to make sure we got the proper file name for the real test later on.
61285   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61286   if test "x$test_shortpath" = x; then
61287     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61288 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61289     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61290   fi
61291 
61292   # Call helper function which possibly converts this using DOS-style short mode.
61293   # If so, the updated path is stored in $new_path.
61294 
61295   input_path="$new_path"
61296   # Check if we need to convert this using DOS-style short mode. If the path
61297   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61298   # take no chances and rewrite it.
61299   # Note: m4 eats our [], so we need to use [ and ] instead.
61300   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61301   if test "x$has_forbidden_chars" != x; then
61302     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61303     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61304     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61305     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61306       # Going to short mode and back again did indeed matter. Since short mode is
61307       # case insensitive, let's make it lowercase to improve readability.
61308       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61309       # Now convert it back to Unix-style (cygpath)
61310       input_path=`$CYGPATH -u "$shortmode_path"`
61311       new_path="$input_path"
61312     fi
61313   fi
61314 
61315   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61316   if test "x$test_cygdrive_prefix" = x; then
61317     # As a simple fix, exclude /usr/bin since it's not a real path.
61318     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61319       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61320       # a path prefixed by /cygdrive for fixpath to work.
61321       new_path="$CYGWIN_ROOT_PATH$input_path"
61322     fi
61323   fi
61324 
61325 
61326   if test "x$path" != "x$new_path"; then
61327     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61328     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61329 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61330   fi
61331 
61332     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61333 
61334   path="$POTENTIAL_FREETYPE_LIB_PATH"
61335   has_colon=`$ECHO $path | $GREP ^.:`
61336   new_path="$path"
61337   if test "x$has_colon" = x; then
61338     # Not in mixed or Windows style, start by that.
61339     new_path=`cmd //c echo $path`
61340   fi
61341 
61342 
61343   input_path="$new_path"
61344   # Check if we need to convert this using DOS-style short mode. If the path
61345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61346   # take no chances and rewrite it.
61347   # Note: m4 eats our [], so we need to use [ and ] instead.
61348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61349   if test "x$has_forbidden_chars" != x; then
61350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61351     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61352   fi
61353 
61354 
61355   windows_path="$new_path"
61356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61357     unix_path=`$CYGPATH -u "$windows_path"`
61358     new_path="$unix_path"
61359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61361     new_path="$unix_path"
61362   fi
61363 
61364   if test "x$path" != "x$new_path"; then
61365     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61366     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61367 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61368   fi
61369 
61370   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61371   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61372 
61373     else
61374       # We're on a unix platform. Hooray! :)
61375       path="$POTENTIAL_FREETYPE_LIB_PATH"
61376       has_space=`$ECHO "$path" | $GREP " "`
61377       if test "x$has_space" != x; then
61378         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61379 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61380         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61381       fi
61382 
61383       # Use eval to expand a potential ~
61384       eval path="$path"
61385       if test ! -f "$path" && test ! -d "$path"; then
61386         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61387       fi
61388 
61389       if test -d "$path"; then
61390         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61391       else
61392         dir="`$DIRNAME "$path"`"
61393         base="`$BASENAME "$path"`"
61394         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61395       fi
61396     fi
61397   fi
61398 
61399 
61400     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61401     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61402 $as_echo_n "checking for freetype includes... " >&6; }
61403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61404 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61405     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61406     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61407 $as_echo_n "checking for freetype libraries... " >&6; }
61408     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61409 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61410   fi
61411 
61412             else
61413 
61414   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61415   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61416   METHOD="well-known location"
61417 
61418   # Let's start with an optimistic view of the world :-)
61419   FOUND_FREETYPE=yes
61420 
61421   # First look for the canonical freetype main include file ft2build.h.
61422   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61423     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61424     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61425     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61426       # Fail.
61427       FOUND_FREETYPE=no
61428     fi
61429   fi
61430 
61431   if test "x$FOUND_FREETYPE" = xyes; then
61432     # Include file found, let's continue the sanity check.
61433     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61434 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61435 
61436     # Reset to default value
61437     FREETYPE_BASE_NAME=freetype
61438     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61439     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61440       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61441           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61442         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61443         # for the .6 version explicitly.
61444         FREETYPE_BASE_NAME=freetype.6
61445         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61446         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61447 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61448       else
61449         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61450 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61451         FOUND_FREETYPE=no
61452       fi
61453     else
61454       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61455         # On Windows, we will need both .lib and .dll file.
61456         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61457           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61458 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61459           FOUND_FREETYPE=no
61460         fi
61461       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61462           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61463         # Found lib in isa dir, use that instead.
61464         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61465         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61466 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61467       fi
61468     fi
61469   fi
61470 
61471   if test "x$FOUND_FREETYPE" = xyes; then
61472 
61473   # Only process if variable expands to non-empty
61474 
61475   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61476     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61477 
61478   # Input might be given as Windows format, start by converting to
61479   # unix format.
61480   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61481   new_path=`$CYGPATH -u "$path"`
61482 
61483   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61484   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61485   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61486   # "foo.exe" is OK but "foo" is an error.
61487   #
61488   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61489   # It is also a way to make sure we got the proper file name for the real test later on.
61490   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61491   if test "x$test_shortpath" = x; then
61492     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61493 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61494     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61495   fi
61496 
61497   # Call helper function which possibly converts this using DOS-style short mode.
61498   # If so, the updated path is stored in $new_path.
61499 
61500   input_path="$new_path"
61501   # Check if we need to convert this using DOS-style short mode. If the path
61502   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61503   # take no chances and rewrite it.
61504   # Note: m4 eats our [], so we need to use [ and ] instead.
61505   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61506   if test "x$has_forbidden_chars" != x; then
61507     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61508     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61509     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61510     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61511       # Going to short mode and back again did indeed matter. Since short mode is
61512       # case insensitive, let's make it lowercase to improve readability.
61513       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61514       # Now convert it back to Unix-style (cygpath)
61515       input_path=`$CYGPATH -u "$shortmode_path"`
61516       new_path="$input_path"
61517     fi
61518   fi
61519 
61520   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61521   if test "x$test_cygdrive_prefix" = x; then
61522     # As a simple fix, exclude /usr/bin since it's not a real path.
61523     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61524       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61525       # a path prefixed by /cygdrive for fixpath to work.
61526       new_path="$CYGWIN_ROOT_PATH$input_path"
61527     fi
61528   fi
61529 
61530 
61531   if test "x$path" != "x$new_path"; then
61532     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61534 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61535   fi
61536 
61537     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61538 
61539   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61540   has_colon=`$ECHO $path | $GREP ^.:`
61541   new_path="$path"
61542   if test "x$has_colon" = x; then
61543     # Not in mixed or Windows style, start by that.
61544     new_path=`cmd //c echo $path`
61545   fi
61546 
61547 
61548   input_path="$new_path"
61549   # Check if we need to convert this using DOS-style short mode. If the path
61550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61551   # take no chances and rewrite it.
61552   # Note: m4 eats our [], so we need to use [ and ] instead.
61553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61554   if test "x$has_forbidden_chars" != x; then
61555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61556     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61557   fi
61558 
61559 
61560   windows_path="$new_path"
61561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61562     unix_path=`$CYGPATH -u "$windows_path"`
61563     new_path="$unix_path"
61564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61566     new_path="$unix_path"
61567   fi
61568 
61569   if test "x$path" != "x$new_path"; then
61570     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61571     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61572 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61573   fi
61574 
61575   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61576   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61577 
61578     else
61579       # We're on a unix platform. Hooray! :)
61580       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61581       has_space=`$ECHO "$path" | $GREP " "`
61582       if test "x$has_space" != x; then
61583         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61584 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61585         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61586       fi
61587 
61588       # Use eval to expand a potential ~
61589       eval path="$path"
61590       if test ! -f "$path" && test ! -d "$path"; then
61591         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61592       fi
61593 
61594       if test -d "$path"; then
61595         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61596       else
61597         dir="`$DIRNAME "$path"`"
61598         base="`$BASENAME "$path"`"
61599         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61600       fi
61601     fi
61602   fi
61603 
61604 
61605   # Only process if variable expands to non-empty
61606 
61607   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61608     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61609 
61610   # Input might be given as Windows format, start by converting to
61611   # unix format.
61612   path="$POTENTIAL_FREETYPE_LIB_PATH"
61613   new_path=`$CYGPATH -u "$path"`
61614 
61615   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61616   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61617   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61618   # "foo.exe" is OK but "foo" is an error.
61619   #
61620   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61621   # It is also a way to make sure we got the proper file name for the real test later on.
61622   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61623   if test "x$test_shortpath" = x; then
61624     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61625 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61626     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61627   fi
61628 
61629   # Call helper function which possibly converts this using DOS-style short mode.
61630   # If so, the updated path is stored in $new_path.
61631 
61632   input_path="$new_path"
61633   # Check if we need to convert this using DOS-style short mode. If the path
61634   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61635   # take no chances and rewrite it.
61636   # Note: m4 eats our [], so we need to use [ and ] instead.
61637   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61638   if test "x$has_forbidden_chars" != x; then
61639     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61640     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61641     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61642     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61643       # Going to short mode and back again did indeed matter. Since short mode is
61644       # case insensitive, let's make it lowercase to improve readability.
61645       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61646       # Now convert it back to Unix-style (cygpath)
61647       input_path=`$CYGPATH -u "$shortmode_path"`
61648       new_path="$input_path"
61649     fi
61650   fi
61651 
61652   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61653   if test "x$test_cygdrive_prefix" = x; then
61654     # As a simple fix, exclude /usr/bin since it's not a real path.
61655     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61656       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61657       # a path prefixed by /cygdrive for fixpath to work.
61658       new_path="$CYGWIN_ROOT_PATH$input_path"
61659     fi
61660   fi
61661 
61662 
61663   if test "x$path" != "x$new_path"; then
61664     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61666 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61667   fi
61668 
61669     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61670 
61671   path="$POTENTIAL_FREETYPE_LIB_PATH"
61672   has_colon=`$ECHO $path | $GREP ^.:`
61673   new_path="$path"
61674   if test "x$has_colon" = x; then
61675     # Not in mixed or Windows style, start by that.
61676     new_path=`cmd //c echo $path`
61677   fi
61678 
61679 
61680   input_path="$new_path"
61681   # Check if we need to convert this using DOS-style short mode. If the path
61682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61683   # take no chances and rewrite it.
61684   # Note: m4 eats our [], so we need to use [ and ] instead.
61685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61686   if test "x$has_forbidden_chars" != x; then
61687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61688     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61689   fi
61690 
61691 
61692   windows_path="$new_path"
61693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61694     unix_path=`$CYGPATH -u "$windows_path"`
61695     new_path="$unix_path"
61696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61698     new_path="$unix_path"
61699   fi
61700 
61701   if test "x$path" != "x$new_path"; then
61702     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61703     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61704 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61705   fi
61706 
61707   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61708   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61709 
61710     else
61711       # We're on a unix platform. Hooray! :)
61712       path="$POTENTIAL_FREETYPE_LIB_PATH"
61713       has_space=`$ECHO "$path" | $GREP " "`
61714       if test "x$has_space" != x; then
61715         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61716 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61717         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61718       fi
61719 
61720       # Use eval to expand a potential ~
61721       eval path="$path"
61722       if test ! -f "$path" && test ! -d "$path"; then
61723         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61724       fi
61725 
61726       if test -d "$path"; then
61727         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61728       else
61729         dir="`$DIRNAME "$path"`"
61730         base="`$BASENAME "$path"`"
61731         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61732       fi
61733     fi
61734   fi
61735 
61736 
61737     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61738     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61739 $as_echo_n "checking for freetype includes... " >&6; }
61740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61741 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61742     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61743     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61744 $as_echo_n "checking for freetype libraries... " >&6; }
61745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61746 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61747   fi
61748 
61749               if test "x$FOUND_FREETYPE" != xyes; then
61750 
61751   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61752   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61753   METHOD="well-known location"
61754 
61755   # Let's start with an optimistic view of the world :-)
61756   FOUND_FREETYPE=yes
61757 
61758   # First look for the canonical freetype main include file ft2build.h.
61759   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61760     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61761     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61762     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61763       # Fail.
61764       FOUND_FREETYPE=no
61765     fi
61766   fi
61767 
61768   if test "x$FOUND_FREETYPE" = xyes; then
61769     # Include file found, let's continue the sanity check.
61770     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61771 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61772 
61773     # Reset to default value
61774     FREETYPE_BASE_NAME=freetype
61775     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61776     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61777       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61778           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61779         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61780         # for the .6 version explicitly.
61781         FREETYPE_BASE_NAME=freetype.6
61782         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61783         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61784 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61785       else
61786         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61787 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61788         FOUND_FREETYPE=no
61789       fi
61790     else
61791       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61792         # On Windows, we will need both .lib and .dll file.
61793         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61794           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61795 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61796           FOUND_FREETYPE=no
61797         fi
61798       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61799           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61800         # Found lib in isa dir, use that instead.
61801         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61802         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61803 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61804       fi
61805     fi
61806   fi
61807 
61808   if test "x$FOUND_FREETYPE" = xyes; then
61809 
61810   # Only process if variable expands to non-empty
61811 
61812   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61813     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61814 
61815   # Input might be given as Windows format, start by converting to
61816   # unix format.
61817   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61818   new_path=`$CYGPATH -u "$path"`
61819 
61820   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61821   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61822   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61823   # "foo.exe" is OK but "foo" is an error.
61824   #
61825   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61826   # It is also a way to make sure we got the proper file name for the real test later on.
61827   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61828   if test "x$test_shortpath" = x; then
61829     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61830 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61831     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61832   fi
61833 
61834   # Call helper function which possibly converts this using DOS-style short mode.
61835   # If so, the updated path is stored in $new_path.
61836 
61837   input_path="$new_path"
61838   # Check if we need to convert this using DOS-style short mode. If the path
61839   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61840   # take no chances and rewrite it.
61841   # Note: m4 eats our [], so we need to use [ and ] instead.
61842   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61843   if test "x$has_forbidden_chars" != x; then
61844     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61845     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61846     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61847     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61848       # Going to short mode and back again did indeed matter. Since short mode is
61849       # case insensitive, let's make it lowercase to improve readability.
61850       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61851       # Now convert it back to Unix-style (cygpath)
61852       input_path=`$CYGPATH -u "$shortmode_path"`
61853       new_path="$input_path"
61854     fi
61855   fi
61856 
61857   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61858   if test "x$test_cygdrive_prefix" = x; then
61859     # As a simple fix, exclude /usr/bin since it's not a real path.
61860     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61861       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61862       # a path prefixed by /cygdrive for fixpath to work.
61863       new_path="$CYGWIN_ROOT_PATH$input_path"
61864     fi
61865   fi
61866 
61867 
61868   if test "x$path" != "x$new_path"; then
61869     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61871 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61872   fi
61873 
61874     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61875 
61876   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61877   has_colon=`$ECHO $path | $GREP ^.:`
61878   new_path="$path"
61879   if test "x$has_colon" = x; then
61880     # Not in mixed or Windows style, start by that.
61881     new_path=`cmd //c echo $path`
61882   fi
61883 
61884 
61885   input_path="$new_path"
61886   # Check if we need to convert this using DOS-style short mode. If the path
61887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61888   # take no chances and rewrite it.
61889   # Note: m4 eats our [], so we need to use [ and ] instead.
61890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61891   if test "x$has_forbidden_chars" != x; then
61892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61893     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61894   fi
61895 
61896 
61897   windows_path="$new_path"
61898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61899     unix_path=`$CYGPATH -u "$windows_path"`
61900     new_path="$unix_path"
61901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61903     new_path="$unix_path"
61904   fi
61905 
61906   if test "x$path" != "x$new_path"; then
61907     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61908     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61909 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61910   fi
61911 
61912   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61913   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61914 
61915     else
61916       # We're on a unix platform. Hooray! :)
61917       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61918       has_space=`$ECHO "$path" | $GREP " "`
61919       if test "x$has_space" != x; then
61920         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61921 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61922         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61923       fi
61924 
61925       # Use eval to expand a potential ~
61926       eval path="$path"
61927       if test ! -f "$path" && test ! -d "$path"; then
61928         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61929       fi
61930 
61931       if test -d "$path"; then
61932         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61933       else
61934         dir="`$DIRNAME "$path"`"
61935         base="`$BASENAME "$path"`"
61936         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61937       fi
61938     fi
61939   fi
61940 
61941 
61942   # Only process if variable expands to non-empty
61943 
61944   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61945     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61946 
61947   # Input might be given as Windows format, start by converting to
61948   # unix format.
61949   path="$POTENTIAL_FREETYPE_LIB_PATH"
61950   new_path=`$CYGPATH -u "$path"`
61951 
61952   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61953   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61954   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61955   # "foo.exe" is OK but "foo" is an error.
61956   #
61957   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61958   # It is also a way to make sure we got the proper file name for the real test later on.
61959   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61960   if test "x$test_shortpath" = x; then
61961     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61962 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61963     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61964   fi
61965 
61966   # Call helper function which possibly converts this using DOS-style short mode.
61967   # If so, the updated path is stored in $new_path.
61968 
61969   input_path="$new_path"
61970   # Check if we need to convert this using DOS-style short mode. If the path
61971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61972   # take no chances and rewrite it.
61973   # Note: m4 eats our [], so we need to use [ and ] instead.
61974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61975   if test "x$has_forbidden_chars" != x; then
61976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61980       # Going to short mode and back again did indeed matter. Since short mode is
61981       # case insensitive, let's make it lowercase to improve readability.
61982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61983       # Now convert it back to Unix-style (cygpath)
61984       input_path=`$CYGPATH -u "$shortmode_path"`
61985       new_path="$input_path"
61986     fi
61987   fi
61988 
61989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61990   if test "x$test_cygdrive_prefix" = x; then
61991     # As a simple fix, exclude /usr/bin since it's not a real path.
61992     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61994       # a path prefixed by /cygdrive for fixpath to work.
61995       new_path="$CYGWIN_ROOT_PATH$input_path"
61996     fi
61997   fi
61998 
61999 
62000   if test "x$path" != "x$new_path"; then
62001     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62002     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62003 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62004   fi
62005 
62006     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62007 
62008   path="$POTENTIAL_FREETYPE_LIB_PATH"
62009   has_colon=`$ECHO $path | $GREP ^.:`
62010   new_path="$path"
62011   if test "x$has_colon" = x; then
62012     # Not in mixed or Windows style, start by that.
62013     new_path=`cmd //c echo $path`
62014   fi
62015 
62016 
62017   input_path="$new_path"
62018   # Check if we need to convert this using DOS-style short mode. If the path
62019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62020   # take no chances and rewrite it.
62021   # Note: m4 eats our [], so we need to use [ and ] instead.
62022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62023   if test "x$has_forbidden_chars" != x; then
62024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62025     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62026   fi
62027 
62028 
62029   windows_path="$new_path"
62030   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62031     unix_path=`$CYGPATH -u "$windows_path"`
62032     new_path="$unix_path"
62033   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62034     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62035     new_path="$unix_path"
62036   fi
62037 
62038   if test "x$path" != "x$new_path"; then
62039     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62041 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62042   fi
62043 
62044   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62045   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62046 
62047     else
62048       # We're on a unix platform. Hooray! :)
62049       path="$POTENTIAL_FREETYPE_LIB_PATH"
62050       has_space=`$ECHO "$path" | $GREP " "`
62051       if test "x$has_space" != x; then
62052         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62053 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62054         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62055       fi
62056 
62057       # Use eval to expand a potential ~
62058       eval path="$path"
62059       if test ! -f "$path" && test ! -d "$path"; then
62060         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62061       fi
62062 
62063       if test -d "$path"; then
62064         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62065       else
62066         dir="`$DIRNAME "$path"`"
62067         base="`$BASENAME "$path"`"
62068         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62069       fi
62070     fi
62071   fi
62072 
62073 
62074     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62075     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62076 $as_echo_n "checking for freetype includes... " >&6; }
62077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62078 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62079     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62080     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62081 $as_echo_n "checking for freetype libraries... " >&6; }
62082     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62083 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62084   fi
62085 
62086               fi
62087             fi
62088           fi
62089         fi
62090       fi # end check in well-known locations
62091 
62092       if test "x$FOUND_FREETYPE" != xyes; then
62093 
62094   # Print a helpful message on how to acquire the necessary build dependency.
62095   # freetype is the help tag: freetype, cups, alsa etc
62096   MISSING_DEPENDENCY=freetype
62097 
62098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62099     cygwin_help $MISSING_DEPENDENCY
62100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62101     msys_help $MISSING_DEPENDENCY
62102   else
62103     PKGHANDLER_COMMAND=
62104 
62105     case $PKGHANDLER in
62106       apt-get)
62107         apt_help     $MISSING_DEPENDENCY ;;
62108       yum)
62109         yum_help     $MISSING_DEPENDENCY ;;
62110       port)
62111         port_help    $MISSING_DEPENDENCY ;;
62112       pkgutil)
62113         pkgutil_help $MISSING_DEPENDENCY ;;
62114       pkgadd)
62115         pkgadd_help  $MISSING_DEPENDENCY ;;
62116     esac
62117 
62118     if test "x$PKGHANDLER_COMMAND" != x; then
62119       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62120     fi
62121   fi
62122 
62123         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62124       fi
62125     fi # end user specified settings
62126 
62127     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62128     if test "x$FREETYPE_CFLAGS" = x; then
62129 
62130   # Only process if variable expands to non-empty
62131 
62132   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62133     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62134 
62135   # Input might be given as Windows format, start by converting to
62136   # unix format.
62137   path="$FREETYPE_INCLUDE_PATH"
62138   new_path=`$CYGPATH -u "$path"`
62139 
62140   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62141   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62142   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62143   # "foo.exe" is OK but "foo" is an error.
62144   #
62145   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62146   # It is also a way to make sure we got the proper file name for the real test later on.
62147   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62148   if test "x$test_shortpath" = x; then
62149     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62150 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62151     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62152   fi
62153 
62154   # Call helper function which possibly converts this using DOS-style short mode.
62155   # If so, the updated path is stored in $new_path.
62156 
62157   input_path="$new_path"
62158   # Check if we need to convert this using DOS-style short mode. If the path
62159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62160   # take no chances and rewrite it.
62161   # Note: m4 eats our [], so we need to use [ and ] instead.
62162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62163   if test "x$has_forbidden_chars" != x; then
62164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62165     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62166     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62167     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62168       # Going to short mode and back again did indeed matter. Since short mode is
62169       # case insensitive, let's make it lowercase to improve readability.
62170       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62171       # Now convert it back to Unix-style (cygpath)
62172       input_path=`$CYGPATH -u "$shortmode_path"`
62173       new_path="$input_path"
62174     fi
62175   fi
62176 
62177   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62178   if test "x$test_cygdrive_prefix" = x; then
62179     # As a simple fix, exclude /usr/bin since it's not a real path.
62180     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62181       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62182       # a path prefixed by /cygdrive for fixpath to work.
62183       new_path="$CYGWIN_ROOT_PATH$input_path"
62184     fi
62185   fi
62186 
62187 
62188   if test "x$path" != "x$new_path"; then
62189     FREETYPE_INCLUDE_PATH="$new_path"
62190     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62191 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62192   fi
62193 
62194     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62195 
62196   path="$FREETYPE_INCLUDE_PATH"
62197   has_colon=`$ECHO $path | $GREP ^.:`
62198   new_path="$path"
62199   if test "x$has_colon" = x; then
62200     # Not in mixed or Windows style, start by that.
62201     new_path=`cmd //c echo $path`
62202   fi
62203 
62204 
62205   input_path="$new_path"
62206   # Check if we need to convert this using DOS-style short mode. If the path
62207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62208   # take no chances and rewrite it.
62209   # Note: m4 eats our [], so we need to use [ and ] instead.
62210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62211   if test "x$has_forbidden_chars" != x; then
62212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62213     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62214   fi
62215 
62216 
62217   windows_path="$new_path"
62218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62219     unix_path=`$CYGPATH -u "$windows_path"`
62220     new_path="$unix_path"
62221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62223     new_path="$unix_path"
62224   fi
62225 
62226   if test "x$path" != "x$new_path"; then
62227     FREETYPE_INCLUDE_PATH="$new_path"
62228     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62229 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62230   fi
62231 
62232   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62233   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62234 
62235     else
62236       # We're on a unix platform. Hooray! :)
62237       path="$FREETYPE_INCLUDE_PATH"
62238       has_space=`$ECHO "$path" | $GREP " "`
62239       if test "x$has_space" != x; then
62240         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62241 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62242         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62243       fi
62244 
62245       # Use eval to expand a potential ~
62246       eval path="$path"
62247       if test ! -f "$path" && test ! -d "$path"; then
62248         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62249       fi
62250 
62251       if test -d "$path"; then
62252         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62253       else
62254         dir="`$DIRNAME "$path"`"
62255         base="`$BASENAME "$path"`"
62256         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62257       fi
62258     fi
62259   fi
62260 
62261       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62262         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62263       else
62264         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62265       fi
62266     fi
62267 
62268     if test "x$FREETYPE_LIBS" = x; then
62269 
62270   # Only process if variable expands to non-empty
62271 
62272   if test "x$FREETYPE_LIB_PATH" != x; then
62273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62274 
62275   # Input might be given as Windows format, start by converting to
62276   # unix format.
62277   path="$FREETYPE_LIB_PATH"
62278   new_path=`$CYGPATH -u "$path"`
62279 
62280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62283   # "foo.exe" is OK but "foo" is an error.
62284   #
62285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62286   # It is also a way to make sure we got the proper file name for the real test later on.
62287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62288   if test "x$test_shortpath" = x; then
62289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62290 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62291     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62292   fi
62293 
62294   # Call helper function which possibly converts this using DOS-style short mode.
62295   # If so, the updated path is stored in $new_path.
62296 
62297   input_path="$new_path"
62298   # Check if we need to convert this using DOS-style short mode. If the path
62299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62300   # take no chances and rewrite it.
62301   # Note: m4 eats our [], so we need to use [ and ] instead.
62302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62303   if test "x$has_forbidden_chars" != x; then
62304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62308       # Going to short mode and back again did indeed matter. Since short mode is
62309       # case insensitive, let's make it lowercase to improve readability.
62310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62311       # Now convert it back to Unix-style (cygpath)
62312       input_path=`$CYGPATH -u "$shortmode_path"`
62313       new_path="$input_path"
62314     fi
62315   fi
62316 
62317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62318   if test "x$test_cygdrive_prefix" = x; then
62319     # As a simple fix, exclude /usr/bin since it's not a real path.
62320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62322       # a path prefixed by /cygdrive for fixpath to work.
62323       new_path="$CYGWIN_ROOT_PATH$input_path"
62324     fi
62325   fi
62326 
62327 
62328   if test "x$path" != "x$new_path"; then
62329     FREETYPE_LIB_PATH="$new_path"
62330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62331 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62332   fi
62333 
62334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62335 
62336   path="$FREETYPE_LIB_PATH"
62337   has_colon=`$ECHO $path | $GREP ^.:`
62338   new_path="$path"
62339   if test "x$has_colon" = x; then
62340     # Not in mixed or Windows style, start by that.
62341     new_path=`cmd //c echo $path`
62342   fi
62343 
62344 
62345   input_path="$new_path"
62346   # Check if we need to convert this using DOS-style short mode. If the path
62347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62348   # take no chances and rewrite it.
62349   # Note: m4 eats our [], so we need to use [ and ] instead.
62350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62351   if test "x$has_forbidden_chars" != x; then
62352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62354   fi
62355 
62356 
62357   windows_path="$new_path"
62358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62359     unix_path=`$CYGPATH -u "$windows_path"`
62360     new_path="$unix_path"
62361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62363     new_path="$unix_path"
62364   fi
62365 
62366   if test "x$path" != "x$new_path"; then
62367     FREETYPE_LIB_PATH="$new_path"
62368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62369 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62370   fi
62371 
62372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62374 
62375     else
62376       # We're on a unix platform. Hooray! :)
62377       path="$FREETYPE_LIB_PATH"
62378       has_space=`$ECHO "$path" | $GREP " "`
62379       if test "x$has_space" != x; then
62380         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62381 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62382         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62383       fi
62384 
62385       # Use eval to expand a potential ~
62386       eval path="$path"
62387       if test ! -f "$path" && test ! -d "$path"; then
62388         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62389       fi
62390 
62391       if test -d "$path"; then
62392         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62393       else
62394         dir="`$DIRNAME "$path"`"
62395         base="`$BASENAME "$path"`"
62396         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62397       fi
62398     fi
62399   fi
62400 
62401       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62402         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62403       else
62404         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62405       fi
62406     fi
62407 
62408     # Try to compile it
62409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62410 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62411     ac_ext=cpp
62412 ac_cpp='$CXXCPP $CPPFLAGS'
62413 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62414 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62415 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62416 
62417     PREV_CXXCFLAGS="$CXXFLAGS"
62418     PREV_LIBS="$LIBS"
62419     PREV_CXX="$CXX"
62420     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62421     LIBS="$LIBS $FREETYPE_LIBS"
62422     CXX="$FIXPATH $CXX"
62423     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62424 /* end confdefs.h.  */
62425 
62426           #include<ft2build.h>
62427           #include FT_FREETYPE_H
62428           int main () {
62429             FT_Init_FreeType(NULL);
62430             return 0;
62431           }
62432 
62433 _ACEOF
62434 if ac_fn_cxx_try_link "$LINENO"; then :
62435 
62436           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62437 $as_echo "yes" >&6; }
62438 
62439 else
62440 
62441           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62442 $as_echo "no" >&6; }
62443           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62444 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62445           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62446 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62447 
62448 
62449   # Print a helpful message on how to acquire the necessary build dependency.
62450   # freetype is the help tag: freetype, cups, alsa etc
62451   MISSING_DEPENDENCY=freetype
62452 
62453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62454     cygwin_help $MISSING_DEPENDENCY
62455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62456     msys_help $MISSING_DEPENDENCY
62457   else
62458     PKGHANDLER_COMMAND=
62459 
62460     case $PKGHANDLER in
62461       apt-get)
62462         apt_help     $MISSING_DEPENDENCY ;;
62463       yum)
62464         yum_help     $MISSING_DEPENDENCY ;;
62465       port)
62466         port_help    $MISSING_DEPENDENCY ;;
62467       pkgutil)
62468         pkgutil_help $MISSING_DEPENDENCY ;;
62469       pkgadd)
62470         pkgadd_help  $MISSING_DEPENDENCY ;;
62471     esac
62472 
62473     if test "x$PKGHANDLER_COMMAND" != x; then
62474       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62475     fi
62476   fi
62477 
62478 
62479           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62480 
62481 
62482 fi
62483 rm -f core conftest.err conftest.$ac_objext \
62484     conftest$ac_exeext conftest.$ac_ext
62485     CXXCFLAGS="$PREV_CXXFLAGS"
62486     LIBS="$PREV_LIBS"
62487     CXX="$PREV_CXX"
62488     ac_ext=cpp
62489 ac_cpp='$CXXCPP $CPPFLAGS'
62490 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62491 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62492 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62493 
62494 
62495     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62496 $as_echo_n "checking if we should bundle freetype... " >&6; }
62497     if test "x$BUNDLE_FREETYPE" = xyes; then
62498       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62499     fi
62500     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62501 $as_echo "$BUNDLE_FREETYPE" >&6; }
62502 
62503   fi # end freetype needed
62504 
62505 
62506 
62507 
62508 
62509 
62510 
62511 # Check whether --with-alsa was given.
62512 if test "${with_alsa+set}" = set; then :
62513   withval=$with_alsa;
62514 fi
62515 
62516 
62517 # Check whether --with-alsa-include was given.
62518 if test "${with_alsa_include+set}" = set; then :
62519   withval=$with_alsa_include;
62520 fi
62521 
62522 
62523 # Check whether --with-alsa-lib was given.
62524 if test "${with_alsa_lib+set}" = set; then :
62525   withval=$with_alsa_lib;
62526 fi
62527 
62528 
62529   if test "x$NEEDS_LIB_ALSA" = xfalse; then
62530     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62531         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62532         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62533       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62534 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62535     fi
62536     ALSA_CFLAGS=
62537     ALSA_LIBS=
62538   else
62539     ALSA_FOUND=no
62540 
62541     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62542       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62543     fi
62544 
62545     if test "x${with_alsa}" != x; then
62546       ALSA_LIBS="-L${with_alsa}/lib -lasound"
62547       ALSA_CFLAGS="-I${with_alsa}/include"
62548       ALSA_FOUND=yes
62549     fi
62550     if test "x${with_alsa_include}" != x; then
62551       ALSA_CFLAGS="-I${with_alsa_include}"
62552       ALSA_FOUND=yes
62553     fi
62554     if test "x${with_alsa_lib}" != x; then
62555       ALSA_LIBS="-L${with_alsa_lib} -lasound"
62556       ALSA_FOUND=yes
62557     fi
62558     # Do not try pkg-config if we have a sysroot set.
62559     if test "x$SYSROOT" = x; then
62560       if test "x$ALSA_FOUND" = xno; then
62561 
62562 pkg_failed=no
62563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62564 $as_echo_n "checking for ALSA... " >&6; }
62565 
62566 if test -n "$ALSA_CFLAGS"; then
62567     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62568  elif test -n "$PKG_CONFIG"; then
62569     if test -n "$PKG_CONFIG" && \
62570     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62571   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62572   ac_status=$?
62573   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62574   test $ac_status = 0; }; then
62575   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62576 else
62577   pkg_failed=yes
62578 fi
62579  else
62580     pkg_failed=untried
62581 fi
62582 if test -n "$ALSA_LIBS"; then
62583     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62584  elif test -n "$PKG_CONFIG"; then
62585     if test -n "$PKG_CONFIG" && \
62586     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62587   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62588   ac_status=$?
62589   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62590   test $ac_status = 0; }; then
62591   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62592 else
62593   pkg_failed=yes
62594 fi
62595  else
62596     pkg_failed=untried
62597 fi
62598 
62599 
62600 
62601 if test $pkg_failed = yes; then
62602 
62603 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62604         _pkg_short_errors_supported=yes
62605 else
62606         _pkg_short_errors_supported=no
62607 fi
62608         if test $_pkg_short_errors_supported = yes; then
62609                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62610         else
62611                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62612         fi
62613         # Put the nasty error message in config.log where it belongs
62614         echo "$ALSA_PKG_ERRORS" >&5
62615 
62616         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62617 $as_echo "no" >&6; }
62618                 ALSA_FOUND=no
62619 elif test $pkg_failed = untried; then
62620         ALSA_FOUND=no
62621 else
62622         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62623         ALSA_LIBS=$pkg_cv_ALSA_LIBS
62624         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62625 $as_echo "yes" >&6; }
62626         ALSA_FOUND=yes
62627 fi
62628       fi
62629     fi
62630     if test "x$ALSA_FOUND" = xno; then
62631       for ac_header in alsa/asoundlib.h
62632 do :
62633   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62634 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62635   cat >>confdefs.h <<_ACEOF
62636 #define HAVE_ALSA_ASOUNDLIB_H 1
62637 _ACEOF
62638 
62639             ALSA_FOUND=yes
62640             ALSA_CFLAGS=-Iignoreme
62641             ALSA_LIBS=-lasound
62642             DEFAULT_ALSA=yes
62643 
62644 else
62645   ALSA_FOUND=no
62646 
62647 fi
62648 
62649 done
62650 
62651     fi
62652     if test "x$ALSA_FOUND" = xno; then
62653 
62654   # Print a helpful message on how to acquire the necessary build dependency.
62655   # alsa is the help tag: freetype, cups, alsa etc
62656   MISSING_DEPENDENCY=alsa
62657 
62658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62659     cygwin_help $MISSING_DEPENDENCY
62660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62661     msys_help $MISSING_DEPENDENCY
62662   else
62663     PKGHANDLER_COMMAND=
62664 
62665     case $PKGHANDLER in
62666       apt-get)
62667         apt_help     $MISSING_DEPENDENCY ;;
62668       yum)
62669         yum_help     $MISSING_DEPENDENCY ;;
62670       port)
62671         port_help    $MISSING_DEPENDENCY ;;
62672       pkgutil)
62673         pkgutil_help $MISSING_DEPENDENCY ;;
62674       pkgadd)
62675         pkgadd_help  $MISSING_DEPENDENCY ;;
62676     esac
62677 
62678     if test "x$PKGHANDLER_COMMAND" != x; then
62679       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62680     fi
62681   fi
62682 
62683       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62684     fi
62685   fi
62686 
62687 
62688 
62689 
62690 
62691 
62692 # Check whether --with-libffi was given.
62693 if test "${with_libffi+set}" = set; then :
62694   withval=$with_libffi;
62695 fi
62696 
62697 
62698 # Check whether --with-libffi-include was given.
62699 if test "${with_libffi_include+set}" = set; then :
62700   withval=$with_libffi_include;
62701 fi
62702 
62703 
62704 # Check whether --with-libffi-lib was given.
62705 if test "${with_libffi_lib+set}" = set; then :
62706   withval=$with_libffi_lib;
62707 fi
62708 
62709 
62710   if test "x$NEEDS_LIB_FFI" = xfalse; then
62711     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62712         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62713         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62714       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62715 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62716     fi
62717     LIBFFI_CFLAGS=
62718     LIBFFI_LIBS=
62719   else
62720     LIBFFI_FOUND=no
62721 
62722     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62723       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62724     fi
62725 
62726     if test "x${with_libffi}" != x; then
62727       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62728       LIBFFI_CFLAGS="-I${with_libffi}/include"
62729       LIBFFI_FOUND=yes
62730     fi
62731     if test "x${with_libffi_include}" != x; then
62732       LIBFFI_CFLAGS="-I${with_libffi_include}"
62733       LIBFFI_FOUND=yes
62734     fi
62735     if test "x${with_libffi_lib}" != x; then
62736       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62737       LIBFFI_FOUND=yes
62738     fi
62739     # Do not try pkg-config if we have a sysroot set.
62740     if test "x$SYSROOT" = x; then
62741       if test "x$LIBFFI_FOUND" = xno; then
62742         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62743 
62744 pkg_failed=no
62745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62746 $as_echo_n "checking for LIBFFI... " >&6; }
62747 
62748 if test -n "$LIBFFI_CFLAGS"; then
62749     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62750  elif test -n "$PKG_CONFIG"; then
62751     if test -n "$PKG_CONFIG" && \
62752     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62753   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62754   ac_status=$?
62755   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62756   test $ac_status = 0; }; then
62757   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62758 else
62759   pkg_failed=yes
62760 fi
62761  else
62762     pkg_failed=untried
62763 fi
62764 if test -n "$LIBFFI_LIBS"; then
62765     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62766  elif test -n "$PKG_CONFIG"; then
62767     if test -n "$PKG_CONFIG" && \
62768     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62769   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62770   ac_status=$?
62771   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62772   test $ac_status = 0; }; then
62773   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62774 else
62775   pkg_failed=yes
62776 fi
62777  else
62778     pkg_failed=untried
62779 fi
62780 
62781 
62782 
62783 if test $pkg_failed = yes; then
62784 
62785 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62786         _pkg_short_errors_supported=yes
62787 else
62788         _pkg_short_errors_supported=no
62789 fi
62790         if test $_pkg_short_errors_supported = yes; then
62791                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62792         else
62793                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62794         fi
62795         # Put the nasty error message in config.log where it belongs
62796         echo "$LIBFFI_PKG_ERRORS" >&5
62797 
62798         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62799 $as_echo "no" >&6; }
62800                 LIBFFI_FOUND=no
62801 elif test $pkg_failed = untried; then
62802         LIBFFI_FOUND=no
62803 else
62804         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62805         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62806         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62807 $as_echo "yes" >&6; }
62808         LIBFFI_FOUND=yes
62809 fi
62810       fi
62811     fi
62812     if test "x$LIBFFI_FOUND" = xno; then
62813       for ac_header in ffi.h
62814 do :
62815   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62816 if test "x$ac_cv_header_ffi_h" = xyes; then :
62817   cat >>confdefs.h <<_ACEOF
62818 #define HAVE_FFI_H 1
62819 _ACEOF
62820 
62821             LIBFFI_FOUND=yes
62822             LIBFFI_CFLAGS=
62823             LIBFFI_LIBS=-lffi
62824 
62825 else
62826   LIBFFI_FOUND=no
62827 
62828 fi
62829 
62830 done
62831 
62832     fi
62833     if test "x$LIBFFI_FOUND" = xno; then
62834 
62835   # Print a helpful message on how to acquire the necessary build dependency.
62836   # ffi is the help tag: freetype, cups, alsa etc
62837   MISSING_DEPENDENCY=ffi
62838 
62839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62840     cygwin_help $MISSING_DEPENDENCY
62841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62842     msys_help $MISSING_DEPENDENCY
62843   else
62844     PKGHANDLER_COMMAND=
62845 
62846     case $PKGHANDLER in
62847       apt-get)
62848         apt_help     $MISSING_DEPENDENCY ;;
62849       yum)
62850         yum_help     $MISSING_DEPENDENCY ;;
62851       port)
62852         port_help    $MISSING_DEPENDENCY ;;
62853       pkgutil)
62854         pkgutil_help $MISSING_DEPENDENCY ;;
62855       pkgadd)
62856         pkgadd_help  $MISSING_DEPENDENCY ;;
62857     esac
62858 
62859     if test "x$PKGHANDLER_COMMAND" != x; then
62860       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62861     fi
62862   fi
62863 
62864       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62865     fi
62866 
62867     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62868 $as_echo_n "checking if libffi works... " >&6; }
62869     ac_ext=c
62870 ac_cpp='$CPP $CPPFLAGS'
62871 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62872 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62873 ac_compiler_gnu=$ac_cv_c_compiler_gnu
62874 
62875     OLD_CFLAGS="$CFLAGS"
62876     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62877     OLD_LIBS="$LIBS"
62878     LIBS="$LIBS $LIBFFI_LIBS"
62879     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62880 /* end confdefs.h.  */
62881 #include <ffi.h>
62882 int
62883 main ()
62884 {
62885 
62886           ffi_call(NULL, NULL, NULL, NULL);
62887           return 0;
62888 
62889   ;
62890   return 0;
62891 }
62892 _ACEOF
62893 if ac_fn_c_try_link "$LINENO"; then :
62894   LIBFFI_WORKS=yes
62895 else
62896   LIBFFI_WORKS=no
62897 
62898 fi
62899 rm -f core conftest.err conftest.$ac_objext \
62900     conftest$ac_exeext conftest.$ac_ext
62901     CFLAGS="$OLD_CFLAGS"
62902     LIBS="$OLD_LIBS"
62903     ac_ext=cpp
62904 ac_cpp='$CXXCPP $CPPFLAGS'
62905 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62906 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62907 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62908 
62909     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62910 $as_echo "$LIBFFI_WORKS" >&6; }
62911 
62912     if test "x$LIBFFI_WORKS" = xno; then
62913 
62914   # Print a helpful message on how to acquire the necessary build dependency.
62915   # ffi is the help tag: freetype, cups, alsa etc
62916   MISSING_DEPENDENCY=ffi
62917 
62918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62919     cygwin_help $MISSING_DEPENDENCY
62920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62921     msys_help $MISSING_DEPENDENCY
62922   else
62923     PKGHANDLER_COMMAND=
62924 
62925     case $PKGHANDLER in
62926       apt-get)
62927         apt_help     $MISSING_DEPENDENCY ;;
62928       yum)
62929         yum_help     $MISSING_DEPENDENCY ;;
62930       port)
62931         port_help    $MISSING_DEPENDENCY ;;
62932       pkgutil)
62933         pkgutil_help $MISSING_DEPENDENCY ;;
62934       pkgadd)
62935         pkgadd_help  $MISSING_DEPENDENCY ;;
62936     esac
62937 
62938     if test "x$PKGHANDLER_COMMAND" != x; then
62939       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62940     fi
62941   fi
62942 
62943       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62944     fi
62945   fi
62946 
62947 
62948 
62949 
62950 
62951   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62952     # Extract the first word of "llvm-config", so it can be a program name with args.
62953 set dummy llvm-config; ac_word=$2
62954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62955 $as_echo_n "checking for $ac_word... " >&6; }
62956 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62957   $as_echo_n "(cached) " >&6
62958 else
62959   if test -n "$LLVM_CONFIG"; then
62960   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62961 else
62962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62963 for as_dir in $PATH
62964 do
62965   IFS=$as_save_IFS
62966   test -z "$as_dir" && as_dir=.
62967     for ac_exec_ext in '' $ac_executable_extensions; do
62968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62969     ac_cv_prog_LLVM_CONFIG="llvm-config"
62970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62971     break 2
62972   fi
62973 done
62974   done
62975 IFS=$as_save_IFS
62976 
62977 fi
62978 fi
62979 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62980 if test -n "$LLVM_CONFIG"; then
62981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62982 $as_echo "$LLVM_CONFIG" >&6; }
62983 else
62984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62985 $as_echo "no" >&6; }
62986 fi
62987 
62988 
62989 
62990     if test "x$LLVM_CONFIG" != xllvm-config; then
62991       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62992     fi
62993 
62994     llvm_components="jit mcjit engine nativecodegen native"
62995     unset LLVM_CFLAGS
62996     for flag in $("$LLVM_CONFIG" --cxxflags); do
62997       if echo "${flag}" | grep -q '^-[ID]'; then
62998         if test "${flag}" != "-D_DEBUG" ; then
62999           if test "${LLVM_CFLAGS}" != "" ; then
63000             LLVM_CFLAGS="${LLVM_CFLAGS} "
63001           fi
63002           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63003         fi
63004       fi
63005     done
63006     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63007     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63008 
63009     unset LLVM_LDFLAGS
63010     for flag in $("${LLVM_CONFIG}" --ldflags); do
63011       if echo "${flag}" | grep -q '^-L'; then
63012         if test "${LLVM_LDFLAGS}" != ""; then
63013           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63014         fi
63015         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63016       fi
63017     done
63018 
63019     unset LLVM_LIBS
63020     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63021       if echo "${flag}" | grep -q '^-l'; then
63022         if test "${LLVM_LIBS}" != ""; then
63023           LLVM_LIBS="${LLVM_LIBS} "
63024         fi
63025         LLVM_LIBS="${LLVM_LIBS}${flag}"
63026       fi
63027     done
63028 
63029     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63030     # always properly detect -ltinfo
63031     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63032 
63033 
63034 
63035 
63036   fi
63037 
63038 
63039 
63040 # Check whether --with-libjpeg was given.
63041 if test "${with_libjpeg+set}" = set; then :
63042   withval=$with_libjpeg;
63043 fi
63044 
63045 
63046   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63047 $as_echo_n "checking for which libjpeg to use... " >&6; }
63048   # default is bundled
63049   DEFAULT_LIBJPEG=bundled
63050   # if user didn't specify, use DEFAULT_LIBJPEG
63051   if test "x${with_libjpeg}" = "x"; then
63052     with_libjpeg=${DEFAULT_LIBJPEG}
63053   fi
63054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63055 $as_echo "${with_libjpeg}" >&6; }
63056 
63057   if test "x${with_libjpeg}" = "xbundled"; then
63058     USE_EXTERNAL_LIBJPEG=false
63059   elif test "x${with_libjpeg}" = "xsystem"; then
63060     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63061 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63062 
63063 else
63064    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63065 fi
63066 
63067 
63068     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63069 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63070 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63071   $as_echo_n "(cached) " >&6
63072 else
63073   ac_check_lib_save_LIBS=$LIBS
63074 LIBS="-ljpeg  $LIBS"
63075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63076 /* end confdefs.h.  */
63077 
63078 /* Override any GCC internal prototype to avoid an error.
63079    Use char because int might match the return type of a GCC
63080    builtin and then its argument prototype would still apply.  */
63081 #ifdef __cplusplus
63082 extern "C"
63083 #endif
63084 char jpeg_CreateDecompress ();
63085 int
63086 main ()
63087 {
63088 return jpeg_CreateDecompress ();
63089   ;
63090   return 0;
63091 }
63092 _ACEOF
63093 if ac_fn_cxx_try_link "$LINENO"; then :
63094   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63095 else
63096   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63097 fi
63098 rm -f core conftest.err conftest.$ac_objext \
63099     conftest$ac_exeext conftest.$ac_ext
63100 LIBS=$ac_check_lib_save_LIBS
63101 fi
63102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63103 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63104 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63105   cat >>confdefs.h <<_ACEOF
63106 #define HAVE_LIBJPEG 1
63107 _ACEOF
63108 
63109   LIBS="-ljpeg $LIBS"
63110 
63111 else
63112    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63113 fi
63114 
63115 
63116     USE_EXTERNAL_LIBJPEG=true
63117   else
63118     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63119   fi
63120 
63121 
63122 
63123 
63124 
63125 # Check whether --with-giflib was given.
63126 if test "${with_giflib+set}" = set; then :
63127   withval=$with_giflib;
63128 fi
63129 
63130 
63131   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63132 $as_echo_n "checking for which giflib to use... " >&6; }
63133   # default is bundled
63134   DEFAULT_GIFLIB=bundled
63135   # if user didn't specify, use DEFAULT_GIFLIB
63136   if test "x${with_giflib}" = "x"; then
63137     with_giflib=${DEFAULT_GIFLIB}
63138   fi
63139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63140 $as_echo "${with_giflib}" >&6; }
63141 
63142   if test "x${with_giflib}" = "xbundled"; then
63143     USE_EXTERNAL_LIBGIF=false
63144   elif test "x${with_giflib}" = "xsystem"; then
63145     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63146 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63147 
63148 else
63149    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63150 fi
63151 
63152 
63153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63154 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63155 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63156   $as_echo_n "(cached) " >&6
63157 else
63158   ac_check_lib_save_LIBS=$LIBS
63159 LIBS="-lgif  $LIBS"
63160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63161 /* end confdefs.h.  */
63162 
63163 /* Override any GCC internal prototype to avoid an error.
63164    Use char because int might match the return type of a GCC
63165    builtin and then its argument prototype would still apply.  */
63166 #ifdef __cplusplus
63167 extern "C"
63168 #endif
63169 char DGifGetCode ();
63170 int
63171 main ()
63172 {
63173 return DGifGetCode ();
63174   ;
63175   return 0;
63176 }
63177 _ACEOF
63178 if ac_fn_cxx_try_link "$LINENO"; then :
63179   ac_cv_lib_gif_DGifGetCode=yes
63180 else
63181   ac_cv_lib_gif_DGifGetCode=no
63182 fi
63183 rm -f core conftest.err conftest.$ac_objext \
63184     conftest$ac_exeext conftest.$ac_ext
63185 LIBS=$ac_check_lib_save_LIBS
63186 fi
63187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63188 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63189 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63190   cat >>confdefs.h <<_ACEOF
63191 #define HAVE_LIBGIF 1
63192 _ACEOF
63193 
63194   LIBS="-lgif $LIBS"
63195 
63196 else
63197    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63198 fi
63199 
63200 
63201     USE_EXTERNAL_LIBGIF=true
63202   else
63203     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63204   fi
63205 
63206 
63207 
63208 
63209 
63210 # Check whether --with-libpng was given.
63211 if test "${with_libpng+set}" = set; then :
63212   withval=$with_libpng;
63213 fi
63214 
63215 
63216   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63217 $as_echo_n "checking for which libpng to use... " >&6; }
63218 
63219   # default is bundled
63220   DEFAULT_LIBPNG=bundled
63221   # if user didn't specify, use DEFAULT_LIBPNG
63222   if test "x${with_libpng}" = "x"; then
63223       with_libpng=${DEFAULT_LIBPNG}
63224   fi
63225 
63226   if test "x${with_libpng}" = "xbundled"; then
63227       USE_EXTERNAL_LIBPNG=false
63228       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63229 $as_echo "bundled" >&6; }
63230   elif test "x${with_libpng}" = "xsystem"; then
63231 
63232 pkg_failed=no
63233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63234 $as_echo_n "checking for PNG... " >&6; }
63235 
63236 if test -n "$PNG_CFLAGS"; then
63237     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63238  elif test -n "$PKG_CONFIG"; then
63239     if test -n "$PKG_CONFIG" && \
63240     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63241   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63242   ac_status=$?
63243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63244   test $ac_status = 0; }; then
63245   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63246 else
63247   pkg_failed=yes
63248 fi
63249  else
63250     pkg_failed=untried
63251 fi
63252 if test -n "$PNG_LIBS"; then
63253     pkg_cv_PNG_LIBS="$PNG_LIBS"
63254  elif test -n "$PKG_CONFIG"; then
63255     if test -n "$PKG_CONFIG" && \
63256     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63257   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63258   ac_status=$?
63259   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63260   test $ac_status = 0; }; then
63261   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63262 else
63263   pkg_failed=yes
63264 fi
63265  else
63266     pkg_failed=untried
63267 fi
63268 
63269 
63270 
63271 if test $pkg_failed = yes; then
63272 
63273 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63274         _pkg_short_errors_supported=yes
63275 else
63276         _pkg_short_errors_supported=no
63277 fi
63278         if test $_pkg_short_errors_supported = yes; then
63279                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63280         else
63281                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63282         fi
63283         # Put the nasty error message in config.log where it belongs
63284         echo "$PNG_PKG_ERRORS" >&5
63285 
63286         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63287 $as_echo "no" >&6; }
63288                  LIBPNG_FOUND=no
63289 elif test $pkg_failed = untried; then
63290          LIBPNG_FOUND=no
63291 else
63292         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63293         PNG_LIBS=$pkg_cv_PNG_LIBS
63294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63295 $as_echo "yes" >&6; }
63296          LIBPNG_FOUND=yes
63297 fi
63298       if test "x${LIBPNG_FOUND}" = "xyes"; then
63299           USE_EXTERNAL_LIBPNG=true
63300           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63301 $as_echo "system" >&6; }
63302       else
63303           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63304 $as_echo "system not found" >&6; }
63305           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63306       fi
63307   else
63308       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63309   fi
63310 
63311 
63312 
63313 
63314 
63315 # Check whether --with-zlib was given.
63316 if test "${with_zlib+set}" = set; then :
63317   withval=$with_zlib;
63318 fi
63319 
63320 
63321   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63322 $as_echo_n "checking for compress in -lz... " >&6; }
63323 if ${ac_cv_lib_z_compress+:} false; then :
63324   $as_echo_n "(cached) " >&6
63325 else
63326   ac_check_lib_save_LIBS=$LIBS
63327 LIBS="-lz  $LIBS"
63328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63329 /* end confdefs.h.  */
63330 
63331 /* Override any GCC internal prototype to avoid an error.
63332    Use char because int might match the return type of a GCC
63333    builtin and then its argument prototype would still apply.  */
63334 #ifdef __cplusplus
63335 extern "C"
63336 #endif
63337 char compress ();
63338 int
63339 main ()
63340 {
63341 return compress ();
63342   ;
63343   return 0;
63344 }
63345 _ACEOF
63346 if ac_fn_cxx_try_link "$LINENO"; then :
63347   ac_cv_lib_z_compress=yes
63348 else
63349   ac_cv_lib_z_compress=no
63350 fi
63351 rm -f core conftest.err conftest.$ac_objext \
63352     conftest$ac_exeext conftest.$ac_ext
63353 LIBS=$ac_check_lib_save_LIBS
63354 fi
63355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63356 $as_echo "$ac_cv_lib_z_compress" >&6; }
63357 if test "x$ac_cv_lib_z_compress" = xyes; then :
63358    ZLIB_FOUND=yes
63359 else
63360    ZLIB_FOUND=no
63361 fi
63362 
63363 
63364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63365 $as_echo_n "checking for which zlib to use... " >&6; }
63366 
63367   DEFAULT_ZLIB=system
63368   if test "x$OPENJDK_TARGET_OS" = xwindows; then
63369     # On windows default is bundled...on others default is system
63370     DEFAULT_ZLIB=bundled
63371   fi
63372 
63373   if test "x${ZLIB_FOUND}" != "xyes"; then
63374     # If we don't find any system...set default to bundled
63375     DEFAULT_ZLIB=bundled
63376   fi
63377 
63378   # If user didn't specify, use DEFAULT_ZLIB
63379   if test "x${with_zlib}" = "x"; then
63380     with_zlib=${DEFAULT_ZLIB}
63381   fi
63382 
63383   if test "x${with_zlib}" = "xbundled"; then
63384     USE_EXTERNAL_LIBZ=false
63385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63386 $as_echo "bundled" >&6; }
63387   elif test "x${with_zlib}" = "xsystem"; then
63388     if test "x${ZLIB_FOUND}" = "xyes"; then
63389       USE_EXTERNAL_LIBZ=true
63390       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63391 $as_echo "system" >&6; }
63392     else
63393       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63394 $as_echo "system not found" >&6; }
63395       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63396     fi
63397   else
63398     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63399   fi
63400 
63401 
63402 
63403 
63404 
63405 # Check whether --with-lcms was given.
63406 if test "${with_lcms+set}" = set; then :
63407   withval=$with_lcms;
63408 fi
63409 
63410 
63411   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63412 $as_echo_n "checking for which lcms to use... " >&6; }
63413 
63414   DEFAULT_LCMS=bundled
63415   # If user didn't specify, use DEFAULT_LCMS
63416   if test "x${with_lcms}" = "x"; then
63417       with_lcms=${DEFAULT_LCMS}
63418   fi
63419 
63420   if test "x${with_lcms}" = "xbundled"; then
63421     USE_EXTERNAL_LCMS=false
63422     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63423 $as_echo "bundled" >&6; }
63424   elif test "x${with_lcms}" = "xsystem"; then
63425     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63426 $as_echo "system" >&6; }
63427 
63428 pkg_failed=no
63429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63430 $as_echo_n "checking for LCMS... " >&6; }
63431 
63432 if test -n "$LCMS_CFLAGS"; then
63433     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63434  elif test -n "$PKG_CONFIG"; then
63435     if test -n "$PKG_CONFIG" && \
63436     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63437   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63438   ac_status=$?
63439   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63440   test $ac_status = 0; }; then
63441   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63442 else
63443   pkg_failed=yes
63444 fi
63445  else
63446     pkg_failed=untried
63447 fi
63448 if test -n "$LCMS_LIBS"; then
63449     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63450  elif test -n "$PKG_CONFIG"; then
63451     if test -n "$PKG_CONFIG" && \
63452     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63453   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63454   ac_status=$?
63455   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63456   test $ac_status = 0; }; then
63457   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63458 else
63459   pkg_failed=yes
63460 fi
63461  else
63462     pkg_failed=untried
63463 fi
63464 
63465 
63466 
63467 if test $pkg_failed = yes; then
63468 
63469 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63470         _pkg_short_errors_supported=yes
63471 else
63472         _pkg_short_errors_supported=no
63473 fi
63474         if test $_pkg_short_errors_supported = yes; then
63475                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63476         else
63477                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63478         fi
63479         # Put the nasty error message in config.log where it belongs
63480         echo "$LCMS_PKG_ERRORS" >&5
63481 
63482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63483 $as_echo "no" >&6; }
63484                 LCMS_FOUND=no
63485 elif test $pkg_failed = untried; then
63486         LCMS_FOUND=no
63487 else
63488         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63489         LCMS_LIBS=$pkg_cv_LCMS_LIBS
63490         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63491 $as_echo "yes" >&6; }
63492         LCMS_FOUND=yes
63493 fi
63494     if test "x${LCMS_FOUND}" = "xyes"; then
63495       USE_EXTERNAL_LCMS=true
63496     else
63497       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63498     fi
63499   else
63500     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63501   fi
63502 
63503 
63504 
63505 
63506 
63507 
63508 
63509 
63510 
63511 
63512 
63513   # Setup libm (the maths library)
63514   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63515     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63516 $as_echo_n "checking for cos in -lm... " >&6; }
63517 if ${ac_cv_lib_m_cos+:} false; then :
63518   $as_echo_n "(cached) " >&6
63519 else
63520   ac_check_lib_save_LIBS=$LIBS
63521 LIBS="-lm  $LIBS"
63522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63523 /* end confdefs.h.  */
63524 
63525 /* Override any GCC internal prototype to avoid an error.
63526    Use char because int might match the return type of a GCC
63527    builtin and then its argument prototype would still apply.  */
63528 #ifdef __cplusplus
63529 extern "C"
63530 #endif
63531 char cos ();
63532 int
63533 main ()
63534 {
63535 return cos ();
63536   ;
63537   return 0;
63538 }
63539 _ACEOF
63540 if ac_fn_cxx_try_link "$LINENO"; then :
63541   ac_cv_lib_m_cos=yes
63542 else
63543   ac_cv_lib_m_cos=no
63544 fi
63545 rm -f core conftest.err conftest.$ac_objext \
63546     conftest$ac_exeext conftest.$ac_ext
63547 LIBS=$ac_check_lib_save_LIBS
63548 fi
63549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63550 $as_echo "$ac_cv_lib_m_cos" >&6; }
63551 if test "x$ac_cv_lib_m_cos" = xyes; then :
63552   cat >>confdefs.h <<_ACEOF
63553 #define HAVE_LIBM 1
63554 _ACEOF
63555 
63556   LIBS="-lm $LIBS"
63557 
63558 else
63559 
63560         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63561 $as_echo "$as_me: Maths library was not found" >&6;}
63562 
63563 fi
63564 
63565     LIBM="-lm"
63566   else
63567     LIBM=""
63568   fi
63569 
63570 
63571   # Setup libdl (for dynamic library loading)
63572   save_LIBS="$LIBS"
63573   LIBS=""
63574   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63575 $as_echo_n "checking for dlopen in -ldl... " >&6; }
63576 if ${ac_cv_lib_dl_dlopen+:} false; then :
63577   $as_echo_n "(cached) " >&6
63578 else
63579   ac_check_lib_save_LIBS=$LIBS
63580 LIBS="-ldl  $LIBS"
63581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63582 /* end confdefs.h.  */
63583 
63584 /* Override any GCC internal prototype to avoid an error.
63585    Use char because int might match the return type of a GCC
63586    builtin and then its argument prototype would still apply.  */
63587 #ifdef __cplusplus
63588 extern "C"
63589 #endif
63590 char dlopen ();
63591 int
63592 main ()
63593 {
63594 return dlopen ();
63595   ;
63596   return 0;
63597 }
63598 _ACEOF
63599 if ac_fn_cxx_try_link "$LINENO"; then :
63600   ac_cv_lib_dl_dlopen=yes
63601 else
63602   ac_cv_lib_dl_dlopen=no
63603 fi
63604 rm -f core conftest.err conftest.$ac_objext \
63605     conftest$ac_exeext conftest.$ac_ext
63606 LIBS=$ac_check_lib_save_LIBS
63607 fi
63608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63609 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63610 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63611   cat >>confdefs.h <<_ACEOF
63612 #define HAVE_LIBDL 1
63613 _ACEOF
63614 
63615   LIBS="-ldl $LIBS"
63616 
63617 fi
63618 
63619   LIBDL="$LIBS"
63620 
63621   LIBS="$save_LIBS"
63622 
63623   # Deprecated libraries, keep the flags for backwards compatibility
63624   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63625 
63626 
63627 # Check whether --with-dxsdk was given.
63628 if test "${with_dxsdk+set}" = set; then :
63629   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63630 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63631 fi
63632 
63633 
63634 
63635 
63636 # Check whether --with-dxsdk-lib was given.
63637 if test "${with_dxsdk_lib+set}" = set; then :
63638   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63639 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63640 fi
63641 
63642 
63643 
63644 
63645 # Check whether --with-dxsdk-include was given.
63646 if test "${with_dxsdk_include+set}" = set; then :
63647   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63648 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63649 fi
63650 
63651 
63652   fi
63653 
63654   # Control if libzip can use mmap. Available for purposes of overriding.
63655   LIBZIP_CAN_USE_MMAP=true
63656 
63657 
63658 
63659   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63660     # Find the root of the Solaris Studio installation from the compiler path
63661     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63662     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63663     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63664 $as_echo_n "checking for libstlport.so.1... " >&6; }
63665     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63666       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63667       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63668     fi
63669     if test -f "$STLPORT_LIB"; then
63670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63671 $as_echo "yes, $STLPORT_LIB" >&6; }
63672 
63673   # Only process if variable expands to non-empty
63674 
63675   if test "x$STLPORT_LIB" != x; then
63676     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63677 
63678   # Input might be given as Windows format, start by converting to
63679   # unix format.
63680   path="$STLPORT_LIB"
63681   new_path=`$CYGPATH -u "$path"`
63682 
63683   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63684   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63685   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63686   # "foo.exe" is OK but "foo" is an error.
63687   #
63688   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63689   # It is also a way to make sure we got the proper file name for the real test later on.
63690   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63691   if test "x$test_shortpath" = x; then
63692     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63693 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63694     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63695   fi
63696 
63697   # Call helper function which possibly converts this using DOS-style short mode.
63698   # If so, the updated path is stored in $new_path.
63699 
63700   input_path="$new_path"
63701   # Check if we need to convert this using DOS-style short mode. If the path
63702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63703   # take no chances and rewrite it.
63704   # Note: m4 eats our [], so we need to use [ and ] instead.
63705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63706   if test "x$has_forbidden_chars" != x; then
63707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63708     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63709     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63710     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63711       # Going to short mode and back again did indeed matter. Since short mode is
63712       # case insensitive, let's make it lowercase to improve readability.
63713       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63714       # Now convert it back to Unix-style (cygpath)
63715       input_path=`$CYGPATH -u "$shortmode_path"`
63716       new_path="$input_path"
63717     fi
63718   fi
63719 
63720   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63721   if test "x$test_cygdrive_prefix" = x; then
63722     # As a simple fix, exclude /usr/bin since it's not a real path.
63723     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63724       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63725       # a path prefixed by /cygdrive for fixpath to work.
63726       new_path="$CYGWIN_ROOT_PATH$input_path"
63727     fi
63728   fi
63729 
63730 
63731   if test "x$path" != "x$new_path"; then
63732     STLPORT_LIB="$new_path"
63733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63734 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63735   fi
63736 
63737     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63738 
63739   path="$STLPORT_LIB"
63740   has_colon=`$ECHO $path | $GREP ^.:`
63741   new_path="$path"
63742   if test "x$has_colon" = x; then
63743     # Not in mixed or Windows style, start by that.
63744     new_path=`cmd //c echo $path`
63745   fi
63746 
63747 
63748   input_path="$new_path"
63749   # Check if we need to convert this using DOS-style short mode. If the path
63750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63751   # take no chances and rewrite it.
63752   # Note: m4 eats our [], so we need to use [ and ] instead.
63753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63754   if test "x$has_forbidden_chars" != x; then
63755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63757   fi
63758 
63759 
63760   windows_path="$new_path"
63761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63762     unix_path=`$CYGPATH -u "$windows_path"`
63763     new_path="$unix_path"
63764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63766     new_path="$unix_path"
63767   fi
63768 
63769   if test "x$path" != "x$new_path"; then
63770     STLPORT_LIB="$new_path"
63771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63772 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63773   fi
63774 
63775   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63776   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63777 
63778     else
63779       # We're on a unix platform. Hooray! :)
63780       path="$STLPORT_LIB"
63781       has_space=`$ECHO "$path" | $GREP " "`
63782       if test "x$has_space" != x; then
63783         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63784 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63785         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63786       fi
63787 
63788       # Use eval to expand a potential ~
63789       eval path="$path"
63790       if test ! -f "$path" && test ! -d "$path"; then
63791         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63792       fi
63793 
63794       if test -d "$path"; then
63795         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63796       else
63797         dir="`$DIRNAME "$path"`"
63798         base="`$BASENAME "$path"`"
63799         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63800       fi
63801     fi
63802   fi
63803 
63804     else
63805       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63806 $as_echo "no, not found at $STLPORT_LIB" >&6; }
63807       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63808     fi
63809 
63810   fi
63811 
63812 
63813 
63814 
63815 
63816 
63817 
63818 
63819 
63820 
63821 
63822 
63823 
63824 
63825 ###############################################################################
63826 #
63827 # We need to do some final tweaking, when everything else is done.
63828 #
63829 ###############################################################################
63830 
63831 
63832   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63833 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63834 
63835   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63836     ENABLE_INTREE_EC=yes
63837     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63838 $as_echo "yes" >&6; }
63839   else
63840     ENABLE_INTREE_EC=no
63841     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63842 $as_echo "no" >&6; }
63843   fi
63844 
63845 
63846 
63847 
63848   # Check whether --enable-jtreg-failure-handler was given.
63849 if test "${enable_jtreg_failure_handler+set}" = set; then :
63850   enableval=$enable_jtreg_failure_handler;
63851 fi
63852 
63853 
63854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63855 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63856 
63857   if test "x$enable_jtreg_failure_handler" = "xyes"; then
63858     if test "x$JT_HOME" = "x"; then
63859       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63860     else
63861       BUILD_FAILURE_HANDLER=true
63862       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63863 $as_echo "yes, forced" >&6; }
63864     fi
63865   elif test "x$enable_jtreg_failure_handler" = "xno"; then
63866     BUILD_FAILURE_HANDLER=false
63867     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63868 $as_echo "no, forced" >&6; }
63869   elif test "x$enable_jtreg_failure_handler" = "xauto" \
63870       || test "x$enable_jtreg_failure_handler" = "x"; then
63871     if test "x$JT_HOME" = "x"; then
63872       BUILD_FAILURE_HANDLER=false
63873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63874 $as_echo "no, missing jtreg" >&6; }
63875     else
63876       BUILD_FAILURE_HANDLER=true
63877       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63878 $as_echo "yes, jtreg present" >&6; }
63879     fi
63880   else
63881     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63882   fi
63883 
63884 
63885 
63886 
63887   # Check whether --enable-generate-classlist was given.
63888 if test "${enable_generate_classlist+set}" = set; then :
63889   enableval=$enable_generate_classlist;
63890 fi
63891 
63892 
63893   # Check if it's likely that it's possible to generate the classlist. Depending
63894   # on exact jvm configuration it could be possible anyway.
63895   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63896     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63897   else
63898     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63899   fi
63900 
63901   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63902 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63903   if test "x$enable_generate_classlist" = "xyes"; then
63904     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63905 $as_echo "yes, forced" >&6; }
63906     ENABLE_GENERATE_CLASSLIST="true"
63907     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63908       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63909 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63910     fi
63911   elif test "x$enable_generate_classlist" = "xno"; then
63912     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63913 $as_echo "no, forced" >&6; }
63914     ENABLE_GENERATE_CLASSLIST="false"
63915   elif test "x$enable_generate_classlist" = "x"; then
63916     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63917       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63918 $as_echo "yes" >&6; }
63919       ENABLE_GENERATE_CLASSLIST="true"
63920     else
63921       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63922 $as_echo "no" >&6; }
63923       ENABLE_GENERATE_CLASSLIST="false"
63924     fi
63925   else
63926     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63927   fi
63928 
63929 
63930 
63931 
63932 ###############################################################################
63933 #
63934 # Configure parts of the build that only affect the build performance,
63935 # not the result.
63936 #
63937 ###############################################################################
63938 
63939 
63940   # How many cores do we have on this build system?
63941 
63942 # Check whether --with-num-cores was given.
63943 if test "${with_num_cores+set}" = set; then :
63944   withval=$with_num_cores;
63945 fi
63946 
63947   if test "x$with_num_cores" = x; then
63948     # The number of cores were not specified, try to probe them.
63949 
63950   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63951 $as_echo_n "checking for number of cores... " >&6; }
63952   NUM_CORES=1
63953   FOUND_CORES=no
63954 
63955   if test -f /proc/cpuinfo; then
63956     # Looks like a Linux (or cygwin) system
63957     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63958     FOUND_CORES=yes
63959   elif test -x /usr/sbin/psrinfo; then
63960     # Looks like a Solaris system
63961     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63962     FOUND_CORES=yes
63963   elif test -x /usr/sbin/sysctl; then
63964     # Looks like a MacOSX system
63965     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63966     FOUND_CORES=yes
63967   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63968     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63969     FOUND_CORES=yes
63970   elif test -n "$NUMBER_OF_PROCESSORS"; then
63971     # On windows, look in the env
63972     NUM_CORES=$NUMBER_OF_PROCESSORS
63973     FOUND_CORES=yes
63974   fi
63975 
63976   if test "x$FOUND_CORES" = xyes; then
63977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63978 $as_echo "$NUM_CORES" >&6; }
63979   else
63980     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63981 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
63982     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63983 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63984   fi
63985 
63986   else
63987     NUM_CORES=$with_num_cores
63988   fi
63989 
63990 
63991 
63992   # How much memory do we have on this build system?
63993 
63994 # Check whether --with-memory-size was given.
63995 if test "${with_memory_size+set}" = set; then :
63996   withval=$with_memory_size;
63997 fi
63998 
63999   if test "x$with_memory_size" = x; then
64000     # The memory size was not specified, try to probe it.
64001 
64002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64003 $as_echo_n "checking for memory size... " >&6; }
64004   # Default to 1024 MB
64005   MEMORY_SIZE=1024
64006   FOUND_MEM=no
64007 
64008   if test -f /proc/meminfo; then
64009     # Looks like a Linux (or cygwin) system
64010     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64011     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64012     FOUND_MEM=yes
64013   elif test -x /usr/sbin/prtconf; then
64014     # Looks like a Solaris or AIX system
64015     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64016     FOUND_MEM=yes
64017   elif test -x /usr/sbin/sysctl; then
64018     # Looks like a MacOSX system
64019     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64020     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64021     FOUND_MEM=yes
64022   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64023     # Windows, but without cygwin
64024     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64025     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64026     FOUND_MEM=yes
64027   fi
64028 
64029   if test "x$FOUND_MEM" = xyes; then
64030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64031 $as_echo "$MEMORY_SIZE MB" >&6; }
64032   else
64033     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64034 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64035     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64036 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64037   fi
64038 
64039   else
64040     MEMORY_SIZE=$with_memory_size
64041   fi
64042 
64043 
64044 
64045   # Provide a decent default number of parallel jobs for make depending on
64046   # number of cores, amount of memory and machine architecture.
64047 
64048 # Check whether --with-jobs was given.
64049 if test "${with_jobs+set}" = set; then :
64050   withval=$with_jobs;
64051 fi
64052 
64053   if test "x$with_jobs" = x; then
64054     # Number of jobs was not specified, calculate.
64055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64056 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64057     # Approximate memory in GB.
64058     memory_gb=`expr $MEMORY_SIZE / 1024`
64059     # Pick the lowest of memory in gb and number of cores.
64060     if test "$memory_gb" -lt "$NUM_CORES"; then
64061       JOBS="$memory_gb"
64062     else
64063       JOBS="$NUM_CORES"
64064     fi
64065     if test "$JOBS" -eq "0"; then
64066       JOBS=1
64067     fi
64068     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64069 $as_echo "$JOBS" >&6; }
64070   else
64071     JOBS=$with_jobs
64072   fi
64073 
64074 
64075 
64076   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64077 
64078 # Check whether --with-test-jobs was given.
64079 if test "${with_test_jobs+set}" = set; then :
64080   withval=$with_test_jobs;
64081 fi
64082 
64083   if test "x$with_test_jobs" = x; then
64084       TEST_JOBS=0
64085   else
64086       TEST_JOBS=$with_test_jobs
64087   fi
64088 
64089 
64090 
64091 # Setup arguments for the boot jdk (after cores and memory have been setup)
64092 
64093   ##############################################################################
64094   #
64095   # Specify jvm options for anything that is run with the Boot JDK.
64096   # Not all JVM:s accept the same arguments on the command line.
64097   #
64098 
64099 # Check whether --with-boot-jdk-jvmargs was given.
64100 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64101   withval=$with_boot_jdk_jvmargs;
64102 fi
64103 
64104 
64105   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64106 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64107 
64108   # Disable special log output when a debug build is used as Boot JDK...
64109 
64110   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64111   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64112   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64113   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64114   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64115   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64116     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64117     JVM_ARG_OK=true
64118   else
64119     $ECHO "Arg failed:" >&5
64120     $ECHO "$OUTPUT" >&5
64121     JVM_ARG_OK=false
64122   fi
64123 
64124 
64125   # Force en-US environment
64126 
64127   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64128   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64129   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64130   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64131   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64132   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64133     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64134     JVM_ARG_OK=true
64135   else
64136     $ECHO "Arg failed:" >&5
64137     $ECHO "$OUTPUT" >&5
64138     JVM_ARG_OK=false
64139   fi
64140 
64141 
64142   # Apply user provided options.
64143 
64144   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64145   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64146   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64147   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64148   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64149   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64150     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64151     JVM_ARG_OK=true
64152   else
64153     $ECHO "Arg failed:" >&5
64154     $ECHO "$OUTPUT" >&5
64155     JVM_ARG_OK=false
64156   fi
64157 
64158 
64159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64160 $as_echo "$boot_jdk_jvmargs" >&6; }
64161 
64162   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64163   JAVA_FLAGS=$boot_jdk_jvmargs
64164 
64165 
64166 
64167   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64168 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64169 
64170   # Starting amount of heap memory.
64171 
64172   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64173   $ECHO "Command: $JAVA -Xms64M -version" >&5
64174   OUTPUT=`$JAVA -Xms64M -version 2>&1`
64175   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64176   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64177   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64178     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64179     JVM_ARG_OK=true
64180   else
64181     $ECHO "Arg failed:" >&5
64182     $ECHO "$OUTPUT" >&5
64183     JVM_ARG_OK=false
64184   fi
64185 
64186   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64187 
64188   # Maximum amount of heap memory and stack size.
64189   JVM_HEAP_LIMIT_32="1024"
64190   # Running a 64 bit JVM allows for and requires a bigger heap
64191   JVM_HEAP_LIMIT_64="1600"
64192   STACK_SIZE_32=768
64193   STACK_SIZE_64=1536
64194   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64195   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64196     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64197   fi
64198   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64199     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64200   fi
64201   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64202     JVM_HEAP_LIMIT_32=512
64203     JVM_HEAP_LIMIT_64=512
64204   fi
64205 
64206   if test "x$BOOT_JDK_BITS" = "x32"; then
64207     STACK_SIZE=$STACK_SIZE_32
64208     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64209   else
64210     STACK_SIZE=$STACK_SIZE_64
64211     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64212   fi
64213 
64214   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64215   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64216   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64217   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64218   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64219   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64220     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64221     JVM_ARG_OK=true
64222   else
64223     $ECHO "Arg failed:" >&5
64224     $ECHO "$OUTPUT" >&5
64225     JVM_ARG_OK=false
64226   fi
64227 
64228 
64229   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64230   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64231   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64232   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64233   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64234   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64235     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64236     JVM_ARG_OK=true
64237   else
64238     $ECHO "Arg failed:" >&5
64239     $ECHO "$OUTPUT" >&5
64240     JVM_ARG_OK=false
64241   fi
64242 
64243 
64244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64245 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64246 
64247   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64248 
64249 
64250   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64251     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64252     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64253   else
64254     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64255     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64256   fi
64257   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64258   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64260 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64262 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64263 
64264 
64265   # By default, the main javac compilations use big
64266   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64267 
64268 
64269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64270 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64271 
64272   # Use serial gc for small short lived tools if possible
64273 
64274   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64275   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64276   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64277   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64278   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64279   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64280     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64281     JVM_ARG_OK=true
64282   else
64283     $ECHO "Arg failed:" >&5
64284     $ECHO "$OUTPUT" >&5
64285     JVM_ARG_OK=false
64286   fi
64287 
64288 
64289   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64290   $ECHO "Command: $JAVA -Xms32M -version" >&5
64291   OUTPUT=`$JAVA -Xms32M -version 2>&1`
64292   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64293   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64294   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64295     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64296     JVM_ARG_OK=true
64297   else
64298     $ECHO "Arg failed:" >&5
64299     $ECHO "$OUTPUT" >&5
64300     JVM_ARG_OK=false
64301   fi
64302 
64303 
64304   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64305   $ECHO "Command: $JAVA -Xmx512M -version" >&5
64306   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64307   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64308   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64309   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64310     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64311     JVM_ARG_OK=true
64312   else
64313     $ECHO "Arg failed:" >&5
64314     $ECHO "$OUTPUT" >&5
64315     JVM_ARG_OK=false
64316   fi
64317 
64318 
64319   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64320   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64321   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64322   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64323   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64324   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64325     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64326     JVM_ARG_OK=true
64327   else
64328     $ECHO "Arg failed:" >&5
64329     $ECHO "$OUTPUT" >&5
64330     JVM_ARG_OK=false
64331   fi
64332 
64333 
64334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64335 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64336 
64337   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64338 
64339 
64340   JAVA_TOOL_FLAGS_SMALL=""
64341   for f in $JAVA_FLAGS_SMALL; do
64342     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64343   done
64344 
64345 
64346 
64347 # Setup smart javac (after cores and memory have been setup)
64348 
64349 
64350 # Check whether --with-sjavac-server-java was given.
64351 if test "${with_sjavac_server_java+set}" = set; then :
64352   withval=$with_sjavac_server_java;
64353 fi
64354 
64355 
64356   if test "x$with_sjavac_server_java" != x; then
64357     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64358     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64359     if test "x$FOUND_VERSION" = x; then
64360       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64361     fi
64362   else
64363     SJAVAC_SERVER_JAVA="$JAVA"
64364   fi
64365 
64366 
64367   if test "$MEMORY_SIZE" -gt "3000"; then
64368 
64369   $ECHO "Check if jvm arg is ok: -d64" >&5
64370   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64371   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64372   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64373   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64374   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64375     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64376     JVM_ARG_OK=true
64377   else
64378     $ECHO "Arg failed:" >&5
64379     $ECHO "$OUTPUT" >&5
64380     JVM_ARG_OK=false
64381   fi
64382 
64383     if test "$JVM_ARG_OK" = true; then
64384       JVM_64BIT=true
64385       JVM_ARG_OK=false
64386     fi
64387   fi
64388 
64389   MX_VALUE=`expr $MEMORY_SIZE / 2`
64390   if test "$JVM_64BIT" = true; then
64391     # Set ms lower than mx since more than one instance of the server might
64392     # get launched at the same time before they figure out which instance won.
64393     MS_VALUE=512
64394     if test "$MX_VALUE" -gt "2048"; then
64395       MX_VALUE=2048
64396     fi
64397   else
64398     MS_VALUE=256
64399     if test "$MX_VALUE" -gt "1500"; then
64400       MX_VALUE=1500
64401     fi
64402   fi
64403   if test "$MX_VALUE" -lt "512"; then
64404     MX_VALUE=512
64405   fi
64406 
64407   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64408   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64409   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64410   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64411   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64412   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64413     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64414     JVM_ARG_OK=true
64415   else
64416     $ECHO "Arg failed:" >&5
64417     $ECHO "$OUTPUT" >&5
64418     JVM_ARG_OK=false
64419   fi
64420 
64421 
64422 
64423   # Check whether --enable-sjavac was given.
64424 if test "${enable_sjavac+set}" = set; then :
64425   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64426 else
64427   ENABLE_SJAVAC="no"
64428 fi
64429 
64430   if test "x$JVM_ARG_OK" = "xfalse"; then
64431     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64432 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64433     ENABLE_SJAVAC="no"
64434   fi
64435   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64436 $as_echo_n "checking whether to use sjavac... " >&6; }
64437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64438 $as_echo "$ENABLE_SJAVAC" >&6; }
64439 
64440 
64441   # Check whether --enable-javac-server was given.
64442 if test "${enable_javac_server+set}" = set; then :
64443   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64444 else
64445   ENABLE_JAVAC_SERVER="yes"
64446 fi
64447 
64448   if test "x$JVM_ARG_OK" = "xfalse"; then
64449     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64450 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64451     ENABLE_JAVAC_SERVER="no"
64452   fi
64453   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64454 $as_echo_n "checking whether to use javac server... " >&6; }
64455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64456 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64457 
64458 
64459   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64460     # When using a server javac, the small client instances do not need much
64461     # resources.
64462     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64463   fi
64464 
64465 
64466 # Setup use of icecc if requested
64467 
64468   # Check whether --enable-icecc was given.
64469 if test "${enable_icecc+set}" = set; then :
64470   enableval=$enable_icecc;
64471 fi
64472 
64473 
64474   if test "x${enable_icecc}" = "xyes"; then
64475 
64476 
64477 
64478   # Publish this variable in the help.
64479 
64480 
64481   if [ -z "${ICECC_CMD+x}" ]; then
64482     # The variable is not set by user, try to locate tool using the code snippet
64483     for ac_prog in icecc
64484 do
64485   # Extract the first word of "$ac_prog", so it can be a program name with args.
64486 set dummy $ac_prog; ac_word=$2
64487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64488 $as_echo_n "checking for $ac_word... " >&6; }
64489 if ${ac_cv_path_ICECC_CMD+:} false; then :
64490   $as_echo_n "(cached) " >&6
64491 else
64492   case $ICECC_CMD in
64493   [\\/]* | ?:[\\/]*)
64494   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64495   ;;
64496   *)
64497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64498 for as_dir in $PATH
64499 do
64500   IFS=$as_save_IFS
64501   test -z "$as_dir" && as_dir=.
64502     for ac_exec_ext in '' $ac_executable_extensions; do
64503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64504     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64506     break 2
64507   fi
64508 done
64509   done
64510 IFS=$as_save_IFS
64511 
64512   ;;
64513 esac
64514 fi
64515 ICECC_CMD=$ac_cv_path_ICECC_CMD
64516 if test -n "$ICECC_CMD"; then
64517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64518 $as_echo "$ICECC_CMD" >&6; }
64519 else
64520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64521 $as_echo "no" >&6; }
64522 fi
64523 
64524 
64525   test -n "$ICECC_CMD" && break
64526 done
64527 
64528   else
64529     # The variable is set, but is it from the command line or the environment?
64530 
64531     # Try to remove the string !ICECC_CMD! from our list.
64532     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64533     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64534       # If it failed, the variable was not from the command line. Ignore it,
64535       # but warn the user (except for BASH, which is always set by the calling BASH).
64536       if test "xICECC_CMD" != xBASH; then
64537         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64538 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64539       fi
64540       # Try to locate tool using the code snippet
64541       for ac_prog in icecc
64542 do
64543   # Extract the first word of "$ac_prog", so it can be a program name with args.
64544 set dummy $ac_prog; ac_word=$2
64545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64546 $as_echo_n "checking for $ac_word... " >&6; }
64547 if ${ac_cv_path_ICECC_CMD+:} false; then :
64548   $as_echo_n "(cached) " >&6
64549 else
64550   case $ICECC_CMD in
64551   [\\/]* | ?:[\\/]*)
64552   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64553   ;;
64554   *)
64555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64556 for as_dir in $PATH
64557 do
64558   IFS=$as_save_IFS
64559   test -z "$as_dir" && as_dir=.
64560     for ac_exec_ext in '' $ac_executable_extensions; do
64561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64562     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64564     break 2
64565   fi
64566 done
64567   done
64568 IFS=$as_save_IFS
64569 
64570   ;;
64571 esac
64572 fi
64573 ICECC_CMD=$ac_cv_path_ICECC_CMD
64574 if test -n "$ICECC_CMD"; then
64575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64576 $as_echo "$ICECC_CMD" >&6; }
64577 else
64578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64579 $as_echo "no" >&6; }
64580 fi
64581 
64582 
64583   test -n "$ICECC_CMD" && break
64584 done
64585 
64586     else
64587       # If it succeeded, then it was overridden by the user. We will use it
64588       # for the tool.
64589 
64590       # First remove it from the list of overridden variables, so we can test
64591       # for unknown variables in the end.
64592       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64593 
64594       # Check if we try to supply an empty value
64595       if test "x$ICECC_CMD" = x; then
64596         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64597 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64598         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64599 $as_echo_n "checking for ICECC_CMD... " >&6; }
64600         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64601 $as_echo "disabled" >&6; }
64602       else
64603         # Check if the provided tool contains a complete path.
64604         tool_specified="$ICECC_CMD"
64605         tool_basename="${tool_specified##*/}"
64606         if test "x$tool_basename" = "x$tool_specified"; then
64607           # A command without a complete path is provided, search $PATH.
64608           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64609 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64610           # Extract the first word of "$tool_basename", so it can be a program name with args.
64611 set dummy $tool_basename; ac_word=$2
64612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64613 $as_echo_n "checking for $ac_word... " >&6; }
64614 if ${ac_cv_path_ICECC_CMD+:} false; then :
64615   $as_echo_n "(cached) " >&6
64616 else
64617   case $ICECC_CMD in
64618   [\\/]* | ?:[\\/]*)
64619   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64620   ;;
64621   *)
64622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64623 for as_dir in $PATH
64624 do
64625   IFS=$as_save_IFS
64626   test -z "$as_dir" && as_dir=.
64627     for ac_exec_ext in '' $ac_executable_extensions; do
64628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64629     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64631     break 2
64632   fi
64633 done
64634   done
64635 IFS=$as_save_IFS
64636 
64637   ;;
64638 esac
64639 fi
64640 ICECC_CMD=$ac_cv_path_ICECC_CMD
64641 if test -n "$ICECC_CMD"; then
64642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64643 $as_echo "$ICECC_CMD" >&6; }
64644 else
64645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64646 $as_echo "no" >&6; }
64647 fi
64648 
64649 
64650           if test "x$ICECC_CMD" = x; then
64651             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64652           fi
64653         else
64654           # Otherwise we believe it is a complete path. Use it as it is.
64655           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64656 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64657           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64658 $as_echo_n "checking for ICECC_CMD... " >&6; }
64659           if test ! -x "$tool_specified"; then
64660             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64661 $as_echo "not found" >&6; }
64662             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64663           fi
64664           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64665 $as_echo "$tool_specified" >&6; }
64666         fi
64667       fi
64668     fi
64669 
64670   fi
64671 
64672 
64673 
64674   if test "x$ICECC_CMD" = x; then
64675     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64676   fi
64677 
64678 
64679     old_path="$PATH"
64680 
64681     # Look for icecc-create-env in some known places
64682     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64683 
64684 
64685 
64686   # Publish this variable in the help.
64687 
64688 
64689   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64690     # The variable is not set by user, try to locate tool using the code snippet
64691     for ac_prog in icecc-create-env
64692 do
64693   # Extract the first word of "$ac_prog", so it can be a program name with args.
64694 set dummy $ac_prog; ac_word=$2
64695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64696 $as_echo_n "checking for $ac_word... " >&6; }
64697 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64698   $as_echo_n "(cached) " >&6
64699 else
64700   case $ICECC_CREATE_ENV in
64701   [\\/]* | ?:[\\/]*)
64702   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64703   ;;
64704   *)
64705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64706 for as_dir in $PATH
64707 do
64708   IFS=$as_save_IFS
64709   test -z "$as_dir" && as_dir=.
64710     for ac_exec_ext in '' $ac_executable_extensions; do
64711   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64712     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64713     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64714     break 2
64715   fi
64716 done
64717   done
64718 IFS=$as_save_IFS
64719 
64720   ;;
64721 esac
64722 fi
64723 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64724 if test -n "$ICECC_CREATE_ENV"; then
64725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64726 $as_echo "$ICECC_CREATE_ENV" >&6; }
64727 else
64728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64729 $as_echo "no" >&6; }
64730 fi
64731 
64732 
64733   test -n "$ICECC_CREATE_ENV" && break
64734 done
64735 
64736   else
64737     # The variable is set, but is it from the command line or the environment?
64738 
64739     # Try to remove the string !ICECC_CREATE_ENV! from our list.
64740     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64741     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64742       # If it failed, the variable was not from the command line. Ignore it,
64743       # but warn the user (except for BASH, which is always set by the calling BASH).
64744       if test "xICECC_CREATE_ENV" != xBASH; then
64745         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64746 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64747       fi
64748       # Try to locate tool using the code snippet
64749       for ac_prog in icecc-create-env
64750 do
64751   # Extract the first word of "$ac_prog", so it can be a program name with args.
64752 set dummy $ac_prog; ac_word=$2
64753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64754 $as_echo_n "checking for $ac_word... " >&6; }
64755 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64756   $as_echo_n "(cached) " >&6
64757 else
64758   case $ICECC_CREATE_ENV in
64759   [\\/]* | ?:[\\/]*)
64760   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64761   ;;
64762   *)
64763   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64764 for as_dir in $PATH
64765 do
64766   IFS=$as_save_IFS
64767   test -z "$as_dir" && as_dir=.
64768     for ac_exec_ext in '' $ac_executable_extensions; do
64769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64770     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64772     break 2
64773   fi
64774 done
64775   done
64776 IFS=$as_save_IFS
64777 
64778   ;;
64779 esac
64780 fi
64781 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64782 if test -n "$ICECC_CREATE_ENV"; then
64783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64784 $as_echo "$ICECC_CREATE_ENV" >&6; }
64785 else
64786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64787 $as_echo "no" >&6; }
64788 fi
64789 
64790 
64791   test -n "$ICECC_CREATE_ENV" && break
64792 done
64793 
64794     else
64795       # If it succeeded, then it was overridden by the user. We will use it
64796       # for the tool.
64797 
64798       # First remove it from the list of overridden variables, so we can test
64799       # for unknown variables in the end.
64800       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64801 
64802       # Check if we try to supply an empty value
64803       if test "x$ICECC_CREATE_ENV" = x; then
64804         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64805 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64806         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64807 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64808         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64809 $as_echo "disabled" >&6; }
64810       else
64811         # Check if the provided tool contains a complete path.
64812         tool_specified="$ICECC_CREATE_ENV"
64813         tool_basename="${tool_specified##*/}"
64814         if test "x$tool_basename" = "x$tool_specified"; then
64815           # A command without a complete path is provided, search $PATH.
64816           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64817 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64818           # Extract the first word of "$tool_basename", so it can be a program name with args.
64819 set dummy $tool_basename; ac_word=$2
64820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64821 $as_echo_n "checking for $ac_word... " >&6; }
64822 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64823   $as_echo_n "(cached) " >&6
64824 else
64825   case $ICECC_CREATE_ENV in
64826   [\\/]* | ?:[\\/]*)
64827   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64828   ;;
64829   *)
64830   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64831 for as_dir in $PATH
64832 do
64833   IFS=$as_save_IFS
64834   test -z "$as_dir" && as_dir=.
64835     for ac_exec_ext in '' $ac_executable_extensions; do
64836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64837     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64839     break 2
64840   fi
64841 done
64842   done
64843 IFS=$as_save_IFS
64844 
64845   ;;
64846 esac
64847 fi
64848 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64849 if test -n "$ICECC_CREATE_ENV"; then
64850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64851 $as_echo "$ICECC_CREATE_ENV" >&6; }
64852 else
64853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64854 $as_echo "no" >&6; }
64855 fi
64856 
64857 
64858           if test "x$ICECC_CREATE_ENV" = x; then
64859             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64860           fi
64861         else
64862           # Otherwise we believe it is a complete path. Use it as it is.
64863           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64864 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64865           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64866 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64867           if test ! -x "$tool_specified"; then
64868             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64869 $as_echo "not found" >&6; }
64870             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64871           fi
64872           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64873 $as_echo "$tool_specified" >&6; }
64874         fi
64875       fi
64876     fi
64877 
64878   fi
64879 
64880 
64881 
64882   if test "x$ICECC_CREATE_ENV" = x; then
64883     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64884   fi
64885 
64886 
64887     # Use icecc-create-env to create a minimal compilation environment that can
64888     # be sent to the other hosts in the icecream cluster.
64889     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64890     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64891     # Older versions of icecc does not have the --gcc parameter
64892     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64893       icecc_gcc_arg="--gcc"
64894     fi
64895     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64896 
64897   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64898       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64899           ${icecc_create_env_log} 2>&1 )
64900   if test "$?" != "0"; then
64901     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64902 $as_echo "$as_me: icecc-create-env output:" >&6;}
64903     cat \
64904           ${icecc_create_env_log}
64905     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64906   fi
64907 
64908     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64909       # For clang, the icecc compilerwrapper is needed. It usually resides next
64910       # to icecc-create-env.
64911 
64912 
64913 
64914   # Publish this variable in the help.
64915 
64916 
64917   if [ -z "${ICECC_WRAPPER+x}" ]; then
64918     # The variable is not set by user, try to locate tool using the code snippet
64919     for ac_prog in compilerwrapper
64920 do
64921   # Extract the first word of "$ac_prog", so it can be a program name with args.
64922 set dummy $ac_prog; ac_word=$2
64923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64924 $as_echo_n "checking for $ac_word... " >&6; }
64925 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64926   $as_echo_n "(cached) " >&6
64927 else
64928   case $ICECC_WRAPPER in
64929   [\\/]* | ?:[\\/]*)
64930   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64931   ;;
64932   *)
64933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64934 for as_dir in $PATH
64935 do
64936   IFS=$as_save_IFS
64937   test -z "$as_dir" && as_dir=.
64938     for ac_exec_ext in '' $ac_executable_extensions; do
64939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64940     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64942     break 2
64943   fi
64944 done
64945   done
64946 IFS=$as_save_IFS
64947 
64948   ;;
64949 esac
64950 fi
64951 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64952 if test -n "$ICECC_WRAPPER"; then
64953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64954 $as_echo "$ICECC_WRAPPER" >&6; }
64955 else
64956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64957 $as_echo "no" >&6; }
64958 fi
64959 
64960 
64961   test -n "$ICECC_WRAPPER" && break
64962 done
64963 
64964   else
64965     # The variable is set, but is it from the command line or the environment?
64966 
64967     # Try to remove the string !ICECC_WRAPPER! from our list.
64968     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64969     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64970       # If it failed, the variable was not from the command line. Ignore it,
64971       # but warn the user (except for BASH, which is always set by the calling BASH).
64972       if test "xICECC_WRAPPER" != xBASH; then
64973         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64974 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64975       fi
64976       # Try to locate tool using the code snippet
64977       for ac_prog in compilerwrapper
64978 do
64979   # Extract the first word of "$ac_prog", so it can be a program name with args.
64980 set dummy $ac_prog; ac_word=$2
64981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64982 $as_echo_n "checking for $ac_word... " >&6; }
64983 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64984   $as_echo_n "(cached) " >&6
64985 else
64986   case $ICECC_WRAPPER in
64987   [\\/]* | ?:[\\/]*)
64988   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64989   ;;
64990   *)
64991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64992 for as_dir in $PATH
64993 do
64994   IFS=$as_save_IFS
64995   test -z "$as_dir" && as_dir=.
64996     for ac_exec_ext in '' $ac_executable_extensions; do
64997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64998     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65000     break 2
65001   fi
65002 done
65003   done
65004 IFS=$as_save_IFS
65005 
65006   ;;
65007 esac
65008 fi
65009 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65010 if test -n "$ICECC_WRAPPER"; then
65011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65012 $as_echo "$ICECC_WRAPPER" >&6; }
65013 else
65014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65015 $as_echo "no" >&6; }
65016 fi
65017 
65018 
65019   test -n "$ICECC_WRAPPER" && break
65020 done
65021 
65022     else
65023       # If it succeeded, then it was overridden by the user. We will use it
65024       # for the tool.
65025 
65026       # First remove it from the list of overridden variables, so we can test
65027       # for unknown variables in the end.
65028       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65029 
65030       # Check if we try to supply an empty value
65031       if test "x$ICECC_WRAPPER" = x; then
65032         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65033 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65035 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65036         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65037 $as_echo "disabled" >&6; }
65038       else
65039         # Check if the provided tool contains a complete path.
65040         tool_specified="$ICECC_WRAPPER"
65041         tool_basename="${tool_specified##*/}"
65042         if test "x$tool_basename" = "x$tool_specified"; then
65043           # A command without a complete path is provided, search $PATH.
65044           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65045 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65046           # Extract the first word of "$tool_basename", so it can be a program name with args.
65047 set dummy $tool_basename; ac_word=$2
65048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65049 $as_echo_n "checking for $ac_word... " >&6; }
65050 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65051   $as_echo_n "(cached) " >&6
65052 else
65053   case $ICECC_WRAPPER in
65054   [\\/]* | ?:[\\/]*)
65055   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65056   ;;
65057   *)
65058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65059 for as_dir in $PATH
65060 do
65061   IFS=$as_save_IFS
65062   test -z "$as_dir" && as_dir=.
65063     for ac_exec_ext in '' $ac_executable_extensions; do
65064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65065     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65067     break 2
65068   fi
65069 done
65070   done
65071 IFS=$as_save_IFS
65072 
65073   ;;
65074 esac
65075 fi
65076 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65077 if test -n "$ICECC_WRAPPER"; then
65078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65079 $as_echo "$ICECC_WRAPPER" >&6; }
65080 else
65081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65082 $as_echo "no" >&6; }
65083 fi
65084 
65085 
65086           if test "x$ICECC_WRAPPER" = x; then
65087             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65088           fi
65089         else
65090           # Otherwise we believe it is a complete path. Use it as it is.
65091           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65092 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65093           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65094 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65095           if test ! -x "$tool_specified"; then
65096             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65097 $as_echo "not found" >&6; }
65098             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65099           fi
65100           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65101 $as_echo "$tool_specified" >&6; }
65102         fi
65103       fi
65104     fi
65105 
65106   fi
65107 
65108 
65109 
65110   if test "x$ICECC_WRAPPER" = x; then
65111     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65112   fi
65113 
65114 
65115 
65116   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65117       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65118   if test "$?" != "0"; then
65119     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65120 $as_echo "$as_me: icecc-create-env output:" >&6;}
65121     cat ${icecc_create_env_log}
65122     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65123   fi
65124 
65125     else
65126       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65127     fi
65128     PATH="$old_path"
65129     # The bundle with the compiler gets a name based on checksums. Parse log file
65130     # to find it.
65131     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65132     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65133     if test ! -f ${ICECC_ENV_BUNDLE}; then
65134       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65135     fi
65136     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65137 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65138     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65139 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65140     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65141 
65142     if test "x${COMPILE_TYPE}" = "xcross"; then
65143       # If cross compiling, create a separate env package for the build compiler
65144       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65145       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65146       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65147 
65148   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65149       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65150             ${icecc_create_env_log_build} 2>&1 )
65151   if test "$?" != "0"; then
65152     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65153 $as_echo "$as_me: icecc-create-env output:" >&6;}
65154     cat \
65155             ${icecc_create_env_log_build}
65156     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65157   fi
65158 
65159       elif test "x${BUILD_CC##*/}" = "xclang"; then
65160 
65161   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65162       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65163   if test "$?" != "0"; then
65164     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65165 $as_echo "$as_me: icecc-create-env output:" >&6;}
65166     cat ${icecc_create_env_log_build}
65167     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65168   fi
65169 
65170       else
65171         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65172       fi
65173       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65174       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65175       if test ! -f ${ICECC_ENV_BUNDLE}; then
65176         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65177       fi
65178       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65179 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65181 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65182       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65183           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65184     else
65185       BUILD_ICECC="${ICECC}"
65186     fi
65187 
65188 
65189   fi
65190 
65191 
65192 # Can the C/C++ compiler use precompiled headers?
65193 
65194 
65195   ###############################################################################
65196   #
65197   # Can the C/C++ compiler use precompiled headers?
65198   #
65199   # Check whether --enable-precompiled-headers was given.
65200 if test "${enable_precompiled_headers+set}" = set; then :
65201   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65202 else
65203   ENABLE_PRECOMPH=yes
65204 fi
65205 
65206 
65207   USE_PRECOMPILED_HEADER=1
65208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65209 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65210   if test "x$ENABLE_PRECOMPH" = xno; then
65211     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65212 $as_echo "no, forced" >&6; }
65213     USE_PRECOMPILED_HEADER=0
65214   elif test "x$ICECC" != "x"; then
65215     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65216 $as_echo "no, does not work effectively with icecc" >&6; }
65217     USE_PRECOMPILED_HEADER=0
65218   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65219     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65220 $as_echo "no, does not work with Solaris Studio" >&6; }
65221     USE_PRECOMPILED_HEADER=0
65222   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65223     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65224 $as_echo "no, does not work with xlc" >&6; }
65225     USE_PRECOMPILED_HEADER=0
65226   else
65227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65228 $as_echo "yes" >&6; }
65229   fi
65230 
65231   if test "x$ENABLE_PRECOMPH" = xyes; then
65232     # Check that the compiler actually supports precomp headers.
65233     if test "x$TOOLCHAIN_TYPE" = xgcc; then
65234       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65235 $as_echo_n "checking that precompiled headers work... " >&6; }
65236       echo "int alfa();" > conftest.h
65237       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65238       if test ! -f conftest.hpp.gch; then
65239         USE_PRECOMPILED_HEADER=0
65240         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65241 $as_echo "no" >&6; }
65242       else
65243         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65244 $as_echo "yes" >&6; }
65245       fi
65246       $RM conftest.h conftest.hpp.gch
65247     fi
65248   fi
65249 
65250 
65251 
65252 
65253 # Setup use of ccache, if available
65254 
65255   # Check whether --enable-ccache was given.
65256 if test "${enable_ccache+set}" = set; then :
65257   enableval=$enable_ccache;
65258 fi
65259 
65260 
65261   CCACHE_STATUS=
65262   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65263 $as_echo_n "checking is ccache enabled... " >&6; }
65264   if test "x$enable_ccache" = xyes; then
65265     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65266       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65267 $as_echo "yes" >&6; }
65268       OLD_PATH="$PATH"
65269       if test "x$TOOLCHAIN_PATH" != x; then
65270         PATH=$TOOLCHAIN_PATH:$PATH
65271       fi
65272 
65273 
65274 
65275   # Publish this variable in the help.
65276 
65277 
65278   if [ -z "${CCACHE+x}" ]; then
65279     # The variable is not set by user, try to locate tool using the code snippet
65280     for ac_prog in ccache
65281 do
65282   # Extract the first word of "$ac_prog", so it can be a program name with args.
65283 set dummy $ac_prog; ac_word=$2
65284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65285 $as_echo_n "checking for $ac_word... " >&6; }
65286 if ${ac_cv_path_CCACHE+:} false; then :
65287   $as_echo_n "(cached) " >&6
65288 else
65289   case $CCACHE in
65290   [\\/]* | ?:[\\/]*)
65291   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65292   ;;
65293   *)
65294   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65295 for as_dir in $PATH
65296 do
65297   IFS=$as_save_IFS
65298   test -z "$as_dir" && as_dir=.
65299     for ac_exec_ext in '' $ac_executable_extensions; do
65300   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65301     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65302     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65303     break 2
65304   fi
65305 done
65306   done
65307 IFS=$as_save_IFS
65308 
65309   ;;
65310 esac
65311 fi
65312 CCACHE=$ac_cv_path_CCACHE
65313 if test -n "$CCACHE"; then
65314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65315 $as_echo "$CCACHE" >&6; }
65316 else
65317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65318 $as_echo "no" >&6; }
65319 fi
65320 
65321 
65322   test -n "$CCACHE" && break
65323 done
65324 
65325   else
65326     # The variable is set, but is it from the command line or the environment?
65327 
65328     # Try to remove the string !CCACHE! from our list.
65329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65331       # If it failed, the variable was not from the command line. Ignore it,
65332       # but warn the user (except for BASH, which is always set by the calling BASH).
65333       if test "xCCACHE" != xBASH; then
65334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65335 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65336       fi
65337       # Try to locate tool using the code snippet
65338       for ac_prog in ccache
65339 do
65340   # Extract the first word of "$ac_prog", so it can be a program name with args.
65341 set dummy $ac_prog; ac_word=$2
65342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65343 $as_echo_n "checking for $ac_word... " >&6; }
65344 if ${ac_cv_path_CCACHE+:} false; then :
65345   $as_echo_n "(cached) " >&6
65346 else
65347   case $CCACHE in
65348   [\\/]* | ?:[\\/]*)
65349   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65350   ;;
65351   *)
65352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65353 for as_dir in $PATH
65354 do
65355   IFS=$as_save_IFS
65356   test -z "$as_dir" && as_dir=.
65357     for ac_exec_ext in '' $ac_executable_extensions; do
65358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65359     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65361     break 2
65362   fi
65363 done
65364   done
65365 IFS=$as_save_IFS
65366 
65367   ;;
65368 esac
65369 fi
65370 CCACHE=$ac_cv_path_CCACHE
65371 if test -n "$CCACHE"; then
65372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65373 $as_echo "$CCACHE" >&6; }
65374 else
65375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65376 $as_echo "no" >&6; }
65377 fi
65378 
65379 
65380   test -n "$CCACHE" && break
65381 done
65382 
65383     else
65384       # If it succeeded, then it was overridden by the user. We will use it
65385       # for the tool.
65386 
65387       # First remove it from the list of overridden variables, so we can test
65388       # for unknown variables in the end.
65389       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65390 
65391       # Check if we try to supply an empty value
65392       if test "x$CCACHE" = x; then
65393         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65394 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65395         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65396 $as_echo_n "checking for CCACHE... " >&6; }
65397         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65398 $as_echo "disabled" >&6; }
65399       else
65400         # Check if the provided tool contains a complete path.
65401         tool_specified="$CCACHE"
65402         tool_basename="${tool_specified##*/}"
65403         if test "x$tool_basename" = "x$tool_specified"; then
65404           # A command without a complete path is provided, search $PATH.
65405           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65406 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65407           # Extract the first word of "$tool_basename", so it can be a program name with args.
65408 set dummy $tool_basename; ac_word=$2
65409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65410 $as_echo_n "checking for $ac_word... " >&6; }
65411 if ${ac_cv_path_CCACHE+:} false; then :
65412   $as_echo_n "(cached) " >&6
65413 else
65414   case $CCACHE in
65415   [\\/]* | ?:[\\/]*)
65416   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65417   ;;
65418   *)
65419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65420 for as_dir in $PATH
65421 do
65422   IFS=$as_save_IFS
65423   test -z "$as_dir" && as_dir=.
65424     for ac_exec_ext in '' $ac_executable_extensions; do
65425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65426     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65428     break 2
65429   fi
65430 done
65431   done
65432 IFS=$as_save_IFS
65433 
65434   ;;
65435 esac
65436 fi
65437 CCACHE=$ac_cv_path_CCACHE
65438 if test -n "$CCACHE"; then
65439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65440 $as_echo "$CCACHE" >&6; }
65441 else
65442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65443 $as_echo "no" >&6; }
65444 fi
65445 
65446 
65447           if test "x$CCACHE" = x; then
65448             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65449           fi
65450         else
65451           # Otherwise we believe it is a complete path. Use it as it is.
65452           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65453 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65454           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65455 $as_echo_n "checking for CCACHE... " >&6; }
65456           if test ! -x "$tool_specified"; then
65457             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65458 $as_echo "not found" >&6; }
65459             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65460           fi
65461           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65462 $as_echo "$tool_specified" >&6; }
65463         fi
65464       fi
65465     fi
65466 
65467   fi
65468 
65469 
65470 
65471   if test "x$CCACHE" = x; then
65472     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65473   fi
65474 
65475 
65476       PATH="$OLD_PATH"
65477       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65478       CCACHE_STATUS="Active ($CCACHE_VERSION)"
65479     else
65480       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65481 $as_echo "no" >&6; }
65482       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65483 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65484     fi
65485   elif test "x$enable_ccache" = xno; then
65486     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65487 $as_echo "no, explicitly disabled" >&6; }
65488     CCACHE_STATUS="Disabled"
65489   elif test "x$enable_ccache" = x; then
65490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65491 $as_echo "no" >&6; }
65492   else
65493     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65494 $as_echo "unknown" >&6; }
65495     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65496   fi
65497 
65498 
65499 
65500 # Check whether --with-ccache-dir was given.
65501 if test "${with_ccache_dir+set}" = set; then :
65502   withval=$with_ccache_dir;
65503 fi
65504 
65505 
65506   if test "x$with_ccache_dir" != x; then
65507     # When using a non home ccache directory, assume the use is to share ccache files
65508     # with other users. Thus change the umask.
65509     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65510     if test "x$CCACHE" = x; then
65511       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65512 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65513     fi
65514   fi
65515 
65516   if test "x$CCACHE" != x; then
65517 
65518   if test "x$CCACHE" != x; then
65519     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65520       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65521           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65522       if test "x$HAS_BAD_CCACHE" != "x"; then
65523         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65524       fi
65525       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65526 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65527       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65528       PUSHED_FLAGS="$CXXFLAGS"
65529       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65530       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65531 /* end confdefs.h.  */
65532 
65533 int
65534 main ()
65535 {
65536 
65537   ;
65538   return 0;
65539 }
65540 _ACEOF
65541 if ac_fn_cxx_try_compile "$LINENO"; then :
65542   CC_KNOWS_CCACHE_TRICK=yes
65543 else
65544   CC_KNOWS_CCACHE_TRICK=no
65545 fi
65546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65547       CXXFLAGS="$PUSHED_FLAGS"
65548       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65549         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65550 $as_echo "yes" >&6; }
65551         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65552 
65553         CCACHE_SLOPPINESS=pch_defines,time_macros
65554       else
65555         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65556 $as_echo "no" >&6; }
65557         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65558       fi
65559     fi
65560 
65561     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65562         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65563 
65564     if test "x$SET_CCACHE_DIR" != x; then
65565       mkdir -p $CCACHE_DIR > /dev/null 2>&1
65566       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65567     fi
65568   fi
65569 
65570   fi
65571 
65572 
65573 ###############################################################################
65574 #
65575 # And now the finish...
65576 #
65577 ###############################################################################
65578 
65579 # Check for some common pitfalls
65580 
65581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65582     file_to_test="$SRC_ROOT/LICENSE"
65583     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65584       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
65585     fi
65586   fi
65587 
65588 
65589   # Did user specify any unknown variables?
65590 
65591   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65592     # Replace the separating ! with spaces before presenting for end user.
65593     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65594     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65595 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65596   fi
65597 
65598 
65599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65600 $as_echo_n "checking if build directory is on local disk... " >&6; }
65601 
65602   # df -l lists only local disks; if the given directory is not found then
65603   # a non-zero exit code is given
65604   if test "x$DF" = x; then
65605     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65606       # msys does not have df; use Windows "net use" instead.
65607       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65608       if test "x$IS_NETWORK_DISK" = x; then
65609         OUTPUT_DIR_IS_LOCAL="yes"
65610       else
65611         OUTPUT_DIR_IS_LOCAL="no"
65612       fi
65613     else
65614       # No df here, say it's local
65615       OUTPUT_DIR_IS_LOCAL="yes"
65616     fi
65617   else
65618     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65619       OUTPUT_DIR_IS_LOCAL="yes"
65620     else
65621       OUTPUT_DIR_IS_LOCAL="no"
65622     fi
65623   fi
65624 
65625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65626 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65627 
65628 
65629 
65630   # Check if the user has any old-style ALT_ variables set.
65631   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65632 
65633   # Before generating output files, test if they exist. If they do, this is a reconfigure.
65634   # Since we can't properly handle the dependencies for this, warn the user about the situation
65635   if test -e $OUTPUT_ROOT/spec.gmk; then
65636     IS_RECONFIGURE=yes
65637   else
65638     IS_RECONFIGURE=no
65639   fi
65640 
65641 
65642 # At the end, call the custom hook. (Dummy macro if no custom sources available)
65643 
65644 
65645 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65646 
65647   # Keep feature lists sorted and free of duplicates
65648   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65649   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65650   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65651   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65652   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65653   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65654   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65655 
65656   # Validate features
65657   for variant in $JVM_VARIANTS; do
65658     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65659 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65660     features_var_name=JVM_FEATURES_$variant
65661     JVM_FEATURES_TO_TEST=${!features_var_name}
65662     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65663 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65664     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65665     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65666     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65667     if test "x$INVALID_FEATURES" != x; then
65668       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65669     fi
65670   done
65671 
65672 
65673 # We're messing a bit with internal autoconf variables to put the config.status
65674 # in the output directory instead of the current directory.
65675 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65676 
65677 # Create the actual output files. Now the main work of configure is done.
65678 cat >confcache <<\_ACEOF
65679 # This file is a shell script that caches the results of configure
65680 # tests run on this system so they can be shared between configure
65681 # scripts and configure runs, see configure's option --config-cache.
65682 # It is not useful on other systems.  If it contains results you don't
65683 # want to keep, you may remove or edit it.
65684 #
65685 # config.status only pays attention to the cache file if you give it
65686 # the --recheck option to rerun configure.
65687 #
65688 # `ac_cv_env_foo' variables (set or unset) will be overridden when
65689 # loading this file, other *unset* `ac_cv_foo' will be assigned the
65690 # following values.
65691 
65692 _ACEOF
65693 
65694 # The following way of writing the cache mishandles newlines in values,
65695 # but we know of no workaround that is simple, portable, and efficient.
65696 # So, we kill variables containing newlines.
65697 # Ultrix sh set writes to stderr and can't be redirected directly,
65698 # and sets the high bit in the cache file unless we assign to the vars.
65699 (
65700   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65701     eval ac_val=\$$ac_var
65702     case $ac_val in #(
65703     *${as_nl}*)
65704       case $ac_var in #(
65705       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65706 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65707       esac
65708       case $ac_var in #(
65709       _ | IFS | as_nl) ;; #(
65710       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65711       *) { eval $ac_var=; unset $ac_var;} ;;
65712       esac ;;
65713     esac
65714   done
65715 
65716   (set) 2>&1 |
65717     case $as_nl`(ac_space=' '; set) 2>&1` in #(
65718     *${as_nl}ac_space=\ *)
65719       # `set' does not quote correctly, so add quotes: double-quote
65720       # substitution turns \\\\ into \\, and sed turns \\ into \.
65721       sed -n \
65722         "s/'/'\\\\''/g;
65723           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65724       ;; #(
65725     *)
65726       # `set' quotes correctly as required by POSIX, so do not add quotes.
65727       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65728       ;;
65729     esac |
65730     sort
65731 ) |
65732   sed '
65733      /^ac_cv_env_/b end
65734      t clear
65735      :clear
65736      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65737      t end
65738      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65739      :end' >>confcache
65740 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65741   if test -w "$cache_file"; then
65742     if test "x$cache_file" != "x/dev/null"; then
65743       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65744 $as_echo "$as_me: updating cache $cache_file" >&6;}
65745       if test ! -f "$cache_file" || test -h "$cache_file"; then
65746         cat confcache >"$cache_file"
65747       else
65748         case $cache_file in #(
65749         */* | ?:*)
65750           mv -f confcache "$cache_file"$$ &&
65751           mv -f "$cache_file"$$ "$cache_file" ;; #(
65752         *)
65753           mv -f confcache "$cache_file" ;;
65754         esac
65755       fi
65756     fi
65757   else
65758     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65759 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65760   fi
65761 fi
65762 rm -f confcache
65763 
65764 test "x$prefix" = xNONE && prefix=$ac_default_prefix
65765 # Let make expand exec_prefix.
65766 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65767 
65768 # Transform confdefs.h into DEFS.
65769 # Protect against shell expansion while executing Makefile rules.
65770 # Protect against Makefile macro expansion.
65771 #
65772 # If the first sed substitution is executed (which looks for macros that
65773 # take arguments), then branch to the quote section.  Otherwise,
65774 # look for a macro that doesn't take arguments.
65775 ac_script='
65776 :mline
65777 /\\$/{
65778  N
65779  s,\\\n,,
65780  b mline
65781 }
65782 t clear
65783 :clear
65784 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
65785 t quote
65786 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
65787 t quote
65788 b any
65789 :quote
65790 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65791 s/\[/\\&/g
65792 s/\]/\\&/g
65793 s/\$/$$/g
65794 H
65795 :any
65796 ${
65797         g
65798         s/^\n//
65799         s/\n/ /g
65800         p
65801 }
65802 '
65803 DEFS=`sed -n "$ac_script" confdefs.h`
65804 
65805 
65806 ac_libobjs=
65807 ac_ltlibobjs=
65808 U=
65809 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65810   # 1. Remove the extension, and $U if already installed.
65811   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65812   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65813   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65814   #    will be set to the directory where LIBOBJS objects are built.
65815   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65816   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65817 done
65818 LIBOBJS=$ac_libobjs
65819 
65820 LTLIBOBJS=$ac_ltlibobjs
65821 
65822 
65823 
65824 : "${CONFIG_STATUS=./config.status}"
65825 ac_write_fail=0
65826 ac_clean_files_save=$ac_clean_files
65827 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65828 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65829 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65830 as_write_fail=0
65831 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65832 #! $SHELL
65833 # Generated by $as_me.
65834 # Run this file to recreate the current configuration.
65835 # Compiler output produced by configure, useful for debugging
65836 # configure, is in config.log if it exists.
65837 
65838 debug=false
65839 ac_cs_recheck=false
65840 ac_cs_silent=false
65841 
65842 SHELL=\${CONFIG_SHELL-$SHELL}
65843 export SHELL
65844 _ASEOF
65845 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65846 ## -------------------- ##
65847 ## M4sh Initialization. ##
65848 ## -------------------- ##
65849 
65850 # Be more Bourne compatible
65851 DUALCASE=1; export DUALCASE # for MKS sh
65852 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65853   emulate sh
65854   NULLCMD=:
65855   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65856   # is contrary to our usage.  Disable this feature.
65857   alias -g '${1+"$@"}'='"$@"'
65858   setopt NO_GLOB_SUBST
65859 else
65860   case `(set -o) 2>/dev/null` in #(
65861   *posix*) :
65862     set -o posix ;; #(
65863   *) :
65864      ;;
65865 esac
65866 fi
65867 
65868 
65869 as_nl='
65870 '
65871 export as_nl
65872 # Printing a long string crashes Solaris 7 /usr/bin/printf.
65873 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65874 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65875 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65876 # Prefer a ksh shell builtin over an external printf program on Solaris,
65877 # but without wasting forks for bash or zsh.
65878 if test -z "$BASH_VERSION$ZSH_VERSION" \
65879     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65880   as_echo='print -r --'
65881   as_echo_n='print -rn --'
65882 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65883   as_echo='printf %s\n'
65884   as_echo_n='printf %s'
65885 else
65886   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65887     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65888     as_echo_n='/usr/ucb/echo -n'
65889   else
65890     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65891     as_echo_n_body='eval
65892       arg=$1;
65893       case $arg in #(
65894       *"$as_nl"*)
65895         expr "X$arg" : "X\\(.*\\)$as_nl";
65896         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65897       esac;
65898       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65899     '
65900     export as_echo_n_body
65901     as_echo_n='sh -c $as_echo_n_body as_echo'
65902   fi
65903   export as_echo_body
65904   as_echo='sh -c $as_echo_body as_echo'
65905 fi
65906 
65907 # The user is always right.
65908 if test "${PATH_SEPARATOR+set}" != set; then
65909   PATH_SEPARATOR=:
65910   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65911     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65912       PATH_SEPARATOR=';'
65913   }
65914 fi
65915 
65916 
65917 # IFS
65918 # We need space, tab and new line, in precisely that order.  Quoting is
65919 # there to prevent editors from complaining about space-tab.
65920 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
65921 # splitting by setting IFS to empty value.)
65922 IFS=" ""        $as_nl"
65923 
65924 # Find who we are.  Look in the path if we contain no directory separator.
65925 as_myself=
65926 case $0 in #((
65927   *[\\/]* ) as_myself=$0 ;;
65928   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65929 for as_dir in $PATH
65930 do
65931   IFS=$as_save_IFS
65932   test -z "$as_dir" && as_dir=.
65933     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65934   done
65935 IFS=$as_save_IFS
65936 
65937      ;;
65938 esac
65939 # We did not find ourselves, most probably we were run as `sh COMMAND'
65940 # in which case we are not to be found in the path.
65941 if test "x$as_myself" = x; then
65942   as_myself=$0
65943 fi
65944 if test ! -f "$as_myself"; then
65945   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65946   exit 1
65947 fi
65948 
65949 # Unset variables that we do not need and which cause bugs (e.g. in
65950 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65951 # suppresses any "Segmentation fault" message there.  '((' could
65952 # trigger a bug in pdksh 5.2.14.
65953 for as_var in BASH_ENV ENV MAIL MAILPATH
65954 do eval test x\${$as_var+set} = xset \
65955   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65956 done
65957 PS1='$ '
65958 PS2='> '
65959 PS4='+ '
65960 
65961 # NLS nuisances.
65962 LC_ALL=C
65963 export LC_ALL
65964 LANGUAGE=C
65965 export LANGUAGE
65966 
65967 # CDPATH.
65968 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65969 
65970 
65971 # as_fn_error STATUS ERROR [LINENO LOG_FD]
65972 # ----------------------------------------
65973 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65974 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65975 # script with STATUS, using 1 if that was 0.
65976 as_fn_error ()
65977 {
65978   as_status=$1; test $as_status -eq 0 && as_status=1
65979   if test "$4"; then
65980     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65981     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65982   fi
65983   $as_echo "$as_me: error: $2" >&2
65984   as_fn_exit $as_status
65985 } # as_fn_error
65986 
65987 
65988 # as_fn_set_status STATUS
65989 # -----------------------
65990 # Set $? to STATUS, without forking.
65991 as_fn_set_status ()
65992 {
65993   return $1
65994 } # as_fn_set_status
65995 
65996 # as_fn_exit STATUS
65997 # -----------------
65998 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65999 as_fn_exit ()
66000 {
66001   set +e
66002   as_fn_set_status $1
66003   exit $1
66004 } # as_fn_exit
66005 
66006 # as_fn_unset VAR
66007 # ---------------
66008 # Portably unset VAR.
66009 as_fn_unset ()
66010 {
66011   { eval $1=; unset $1;}
66012 }
66013 as_unset=as_fn_unset
66014 # as_fn_append VAR VALUE
66015 # ----------------------
66016 # Append the text in VALUE to the end of the definition contained in VAR. Take
66017 # advantage of any shell optimizations that allow amortized linear growth over
66018 # repeated appends, instead of the typical quadratic growth present in naive
66019 # implementations.
66020 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66021   eval 'as_fn_append ()
66022   {
66023     eval $1+=\$2
66024   }'
66025 else
66026   as_fn_append ()
66027   {
66028     eval $1=\$$1\$2
66029   }
66030 fi # as_fn_append
66031 
66032 # as_fn_arith ARG...
66033 # ------------------
66034 # Perform arithmetic evaluation on the ARGs, and store the result in the
66035 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66036 # must be portable across $(()) and expr.
66037 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66038   eval 'as_fn_arith ()
66039   {
66040     as_val=$(( $* ))
66041   }'
66042 else
66043   as_fn_arith ()
66044   {
66045     as_val=`expr "$@" || test $? -eq 1`
66046   }
66047 fi # as_fn_arith
66048 
66049 
66050 if expr a : '\(a\)' >/dev/null 2>&1 &&
66051    test "X`expr 00001 : '.*\(...\)'`" = X001; then
66052   as_expr=expr
66053 else
66054   as_expr=false
66055 fi
66056 
66057 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66058   as_basename=basename
66059 else
66060   as_basename=false
66061 fi
66062 
66063 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66064   as_dirname=dirname
66065 else
66066   as_dirname=false
66067 fi
66068 
66069 as_me=`$as_basename -- "$0" ||
66070 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66071          X"$0" : 'X\(//\)$' \| \
66072          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66073 $as_echo X/"$0" |
66074     sed '/^.*\/\([^/][^/]*\)\/*$/{
66075             s//\1/
66076             q
66077           }
66078           /^X\/\(\/\/\)$/{
66079             s//\1/
66080             q
66081           }
66082           /^X\/\(\/\).*/{
66083             s//\1/
66084             q
66085           }
66086           s/.*/./; q'`
66087 
66088 # Avoid depending upon Character Ranges.
66089 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66090 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66091 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66092 as_cr_digits='0123456789'
66093 as_cr_alnum=$as_cr_Letters$as_cr_digits
66094 
66095 ECHO_C= ECHO_N= ECHO_T=
66096 case `echo -n x` in #(((((
66097 -n*)
66098   case `echo 'xy\c'` in
66099   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
66100   xy)  ECHO_C='\c';;
66101   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66102        ECHO_T=' ';;
66103   esac;;
66104 *)
66105   ECHO_N='-n';;
66106 esac
66107 
66108 rm -f conf$$ conf$$.exe conf$$.file
66109 if test -d conf$$.dir; then
66110   rm -f conf$$.dir/conf$$.file
66111 else
66112   rm -f conf$$.dir
66113   mkdir conf$$.dir 2>/dev/null
66114 fi
66115 if (echo >conf$$.file) 2>/dev/null; then
66116   if ln -s conf$$.file conf$$ 2>/dev/null; then
66117     as_ln_s='ln -s'
66118     # ... but there are two gotchas:
66119     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66120     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66121     # In both cases, we have to default to `cp -pR'.
66122     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66123       as_ln_s='cp -pR'
66124   elif ln conf$$.file conf$$ 2>/dev/null; then
66125     as_ln_s=ln
66126   else
66127     as_ln_s='cp -pR'
66128   fi
66129 else
66130   as_ln_s='cp -pR'
66131 fi
66132 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66133 rmdir conf$$.dir 2>/dev/null
66134 
66135 
66136 # as_fn_mkdir_p
66137 # -------------
66138 # Create "$as_dir" as a directory, including parents if necessary.
66139 as_fn_mkdir_p ()
66140 {
66141 
66142   case $as_dir in #(
66143   -*) as_dir=./$as_dir;;
66144   esac
66145   test -d "$as_dir" || eval $as_mkdir_p || {
66146     as_dirs=
66147     while :; do
66148       case $as_dir in #(
66149       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66150       *) as_qdir=$as_dir;;
66151       esac
66152       as_dirs="'$as_qdir' $as_dirs"
66153       as_dir=`$as_dirname -- "$as_dir" ||
66154 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66155          X"$as_dir" : 'X\(//\)[^/]' \| \
66156          X"$as_dir" : 'X\(//\)$' \| \
66157          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66158 $as_echo X"$as_dir" |
66159     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66160             s//\1/
66161             q
66162           }
66163           /^X\(\/\/\)[^/].*/{
66164             s//\1/
66165             q
66166           }
66167           /^X\(\/\/\)$/{
66168             s//\1/
66169             q
66170           }
66171           /^X\(\/\).*/{
66172             s//\1/
66173             q
66174           }
66175           s/.*/./; q'`
66176       test -d "$as_dir" && break
66177     done
66178     test -z "$as_dirs" || eval "mkdir $as_dirs"
66179   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66180 
66181 
66182 } # as_fn_mkdir_p
66183 if mkdir -p . 2>/dev/null; then
66184   as_mkdir_p='mkdir -p "$as_dir"'
66185 else
66186   test -d ./-p && rmdir ./-p
66187   as_mkdir_p=false
66188 fi
66189 
66190 
66191 # as_fn_executable_p FILE
66192 # -----------------------
66193 # Test if FILE is an executable regular file.
66194 as_fn_executable_p ()
66195 {
66196   test -f "$1" && test -x "$1"
66197 } # as_fn_executable_p
66198 as_test_x='test -x'
66199 as_executable_p=as_fn_executable_p
66200 
66201 # Sed expression to map a string onto a valid CPP name.
66202 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66203 
66204 # Sed expression to map a string onto a valid variable name.
66205 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66206 
66207 
66208 exec 6>&1
66209 ## ----------------------------------- ##
66210 ## Main body of $CONFIG_STATUS script. ##
66211 ## ----------------------------------- ##
66212 _ASEOF
66213 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66214 
66215 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66216 # Save the log message, to keep $0 and so on meaningful, and to
66217 # report actual input values of CONFIG_FILES etc. instead of their
66218 # values after options handling.
66219 ac_log="
66220 This file was extended by OpenJDK $as_me jdk9, which was
66221 generated by GNU Autoconf 2.69.  Invocation command line was
66222 
66223   CONFIG_FILES    = $CONFIG_FILES
66224   CONFIG_HEADERS  = $CONFIG_HEADERS
66225   CONFIG_LINKS    = $CONFIG_LINKS
66226   CONFIG_COMMANDS = $CONFIG_COMMANDS
66227   $ $0 $@
66228 
66229 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66230 "
66231 
66232 _ACEOF
66233 
66234 case $ac_config_files in *"
66235 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66236 esac
66237 
66238 
66239 
66240 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66241 # Files that config.status was made for.
66242 config_files="$ac_config_files"
66243 
66244 _ACEOF
66245 
66246 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66247 ac_cs_usage="\
66248 \`$as_me' instantiates files and other configuration actions
66249 from templates according to the current configuration.  Unless the files
66250 and actions are specified as TAGs, all are instantiated by default.
66251 
66252 Usage: $0 [OPTION]... [TAG]...
66253 
66254   -h, --help       print this help, then exit
66255   -V, --version    print version number and configuration settings, then exit
66256       --config     print configuration, then exit
66257   -q, --quiet, --silent
66258                    do not print progress messages
66259   -d, --debug      don't remove temporary files
66260       --recheck    update $as_me by reconfiguring in the same conditions
66261       --file=FILE[:TEMPLATE]
66262                    instantiate the configuration file FILE
66263 
66264 Configuration files:
66265 $config_files
66266 
66267 Report bugs to <build-dev@openjdk.java.net>.
66268 OpenJDK home page: <http://openjdk.java.net>."
66269 
66270 _ACEOF
66271 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66272 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66273 ac_cs_version="\\
66274 OpenJDK config.status jdk9
66275 configured by $0, generated by GNU Autoconf 2.69,
66276   with options \\"\$ac_cs_config\\"
66277 
66278 Copyright (C) 2012 Free Software Foundation, Inc.
66279 This config.status script is free software; the Free Software Foundation
66280 gives unlimited permission to copy, distribute and modify it."
66281 
66282 ac_pwd='$ac_pwd'
66283 srcdir='$srcdir'
66284 AWK='$AWK'
66285 test -n "\$AWK" || AWK=awk
66286 _ACEOF
66287 
66288 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66289 # The default lists apply if the user does not specify any file.
66290 ac_need_defaults=:
66291 while test $# != 0
66292 do
66293   case $1 in
66294   --*=?*)
66295     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66296     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66297     ac_shift=:
66298     ;;
66299   --*=)
66300     ac_option=`expr "X$1" : 'X\([^=]*\)='`
66301     ac_optarg=
66302     ac_shift=:
66303     ;;
66304   *)
66305     ac_option=$1
66306     ac_optarg=$2
66307     ac_shift=shift
66308     ;;
66309   esac
66310 
66311   case $ac_option in
66312   # Handling of the options.
66313   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66314     ac_cs_recheck=: ;;
66315   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66316     $as_echo "$ac_cs_version"; exit ;;
66317   --config | --confi | --conf | --con | --co | --c )
66318     $as_echo "$ac_cs_config"; exit ;;
66319   --debug | --debu | --deb | --de | --d | -d )
66320     debug=: ;;
66321   --file | --fil | --fi | --f )
66322     $ac_shift
66323     case $ac_optarg in
66324     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66325     '') as_fn_error $? "missing file argument" ;;
66326     esac
66327     as_fn_append CONFIG_FILES " '$ac_optarg'"
66328     ac_need_defaults=false;;
66329   --he | --h |  --help | --hel | -h )
66330     $as_echo "$ac_cs_usage"; exit ;;
66331   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66332   | -silent | --silent | --silen | --sile | --sil | --si | --s)
66333     ac_cs_silent=: ;;
66334 
66335   # This is an error.
66336   -*) as_fn_error $? "unrecognized option: \`$1'
66337 Try \`$0 --help' for more information." ;;
66338 
66339   *) as_fn_append ac_config_targets " $1"
66340      ac_need_defaults=false ;;
66341 
66342   esac
66343   shift
66344 done
66345 
66346 ac_configure_extra_args=
66347 
66348 if $ac_cs_silent; then
66349   exec 6>/dev/null
66350   ac_configure_extra_args="$ac_configure_extra_args --silent"
66351 fi
66352 
66353 _ACEOF
66354 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66355 if \$ac_cs_recheck; then
66356   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66357   shift
66358   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66359   CONFIG_SHELL='$SHELL'
66360   export CONFIG_SHELL
66361   exec "\$@"
66362 fi
66363 
66364 _ACEOF
66365 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66366 exec 5>>config.log
66367 {
66368   echo
66369   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66370 ## Running $as_me. ##
66371 _ASBOX
66372   $as_echo "$ac_log"
66373 } >&5
66374 
66375 _ACEOF
66376 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66377 _ACEOF
66378 
66379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66380 
66381 # Handling of arguments.
66382 for ac_config_target in $ac_config_targets
66383 do
66384   case $ac_config_target in
66385     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66386     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66387     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66388     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66389     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66390 
66391   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66392   esac
66393 done
66394 
66395 
66396 # If the user did not use the arguments to specify the items to instantiate,
66397 # then the envvar interface is used.  Set only those that are not.
66398 # We use the long form for the default assignment because of an extremely
66399 # bizarre bug on SunOS 4.1.3.
66400 if $ac_need_defaults; then
66401   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66402 fi
66403 
66404 # Have a temporary directory for convenience.  Make it in the build tree
66405 # simply because there is no reason against having it here, and in addition,
66406 # creating and moving files from /tmp can sometimes cause problems.
66407 # Hook for its removal unless debugging.
66408 # Note that there is a small window in which the directory will not be cleaned:
66409 # after its creation but before its name has been assigned to `$tmp'.
66410 $debug ||
66411 {
66412   tmp= ac_tmp=
66413   trap 'exit_status=$?
66414   : "${ac_tmp:=$tmp}"
66415   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66416 ' 0
66417   trap 'as_fn_exit 1' 1 2 13 15
66418 }
66419 # Create a (secure) tmp directory for tmp files.
66420 
66421 {
66422   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66423   test -d "$tmp"
66424 }  ||
66425 {
66426   tmp=./conf$$-$RANDOM
66427   (umask 077 && mkdir "$tmp")
66428 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66429 ac_tmp=$tmp
66430 
66431 # Set up the scripts for CONFIG_FILES section.
66432 # No need to generate them if there are no CONFIG_FILES.
66433 # This happens for instance with `./config.status config.h'.
66434 if test -n "$CONFIG_FILES"; then
66435 
66436 
66437 ac_cr=`echo X | tr X '\015'`
66438 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66439 # But we know of no other shell where ac_cr would be empty at this
66440 # point, so we can use a bashism as a fallback.
66441 if test "x$ac_cr" = x; then
66442   eval ac_cr=\$\'\\r\'
66443 fi
66444 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66445 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66446   ac_cs_awk_cr='\\r'
66447 else
66448   ac_cs_awk_cr=$ac_cr
66449 fi
66450 
66451 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66452 _ACEOF
66453 
66454 
66455 {
66456   echo "cat >conf$$subs.awk <<_ACEOF" &&
66457   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66458   echo "_ACEOF"
66459 } >conf$$subs.sh ||
66460   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66461 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66462 ac_delim='%!_!# '
66463 for ac_last_try in false false false false false :; do
66464   . ./conf$$subs.sh ||
66465     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66466 
66467   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66468   if test $ac_delim_n = $ac_delim_num; then
66469     break
66470   elif $ac_last_try; then
66471     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66472   else
66473     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66474   fi
66475 done
66476 rm -f conf$$subs.sh
66477 
66478 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66479 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66480 _ACEOF
66481 sed -n '
66482 h
66483 s/^/S["/; s/!.*/"]=/
66484 p
66485 g
66486 s/^[^!]*!//
66487 :repl
66488 t repl
66489 s/'"$ac_delim"'$//
66490 t delim
66491 :nl
66492 h
66493 s/\(.\{148\}\)..*/\1/
66494 t more1
66495 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66496 p
66497 n
66498 b repl
66499 :more1
66500 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66501 p
66502 g
66503 s/.\{148\}//
66504 t nl
66505 :delim
66506 h
66507 s/\(.\{148\}\)..*/\1/
66508 t more2
66509 s/["\\]/\\&/g; s/^/"/; s/$/"/
66510 p
66511 b
66512 :more2
66513 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66514 p
66515 g
66516 s/.\{148\}//
66517 t delim
66518 ' <conf$$subs.awk | sed '
66519 /^[^""]/{
66520   N
66521   s/\n//
66522 }
66523 ' >>$CONFIG_STATUS || ac_write_fail=1
66524 rm -f conf$$subs.awk
66525 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66526 _ACAWK
66527 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66528   for (key in S) S_is_set[key] = 1
66529   FS = ""
66530 
66531 }
66532 {
66533   line = $ 0
66534   nfields = split(line, field, "@")
66535   substed = 0
66536   len = length(field[1])
66537   for (i = 2; i < nfields; i++) {
66538     key = field[i]
66539     keylen = length(key)
66540     if (S_is_set[key]) {
66541       value = S[key]
66542       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66543       len += length(value) + length(field[++i])
66544       substed = 1
66545     } else
66546       len += 1 + keylen
66547   }
66548 
66549   print line
66550 }
66551 
66552 _ACAWK
66553 _ACEOF
66554 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66555 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66556   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66557 else
66558   cat
66559 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66560   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66561 _ACEOF
66562 
66563 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66564 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66565 # trailing colons and then remove the whole line if VPATH becomes empty
66566 # (actually we leave an empty line to preserve line numbers).
66567 if test "x$srcdir" = x.; then
66568   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
66569 h
66570 s///
66571 s/^/:/
66572 s/[      ]*$/:/
66573 s/:\$(srcdir):/:/g
66574 s/:\${srcdir}:/:/g
66575 s/:@srcdir@:/:/g
66576 s/^:*//
66577 s/:*$//
66578 x
66579 s/\(=[   ]*\).*/\1/
66580 G
66581 s/\n//
66582 s/^[^=]*=[       ]*$//
66583 }'
66584 fi
66585 
66586 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66587 fi # test -n "$CONFIG_FILES"
66588 
66589 
66590 eval set X "  :F $CONFIG_FILES      "
66591 shift
66592 for ac_tag
66593 do
66594   case $ac_tag in
66595   :[FHLC]) ac_mode=$ac_tag; continue;;
66596   esac
66597   case $ac_mode$ac_tag in
66598   :[FHL]*:*);;
66599   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66600   :[FH]-) ac_tag=-:-;;
66601   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66602   esac
66603   ac_save_IFS=$IFS
66604   IFS=:
66605   set x $ac_tag
66606   IFS=$ac_save_IFS
66607   shift
66608   ac_file=$1
66609   shift
66610 
66611   case $ac_mode in
66612   :L) ac_source=$1;;
66613   :[FH])
66614     ac_file_inputs=
66615     for ac_f
66616     do
66617       case $ac_f in
66618       -) ac_f="$ac_tmp/stdin";;
66619       *) # Look for the file first in the build tree, then in the source tree
66620          # (if the path is not absolute).  The absolute path cannot be DOS-style,
66621          # because $ac_f cannot contain `:'.
66622          test -f "$ac_f" ||
66623            case $ac_f in
66624            [\\/$]*) false;;
66625            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66626            esac ||
66627            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66628       esac
66629       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66630       as_fn_append ac_file_inputs " '$ac_f'"
66631     done
66632 
66633     # Let's still pretend it is `configure' which instantiates (i.e., don't
66634     # use $as_me), people would be surprised to read:
66635     #    /* config.h.  Generated by config.status.  */
66636     configure_input='Generated from '`
66637           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66638         `' by configure.'
66639     if test x"$ac_file" != x-; then
66640       configure_input="$ac_file.  $configure_input"
66641       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66642 $as_echo "$as_me: creating $ac_file" >&6;}
66643     fi
66644     # Neutralize special characters interpreted by sed in replacement strings.
66645     case $configure_input in #(
66646     *\&* | *\|* | *\\* )
66647        ac_sed_conf_input=`$as_echo "$configure_input" |
66648        sed 's/[\\\\&|]/\\\\&/g'`;; #(
66649     *) ac_sed_conf_input=$configure_input;;
66650     esac
66651 
66652     case $ac_tag in
66653     *:-:* | *:-) cat >"$ac_tmp/stdin" \
66654       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66655     esac
66656     ;;
66657   esac
66658 
66659   ac_dir=`$as_dirname -- "$ac_file" ||
66660 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66661          X"$ac_file" : 'X\(//\)[^/]' \| \
66662          X"$ac_file" : 'X\(//\)$' \| \
66663          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66664 $as_echo X"$ac_file" |
66665     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66666             s//\1/
66667             q
66668           }
66669           /^X\(\/\/\)[^/].*/{
66670             s//\1/
66671             q
66672           }
66673           /^X\(\/\/\)$/{
66674             s//\1/
66675             q
66676           }
66677           /^X\(\/\).*/{
66678             s//\1/
66679             q
66680           }
66681           s/.*/./; q'`
66682   as_dir="$ac_dir"; as_fn_mkdir_p
66683   ac_builddir=.
66684 
66685 case "$ac_dir" in
66686 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66687 *)
66688   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66689   # A ".." for each directory in $ac_dir_suffix.
66690   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66691   case $ac_top_builddir_sub in
66692   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66693   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66694   esac ;;
66695 esac
66696 ac_abs_top_builddir=$ac_pwd
66697 ac_abs_builddir=$ac_pwd$ac_dir_suffix
66698 # for backward compatibility:
66699 ac_top_builddir=$ac_top_build_prefix
66700 
66701 case $srcdir in
66702   .)  # We are building in place.
66703     ac_srcdir=.
66704     ac_top_srcdir=$ac_top_builddir_sub
66705     ac_abs_top_srcdir=$ac_pwd ;;
66706   [\\/]* | ?:[\\/]* )  # Absolute name.
66707     ac_srcdir=$srcdir$ac_dir_suffix;
66708     ac_top_srcdir=$srcdir
66709     ac_abs_top_srcdir=$srcdir ;;
66710   *) # Relative name.
66711     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66712     ac_top_srcdir=$ac_top_build_prefix$srcdir
66713     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66714 esac
66715 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66716 
66717 
66718   case $ac_mode in
66719   :F)
66720   #
66721   # CONFIG_FILE
66722   #
66723 
66724 _ACEOF
66725 
66726 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66727 # If the template does not know about datarootdir, expand it.
66728 # FIXME: This hack should be removed a few years after 2.60.
66729 ac_datarootdir_hack=; ac_datarootdir_seen=
66730 ac_sed_dataroot='
66731 /datarootdir/ {
66732   p
66733   q
66734 }
66735 /@datadir@/p
66736 /@docdir@/p
66737 /@infodir@/p
66738 /@localedir@/p
66739 /@mandir@/p'
66740 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66741 *datarootdir*) ac_datarootdir_seen=yes;;
66742 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66743   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66744 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66745 _ACEOF
66746 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66747   ac_datarootdir_hack='
66748   s&@datadir@&$datadir&g
66749   s&@docdir@&$docdir&g
66750   s&@infodir@&$infodir&g
66751   s&@localedir@&$localedir&g
66752   s&@mandir@&$mandir&g
66753   s&\\\${datarootdir}&$datarootdir&g' ;;
66754 esac
66755 _ACEOF
66756 
66757 # Neutralize VPATH when `$srcdir' = `.'.
66758 # Shell code in configure.ac might set extrasub.
66759 # FIXME: do we really want to maintain this feature?
66760 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66761 ac_sed_extra="$ac_vpsub
66762 $extrasub
66763 _ACEOF
66764 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66765 :t
66766 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66767 s|@configure_input@|$ac_sed_conf_input|;t t
66768 s&@top_builddir@&$ac_top_builddir_sub&;t t
66769 s&@top_build_prefix@&$ac_top_build_prefix&;t t
66770 s&@srcdir@&$ac_srcdir&;t t
66771 s&@abs_srcdir@&$ac_abs_srcdir&;t t
66772 s&@top_srcdir@&$ac_top_srcdir&;t t
66773 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66774 s&@builddir@&$ac_builddir&;t t
66775 s&@abs_builddir@&$ac_abs_builddir&;t t
66776 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66777 $ac_datarootdir_hack
66778 "
66779 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66780   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66781 
66782 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66783   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66784   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
66785       "$ac_tmp/out"`; test -z "$ac_out"; } &&
66786   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66787 which seems to be undefined.  Please make sure it is defined" >&5
66788 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66789 which seems to be undefined.  Please make sure it is defined" >&2;}
66790 
66791   rm -f "$ac_tmp/stdin"
66792   case $ac_file in
66793   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66794   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66795   esac \
66796   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66797  ;;
66798 
66799 
66800 
66801   esac
66802 
66803 done # for ac_tag
66804 
66805 
66806 as_fn_exit 0
66807 _ACEOF
66808 ac_clean_files=$ac_clean_files_save
66809 
66810 test $ac_write_fail = 0 ||
66811   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66812 
66813 
66814 # configure is writing to config.log, and then calls config.status.
66815 # config.status does its own redirection, appending to config.log.
66816 # Unfortunately, on DOS this fails, as config.log is still kept open
66817 # by configure, so config.status won't be able to write to it; its
66818 # output is simply discarded.  So we exec the FD to /dev/null,
66819 # effectively closing config.log, so it can be properly (re)opened and
66820 # appended to by config.status.  When coming back to configure, we
66821 # need to make the FD available again.
66822 if test "$no_create" != yes; then
66823   ac_cs_success=:
66824   ac_config_status_args=
66825   test "$silent" = yes &&
66826     ac_config_status_args="$ac_config_status_args --quiet"
66827   exec 5>/dev/null
66828   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66829   exec 5>>config.log
66830   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66831   # would make configure fail if this is the last instruction.
66832   $ac_cs_success || as_fn_exit 1
66833 fi
66834 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66835   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66836 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66837 fi
66838 
66839 
66840 # After AC_OUTPUT, we need to do final work
66841 
66842 
66843   # Try to move config.log (generated by autoconf) to the configure-support directory.
66844   if test -e ./config.log; then
66845     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66846   fi
66847 
66848   # Rotate our log file (configure.log)
66849   if test -e "$OUTPUT_ROOT/configure.log.old"; then
66850     $RM -f "$OUTPUT_ROOT/configure.log.old"
66851   fi
66852   if test -e "$OUTPUT_ROOT/configure.log"; then
66853     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66854   fi
66855 
66856   # Move configure.log from current directory to the build output root
66857   if test -e ./configure.log; then
66858     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66859   fi
66860 
66861   # Make the compare script executable
66862   $CHMOD +x $OUTPUT_ROOT/compare.sh
66863 
66864 
66865 # Finally output some useful information to the user
66866 
66867   # Finally output some useful information to the user
66868 
66869   printf "\n"
66870   printf "====================================================\n"
66871   if test "x$no_create" != "xyes"; then
66872     if test "x$IS_RECONFIGURE" != "xyes"; then
66873       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66874     else
66875       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66876     fi
66877   else
66878     if test "x$IS_RECONFIGURE" != "xyes"; then
66879       printf "A configuration has been successfully checked but not created\n"
66880     else
66881       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66882     fi
66883   fi
66884   if test "x$CONFIGURE_COMMAND_LINE" != x; then
66885     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66886   else
66887     printf "using default settings.\n"
66888   fi
66889 
66890   printf "\n"
66891   printf "Configuration summary:\n"
66892   printf "* Debug level:    $DEBUG_LEVEL\n"
66893   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66894   printf "* JDK variant:    $JDK_VARIANT\n"
66895   printf "* JVM variants:   $JVM_VARIANTS\n"
66896   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66897   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66898 
66899   printf "\n"
66900   printf "Tools summary:\n"
66901   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66902     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66903   fi
66904   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66905   if test "x$TOOLCHAIN_VERSION" != "x"; then
66906     print_version=" $TOOLCHAIN_VERSION"
66907   fi
66908   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66909   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66910   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66911 
66912   printf "\n"
66913   printf "Build performance summary:\n"
66914   printf "* Cores to use:   $JOBS\n"
66915   printf "* Memory limit:   $MEMORY_SIZE MB\n"
66916   if test "x$CCACHE_STATUS" != "x"; then
66917     printf "* ccache status:  $CCACHE_STATUS\n"
66918   fi
66919   printf "\n"
66920 
66921   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66922     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66923     printf "will result in longer build times.\n"
66924     printf "\n"
66925   fi
66926 
66927   if test "x$FOUND_ALT_VARIABLES" != "x"; then
66928     printf "WARNING: You have old-style ALT_ environment variables set.\n"
66929     printf "These are not respected, and will be ignored. It is recommended\n"
66930     printf "that you clean your environment. The following variables are set:\n"
66931     printf "$FOUND_ALT_VARIABLES\n"
66932     printf "\n"
66933   fi
66934 
66935   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66936     printf "WARNING: Your build output directory is not on a local disk.\n"
66937     printf "This will severely degrade build performance!\n"
66938     printf "It is recommended that you create an output directory on a local disk,\n"
66939     printf "and run the configure script again from that directory.\n"
66940     printf "\n"
66941   fi
66942 
66943   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66944     printf "WARNING: The result of this configuration has overridden an older\n"
66945     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66946     printf "proper build. Failure to do so might result in strange build problems.\n"
66947     printf "\n"
66948   fi
66949 
66950   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66951     printf "WARNING: The result of this configuration was not saved.\n"
66952     printf "You should run without '--no-create | -n' to create the configuration.\n"
66953     printf "\n"
66954   fi
66955 
66956 
66957 
66958   # Locate config.log.
66959   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66960     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66961   elif test -e "./config.log"; then
66962     CONFIG_LOG_PATH="."
66963   fi
66964 
66965   if test -e "$CONFIG_LOG_PATH/config.log"; then
66966     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66967     if test $? -eq 0; then
66968       printf "The following warnings were produced. Repeated here for convenience:\n"
66969       # We must quote sed expression (using []) to stop m4 from eating the [].
66970       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66971       printf "\n"
66972     fi
66973   fi
66974