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 JAVA_FLAGS_BIG
 648 JAVA_FLAGS
 649 TEST_JOBS
 650 JOBS
 651 MEMORY_SIZE
 652 NUM_CORES
 653 ENABLE_INTREE_EC
 654 HOTSPOT_MAKE_ARGS
 655 LIBZIP_CAN_USE_MMAP
 656 LIBDL
 657 LIBM
 658 USE_EXTERNAL_LCMS
 659 LCMS_LIBS
 660 LCMS_CFLAGS
 661 USE_EXTERNAL_LIBZ
 662 USE_EXTERNAL_LIBPNG
 663 PNG_LIBS
 664 PNG_CFLAGS
 665 USE_EXTERNAL_LIBGIF
 666 USE_EXTERNAL_LIBJPEG
 667 LLVM_LIBS
 668 LLVM_LDFLAGS
 669 LLVM_CFLAGS
 670 LLVM_CONFIG
 671 LIBFFI_LIBS
 672 LIBFFI_CFLAGS
 673 ALSA_LIBS
 674 ALSA_CFLAGS
 675 FREETYPE_BUNDLE_LIB_PATH
 676 FREETYPE_LIBS
 677 FREETYPE_CFLAGS
 678 CUPS_CFLAGS
 679 X_EXTRA_LIBS
 680 X_LIBS
 681 X_PRE_LIBS
 682 X_CFLAGS
 683 XMKMF
 684 MSVCP_DLL
 685 MSVCR_DLL
 686 LIBCXX
 687 STATIC_CXX_SETTING
 688 FIXPATH_DETACH_FLAG
 689 FIXPATH
 690 GCOV_ENABLED
 691 STRIP_POLICY
 692 DEBUG_BINARIES
 693 ZIP_EXTERNAL_DEBUG_SYMBOLS
 694 COPY_DEBUG_SYMBOLS
 695 COMPILE_WITH_DEBUG_SYMBOLS
 696 CFLAGS_WARNINGS_ARE_ERRORS
 697 DISABLE_WARNING_PREFIX
 698 HOTSPOT_SET_WARNINGS_AS_ERRORS
 699 WARNINGS_AS_ERRORS
 700 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 701 ZERO_ARCHFLAG
 702 LDFLAGS_TESTEXE
 703 LDFLAGS_TESTLIB
 704 LDFLAGS_HASH_STYLE
 705 LDFLAGS_CXX_JDK
 706 JDKEXE_LIBS
 707 JDKLIB_LIBS
 708 LDFLAGS_JDKEXE
 709 LDFLAGS_JDKLIB
 710 CXXFLAGS_TESTEXE
 711 CXXFLAGS_TESTLIB
 712 CFLAGS_TESTEXE
 713 CFLAGS_TESTLIB
 714 CXXFLAGS_JDKEXE
 715 CXXFLAGS_JDKLIB
 716 CFLAGS_JDKEXE
 717 CFLAGS_JDKLIB
 718 MACOSX_VERSION_MIN
 719 NO_LIFETIME_DSE_CFLAG
 720 NO_NULL_POINTER_CHECK_CFLAG
 721 CXXSTD_CXXFLAG
 722 CXX_O_FLAG_NONE
 723 CXX_O_FLAG_DEBUG
 724 CXX_O_FLAG_NORM
 725 CXX_O_FLAG_HI
 726 CXX_O_FLAG_HIGHEST
 727 C_O_FLAG_NONE
 728 C_O_FLAG_DEBUG
 729 C_O_FLAG_NORM
 730 C_O_FLAG_HI
 731 C_O_FLAG_HIGHEST
 732 CXXFLAGS_DEBUG_SYMBOLS
 733 CFLAGS_DEBUG_SYMBOLS
 734 CXX_FLAG_DEPS
 735 C_FLAG_DEPS
 736 SHARED_LIBRARY_FLAGS
 737 SET_SHARED_LIBRARY_MAPFILE
 738 SET_SHARED_LIBRARY_NAME
 739 SET_SHARED_LIBRARY_ORIGIN
 740 SET_EXECUTABLE_ORIGIN
 741 CXX_FLAG_REORDER
 742 C_FLAG_REORDER
 743 RC_FLAGS
 744 AR_OUT_OPTION
 745 LD_OUT_OPTION
 746 EXE_OUT_OPTION
 747 CC_OUT_OPTION
 748 STRIPFLAGS
 749 ARFLAGS
 750 COMPILER_BINDCMD_FILE_FLAG
 751 COMPILER_COMMAND_FILE_FLAG
 752 COMPILER_TARGET_BITS_FLAG
 753 JT_HOME
 754 JTREGEXE
 755 USING_BROKEN_SUSE_LD
 756 PACKAGE_PATH
 757 USE_CLANG
 758 HOTSPOT_LD
 759 HOTSPOT_CXX
 760 HOTSPOT_RC
 761 HOTSPOT_MT
 762 BUILD_AS
 763 BUILD_LDCXX
 764 BUILD_LD
 765 BUILD_AR
 766 BUILD_NM
 767 BUILD_CXX
 768 BUILD_CC
 769 BUILD_SYSROOT_LDFLAGS
 770 BUILD_SYSROOT_CFLAGS
 771 ac_ct_OBJDUMP
 772 OBJDUMP
 773 ac_ct_OBJCOPY
 774 OBJCOPY
 775 ac_ct_NM
 776 ac_ct_STRIP
 777 GNM
 778 NM
 779 STRIP
 780 MSBUILD
 781 DUMPBIN
 782 RC
 783 MT
 784 LIPO
 785 ac_ct_AR
 786 AR
 787 AS
 788 LDCXX
 789 LD
 790 CXXCPP
 791 CPP
 792 CXX_VERSION_NUMBER
 793 CC_VERSION_NUMBER
 794 ac_ct_CXX
 795 CXXFLAGS
 796 CXX
 797 TOOLCHAIN_PATH_CXX
 798 POTENTIAL_CXX
 799 OBJEXT
 800 EXEEXT
 801 ac_ct_CC
 802 CPPFLAGS
 803 LDFLAGS
 804 CFLAGS
 805 CC
 806 TOOLCHAIN_PATH_CC
 807 POTENTIAL_CC
 808 TOOLCHAIN_VERSION
 809 VS_LIB
 810 VS_INCLUDE
 811 VS_PATH
 812 CYGWIN_LINK
 813 SYSROOT_LDFLAGS
 814 SYSROOT_CFLAGS
 815 LEGACY_EXTRA_LDFLAGS
 816 LEGACY_EXTRA_CXXFLAGS
 817 LEGACY_EXTRA_CFLAGS
 818 EXE_SUFFIX
 819 OBJ_SUFFIX
 820 STATIC_LIBRARY
 821 SHARED_LIBRARY
 822 STATIC_LIBRARY_SUFFIX
 823 SHARED_LIBRARY_SUFFIX
 824 LIBRARY_PREFIX
 825 TOOLCHAIN_TYPE
 826 STATIC_BUILD
 827 BUILD_HOTSPOT
 828 HOTSPOT_DIST
 829 BUILD_OUTPUT
 830 JDK_TOPDIR
 831 NASHORN_TOPDIR
 832 HOTSPOT_TOPDIR
 833 JAXWS_TOPDIR
 834 JAXP_TOPDIR
 835 CORBA_TOPDIR
 836 LANGTOOLS_TOPDIR
 837 BOOT_JDK_BITS
 838 JAVAC_FLAGS
 839 BOOT_JDK_SOURCETARGET
 840 JARSIGNER
 841 JAR
 842 JAVAH
 843 JAVAC
 844 JAVA
 845 BOOT_JDK
 846 JAVA_CHECK
 847 JAVAC_CHECK
 848 VERSION_IS_GA
 849 VERSION_SHORT
 850 VERSION_STRING
 851 VERSION_NUMBER_FOUR_POSITIONS
 852 VERSION_NUMBER
 853 VERSION_OPT
 854 VERSION_BUILD
 855 VERSION_PRE
 856 VERSION_PATCH
 857 VERSION_SECURITY
 858 VERSION_MINOR
 859 VERSION_MAJOR
 860 MACOSX_BUNDLE_ID_BASE
 861 MACOSX_BUNDLE_NAME_BASE
 862 COMPANY_NAME
 863 JDK_RC_PLATFORM_NAME
 864 PRODUCT_SUFFIX
 865 PRODUCT_NAME
 866 LAUNCHER_NAME
 867 TEST_IN_BUILD
 868 COPYRIGHT_YEAR
 869 COMPRESS_JARS
 870 INCLUDE_SA
 871 UNLIMITED_CRYPTO
 872 CACERTS_FILE
 873 BUILD_HEADLESS
 874 SUPPORT_HEADFUL
 875 SUPPORT_HEADLESS
 876 DEFAULT_MAKE_TARGET
 877 OS_VERSION_MICRO
 878 OS_VERSION_MINOR
 879 OS_VERSION_MAJOR
 880 PKG_CONFIG
 881 BASH_ARGS
 882 SETFILE
 883 CODESIGN
 884 XATTR
 885 DSYMUTIL
 886 IS_GNU_TIME
 887 PATCH
 888 TIME
 889 STAT
 890 HG
 891 READELF
 892 OTOOL
 893 LDD
 894 ZIP
 895 UNZIP
 896 FIND_DELETE
 897 OUTPUT_SYNC
 898 OUTPUT_SYNC_SUPPORTED
 899 CHECK_TOOLSDIR_MAKE
 900 CHECK_TOOLSDIR_GMAKE
 901 CHECK_MAKE
 902 CHECK_GMAKE
 903 MAKE
 904 PKGHANDLER
 905 CONFIGURESUPPORT_OUTPUTDIR
 906 OUTPUT_ROOT
 907 CONF_NAME
 908 SPEC
 909 SDKROOT
 910 XCODEBUILD
 911 BUILD_VARIANT_RELEASE
 912 DEBUG_CLASSFILES
 913 FASTDEBUG
 914 VARIANT
 915 DEBUG_LEVEL
 916 MACOSX_UNIVERSAL
 917 JVM_VARIANT_CORE
 918 JVM_VARIANT_ZEROSHARK
 919 JVM_VARIANT_ZERO
 920 JVM_VARIANT_MINIMAL1
 921 JVM_VARIANT_CLIENT
 922 JVM_VARIANT_SERVER
 923 JVM_VARIANTS
 924 JVM_INTERPRETER
 925 JDK_VARIANT
 926 SET_OPENJDK
 927 USERNAME
 928 CANONICAL_TOPDIR
 929 ORIGINAL_TOPDIR
 930 TOPDIR
 931 PATH_SEP
 932 ZERO_ARCHDEF
 933 DEFINE_CROSS_COMPILE_ARCH
 934 LP64
 935 OPENJDK_TARGET_OS_EXPORT_DIR
 936 OPENJDK_TARGET_CPU_JLI_CFLAGS
 937 OPENJDK_TARGET_CPU_OSARCH
 938 OPENJDK_TARGET_CPU_ISADIR
 939 OPENJDK_TARGET_CPU_LIBDIR
 940 OPENJDK_TARGET_CPU_LEGACY_LIB
 941 OPENJDK_TARGET_CPU_LEGACY
 942 REQUIRED_OS_VERSION
 943 REQUIRED_OS_NAME
 944 COMPILE_TYPE
 945 OPENJDK_TARGET_CPU_ENDIAN
 946 OPENJDK_TARGET_CPU_BITS
 947 OPENJDK_TARGET_CPU_ARCH
 948 OPENJDK_TARGET_CPU
 949 OPENJDK_TARGET_OS_ENV
 950 OPENJDK_TARGET_OS_TYPE
 951 OPENJDK_TARGET_OS
 952 OPENJDK_BUILD_CPU_ENDIAN
 953 OPENJDK_BUILD_CPU_BITS
 954 OPENJDK_BUILD_CPU_ARCH
 955 OPENJDK_BUILD_CPU
 956 OPENJDK_BUILD_OS_ENV
 957 OPENJDK_BUILD_OS_TYPE
 958 OPENJDK_BUILD_OS
 959 OPENJDK_BUILD_AUTOCONF_NAME
 960 OPENJDK_TARGET_AUTOCONF_NAME
 961 target_os
 962 target_vendor
 963 target_cpu
 964 target
 965 host_os
 966 host_vendor
 967 host_cpu
 968 host
 969 build_os
 970 build_vendor
 971 build_cpu
 972 build
 973 NICE
 974 CPIO
 975 DF
 976 READLINK
 977 CYGPATH
 978 SED
 979 FGREP
 980 EGREP
 981 GREP
 982 AWK
 983 XARGS
 984 WHICH
 985 WC
 986 UNIQ
 987 UNAME
 988 TR
 989 TOUCH
 990 TEE
 991 TAR
 992 TAIL
 993 SORT
 994 SH
 995 RMDIR
 996 RM
 997 PRINTF
 998 NAWK
 999 MV
1000 MKTEMP
1001 MKDIR
1002 LS
1003 LN
1004 HEAD
1005 FIND
1006 FILE
1007 EXPR
1008 ECHO
1009 DIRNAME
1010 DIFF
1011 DATE
1012 CUT
1013 CP
1014 COMM
1015 CMP
1016 CHMOD
1017 CAT
1018 BASH
1019 BASENAME
1020 DATE_WHEN_CONFIGURED
1021 ORIGINAL_PATH
1022 CONFIGURE_COMMAND_LINE
1023 target_alias
1024 host_alias
1025 build_alias
1026 LIBS
1027 ECHO_T
1028 ECHO_N
1029 ECHO_C
1030 DEFS
1031 mandir
1032 localedir
1033 libdir
1034 psdir
1035 pdfdir
1036 dvidir
1037 htmldir
1038 infodir
1039 docdir
1040 oldincludedir
1041 includedir
1042 localstatedir
1043 sharedstatedir
1044 sysconfdir
1045 datadir
1046 datarootdir
1047 libexecdir
1048 sbindir
1049 bindir
1050 program_transform_name
1051 prefix
1052 exec_prefix
1053 PACKAGE_URL
1054 PACKAGE_BUGREPORT
1055 PACKAGE_STRING
1056 PACKAGE_VERSION
1057 PACKAGE_TARNAME
1058 PACKAGE_NAME
1059 PATH_SEPARATOR
1060 SHELL'
1061 ac_subst_files=''
1062 ac_user_opts='
1063 enable_option_checking
1064 with_target_bits
1065 enable_openjdk_only
1066 with_custom_make_dir
1067 with_jdk_variant
1068 with_jvm_interpreter
1069 with_jvm_variants
1070 enable_debug
1071 with_debug_level
1072 with_devkit
1073 with_sys_root
1074 with_sysroot
1075 with_tools_dir
1076 with_toolchain_path
1077 with_extra_path
1078 with_sdk_name
1079 with_conf_name
1080 with_output_sync
1081 with_default_make_target
1082 enable_headful
1083 with_cacerts_file
1084 enable_unlimited_crypto
1085 with_copyright_year
1086 enable_hotspot_test_in_build
1087 with_milestone
1088 with_update_version
1089 with_user_release_suffix
1090 with_build_number
1091 with_version_string
1092 with_version_pre
1093 with_version_opt
1094 with_version_build
1095 with_version_major
1096 with_version_minor
1097 with_version_security
1098 with_version_patch
1099 with_boot_jdk
1100 with_add_source_root
1101 with_override_source_root
1102 with_adds_and_overrides
1103 with_override_langtools
1104 with_override_corba
1105 with_override_jaxp
1106 with_override_jaxws
1107 with_override_hotspot
1108 with_override_nashorn
1109 with_override_jdk
1110 with_import_hotspot
1111 enable_static_build
1112 with_toolchain_type
1113 with_extra_cflags
1114 with_extra_cxxflags
1115 with_extra_ldflags
1116 with_toolchain_version
1117 with_build_devkit
1118 with_jtreg
1119 enable_warnings_as_errors
1120 with_native_debug_symbols
1121 enable_debug_symbols
1122 enable_zip_debug_info
1123 enable_native_coverage
1124 with_stdc__lib
1125 with_msvcr_dll
1126 with_msvcp_dll
1127 with_x
1128 with_cups
1129 with_cups_include
1130 with_freetype
1131 with_freetype_include
1132 with_freetype_lib
1133 with_freetype_src
1134 enable_freetype_bundling
1135 with_alsa
1136 with_alsa_include
1137 with_alsa_lib
1138 with_libffi
1139 with_libffi_include
1140 with_libffi_lib
1141 with_libjpeg
1142 with_giflib
1143 with_libpng
1144 with_zlib
1145 with_lcms
1146 with_dxsdk
1147 with_dxsdk_lib
1148 with_dxsdk_include
1149 with_num_cores
1150 with_memory_size
1151 with_jobs
1152 with_test_jobs
1153 with_boot_jdk_jvmargs
1154 with_sjavac_server_java
1155 enable_sjavac
1156 enable_javac_server
1157 enable_icecc
1158 enable_precompiled_headers
1159 enable_ccache
1160 with_ccache_dir
1161 '
1162       ac_precious_vars='build_alias
1163 host_alias
1164 target_alias
1165 BASENAME
1166 BASH
1167 CAT
1168 CHMOD
1169 CMP
1170 COMM
1171 CP
1172 CUT
1173 DATE
1174 DIFF
1175 DIRNAME
1176 ECHO
1177 EXPR
1178 FILE
1179 FIND
1180 HEAD
1181 LN
1182 LS
1183 MKDIR
1184 MKTEMP
1185 MV
1186 NAWK
1187 PRINTF
1188 RM
1189 RMDIR
1190 SH
1191 SORT
1192 TAIL
1193 TAR
1194 TEE
1195 TOUCH
1196 TR
1197 UNAME
1198 UNIQ
1199 WC
1200 WHICH
1201 XARGS
1202 AWK
1203 GREP
1204 EGREP
1205 FGREP
1206 SED
1207 CYGPATH
1208 READLINK
1209 DF
1210 CPIO
1211 NICE
1212 MAKE
1213 UNZIP
1214 ZIP
1215 LDD
1216 OTOOL
1217 READELF
1218 HG
1219 STAT
1220 TIME
1221 PATCH
1222 DSYMUTIL
1223 XATTR
1224 CODESIGN
1225 SETFILE
1226 PKG_CONFIG
1227 JAVA
1228 JAVAC
1229 JAVAH
1230 JAR
1231 JARSIGNER
1232 CC
1233 CFLAGS
1234 LDFLAGS
1235 LIBS
1236 CPPFLAGS
1237 CXX
1238 CXXFLAGS
1239 CCC
1240 CPP
1241 CXXCPP
1242 AS
1243 AR
1244 LIPO
1245 STRIP
1246 NM
1247 GNM
1248 OBJCOPY
1249 OBJDUMP
1250 BUILD_CC
1251 BUILD_CXX
1252 BUILD_NM
1253 BUILD_AR
1254 JTREGEXE
1255 XMKMF
1256 FREETYPE_CFLAGS
1257 FREETYPE_LIBS
1258 ALSA_CFLAGS
1259 ALSA_LIBS
1260 LIBFFI_CFLAGS
1261 LIBFFI_LIBS
1262 PNG_CFLAGS
1263 PNG_LIBS
1264 LCMS_CFLAGS
1265 LCMS_LIBS
1266 ICECC_CMD
1267 ICECC_CREATE_ENV
1268 ICECC_WRAPPER
1269 CCACHE'
1270 
1271 
1272 # Initialize some variables set by options.
1273 ac_init_help=
1274 ac_init_version=false
1275 ac_unrecognized_opts=
1276 ac_unrecognized_sep=
1277 # The variables have the same names as the options, with
1278 # dashes changed to underlines.
1279 cache_file=/dev/null
1280 exec_prefix=NONE
1281 no_create=
1282 no_recursion=
1283 prefix=NONE
1284 program_prefix=NONE
1285 program_suffix=NONE
1286 program_transform_name=s,x,x,
1287 silent=
1288 site=
1289 srcdir=
1290 verbose=
1291 x_includes=NONE
1292 x_libraries=NONE
1293 
1294 # Installation directory options.
1295 # These are left unexpanded so users can "make install exec_prefix=/foo"
1296 # and all the variables that are supposed to be based on exec_prefix
1297 # by default will actually change.
1298 # Use braces instead of parens because sh, perl, etc. also accept them.
1299 # (The list follows the same order as the GNU Coding Standards.)
1300 bindir='${exec_prefix}/bin'
1301 sbindir='${exec_prefix}/sbin'
1302 libexecdir='${exec_prefix}/libexec'
1303 datarootdir='${prefix}/share'
1304 datadir='${datarootdir}'
1305 sysconfdir='${prefix}/etc'
1306 sharedstatedir='${prefix}/com'
1307 localstatedir='${prefix}/var'
1308 includedir='${prefix}/include'
1309 oldincludedir='/usr/include'
1310 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1311 infodir='${datarootdir}/info'
1312 htmldir='${docdir}'
1313 dvidir='${docdir}'
1314 pdfdir='${docdir}'
1315 psdir='${docdir}'
1316 libdir='${exec_prefix}/lib'
1317 localedir='${datarootdir}/locale'
1318 mandir='${datarootdir}/man'
1319 
1320 ac_prev=
1321 ac_dashdash=
1322 for ac_option
1323 do
1324   # If the previous option needs an argument, assign it.
1325   if test -n "$ac_prev"; then
1326     eval $ac_prev=\$ac_option
1327     ac_prev=
1328     continue
1329   fi
1330 
1331   case $ac_option in
1332   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1333   *=)   ac_optarg= ;;
1334   *)    ac_optarg=yes ;;
1335   esac
1336 
1337   # Accept the important Cygnus configure options, so we can diagnose typos.
1338 
1339   case $ac_dashdash$ac_option in
1340   --)
1341     ac_dashdash=yes ;;
1342 
1343   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1344     ac_prev=bindir ;;
1345   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1346     bindir=$ac_optarg ;;
1347 
1348   -build | --build | --buil | --bui | --bu)
1349     ac_prev=build_alias ;;
1350   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1351     build_alias=$ac_optarg ;;
1352 
1353   -cache-file | --cache-file | --cache-fil | --cache-fi \
1354   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1355     ac_prev=cache_file ;;
1356   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1357   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1358     cache_file=$ac_optarg ;;
1359 
1360   --config-cache | -C)
1361     cache_file=config.cache ;;
1362 
1363   -datadir | --datadir | --datadi | --datad)
1364     ac_prev=datadir ;;
1365   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1366     datadir=$ac_optarg ;;
1367 
1368   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1369   | --dataroo | --dataro | --datar)
1370     ac_prev=datarootdir ;;
1371   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1372   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1373     datarootdir=$ac_optarg ;;
1374 
1375   -disable-* | --disable-*)
1376     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1377     # Reject names that are not valid shell variable names.
1378     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1379       as_fn_error $? "invalid feature name: $ac_useropt"
1380     ac_useropt_orig=$ac_useropt
1381     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1382     case $ac_user_opts in
1383       *"
1384 "enable_$ac_useropt"
1385 "*) ;;
1386       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1387          ac_unrecognized_sep=', ';;
1388     esac
1389     eval enable_$ac_useropt=no ;;
1390 
1391   -docdir | --docdir | --docdi | --doc | --do)
1392     ac_prev=docdir ;;
1393   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1394     docdir=$ac_optarg ;;
1395 
1396   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1397     ac_prev=dvidir ;;
1398   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1399     dvidir=$ac_optarg ;;
1400 
1401   -enable-* | --enable-*)
1402     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1403     # Reject names that are not valid shell variable names.
1404     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1405       as_fn_error $? "invalid feature name: $ac_useropt"
1406     ac_useropt_orig=$ac_useropt
1407     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1408     case $ac_user_opts in
1409       *"
1410 "enable_$ac_useropt"
1411 "*) ;;
1412       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1413          ac_unrecognized_sep=', ';;
1414     esac
1415     eval enable_$ac_useropt=\$ac_optarg ;;
1416 
1417   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1418   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1419   | --exec | --exe | --ex)
1420     ac_prev=exec_prefix ;;
1421   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1422   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1423   | --exec=* | --exe=* | --ex=*)
1424     exec_prefix=$ac_optarg ;;
1425 
1426   -gas | --gas | --ga | --g)
1427     # Obsolete; use --with-gas.
1428     with_gas=yes ;;
1429 
1430   -help | --help | --hel | --he | -h)
1431     ac_init_help=long ;;
1432   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1433     ac_init_help=recursive ;;
1434   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1435     ac_init_help=short ;;
1436 
1437   -host | --host | --hos | --ho)
1438     ac_prev=host_alias ;;
1439   -host=* | --host=* | --hos=* | --ho=*)
1440     host_alias=$ac_optarg ;;
1441 
1442   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1443     ac_prev=htmldir ;;
1444   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1445   | --ht=*)
1446     htmldir=$ac_optarg ;;
1447 
1448   -includedir | --includedir | --includedi | --included | --include \
1449   | --includ | --inclu | --incl | --inc)
1450     ac_prev=includedir ;;
1451   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1452   | --includ=* | --inclu=* | --incl=* | --inc=*)
1453     includedir=$ac_optarg ;;
1454 
1455   -infodir | --infodir | --infodi | --infod | --info | --inf)
1456     ac_prev=infodir ;;
1457   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1458     infodir=$ac_optarg ;;
1459 
1460   -libdir | --libdir | --libdi | --libd)
1461     ac_prev=libdir ;;
1462   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1463     libdir=$ac_optarg ;;
1464 
1465   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1466   | --libexe | --libex | --libe)
1467     ac_prev=libexecdir ;;
1468   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1469   | --libexe=* | --libex=* | --libe=*)
1470     libexecdir=$ac_optarg ;;
1471 
1472   -localedir | --localedir | --localedi | --localed | --locale)
1473     ac_prev=localedir ;;
1474   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1475     localedir=$ac_optarg ;;
1476 
1477   -localstatedir | --localstatedir | --localstatedi | --localstated \
1478   | --localstate | --localstat | --localsta | --localst | --locals)
1479     ac_prev=localstatedir ;;
1480   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1481   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1482     localstatedir=$ac_optarg ;;
1483 
1484   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1485     ac_prev=mandir ;;
1486   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1487     mandir=$ac_optarg ;;
1488 
1489   -nfp | --nfp | --nf)
1490     # Obsolete; use --without-fp.
1491     with_fp=no ;;
1492 
1493   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1494   | --no-cr | --no-c | -n)
1495     no_create=yes ;;
1496 
1497   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1498   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1499     no_recursion=yes ;;
1500 
1501   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1502   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1503   | --oldin | --oldi | --old | --ol | --o)
1504     ac_prev=oldincludedir ;;
1505   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1506   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1507   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1508     oldincludedir=$ac_optarg ;;
1509 
1510   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1511     ac_prev=prefix ;;
1512   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1513     prefix=$ac_optarg ;;
1514 
1515   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1516   | --program-pre | --program-pr | --program-p)
1517     ac_prev=program_prefix ;;
1518   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1519   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1520     program_prefix=$ac_optarg ;;
1521 
1522   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1523   | --program-suf | --program-su | --program-s)
1524     ac_prev=program_suffix ;;
1525   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1526   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1527     program_suffix=$ac_optarg ;;
1528 
1529   -program-transform-name | --program-transform-name \
1530   | --program-transform-nam | --program-transform-na \
1531   | --program-transform-n | --program-transform- \
1532   | --program-transform | --program-transfor \
1533   | --program-transfo | --program-transf \
1534   | --program-trans | --program-tran \
1535   | --progr-tra | --program-tr | --program-t)
1536     ac_prev=program_transform_name ;;
1537   -program-transform-name=* | --program-transform-name=* \
1538   | --program-transform-nam=* | --program-transform-na=* \
1539   | --program-transform-n=* | --program-transform-=* \
1540   | --program-transform=* | --program-transfor=* \
1541   | --program-transfo=* | --program-transf=* \
1542   | --program-trans=* | --program-tran=* \
1543   | --progr-tra=* | --program-tr=* | --program-t=*)
1544     program_transform_name=$ac_optarg ;;
1545 
1546   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1547     ac_prev=pdfdir ;;
1548   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1549     pdfdir=$ac_optarg ;;
1550 
1551   -psdir | --psdir | --psdi | --psd | --ps)
1552     ac_prev=psdir ;;
1553   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1554     psdir=$ac_optarg ;;
1555 
1556   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1557   | -silent | --silent | --silen | --sile | --sil)
1558     silent=yes ;;
1559 
1560   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1561     ac_prev=sbindir ;;
1562   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1563   | --sbi=* | --sb=*)
1564     sbindir=$ac_optarg ;;
1565 
1566   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1567   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1568   | --sharedst | --shareds | --shared | --share | --shar \
1569   | --sha | --sh)
1570     ac_prev=sharedstatedir ;;
1571   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1572   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1573   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1574   | --sha=* | --sh=*)
1575     sharedstatedir=$ac_optarg ;;
1576 
1577   -site | --site | --sit)
1578     ac_prev=site ;;
1579   -site=* | --site=* | --sit=*)
1580     site=$ac_optarg ;;
1581 
1582   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1583     ac_prev=srcdir ;;
1584   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1585     srcdir=$ac_optarg ;;
1586 
1587   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1588   | --syscon | --sysco | --sysc | --sys | --sy)
1589     ac_prev=sysconfdir ;;
1590   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1591   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1592     sysconfdir=$ac_optarg ;;
1593 
1594   -target | --target | --targe | --targ | --tar | --ta | --t)
1595     ac_prev=target_alias ;;
1596   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1597     target_alias=$ac_optarg ;;
1598 
1599   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1600     verbose=yes ;;
1601 
1602   -version | --version | --versio | --versi | --vers | -V)
1603     ac_init_version=: ;;
1604 
1605   -with-* | --with-*)
1606     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1607     # Reject names that are not valid shell variable names.
1608     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1609       as_fn_error $? "invalid package name: $ac_useropt"
1610     ac_useropt_orig=$ac_useropt
1611     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1612     case $ac_user_opts in
1613       *"
1614 "with_$ac_useropt"
1615 "*) ;;
1616       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1617          ac_unrecognized_sep=', ';;
1618     esac
1619     eval with_$ac_useropt=\$ac_optarg ;;
1620 
1621   -without-* | --without-*)
1622     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1623     # Reject names that are not valid shell variable names.
1624     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1625       as_fn_error $? "invalid package name: $ac_useropt"
1626     ac_useropt_orig=$ac_useropt
1627     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1628     case $ac_user_opts in
1629       *"
1630 "with_$ac_useropt"
1631 "*) ;;
1632       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1633          ac_unrecognized_sep=', ';;
1634     esac
1635     eval with_$ac_useropt=no ;;
1636 
1637   --x)
1638     # Obsolete; use --with-x.
1639     with_x=yes ;;
1640 
1641   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1642   | --x-incl | --x-inc | --x-in | --x-i)
1643     ac_prev=x_includes ;;
1644   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1645   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1646     x_includes=$ac_optarg ;;
1647 
1648   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1649   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1650     ac_prev=x_libraries ;;
1651   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1652   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1653     x_libraries=$ac_optarg ;;
1654 
1655   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1656 Try \`$0 --help' for more information"
1657     ;;
1658 
1659   *=*)
1660     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1661     # Reject names that are not valid shell variable names.
1662     case $ac_envvar in #(
1663       '' | [0-9]* | *[!_$as_cr_alnum]* )
1664       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1665     esac
1666     eval $ac_envvar=\$ac_optarg
1667     export $ac_envvar ;;
1668 
1669   *)
1670     # FIXME: should be removed in autoconf 3.0.
1671     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1672     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1673       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1674     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1675     ;;
1676 
1677   esac
1678 done
1679 
1680 if test -n "$ac_prev"; then
1681   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1682   as_fn_error $? "missing argument to $ac_option"
1683 fi
1684 
1685 if test -n "$ac_unrecognized_opts"; then
1686   case $enable_option_checking in
1687     no) ;;
1688     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1689     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1690   esac
1691 fi
1692 
1693 # Check all directory arguments for consistency.
1694 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1695                 datadir sysconfdir sharedstatedir localstatedir includedir \
1696                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1697                 libdir localedir mandir
1698 do
1699   eval ac_val=\$$ac_var
1700   # Remove trailing slashes.
1701   case $ac_val in
1702     */ )
1703       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1704       eval $ac_var=\$ac_val;;
1705   esac
1706   # Be sure to have absolute directory names.
1707   case $ac_val in
1708     [\\/$]* | ?:[\\/]* )  continue;;
1709     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1710   esac
1711   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1712 done
1713 
1714 # There might be people who depend on the old broken behavior: `$host'
1715 # used to hold the argument of --host etc.
1716 # FIXME: To remove some day.
1717 build=$build_alias
1718 host=$host_alias
1719 target=$target_alias
1720 
1721 # FIXME: To remove some day.
1722 if test "x$host_alias" != x; then
1723   if test "x$build_alias" = x; then
1724     cross_compiling=maybe
1725   elif test "x$build_alias" != "x$host_alias"; then
1726     cross_compiling=yes
1727   fi
1728 fi
1729 
1730 ac_tool_prefix=
1731 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1732 
1733 test "$silent" = yes && exec 6>/dev/null
1734 
1735 
1736 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1737 ac_ls_di=`ls -di .` &&
1738 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1739   as_fn_error $? "working directory cannot be determined"
1740 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1741   as_fn_error $? "pwd does not report name of working directory"
1742 
1743 
1744 # Find the source files, if location was not specified.
1745 if test -z "$srcdir"; then
1746   ac_srcdir_defaulted=yes
1747   # Try the directory containing this script, then the parent directory.
1748   ac_confdir=`$as_dirname -- "$as_myself" ||
1749 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1750          X"$as_myself" : 'X\(//\)[^/]' \| \
1751          X"$as_myself" : 'X\(//\)$' \| \
1752          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1753 $as_echo X"$as_myself" |
1754     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1755             s//\1/
1756             q
1757           }
1758           /^X\(\/\/\)[^/].*/{
1759             s//\1/
1760             q
1761           }
1762           /^X\(\/\/\)$/{
1763             s//\1/
1764             q
1765           }
1766           /^X\(\/\).*/{
1767             s//\1/
1768             q
1769           }
1770           s/.*/./; q'`
1771   srcdir=$ac_confdir
1772   if test ! -r "$srcdir/$ac_unique_file"; then
1773     srcdir=..
1774   fi
1775 else
1776   ac_srcdir_defaulted=no
1777 fi
1778 if test ! -r "$srcdir/$ac_unique_file"; then
1779   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1780   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1781 fi
1782 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1783 ac_abs_confdir=`(
1784         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1785         pwd)`
1786 # When building in place, set srcdir=.
1787 if test "$ac_abs_confdir" = "$ac_pwd"; then
1788   srcdir=.
1789 fi
1790 # Remove unnecessary trailing slashes from srcdir.
1791 # Double slashes in file names in object file debugging info
1792 # mess up M-x gdb in Emacs.
1793 case $srcdir in
1794 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1795 esac
1796 for ac_var in $ac_precious_vars; do
1797   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1798   eval ac_env_${ac_var}_value=\$${ac_var}
1799   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1800   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1801 done
1802 
1803 #
1804 # Report the --help message.
1805 #
1806 if test "$ac_init_help" = "long"; then
1807   # Omit some internal or obsolete options to make the list less imposing.
1808   # This message is too long to be a string in the A/UX 3.1 sh.
1809   cat <<_ACEOF
1810 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1811 
1812 Usage: $0 [OPTION]... [VAR=VALUE]...
1813 
1814 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1815 VAR=VALUE.  See below for descriptions of some of the useful variables.
1816 
1817 Defaults for the options are specified in brackets.
1818 
1819 Configuration:
1820   -h, --help              display this help and exit
1821       --help=short        display options specific to this package
1822       --help=recursive    display the short help of all the included packages
1823   -V, --version           display version information and exit
1824   -q, --quiet, --silent   do not print \`checking ...' messages
1825       --cache-file=FILE   cache test results in FILE [disabled]
1826   -C, --config-cache      alias for \`--cache-file=config.cache'
1827   -n, --no-create         do not create output files
1828       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1829 
1830 Installation directories:
1831   --prefix=PREFIX         install architecture-independent files in PREFIX
1832                           [$ac_default_prefix]
1833   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1834                           [PREFIX]
1835 
1836 By default, \`make install' will install all the files in
1837 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1838 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1839 for instance \`--prefix=\$HOME'.
1840 
1841 For better control, use the options below.
1842 
1843 Fine tuning of the installation directories:
1844   --bindir=DIR            user executables [EPREFIX/bin]
1845   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1846   --libexecdir=DIR        program executables [EPREFIX/libexec]
1847   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1848   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1849   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1850   --libdir=DIR            object code libraries [EPREFIX/lib]
1851   --includedir=DIR        C header files [PREFIX/include]
1852   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1853   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1854   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1855   --infodir=DIR           info documentation [DATAROOTDIR/info]
1856   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1857   --mandir=DIR            man documentation [DATAROOTDIR/man]
1858   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1859   --htmldir=DIR           html documentation [DOCDIR]
1860   --dvidir=DIR            dvi documentation [DOCDIR]
1861   --pdfdir=DIR            pdf documentation [DOCDIR]
1862   --psdir=DIR             ps documentation [DOCDIR]
1863 _ACEOF
1864 
1865   cat <<\_ACEOF
1866 
1867 X features:
1868   --x-includes=DIR    X include files are in DIR
1869   --x-libraries=DIR   X library files are in DIR
1870 
1871 System types:
1872   --build=BUILD     configure for building on BUILD [guessed]
1873   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1874   --target=TARGET   configure for building compilers for TARGET [HOST]
1875 _ACEOF
1876 fi
1877 
1878 if test -n "$ac_init_help"; then
1879   case $ac_init_help in
1880      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1881    esac
1882   cat <<\_ACEOF
1883 
1884 Optional Features:
1885   --disable-option-checking  ignore unrecognized --enable/--with options
1886   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1887   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1888   --enable-openjdk-only   suppress building custom source even if present
1889                           [disabled]
1890   --enable-debug          set the debug level to fastdebug (shorthand for
1891                           --with-debug-level=fastdebug) [disabled]
1892   --disable-headful       disable building headful support (graphical UI
1893                           support) [enabled]
1894   --enable-unlimited-crypto
1895                           Enable unlimited crypto policy [disabled]
1896   --enable-hotspot-test-in-build
1897                           run the Queens test after Hotspot build [disabled]
1898   --enable-static-build   enable static library build [disabled]
1899   --disable-warnings-as-errors
1900                           do not consider native warnings to be an error
1901                           [enabled]
1902   --enable-debug-symbols  Deprecated. Option is kept for backwards
1903                           compatibility and is ignored
1904   --enable-zip-debug-info Deprecated. Option is kept for backwards
1905                           compatibility and is ignored
1906   --enable-native-coverage
1907                           enable native compilation with code coverage
1908                           data[disabled]
1909   --disable-freetype-bundling
1910                           disable bundling of the freetype library with the
1911                           build result [enabled on Windows or when using
1912                           --with-freetype, disabled otherwise]
1913   --enable-sjavac         use sjavac to do fast incremental compiles
1914                           [disabled]
1915   --disable-javac-server  disable javac server [enabled]
1916   --enable-icecc          enable distribted compilation of native code using
1917                           icecc/icecream [disabled]
1918   --disable-precompiled-headers
1919                           disable using precompiled headers when compiling C++
1920                           [enabled]
1921   --enable-ccache         enable using ccache to speed up recompilations
1922                           [disabled]
1923 
1924 Optional Packages:
1925   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1926   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1927   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1928                           support it), e.g. --with-target-bits=32 [guessed]
1929   --with-custom-make-dir  Deprecated. Option is kept for backwards
1930                           compatibility and is ignored
1931   --with-jdk-variant      JDK variant to build (normal) [normal]
1932   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1933   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1934                           client, minimal1, zero, zeroshark, core) [server]
1935   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1936                           optimized) [release]
1937   --with-devkit           use this devkit for compilers, tools and resources
1938   --with-sys-root         alias for --with-sysroot for backwards compatability
1939   --with-sysroot          use this directory as sysroot
1940   --with-tools-dir        alias for --with-toolchain-path for backwards
1941                           compatibility
1942   --with-toolchain-path   prepend these directories when searching for
1943                           toolchain binaries (compilers etc)
1944   --with-extra-path       prepend these directories to the default path
1945   --with-sdk-name         use the platform SDK of the given name. [macosx]
1946   --with-conf-name        use this as the name of the configuration [generated
1947                           from important configuration options]
1948   --with-output-sync      set make output sync type if supported by make.
1949                           [recurse]
1950   --with-default-make-target
1951                           set the default make target [exploded-image]
1952   --with-cacerts-file     specify alternative cacerts file
1953   --with-copyright-year   Set copyright year value for build [current year]
1954   --with-milestone        Deprecated. Option is kept for backwards
1955                           compatibility and is ignored
1956   --with-update-version   Deprecated. Option is kept for backwards
1957                           compatibility and is ignored
1958   --with-user-release-suffix
1959                           Deprecated. Option is kept for backwards
1960                           compatibility and is ignored
1961   --with-build-number     Deprecated. Option is kept for backwards
1962                           compatibility and is ignored
1963   --with-version-string   Set version string [calculated]
1964   --with-version-pre      Set the base part of the version 'PRE' field
1965                           (pre-release identifier) ['internal']
1966   --with-version-opt      Set version 'OPT' field (build metadata)
1967                           [<timestamp>.<user>.<dirname>]
1968   --with-version-build    Set version 'BUILD' field (build number) [not
1969                           specified]
1970   --with-version-major    Set version 'MAJOR' field (first number) [current
1971                           source value]
1972   --with-version-minor    Set version 'MINOR' field (second number) [current
1973                           source value]
1974   --with-version-security Set version 'SECURITY' field (third number) [current
1975                           source value]
1976   --with-version-patch    Set version 'PATCH' field (fourth number) [not
1977                           specified]
1978   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1979   --with-add-source-root  Deprecated. Option is kept for backwards
1980                           compatibility and is ignored
1981   --with-override-source-root
1982                           Deprecated. Option is kept for backwards
1983                           compatibility and is ignored
1984   --with-adds-and-overrides
1985                           Deprecated. Option is kept for backwards
1986                           compatibility and is ignored
1987   --with-override-langtools
1988                           Deprecated. Option is kept for backwards
1989                           compatibility and is ignored
1990   --with-override-corba   Deprecated. Option is kept for backwards
1991                           compatibility and is ignored
1992   --with-override-jaxp    Deprecated. Option is kept for backwards
1993                           compatibility and is ignored
1994   --with-override-jaxws   Deprecated. Option is kept for backwards
1995                           compatibility and is ignored
1996   --with-override-hotspot Deprecated. Option is kept for backwards
1997                           compatibility and is ignored
1998   --with-override-nashorn Deprecated. Option is kept for backwards
1999                           compatibility and is ignored
2000   --with-override-jdk     Deprecated. Option is kept for backwards
2001                           compatibility and is ignored
2002   --with-import-hotspot   import hotspot binaries from this jdk image or
2003                           hotspot build dist dir instead of building from
2004                           source
2005   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2006                           to show possible values [platform dependent]
2007   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2008   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2009   --with-extra-ldflags    extra flags to be used when linking jdk
2010   --with-toolchain-version
2011                           the version of the toolchain to look for, use
2012                           '--help' to show possible values [platform
2013                           dependent]
2014   --with-build-devkit     Devkit to use for the build platform toolchain
2015   --with-jtreg            Regression Test Harness [probed]
2016   --with-native-debug-symbols
2017                           set the native debug symbol configuration (none,
2018                           internal, external, zipped) [varying]
2019   --with-stdc++lib=<static>,<dynamic>,<default>
2020                           force linking of the C++ runtime on Linux to either
2021                           static or dynamic, default is static with dynamic as
2022                           fallback
2023   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2024                           (Windows only) [probed]
2025   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2026                           (Windows only) [probed]
2027   --with-x                use the X Window System
2028   --with-cups             specify prefix directory for the cups package
2029                           (expecting the headers under PATH/include)
2030   --with-cups-include     specify directory for the cups include files
2031   --with-freetype         specify prefix directory for the freetype package
2032                           (expecting the libraries under PATH/lib and the
2033                           headers under PATH/include)
2034   --with-freetype-include specify directory for the freetype include files
2035   --with-freetype-lib     specify directory for the freetype library
2036   --with-freetype-src     specify directory with freetype sources to
2037                           automatically build the library (experimental,
2038                           Windows-only)
2039   --with-alsa             specify prefix directory for the alsa package
2040                           (expecting the libraries under PATH/lib and the
2041                           headers under PATH/include)
2042   --with-alsa-include     specify directory for the alsa include files
2043   --with-alsa-lib         specify directory for the alsa library
2044   --with-libffi           specify prefix directory for the libffi package
2045                           (expecting the libraries under PATH/lib and the
2046                           headers under PATH/include)
2047   --with-libffi-include   specify directory for the libffi include files
2048   --with-libffi-lib       specify directory for the libffi library
2049   --with-libjpeg          use libjpeg from build system or OpenJDK source
2050                           (system, bundled) [bundled]
2051   --with-giflib           use giflib from build system or OpenJDK source
2052                           (system, bundled) [bundled]
2053   --with-libpng           use libpng from build system or OpenJDK source
2054                           (system, bundled) [bundled]
2055   --with-zlib             use zlib from build system or OpenJDK source
2056                           (system, bundled) [bundled]
2057   --with-lcms             use lcms2 from build system or OpenJDK source
2058                           (system, bundled) [bundled]
2059   --with-dxsdk            Deprecated. Option is kept for backwards
2060                           compatibility and is ignored
2061   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2062                           compatibility and is ignored
2063   --with-dxsdk-include    Deprecated. Option is kept for backwards
2064                           compatibility and is ignored
2065   --with-num-cores        number of cores in the build system, e.g.
2066                           --with-num-cores=8 [probed]
2067   --with-memory-size      memory (in MB) available in the build system, e.g.
2068                           --with-memory-size=1024 [probed]
2069   --with-jobs             number of parallel jobs to let make run [calculated
2070                           based on cores and memory]
2071   --with-test-jobs        number of parallel tests jobs to run [based on build
2072                           jobs]
2073   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2074                           invocations of boot JDK, overriding the default
2075                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2076                           -enableassertions"
2077   --with-sjavac-server-java
2078                           use this java binary for running the sjavac
2079                           background server [Boot JDK java]
2080   --with-ccache-dir       where to store ccache files [~/.ccache]
2081 
2082 Some influential environment variables:
2083   BASENAME    Override default value for BASENAME
2084   BASH        Override default value for BASH
2085   CAT         Override default value for CAT
2086   CHMOD       Override default value for CHMOD
2087   CMP         Override default value for CMP
2088   COMM        Override default value for COMM
2089   CP          Override default value for CP
2090   CUT         Override default value for CUT
2091   DATE        Override default value for DATE
2092   DIFF        Override default value for DIFF
2093   DIRNAME     Override default value for DIRNAME
2094   ECHO        Override default value for ECHO
2095   EXPR        Override default value for EXPR
2096   FILE        Override default value for FILE
2097   FIND        Override default value for FIND
2098   HEAD        Override default value for HEAD
2099   LN          Override default value for LN
2100   LS          Override default value for LS
2101   MKDIR       Override default value for MKDIR
2102   MKTEMP      Override default value for MKTEMP
2103   MV          Override default value for MV
2104   NAWK        Override default value for NAWK
2105   PRINTF      Override default value for PRINTF
2106   RM          Override default value for RM
2107   RMDIR       Override default value for RMDIR
2108   SH          Override default value for SH
2109   SORT        Override default value for SORT
2110   TAIL        Override default value for TAIL
2111   TAR         Override default value for TAR
2112   TEE         Override default value for TEE
2113   TOUCH       Override default value for TOUCH
2114   TR          Override default value for TR
2115   UNAME       Override default value for UNAME
2116   UNIQ        Override default value for UNIQ
2117   WC          Override default value for WC
2118   WHICH       Override default value for WHICH
2119   XARGS       Override default value for XARGS
2120   AWK         Override default value for AWK
2121   GREP        Override default value for GREP
2122   EGREP       Override default value for EGREP
2123   FGREP       Override default value for FGREP
2124   SED         Override default value for SED
2125   CYGPATH     Override default value for CYGPATH
2126   READLINK    Override default value for READLINK
2127   DF          Override default value for DF
2128   CPIO        Override default value for CPIO
2129   NICE        Override default value for NICE
2130   MAKE        Override default value for MAKE
2131   UNZIP       Override default value for UNZIP
2132   ZIP         Override default value for ZIP
2133   LDD         Override default value for LDD
2134   OTOOL       Override default value for OTOOL
2135   READELF     Override default value for READELF
2136   HG          Override default value for HG
2137   STAT        Override default value for STAT
2138   TIME        Override default value for TIME
2139   PATCH       Override default value for PATCH
2140   DSYMUTIL    Override default value for DSYMUTIL
2141   XATTR       Override default value for XATTR
2142   CODESIGN    Override default value for CODESIGN
2143   SETFILE     Override default value for SETFILE
2144   PKG_CONFIG  path to pkg-config utility
2145   JAVA        Override default value for JAVA
2146   JAVAC       Override default value for JAVAC
2147   JAVAH       Override default value for JAVAH
2148   JAR         Override default value for JAR
2149   JARSIGNER   Override default value for JARSIGNER
2150   CC          C compiler command
2151   CFLAGS      C compiler flags
2152   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2153               nonstandard directory <lib dir>
2154   LIBS        libraries to pass to the linker, e.g. -l<library>
2155   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2156               you have headers in a nonstandard directory <include dir>
2157   CXX         C++ compiler command
2158   CXXFLAGS    C++ compiler flags
2159   CPP         C preprocessor
2160   CXXCPP      C++ preprocessor
2161   AS          Override default value for AS
2162   AR          Override default value for AR
2163   LIPO        Override default value for LIPO
2164   STRIP       Override default value for STRIP
2165   NM          Override default value for NM
2166   GNM         Override default value for GNM
2167   OBJCOPY     Override default value for OBJCOPY
2168   OBJDUMP     Override default value for OBJDUMP
2169   BUILD_CC    Override default value for BUILD_CC
2170   BUILD_CXX   Override default value for BUILD_CXX
2171   BUILD_NM    Override default value for BUILD_NM
2172   BUILD_AR    Override default value for BUILD_AR
2173   JTREGEXE    Override default value for JTREGEXE
2174   XMKMF       Path to xmkmf, Makefile generator for X Window System
2175   FREETYPE_CFLAGS
2176               C compiler flags for FREETYPE, overriding pkg-config
2177   FREETYPE_LIBS
2178               linker flags for FREETYPE, overriding pkg-config
2179   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2180   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2181   LIBFFI_CFLAGS
2182               C compiler flags for LIBFFI, overriding pkg-config
2183   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2184   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2185   PNG_LIBS    linker flags for PNG, overriding pkg-config
2186   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2187   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2188   ICECC_CMD   Override default value for ICECC_CMD
2189   ICECC_CREATE_ENV
2190               Override default value for ICECC_CREATE_ENV
2191   ICECC_WRAPPER
2192               Override default value for ICECC_WRAPPER
2193   CCACHE      Override default value for CCACHE
2194 
2195 Use these variables to override the choices made by `configure' or to help
2196 it to find libraries and programs with nonstandard names/locations.
2197 
2198 Report bugs to <build-dev@openjdk.java.net>.
2199 OpenJDK home page: <http://openjdk.java.net>.
2200 _ACEOF
2201 ac_status=$?
2202 fi
2203 
2204 if test "$ac_init_help" = "recursive"; then
2205   # If there are subdirs, report their specific --help.
2206   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2207     test -d "$ac_dir" ||
2208       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2209       continue
2210     ac_builddir=.
2211 
2212 case "$ac_dir" in
2213 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2214 *)
2215   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2216   # A ".." for each directory in $ac_dir_suffix.
2217   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2218   case $ac_top_builddir_sub in
2219   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2220   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2221   esac ;;
2222 esac
2223 ac_abs_top_builddir=$ac_pwd
2224 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2225 # for backward compatibility:
2226 ac_top_builddir=$ac_top_build_prefix
2227 
2228 case $srcdir in
2229   .)  # We are building in place.
2230     ac_srcdir=.
2231     ac_top_srcdir=$ac_top_builddir_sub
2232     ac_abs_top_srcdir=$ac_pwd ;;
2233   [\\/]* | ?:[\\/]* )  # Absolute name.
2234     ac_srcdir=$srcdir$ac_dir_suffix;
2235     ac_top_srcdir=$srcdir
2236     ac_abs_top_srcdir=$srcdir ;;
2237   *) # Relative name.
2238     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2239     ac_top_srcdir=$ac_top_build_prefix$srcdir
2240     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2241 esac
2242 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2243 
2244     cd "$ac_dir" || { ac_status=$?; continue; }
2245     # Check for guested configure.
2246     if test -f "$ac_srcdir/configure.gnu"; then
2247       echo &&
2248       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2249     elif test -f "$ac_srcdir/configure"; then
2250       echo &&
2251       $SHELL "$ac_srcdir/configure" --help=recursive
2252     else
2253       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2254     fi || ac_status=$?
2255     cd "$ac_pwd" || { ac_status=$?; break; }
2256   done
2257 fi
2258 
2259 test -n "$ac_init_help" && exit $ac_status
2260 if $ac_init_version; then
2261   cat <<\_ACEOF
2262 OpenJDK configure jdk9
2263 generated by GNU Autoconf 2.69
2264 
2265 Copyright (C) 2012 Free Software Foundation, Inc.
2266 This configure script is free software; the Free Software Foundation
2267 gives unlimited permission to copy, distribute and modify it.
2268 _ACEOF
2269   exit
2270 fi
2271 
2272 ## ------------------------ ##
2273 ## Autoconf initialization. ##
2274 ## ------------------------ ##
2275 
2276 # ac_fn_c_try_compile LINENO
2277 # --------------------------
2278 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2279 ac_fn_c_try_compile ()
2280 {
2281   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282   rm -f conftest.$ac_objext
2283   if { { ac_try="$ac_compile"
2284 case "(($ac_try" in
2285   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2286   *) ac_try_echo=$ac_try;;
2287 esac
2288 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2289 $as_echo "$ac_try_echo"; } >&5
2290   (eval "$ac_compile") 2>conftest.err
2291   ac_status=$?
2292   if test -s conftest.err; then
2293     grep -v '^ *+' conftest.err >conftest.er1
2294     cat conftest.er1 >&5
2295     mv -f conftest.er1 conftest.err
2296   fi
2297   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2298   test $ac_status = 0; } && {
2299          test -z "$ac_c_werror_flag" ||
2300          test ! -s conftest.err
2301        } && test -s conftest.$ac_objext; then :
2302   ac_retval=0
2303 else
2304   $as_echo "$as_me: failed program was:" >&5
2305 sed 's/^/| /' conftest.$ac_ext >&5
2306 
2307         ac_retval=1
2308 fi
2309   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310   as_fn_set_status $ac_retval
2311 
2312 } # ac_fn_c_try_compile
2313 
2314 # ac_fn_cxx_try_compile LINENO
2315 # ----------------------------
2316 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2317 ac_fn_cxx_try_compile ()
2318 {
2319   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2320   rm -f conftest.$ac_objext
2321   if { { ac_try="$ac_compile"
2322 case "(($ac_try" in
2323   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2324   *) ac_try_echo=$ac_try;;
2325 esac
2326 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2327 $as_echo "$ac_try_echo"; } >&5
2328   (eval "$ac_compile") 2>conftest.err
2329   ac_status=$?
2330   if test -s conftest.err; then
2331     grep -v '^ *+' conftest.err >conftest.er1
2332     cat conftest.er1 >&5
2333     mv -f conftest.er1 conftest.err
2334   fi
2335   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2336   test $ac_status = 0; } && {
2337          test -z "$ac_cxx_werror_flag" ||
2338          test ! -s conftest.err
2339        } && test -s conftest.$ac_objext; then :
2340   ac_retval=0
2341 else
2342   $as_echo "$as_me: failed program was:" >&5
2343 sed 's/^/| /' conftest.$ac_ext >&5
2344 
2345         ac_retval=1
2346 fi
2347   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2348   as_fn_set_status $ac_retval
2349 
2350 } # ac_fn_cxx_try_compile
2351 
2352 # ac_fn_c_try_cpp LINENO
2353 # ----------------------
2354 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2355 ac_fn_c_try_cpp ()
2356 {
2357   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2358   if { { ac_try="$ac_cpp conftest.$ac_ext"
2359 case "(($ac_try" in
2360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2361   *) ac_try_echo=$ac_try;;
2362 esac
2363 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2364 $as_echo "$ac_try_echo"; } >&5
2365   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2366   ac_status=$?
2367   if test -s conftest.err; then
2368     grep -v '^ *+' conftest.err >conftest.er1
2369     cat conftest.er1 >&5
2370     mv -f conftest.er1 conftest.err
2371   fi
2372   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2373   test $ac_status = 0; } > conftest.i && {
2374          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2375          test ! -s conftest.err
2376        }; then :
2377   ac_retval=0
2378 else
2379   $as_echo "$as_me: failed program was:" >&5
2380 sed 's/^/| /' conftest.$ac_ext >&5
2381 
2382     ac_retval=1
2383 fi
2384   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2385   as_fn_set_status $ac_retval
2386 
2387 } # ac_fn_c_try_cpp
2388 
2389 # ac_fn_cxx_try_cpp LINENO
2390 # ------------------------
2391 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2392 ac_fn_cxx_try_cpp ()
2393 {
2394   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395   if { { ac_try="$ac_cpp conftest.$ac_ext"
2396 case "(($ac_try" in
2397   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2398   *) ac_try_echo=$ac_try;;
2399 esac
2400 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2401 $as_echo "$ac_try_echo"; } >&5
2402   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2403   ac_status=$?
2404   if test -s conftest.err; then
2405     grep -v '^ *+' conftest.err >conftest.er1
2406     cat conftest.er1 >&5
2407     mv -f conftest.er1 conftest.err
2408   fi
2409   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2410   test $ac_status = 0; } > conftest.i && {
2411          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2412          test ! -s conftest.err
2413        }; then :
2414   ac_retval=0
2415 else
2416   $as_echo "$as_me: failed program was:" >&5
2417 sed 's/^/| /' conftest.$ac_ext >&5
2418 
2419     ac_retval=1
2420 fi
2421   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422   as_fn_set_status $ac_retval
2423 
2424 } # ac_fn_cxx_try_cpp
2425 
2426 # ac_fn_c_try_link LINENO
2427 # -----------------------
2428 # Try to link conftest.$ac_ext, and return whether this succeeded.
2429 ac_fn_c_try_link ()
2430 {
2431   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432   rm -f conftest.$ac_objext conftest$ac_exeext
2433   if { { ac_try="$ac_link"
2434 case "(($ac_try" in
2435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2436   *) ac_try_echo=$ac_try;;
2437 esac
2438 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2439 $as_echo "$ac_try_echo"; } >&5
2440   (eval "$ac_link") 2>conftest.err
2441   ac_status=$?
2442   if test -s conftest.err; then
2443     grep -v '^ *+' conftest.err >conftest.er1
2444     cat conftest.er1 >&5
2445     mv -f conftest.er1 conftest.err
2446   fi
2447   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2448   test $ac_status = 0; } && {
2449          test -z "$ac_c_werror_flag" ||
2450          test ! -s conftest.err
2451        } && test -s conftest$ac_exeext && {
2452          test "$cross_compiling" = yes ||
2453          test -x conftest$ac_exeext
2454        }; then :
2455   ac_retval=0
2456 else
2457   $as_echo "$as_me: failed program was:" >&5
2458 sed 's/^/| /' conftest.$ac_ext >&5
2459 
2460         ac_retval=1
2461 fi
2462   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2463   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2464   # interfere with the next link command; also delete a directory that is
2465   # left behind by Apple's compiler.  We do this before executing the actions.
2466   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2467   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2468   as_fn_set_status $ac_retval
2469 
2470 } # ac_fn_c_try_link
2471 
2472 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2473 # ---------------------------------------------------------
2474 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2475 # the include files in INCLUDES and setting the cache variable VAR
2476 # accordingly.
2477 ac_fn_cxx_check_header_mongrel ()
2478 {
2479   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480   if eval \${$3+:} false; then :
2481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2482 $as_echo_n "checking for $2... " >&6; }
2483 if eval \${$3+:} false; then :
2484   $as_echo_n "(cached) " >&6
2485 fi
2486 eval ac_res=\$$3
2487                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2488 $as_echo "$ac_res" >&6; }
2489 else
2490   # Is the header compilable?
2491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2492 $as_echo_n "checking $2 usability... " >&6; }
2493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2494 /* end confdefs.h.  */
2495 $4
2496 #include <$2>
2497 _ACEOF
2498 if ac_fn_cxx_try_compile "$LINENO"; then :
2499   ac_header_compiler=yes
2500 else
2501   ac_header_compiler=no
2502 fi
2503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2505 $as_echo "$ac_header_compiler" >&6; }
2506 
2507 # Is the header present?
2508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2509 $as_echo_n "checking $2 presence... " >&6; }
2510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2511 /* end confdefs.h.  */
2512 #include <$2>
2513 _ACEOF
2514 if ac_fn_cxx_try_cpp "$LINENO"; then :
2515   ac_header_preproc=yes
2516 else
2517   ac_header_preproc=no
2518 fi
2519 rm -f conftest.err conftest.i conftest.$ac_ext
2520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2521 $as_echo "$ac_header_preproc" >&6; }
2522 
2523 # So?  What about this header?
2524 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2525   yes:no: )
2526     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2527 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2528     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2529 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2530     ;;
2531   no:yes:* )
2532     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2533 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2534     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2535 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2536     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2537 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2538     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2539 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2540     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2541 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2542 ( $as_echo "## ----------------------------------------- ##
2543 ## Report this to build-dev@openjdk.java.net ##
2544 ## ----------------------------------------- ##"
2545      ) | sed "s/^/$as_me: WARNING:     /" >&2
2546     ;;
2547 esac
2548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2549 $as_echo_n "checking for $2... " >&6; }
2550 if eval \${$3+:} false; then :
2551   $as_echo_n "(cached) " >&6
2552 else
2553   eval "$3=\$ac_header_compiler"
2554 fi
2555 eval ac_res=\$$3
2556                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2557 $as_echo "$ac_res" >&6; }
2558 fi
2559   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560 
2561 } # ac_fn_cxx_check_header_mongrel
2562 
2563 # ac_fn_cxx_try_run LINENO
2564 # ------------------------
2565 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2566 # that executables *can* be run.
2567 ac_fn_cxx_try_run ()
2568 {
2569   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570   if { { ac_try="$ac_link"
2571 case "(($ac_try" in
2572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2573   *) ac_try_echo=$ac_try;;
2574 esac
2575 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2576 $as_echo "$ac_try_echo"; } >&5
2577   (eval "$ac_link") 2>&5
2578   ac_status=$?
2579   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2580   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2581   { { case "(($ac_try" in
2582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2583   *) ac_try_echo=$ac_try;;
2584 esac
2585 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2586 $as_echo "$ac_try_echo"; } >&5
2587   (eval "$ac_try") 2>&5
2588   ac_status=$?
2589   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2590   test $ac_status = 0; }; }; then :
2591   ac_retval=0
2592 else
2593   $as_echo "$as_me: program exited with status $ac_status" >&5
2594        $as_echo "$as_me: failed program was:" >&5
2595 sed 's/^/| /' conftest.$ac_ext >&5
2596 
2597        ac_retval=$ac_status
2598 fi
2599   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601   as_fn_set_status $ac_retval
2602 
2603 } # ac_fn_cxx_try_run
2604 
2605 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2606 # ---------------------------------------------------------
2607 # Tests whether HEADER exists and can be compiled using the include files in
2608 # INCLUDES, setting the cache variable VAR accordingly.
2609 ac_fn_cxx_check_header_compile ()
2610 {
2611   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613 $as_echo_n "checking for $2... " >&6; }
2614 if eval \${$3+:} false; then :
2615   $as_echo_n "(cached) " >&6
2616 else
2617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618 /* end confdefs.h.  */
2619 $4
2620 #include <$2>
2621 _ACEOF
2622 if ac_fn_cxx_try_compile "$LINENO"; then :
2623   eval "$3=yes"
2624 else
2625   eval "$3=no"
2626 fi
2627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2628 fi
2629 eval ac_res=\$$3
2630                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2631 $as_echo "$ac_res" >&6; }
2632   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2633 
2634 } # ac_fn_cxx_check_header_compile
2635 
2636 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2637 # ----------------------------------------------
2638 # Tries to find the compile-time value of EXPR in a program that includes
2639 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2640 # computed
2641 ac_fn_cxx_compute_int ()
2642 {
2643   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2644   if test "$cross_compiling" = yes; then
2645     # Depending upon the size, compute the lo and hi bounds.
2646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2647 /* end confdefs.h.  */
2648 $4
2649 int
2650 main ()
2651 {
2652 static int test_array [1 - 2 * !(($2) >= 0)];
2653 test_array [0] = 0;
2654 return test_array [0];
2655 
2656   ;
2657   return 0;
2658 }
2659 _ACEOF
2660 if ac_fn_cxx_try_compile "$LINENO"; then :
2661   ac_lo=0 ac_mid=0
2662   while :; do
2663     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2664 /* end confdefs.h.  */
2665 $4
2666 int
2667 main ()
2668 {
2669 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2670 test_array [0] = 0;
2671 return test_array [0];
2672 
2673   ;
2674   return 0;
2675 }
2676 _ACEOF
2677 if ac_fn_cxx_try_compile "$LINENO"; then :
2678   ac_hi=$ac_mid; break
2679 else
2680   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2681                         if test $ac_lo -le $ac_mid; then
2682                           ac_lo= ac_hi=
2683                           break
2684                         fi
2685                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2686 fi
2687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688   done
2689 else
2690   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2691 /* end confdefs.h.  */
2692 $4
2693 int
2694 main ()
2695 {
2696 static int test_array [1 - 2 * !(($2) < 0)];
2697 test_array [0] = 0;
2698 return test_array [0];
2699 
2700   ;
2701   return 0;
2702 }
2703 _ACEOF
2704 if ac_fn_cxx_try_compile "$LINENO"; then :
2705   ac_hi=-1 ac_mid=-1
2706   while :; do
2707     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2708 /* end confdefs.h.  */
2709 $4
2710 int
2711 main ()
2712 {
2713 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2714 test_array [0] = 0;
2715 return test_array [0];
2716 
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 if ac_fn_cxx_try_compile "$LINENO"; then :
2722   ac_lo=$ac_mid; break
2723 else
2724   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2725                         if test $ac_mid -le $ac_hi; then
2726                           ac_lo= ac_hi=
2727                           break
2728                         fi
2729                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2730 fi
2731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2732   done
2733 else
2734   ac_lo= ac_hi=
2735 fi
2736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2737 fi
2738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739 # Binary search between lo and hi bounds.
2740 while test "x$ac_lo" != "x$ac_hi"; do
2741   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2742   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2743 /* end confdefs.h.  */
2744 $4
2745 int
2746 main ()
2747 {
2748 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2749 test_array [0] = 0;
2750 return test_array [0];
2751 
2752   ;
2753   return 0;
2754 }
2755 _ACEOF
2756 if ac_fn_cxx_try_compile "$LINENO"; then :
2757   ac_hi=$ac_mid
2758 else
2759   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2760 fi
2761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2762 done
2763 case $ac_lo in #((
2764 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2765 '') ac_retval=1 ;;
2766 esac
2767   else
2768     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2769 /* end confdefs.h.  */
2770 $4
2771 static long int longval () { return $2; }
2772 static unsigned long int ulongval () { return $2; }
2773 #include <stdio.h>
2774 #include <stdlib.h>
2775 int
2776 main ()
2777 {
2778 
2779   FILE *f = fopen ("conftest.val", "w");
2780   if (! f)
2781     return 1;
2782   if (($2) < 0)
2783     {
2784       long int i = longval ();
2785       if (i != ($2))
2786         return 1;
2787       fprintf (f, "%ld", i);
2788     }
2789   else
2790     {
2791       unsigned long int i = ulongval ();
2792       if (i != ($2))
2793         return 1;
2794       fprintf (f, "%lu", i);
2795     }
2796   /* Do not output a trailing newline, as this causes \r\n confusion
2797      on some platforms.  */
2798   return ferror (f) || fclose (f) != 0;
2799 
2800   ;
2801   return 0;
2802 }
2803 _ACEOF
2804 if ac_fn_cxx_try_run "$LINENO"; then :
2805   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2806 else
2807   ac_retval=1
2808 fi
2809 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2810   conftest.$ac_objext conftest.beam conftest.$ac_ext
2811 rm -f conftest.val
2812 
2813   fi
2814   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2815   as_fn_set_status $ac_retval
2816 
2817 } # ac_fn_cxx_compute_int
2818 
2819 # ac_fn_cxx_try_link LINENO
2820 # -------------------------
2821 # Try to link conftest.$ac_ext, and return whether this succeeded.
2822 ac_fn_cxx_try_link ()
2823 {
2824   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2825   rm -f conftest.$ac_objext conftest$ac_exeext
2826   if { { ac_try="$ac_link"
2827 case "(($ac_try" in
2828   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2829   *) ac_try_echo=$ac_try;;
2830 esac
2831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2832 $as_echo "$ac_try_echo"; } >&5
2833   (eval "$ac_link") 2>conftest.err
2834   ac_status=$?
2835   if test -s conftest.err; then
2836     grep -v '^ *+' conftest.err >conftest.er1
2837     cat conftest.er1 >&5
2838     mv -f conftest.er1 conftest.err
2839   fi
2840   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2841   test $ac_status = 0; } && {
2842          test -z "$ac_cxx_werror_flag" ||
2843          test ! -s conftest.err
2844        } && test -s conftest$ac_exeext && {
2845          test "$cross_compiling" = yes ||
2846          test -x conftest$ac_exeext
2847        }; then :
2848   ac_retval=0
2849 else
2850   $as_echo "$as_me: failed program was:" >&5
2851 sed 's/^/| /' conftest.$ac_ext >&5
2852 
2853         ac_retval=1
2854 fi
2855   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2856   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2857   # interfere with the next link command; also delete a directory that is
2858   # left behind by Apple's compiler.  We do this before executing the actions.
2859   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2860   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2861   as_fn_set_status $ac_retval
2862 
2863 } # ac_fn_cxx_try_link
2864 
2865 # ac_fn_cxx_check_func LINENO FUNC VAR
2866 # ------------------------------------
2867 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2868 ac_fn_cxx_check_func ()
2869 {
2870   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2871   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2872 $as_echo_n "checking for $2... " >&6; }
2873 if eval \${$3+:} false; then :
2874   $as_echo_n "(cached) " >&6
2875 else
2876   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2877 /* end confdefs.h.  */
2878 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2879    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2880 #define $2 innocuous_$2
2881 
2882 /* System header to define __stub macros and hopefully few prototypes,
2883     which can conflict with char $2 (); below.
2884     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2885     <limits.h> exists even on freestanding compilers.  */
2886 
2887 #ifdef __STDC__
2888 # include <limits.h>
2889 #else
2890 # include <assert.h>
2891 #endif
2892 
2893 #undef $2
2894 
2895 /* Override any GCC internal prototype to avoid an error.
2896    Use char because int might match the return type of a GCC
2897    builtin and then its argument prototype would still apply.  */
2898 #ifdef __cplusplus
2899 extern "C"
2900 #endif
2901 char $2 ();
2902 /* The GNU C library defines this for functions which it implements
2903     to always fail with ENOSYS.  Some functions are actually named
2904     something starting with __ and the normal name is an alias.  */
2905 #if defined __stub_$2 || defined __stub___$2
2906 choke me
2907 #endif
2908 
2909 int
2910 main ()
2911 {
2912 return $2 ();
2913   ;
2914   return 0;
2915 }
2916 _ACEOF
2917 if ac_fn_cxx_try_link "$LINENO"; then :
2918   eval "$3=yes"
2919 else
2920   eval "$3=no"
2921 fi
2922 rm -f core conftest.err conftest.$ac_objext \
2923     conftest$ac_exeext conftest.$ac_ext
2924 fi
2925 eval ac_res=\$$3
2926                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2927 $as_echo "$ac_res" >&6; }
2928   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2929 
2930 } # ac_fn_cxx_check_func
2931 
2932 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2933 # -------------------------------------------------------
2934 # Tests whether HEADER exists and can be compiled using the include files in
2935 # INCLUDES, setting the cache variable VAR accordingly.
2936 ac_fn_c_check_header_compile ()
2937 {
2938   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2939   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2940 $as_echo_n "checking for $2... " >&6; }
2941 if eval \${$3+:} false; then :
2942   $as_echo_n "(cached) " >&6
2943 else
2944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2945 /* end confdefs.h.  */
2946 $4
2947 #include <$2>
2948 _ACEOF
2949 if ac_fn_c_try_compile "$LINENO"; then :
2950   eval "$3=yes"
2951 else
2952   eval "$3=no"
2953 fi
2954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2955 fi
2956 eval ac_res=\$$3
2957                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2958 $as_echo "$ac_res" >&6; }
2959   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2960 
2961 } # ac_fn_c_check_header_compile
2962 cat >config.log <<_ACEOF
2963 This file contains any messages produced by compilers while
2964 running configure, to aid debugging if configure makes a mistake.
2965 
2966 It was created by OpenJDK $as_me jdk9, which was
2967 generated by GNU Autoconf 2.69.  Invocation command line was
2968 
2969   $ $0 $@
2970 
2971 _ACEOF
2972 exec 5>>config.log
2973 {
2974 cat <<_ASUNAME
2975 ## --------- ##
2976 ## Platform. ##
2977 ## --------- ##
2978 
2979 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2980 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2981 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2982 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2983 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2984 
2985 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2986 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2987 
2988 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2989 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2990 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2991 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2992 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2993 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2994 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2995 
2996 _ASUNAME
2997 
2998 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2999 for as_dir in $PATH
3000 do
3001   IFS=$as_save_IFS
3002   test -z "$as_dir" && as_dir=.
3003     $as_echo "PATH: $as_dir"
3004   done
3005 IFS=$as_save_IFS
3006 
3007 } >&5
3008 
3009 cat >&5 <<_ACEOF
3010 
3011 
3012 ## ----------- ##
3013 ## Core tests. ##
3014 ## ----------- ##
3015 
3016 _ACEOF
3017 
3018 
3019 # Keep a trace of the command line.
3020 # Strip out --no-create and --no-recursion so they do not pile up.
3021 # Strip out --silent because we don't want to record it for future runs.
3022 # Also quote any args containing shell meta-characters.
3023 # Make two passes to allow for proper duplicate-argument suppression.
3024 ac_configure_args=
3025 ac_configure_args0=
3026 ac_configure_args1=
3027 ac_must_keep_next=false
3028 for ac_pass in 1 2
3029 do
3030   for ac_arg
3031   do
3032     case $ac_arg in
3033     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3034     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3035     | -silent | --silent | --silen | --sile | --sil)
3036       continue ;;
3037     *\'*)
3038       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3039     esac
3040     case $ac_pass in
3041     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3042     2)
3043       as_fn_append ac_configure_args1 " '$ac_arg'"
3044       if test $ac_must_keep_next = true; then
3045         ac_must_keep_next=false # Got value, back to normal.
3046       else
3047         case $ac_arg in
3048           *=* | --config-cache | -C | -disable-* | --disable-* \
3049           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3050           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3051           | -with-* | --with-* | -without-* | --without-* | --x)
3052             case "$ac_configure_args0 " in
3053               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3054             esac
3055             ;;
3056           -* ) ac_must_keep_next=true ;;
3057         esac
3058       fi
3059       as_fn_append ac_configure_args " '$ac_arg'"
3060       ;;
3061     esac
3062   done
3063 done
3064 { ac_configure_args0=; unset ac_configure_args0;}
3065 { ac_configure_args1=; unset ac_configure_args1;}
3066 
3067 # When interrupted or exit'd, cleanup temporary files, and complete
3068 # config.log.  We remove comments because anyway the quotes in there
3069 # would cause problems or look ugly.
3070 # WARNING: Use '\'' to represent an apostrophe within the trap.
3071 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3072 trap 'exit_status=$?
3073   # Save into config.log some information that might help in debugging.
3074   {
3075     echo
3076 
3077     $as_echo "## ---------------- ##
3078 ## Cache variables. ##
3079 ## ---------------- ##"
3080     echo
3081     # The following way of writing the cache mishandles newlines in values,
3082 (
3083   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3084     eval ac_val=\$$ac_var
3085     case $ac_val in #(
3086     *${as_nl}*)
3087       case $ac_var in #(
3088       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3089 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3090       esac
3091       case $ac_var in #(
3092       _ | IFS | as_nl) ;; #(
3093       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3094       *) { eval $ac_var=; unset $ac_var;} ;;
3095       esac ;;
3096     esac
3097   done
3098   (set) 2>&1 |
3099     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3100     *${as_nl}ac_space=\ *)
3101       sed -n \
3102         "s/'\''/'\''\\\\'\'''\''/g;
3103           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3104       ;; #(
3105     *)
3106       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3107       ;;
3108     esac |
3109     sort
3110 )
3111     echo
3112 
3113     $as_echo "## ----------------- ##
3114 ## Output variables. ##
3115 ## ----------------- ##"
3116     echo
3117     for ac_var in $ac_subst_vars
3118     do
3119       eval ac_val=\$$ac_var
3120       case $ac_val in
3121       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3122       esac
3123       $as_echo "$ac_var='\''$ac_val'\''"
3124     done | sort
3125     echo
3126 
3127     if test -n "$ac_subst_files"; then
3128       $as_echo "## ------------------- ##
3129 ## File substitutions. ##
3130 ## ------------------- ##"
3131       echo
3132       for ac_var in $ac_subst_files
3133       do
3134         eval ac_val=\$$ac_var
3135         case $ac_val in
3136         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3137         esac
3138         $as_echo "$ac_var='\''$ac_val'\''"
3139       done | sort
3140       echo
3141     fi
3142 
3143     if test -s confdefs.h; then
3144       $as_echo "## ----------- ##
3145 ## confdefs.h. ##
3146 ## ----------- ##"
3147       echo
3148       cat confdefs.h
3149       echo
3150     fi
3151     test "$ac_signal" != 0 &&
3152       $as_echo "$as_me: caught signal $ac_signal"
3153     $as_echo "$as_me: exit $exit_status"
3154   } >&5
3155   rm -f core *.core core.conftest.* &&
3156     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3157     exit $exit_status
3158 ' 0
3159 for ac_signal in 1 2 13 15; do
3160   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3161 done
3162 ac_signal=0
3163 
3164 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3165 rm -f -r conftest* confdefs.h
3166 
3167 $as_echo "/* confdefs.h */" > confdefs.h
3168 
3169 # Predefined preprocessor variables.
3170 
3171 cat >>confdefs.h <<_ACEOF
3172 #define PACKAGE_NAME "$PACKAGE_NAME"
3173 _ACEOF
3174 
3175 cat >>confdefs.h <<_ACEOF
3176 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3177 _ACEOF
3178 
3179 cat >>confdefs.h <<_ACEOF
3180 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3181 _ACEOF
3182 
3183 cat >>confdefs.h <<_ACEOF
3184 #define PACKAGE_STRING "$PACKAGE_STRING"
3185 _ACEOF
3186 
3187 cat >>confdefs.h <<_ACEOF
3188 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3189 _ACEOF
3190 
3191 cat >>confdefs.h <<_ACEOF
3192 #define PACKAGE_URL "$PACKAGE_URL"
3193 _ACEOF
3194 
3195 
3196 # Let the site file select an alternate cache file if it wants to.
3197 # Prefer an explicitly selected file to automatically selected ones.
3198 ac_site_file1=NONE
3199 ac_site_file2=NONE
3200 if test -n "$CONFIG_SITE"; then
3201   # We do not want a PATH search for config.site.
3202   case $CONFIG_SITE in #((
3203     -*)  ac_site_file1=./$CONFIG_SITE;;
3204     */*) ac_site_file1=$CONFIG_SITE;;
3205     *)   ac_site_file1=./$CONFIG_SITE;;
3206   esac
3207 elif test "x$prefix" != xNONE; then
3208   ac_site_file1=$prefix/share/config.site
3209   ac_site_file2=$prefix/etc/config.site
3210 else
3211   ac_site_file1=$ac_default_prefix/share/config.site
3212   ac_site_file2=$ac_default_prefix/etc/config.site
3213 fi
3214 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3215 do
3216   test "x$ac_site_file" = xNONE && continue
3217   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3218     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3219 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3220     sed 's/^/| /' "$ac_site_file" >&5
3221     . "$ac_site_file" \
3222       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3223 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3224 as_fn_error $? "failed to load site script $ac_site_file
3225 See \`config.log' for more details" "$LINENO" 5; }
3226   fi
3227 done
3228 
3229 if test -r "$cache_file"; then
3230   # Some versions of bash will fail to source /dev/null (special files
3231   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3232   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3233     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3234 $as_echo "$as_me: loading cache $cache_file" >&6;}
3235     case $cache_file in
3236       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3237       *)                      . "./$cache_file";;
3238     esac
3239   fi
3240 else
3241   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3242 $as_echo "$as_me: creating cache $cache_file" >&6;}
3243   >$cache_file
3244 fi
3245 
3246 # Check that the precious variables saved in the cache have kept the same
3247 # value.
3248 ac_cache_corrupted=false
3249 for ac_var in $ac_precious_vars; do
3250   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3251   eval ac_new_set=\$ac_env_${ac_var}_set
3252   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3253   eval ac_new_val=\$ac_env_${ac_var}_value
3254   case $ac_old_set,$ac_new_set in
3255     set,)
3256       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3257 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3258       ac_cache_corrupted=: ;;
3259     ,set)
3260       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3261 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3262       ac_cache_corrupted=: ;;
3263     ,);;
3264     *)
3265       if test "x$ac_old_val" != "x$ac_new_val"; then
3266         # differences in whitespace do not lead to failure.
3267         ac_old_val_w=`echo x $ac_old_val`
3268         ac_new_val_w=`echo x $ac_new_val`
3269         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3270           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3271 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3272           ac_cache_corrupted=:
3273         else
3274           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3275 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3276           eval $ac_var=\$ac_old_val
3277         fi
3278         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3279 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3280         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3281 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3282       fi;;
3283   esac
3284   # Pass precious variables to config.status.
3285   if test "$ac_new_set" = set; then
3286     case $ac_new_val in
3287     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3288     *) ac_arg=$ac_var=$ac_new_val ;;
3289     esac
3290     case " $ac_configure_args " in
3291       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3292       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3293     esac
3294   fi
3295 done
3296 if $ac_cache_corrupted; then
3297   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3298 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3299   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3300 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3301   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3302 fi
3303 ## -------------------- ##
3304 ## Main body of script. ##
3305 ## -------------------- ##
3306 
3307 ac_ext=c
3308 ac_cpp='$CPP $CPPFLAGS'
3309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3312 
3313 
3314 
3315 ac_aux_dir=
3316 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3317   if test -f "$ac_dir/install-sh"; then
3318     ac_aux_dir=$ac_dir
3319     ac_install_sh="$ac_aux_dir/install-sh -c"
3320     break
3321   elif test -f "$ac_dir/install.sh"; then
3322     ac_aux_dir=$ac_dir
3323     ac_install_sh="$ac_aux_dir/install.sh -c"
3324     break
3325   elif test -f "$ac_dir/shtool"; then
3326     ac_aux_dir=$ac_dir
3327     ac_install_sh="$ac_aux_dir/shtool install -c"
3328     break
3329   fi
3330 done
3331 if test -z "$ac_aux_dir"; then
3332   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
3333 fi
3334 
3335 # These three variables are undocumented and unsupported,
3336 # and are intended to be withdrawn in a future Autoconf release.
3337 # They can cause serious problems if a builder's source tree is in a directory
3338 # whose full name contains unusual characters.
3339 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3340 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3341 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3342 
3343 
3344 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3345 
3346 #
3347 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3348 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3349 #
3350 # This code is free software; you can redistribute it and/or modify it
3351 # under the terms of the GNU General Public License version 2 only, as
3352 # published by the Free Software Foundation.  Oracle designates this
3353 # particular file as subject to the "Classpath" exception as provided
3354 # by Oracle in the LICENSE file that accompanied this code.
3355 #
3356 # This code is distributed in the hope that it will be useful, but WITHOUT
3357 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3358 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3359 # version 2 for more details (a copy is included in the LICENSE file that
3360 # accompanied this code).
3361 #
3362 # You should have received a copy of the GNU General Public License version
3363 # 2 along with this work; if not, write to the Free Software Foundation,
3364 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3365 #
3366 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3367 # or visit www.oracle.com if you need additional information or have any
3368 # questions.
3369 #
3370 
3371 #
3372 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3373 #
3374 # This program is free software; you can redistribute it and/or modify
3375 # it under the terms of the GNU General Public License as published by
3376 # the Free Software Foundation; either version 2 of the License, or
3377 # (at your option) any later version.
3378 #
3379 # This program is distributed in the hope that it will be useful, but
3380 # WITHOUT ANY WARRANTY; without even the implied warranty of
3381 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3382 # General Public License for more details.
3383 #
3384 # You should have received a copy of the GNU General Public License
3385 # along with this program; if not, write to the Free Software
3386 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3387 #
3388 # As a special exception to the GNU General Public License, if you
3389 # distribute this file as part of a program that contains a
3390 # configuration script generated by Autoconf, you may include it under
3391 # the same distribution terms that you use for the rest of that program.
3392 
3393 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3394 # ----------------------------------
3395 # PKG_PROG_PKG_CONFIG
3396 
3397 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3398 #
3399 # Check to see whether a particular set of modules exists.  Similar
3400 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3401 #
3402 #
3403 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3404 # this or PKG_CHECK_MODULES is called, or make sure to call
3405 # PKG_CHECK_EXISTS manually
3406 # --------------------------------------------------------------
3407 
3408 
3409 
3410 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3411 # ---------------------------------------------
3412 # _PKG_CONFIG
3413 
3414 # _PKG_SHORT_ERRORS_SUPPORTED
3415 # -----------------------------
3416 # _PKG_SHORT_ERRORS_SUPPORTED
3417 
3418 
3419 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3420 # [ACTION-IF-NOT-FOUND])
3421 #
3422 #
3423 # Note that if there is a possibility the first call to
3424 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3425 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3426 #
3427 #
3428 # --------------------------------------------------------------
3429 # PKG_CHECK_MODULES
3430 
3431 
3432 # Include these first...
3433 #
3434 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3435 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3436 #
3437 # This code is free software; you can redistribute it and/or modify it
3438 # under the terms of the GNU General Public License version 2 only, as
3439 # published by the Free Software Foundation.  Oracle designates this
3440 # particular file as subject to the "Classpath" exception as provided
3441 # by Oracle in the LICENSE file that accompanied this code.
3442 #
3443 # This code is distributed in the hope that it will be useful, but WITHOUT
3444 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3445 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3446 # version 2 for more details (a copy is included in the LICENSE file that
3447 # accompanied this code).
3448 #
3449 # You should have received a copy of the GNU General Public License version
3450 # 2 along with this work; if not, write to the Free Software Foundation,
3451 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3452 #
3453 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3454 # or visit www.oracle.com if you need additional information or have any
3455 # questions.
3456 #
3457 
3458 # Create a function/macro that takes a series of named arguments. The call is
3459 # similar to AC_DEFUN, but the setup of the function looks like this:
3460 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3461 # ... do something
3462 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3463 # ])
3464 # A star (*) in front of a named argument means that it is required and it's
3465 # presence will be verified. To pass e.g. the first value as a normal indexed
3466 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3467 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3468 # "ARG_FOO".
3469 #
3470 # The generated function can be called like this:
3471 # MYFUNC(FOO: [foo-val],
3472 #     BAR: [
3473 #         $ECHO hello world
3474 #     ])
3475 # Note that the argument value must start on the same line as the argument name.
3476 #
3477 # Argument 1: Name of the function to define
3478 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3479 # Argument 3: Argument array to treat as named, typically $@
3480 # Argument 4: The main function body
3481 
3482 
3483 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3484 # If so, then append $1 to $2 \
3485 # Also set JVM_ARG_OK to true/false depending on outcome.
3486 
3487 
3488 # Appends a string to a path variable, only adding the : when needed.
3489 
3490 
3491 # Prepends a string to a path variable, only adding the : when needed.
3492 
3493 
3494 # This will make sure the given variable points to a full and proper
3495 # path. This means:
3496 # 1) There will be no spaces in the path. On unix platforms,
3497 #    spaces in the path will result in an error. On Windows,
3498 #    the path will be rewritten using short-style to be space-free.
3499 # 2) The path will be absolute, and it will be in unix-style (on
3500 #     cygwin).
3501 # $1: The name of the variable to fix
3502 
3503 
3504 # This will make sure the given variable points to a executable
3505 # with a full and proper path. This means:
3506 # 1) There will be no spaces in the path. On unix platforms,
3507 #    spaces in the path will result in an error. On Windows,
3508 #    the path will be rewritten using short-style to be space-free.
3509 # 2) The path will be absolute, and it will be in unix-style (on
3510 #     cygwin).
3511 # Any arguments given to the executable is preserved.
3512 # If the input variable does not have a directory specification, then
3513 # it need to be in the PATH.
3514 # $1: The name of the variable to fix
3515 
3516 
3517 
3518 
3519 # Register a --with argument but mark it as deprecated
3520 # $1: The name of the with argument to deprecate, not including --with-
3521 
3522 
3523 # Register a --enable argument but mark it as deprecated
3524 # $1: The name of the with argument to deprecate, not including --enable-
3525 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3526 # $3: Messages to user.
3527 
3528 
3529 
3530 
3531 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3532 # $1: variable to check
3533 
3534 
3535 # Check that there are no unprocessed overridden variables left.
3536 # If so, they are an incorrect argument and we will exit with an error.
3537 
3538 
3539 # Setup a tool for the given variable. If correctly specified by the user,
3540 # use that value, otherwise search for the tool using the supplied code snippet.
3541 # $1: variable to set
3542 # $2: code snippet to call to look for the tool
3543 # $3: code snippet to call if variable was used to find tool
3544 
3545 
3546 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3547 # $1: variable to set
3548 # $2: executable name (or list of names) to look for
3549 
3550 
3551 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3552 # $1: variable to set
3553 # $2: executable name (or list of names) to look for
3554 
3555 
3556 # Like BASIC_PATH_PROGS but fails if no tool was found.
3557 # $1: variable to set
3558 # $2: executable name (or list of names) to look for
3559 
3560 
3561 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3562 # $1: variable to set
3563 # $2: autoconf macro to call to look for the special tool
3564 
3565 
3566 # Setup the most fundamental tools that relies on not much else to set up,
3567 # but is used by much of the early bootstrap code.
3568 
3569 
3570 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3571 
3572 
3573 # Evaluates platform specific overrides for devkit variables.
3574 # $1: Name of variable
3575 
3576 
3577 
3578 
3579 
3580 
3581 #%%% Simple tools %%%
3582 
3583 # Check if we have found a usable version of make
3584 # $1: the path to a potential make binary (or empty)
3585 # $2: the description on how we found this
3586 
3587 
3588 
3589 
3590 # Goes looking for a usable version of GNU make.
3591 
3592 
3593 
3594 
3595 
3596 
3597 # Check if build directory is on local disk. If not possible to determine,
3598 # we prefer to claim it's local.
3599 # Argument 1: directory to test
3600 # Argument 2: what to do if it is on local disk
3601 # Argument 3: what to do otherwise (remote disk or failure)
3602 
3603 
3604 # Check that source files have basic read permissions set. This might
3605 # not be the case in cygwin in certain conditions.
3606 
3607 
3608 
3609 
3610 # Check for support for specific options in bash
3611 
3612 
3613 ################################################################################
3614 #
3615 # Default make target
3616 #
3617 
3618 
3619 # Code to run after AC_OUTPUT
3620 
3621 
3622 #
3623 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3624 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3625 #
3626 # This code is free software; you can redistribute it and/or modify it
3627 # under the terms of the GNU General Public License version 2 only, as
3628 # published by the Free Software Foundation.  Oracle designates this
3629 # particular file as subject to the "Classpath" exception as provided
3630 # by Oracle in the LICENSE file that accompanied this code.
3631 #
3632 # This code is distributed in the hope that it will be useful, but WITHOUT
3633 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3634 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3635 # version 2 for more details (a copy is included in the LICENSE file that
3636 # accompanied this code).
3637 #
3638 # You should have received a copy of the GNU General Public License version
3639 # 2 along with this work; if not, write to the Free Software Foundation,
3640 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3641 #
3642 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3643 # or visit www.oracle.com if you need additional information or have any
3644 # questions.
3645 #
3646 
3647 
3648 
3649 
3650 
3651 # Helper function which possibly converts a path using DOS-style short mode.
3652 # If so, the updated path is stored in $new_path.
3653 # $1: The path to check
3654 
3655 
3656 # Helper function which possibly converts a path using DOS-style short mode.
3657 # If so, the updated path is stored in $new_path.
3658 # $1: The path to check
3659 
3660 
3661 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3662 # and could probably be heavily simplified. However, all changes in this
3663 # area tend to need lot of testing in different scenarios, and in lack of
3664 # proper unit testing, cleaning this up has not been deemed worth the effort
3665 # at the moment.
3666 
3667 
3668 
3669 
3670 
3671 
3672 
3673 
3674 
3675 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3676 
3677 
3678 
3679 
3680 # ... then the rest
3681 #
3682 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3683 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3684 #
3685 # This code is free software; you can redistribute it and/or modify it
3686 # under the terms of the GNU General Public License version 2 only, as
3687 # published by the Free Software Foundation.  Oracle designates this
3688 # particular file as subject to the "Classpath" exception as provided
3689 # by Oracle in the LICENSE file that accompanied this code.
3690 #
3691 # This code is distributed in the hope that it will be useful, but WITHOUT
3692 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3693 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3694 # version 2 for more details (a copy is included in the LICENSE file that
3695 # accompanied this code).
3696 #
3697 # You should have received a copy of the GNU General Public License version
3698 # 2 along with this work; if not, write to the Free Software Foundation,
3699 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3700 #
3701 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3702 # or visit www.oracle.com if you need additional information or have any
3703 # questions.
3704 #
3705 
3706 ########################################################################
3707 # This file handles detection of the Boot JDK. The Boot JDK detection
3708 # process has been developed as a response to solve a complex real-world
3709 # problem. Initially, it was simple, but it has grown as platform after
3710 # platform, idiosyncracy after idiosyncracy has been supported.
3711 #
3712 # The basic idea is this:
3713 # 1) You need an acceptable *) JDK to use as a Boot JDK
3714 # 2) There are several ways to locate a JDK, that are mostly platform
3715 #    dependent **)
3716 # 3) You can have multiple JDKs installed
3717 # 4) If possible, configure should try to dig out an acceptable JDK
3718 #    automatically, without having to resort to command-line options
3719 #
3720 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3721 #     javac) and not a JRE, etc.
3722 #
3723 # **) On Windows we typically use a well-known path.
3724 #     On MacOSX we typically use the tool java_home.
3725 #     On Linux we typically find javac in the $PATH, and then follow a
3726 #     chain of symlinks that often ends up in a real JDK.
3727 #
3728 # This leads to the code where we check in different ways to locate a
3729 # JDK, and if one is found, check if it is acceptable. If not, we print
3730 # our reasons for rejecting it (useful when debugging non-working
3731 # configure situations) and continue checking the next one.
3732 ########################################################################
3733 
3734 # Execute the check given as argument, and verify the result
3735 # If the Boot JDK was previously found, do nothing
3736 # $1 A command line (typically autoconf macro) to execute
3737 
3738 
3739 # Test: Is bootjdk explicitely set by command line arguments?
3740 
3741 
3742 # Test: Is $JAVA_HOME set?
3743 
3744 
3745 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3746 
3747 
3748 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3749 # $1: Argument to the java_home binary (optional)
3750 
3751 
3752 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3753 
3754 
3755 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3756 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3757 # $1 = Path to directory containing jdk installations.
3758 # $2 = String to append to the found JDK directory to get the proper JDK home
3759 
3760 
3761 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3762 # environmental variable as base for where to look.
3763 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3764 
3765 
3766 # Test: Is there a JDK installed in default, well-known locations?
3767 
3768 
3769 # Check that a command-line tool in the Boot JDK is correct
3770 # $1 = name of variable to assign
3771 # $2 = name of binary
3772 
3773 
3774 ###############################################################################
3775 #
3776 # We need a Boot JDK to bootstrap the build.
3777 #
3778 
3779 
3780 
3781 
3782 
3783 #
3784 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3785 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3786 #
3787 # This code is free software; you can redistribute it and/or modify it
3788 # under the terms of the GNU General Public License version 2 only, as
3789 # published by the Free Software Foundation.  Oracle designates this
3790 # particular file as subject to the "Classpath" exception as provided
3791 # by Oracle in the LICENSE file that accompanied this code.
3792 #
3793 # This code is distributed in the hope that it will be useful, but WITHOUT
3794 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3795 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3796 # version 2 for more details (a copy is included in the LICENSE file that
3797 # accompanied this code).
3798 #
3799 # You should have received a copy of the GNU General Public License version
3800 # 2 along with this work; if not, write to the Free Software Foundation,
3801 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3802 #
3803 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3804 # or visit www.oracle.com if you need additional information or have any
3805 # questions.
3806 #
3807 
3808 
3809 
3810 
3811 
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 
3820 
3821 
3822 
3823 
3824 ################################################################################
3825 #
3826 # Runs icecc-create-env once and prints the error if it fails
3827 #
3828 # $1: arguments to icecc-create-env
3829 # $2: log file
3830 #
3831 
3832 
3833 ################################################################################
3834 #
3835 # Optionally enable distributed compilation of native code using icecc/icecream
3836 #
3837 
3838 
3839 
3840 
3841 
3842 
3843 
3844 #
3845 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3846 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3847 #
3848 # This code is free software; you can redistribute it and/or modify it
3849 # under the terms of the GNU General Public License version 2 only, as
3850 # published by the Free Software Foundation.  Oracle designates this
3851 # particular file as subject to the "Classpath" exception as provided
3852 # by Oracle in the LICENSE file that accompanied this code.
3853 #
3854 # This code is distributed in the hope that it will be useful, but WITHOUT
3855 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3856 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3857 # version 2 for more details (a copy is included in the LICENSE file that
3858 # accompanied this code).
3859 #
3860 # You should have received a copy of the GNU General Public License version
3861 # 2 along with this work; if not, write to the Free Software Foundation,
3862 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3863 #
3864 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3865 # or visit www.oracle.com if you need additional information or have any
3866 # questions.
3867 #
3868 
3869 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3870 # corresponding configure arguments instead
3871 
3872 
3873 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3874 # that configure can use them while detecting compilers.
3875 # TOOLCHAIN_TYPE is available here.
3876 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
3877 
3878 
3879 
3880 
3881 
3882 
3883 # Documentation on common flags used for solstudio in HIGHEST.
3884 #
3885 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3886 #          done with care, there are some assumptions below that need to
3887 #          be understood about the use of pointers, and IEEE behavior.
3888 #
3889 # -fns: Use non-standard floating point mode (not IEEE 754)
3890 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3891 # -fsingle: Use single precision floating point with 'float'
3892 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3893 #   (Source with excessing pointer casting and data access with mixed
3894 #    pointer types are not recommended)
3895 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3896 #   (If you expect perfect errno behavior, do not use this)
3897 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3898 # -xrestrict: Pointer parameters to functions do not overlap
3899 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3900 #    If you pass in multiple pointers to the same data, do not use this)
3901 # -xlibmil: Inline some library routines
3902 #   (If you expect perfect errno behavior, do not use this)
3903 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3904 #   (If you expect perfect errno behavior, do not use this)
3905 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3906 
3907     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3908     # Bug?
3909     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3910     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3911     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3912     #fi
3913 
3914 
3915 
3916 
3917 
3918 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3919 #                                  IF_FALSE: [RUN-IF-FALSE])
3920 # ------------------------------------------------------------
3921 # Check that the C compiler supports an argument
3922 
3923 
3924 
3925 
3926 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3927 #                                    IF_FALSE: [RUN-IF-FALSE])
3928 # ------------------------------------------------------------
3929 # Check that the C++ compiler supports an argument
3930 
3931 
3932 
3933 
3934 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3935 #                                IF_FALSE: [RUN-IF-FALSE])
3936 # ------------------------------------------------------------
3937 # Check that the C and C++ compilers support an argument
3938 
3939 
3940 
3941 
3942 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3943 #                                   IF_FALSE: [RUN-IF-FALSE])
3944 # ------------------------------------------------------------
3945 # Check that the linker support an argument
3946 
3947 
3948 
3949 
3950 
3951 
3952 #
3953 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3954 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3955 #
3956 # This code is free software; you can redistribute it and/or modify it
3957 # under the terms of the GNU General Public License version 2 only, as
3958 # published by the Free Software Foundation.  Oracle designates this
3959 # particular file as subject to the "Classpath" exception as provided
3960 # by Oracle in the LICENSE file that accompanied this code.
3961 #
3962 # This code is distributed in the hope that it will be useful, but WITHOUT
3963 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3964 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3965 # version 2 for more details (a copy is included in the LICENSE file that
3966 # accompanied this code).
3967 #
3968 # You should have received a copy of the GNU General Public License version
3969 # 2 along with this work; if not, write to the Free Software Foundation,
3970 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3971 #
3972 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3973 # or visit www.oracle.com if you need additional information or have any
3974 # questions.
3975 #
3976 
3977 
3978 
3979 
3980 
3981 cygwin_help() {
3982   case $1 in
3983     unzip)
3984       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3985       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3986       ;;
3987     zip)
3988       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3989       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3990       ;;
3991     make)
3992       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3993       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3994       ;;
3995     freetype)
3996       HELP_MSG="
3997 The freetype library can now be build during the configure process.
3998 Download the freetype sources and unpack them into an arbitrary directory:
3999 
4000 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4001 tar -xzf freetype-2.5.3.tar.gz
4002 
4003 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4004 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4005 builds or into '<freetype_src>/lib32' for 32-bit builds.
4006 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4007 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4008 
4009 Alternatively you can unpack the sources like this to use the default directory:
4010 
4011 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4012       ;;
4013   esac
4014 }
4015 
4016 msys_help() {
4017   PKGHANDLER_COMMAND=""
4018 }
4019 
4020 apt_help() {
4021   case $1 in
4022     reduced)
4023       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4024     devkit)
4025       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4026     openjdk)
4027       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4028     alsa)
4029       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4030     cups)
4031       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4032     freetype)
4033       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4034     ffi)
4035       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4036     x11)
4037       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4038     ccache)
4039       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4040   esac
4041 }
4042 
4043 yum_help() {
4044   case $1 in
4045     devkit)
4046       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4047     openjdk)
4048       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4049     alsa)
4050       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4051     cups)
4052       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4053     freetype)
4054       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4055     x11)
4056       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4057     ccache)
4058       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4059   esac
4060 }
4061 
4062 port_help() {
4063   PKGHANDLER_COMMAND=""
4064 }
4065 
4066 pkgutil_help() {
4067   PKGHANDLER_COMMAND=""
4068 }
4069 
4070 pkgadd_help() {
4071   PKGHANDLER_COMMAND=""
4072 }
4073 
4074 # This function will check if we're called from the "configure" wrapper while
4075 # printing --help. If so, we will print out additional information that can
4076 # only be extracted within the autoconf script, and then exit. This must be
4077 # called at the very beginning in configure.ac.
4078 
4079 
4080 
4081 
4082 
4083 
4084 #
4085 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4086 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4087 #
4088 # This code is free software; you can redistribute it and/or modify it
4089 # under the terms of the GNU General Public License version 2 only, as
4090 # published by the Free Software Foundation.  Oracle designates this
4091 # particular file as subject to the "Classpath" exception as provided
4092 # by Oracle in the LICENSE file that accompanied this code.
4093 #
4094 # This code is distributed in the hope that it will be useful, but WITHOUT
4095 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4096 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4097 # version 2 for more details (a copy is included in the LICENSE file that
4098 # accompanied this code).
4099 #
4100 # You should have received a copy of the GNU General Public License version
4101 # 2 along with this work; if not, write to the Free Software Foundation,
4102 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4103 #
4104 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4105 # or visit www.oracle.com if you need additional information or have any
4106 # questions.
4107 #
4108 
4109 ###############################################################################
4110 # Check which interpreter of the JVM we want to build.
4111 # Currently we have:
4112 #    template: Template interpreter (the default)
4113 #    cpp     : C++ interpreter
4114 
4115 
4116 ###############################################################################
4117 # Check which variants of the JVM that we want to build.
4118 # Currently we have:
4119 #    server: normal interpreter and a C2 or tiered C1/C2 compiler
4120 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4121 #    minimal1: reduced form of client with optional VM services and features stripped out
4122 #    zero: no machine code interpreter, no compiler
4123 #    zeroshark: zero interpreter and shark/llvm compiler backend
4124 #    core: interpreter only, no compiler (only works on some platforms)
4125 
4126 
4127 
4128 ###############################################################################
4129 # Setup legacy vars/targets and new vars to deal with different debug levels.
4130 #
4131 #    release: no debug information, all optimizations, no asserts.
4132 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4133 #    fastdebug: debug information (-g), all optimizations, all asserts
4134 #    slowdebug: debug information (-g), no optimizations, all asserts
4135 #
4136 
4137 
4138 
4139 
4140 
4141 
4142 #
4143 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4144 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4145 #
4146 # This code is free software; you can redistribute it and/or modify it
4147 # under the terms of the GNU General Public License version 2 only, as
4148 # published by the Free Software Foundation.  Oracle designates this
4149 # particular file as subject to the "Classpath" exception as provided
4150 # by Oracle in the LICENSE file that accompanied this code.
4151 #
4152 # This code is distributed in the hope that it will be useful, but WITHOUT
4153 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4154 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4155 # version 2 for more details (a copy is included in the LICENSE file that
4156 # accompanied this code).
4157 #
4158 # You should have received a copy of the GNU General Public License version
4159 # 2 along with this work; if not, write to the Free Software Foundation,
4160 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4161 #
4162 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4163 # or visit www.oracle.com if you need additional information or have any
4164 # questions.
4165 #
4166 
4167 ###############################################################################
4168 # Check which variant of the JDK that we want to build.
4169 # Currently we have:
4170 #    normal:   standard edition
4171 # but the custom make system may add other variants
4172 #
4173 # Effectively the JDK variant gives a name to a specific set of
4174 # modules to compile into the JDK.
4175 
4176 
4177 ###############################################################################
4178 # Set the debug level
4179 #    release: no debug information, all optimizations, no asserts.
4180 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4181 #    fastdebug: debug information (-g), all optimizations, all asserts
4182 #    slowdebug: debug information (-g), no optimizations, all asserts
4183 
4184 
4185 ###############################################################################
4186 #
4187 # Should we build only OpenJDK even if closed sources are present?
4188 #
4189 
4190 
4191 
4192 
4193 ###############################################################################
4194 #
4195 # Enable or disable the elliptic curve crypto implementation
4196 #
4197 
4198 
4199 
4200 
4201 ################################################################################
4202 #
4203 # Gcov coverage data for hotspot
4204 #
4205 
4206 
4207 ################################################################################
4208 #
4209 # Static build support.  When enabled will generate static
4210 # libraries instead of shared libraries for all JDK libs.
4211 #
4212 
4213 
4214 #
4215 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4216 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4217 #
4218 # This code is free software; you can redistribute it and/or modify it
4219 # under the terms of the GNU General Public License version 2 only, as
4220 # published by the Free Software Foundation.  Oracle designates this
4221 # particular file as subject to the "Classpath" exception as provided
4222 # by Oracle in the LICENSE file that accompanied this code.
4223 #
4224 # This code is distributed in the hope that it will be useful, but WITHOUT
4225 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4226 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4227 # version 2 for more details (a copy is included in the LICENSE file that
4228 # accompanied this code).
4229 #
4230 # You should have received a copy of the GNU General Public License version
4231 # 2 along with this work; if not, write to the Free Software Foundation,
4232 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4233 #
4234 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4235 # or visit www.oracle.com if you need additional information or have any
4236 # questions.
4237 #
4238 
4239 ###############################################################################
4240 #
4241 # Setup version numbers
4242 #
4243 
4244 # Verify that a given string represents a valid version number, and assign it
4245 # to a variable.
4246 
4247 # Argument 1: the variable to assign to
4248 # Argument 2: the value given by the user
4249 
4250 
4251 
4252 
4253 #
4254 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4255 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4256 #
4257 # This code is free software; you can redistribute it and/or modify it
4258 # under the terms of the GNU General Public License version 2 only, as
4259 # published by the Free Software Foundation.  Oracle designates this
4260 # particular file as subject to the "Classpath" exception as provided
4261 # by Oracle in the LICENSE file that accompanied this code.
4262 #
4263 # This code is distributed in the hope that it will be useful, but WITHOUT
4264 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4265 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4266 # version 2 for more details (a copy is included in the LICENSE file that
4267 # accompanied this code).
4268 #
4269 # You should have received a copy of the GNU General Public License version
4270 # 2 along with this work; if not, write to the Free Software Foundation,
4271 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4272 #
4273 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4274 # or visit www.oracle.com if you need additional information or have any
4275 # questions.
4276 #
4277 
4278 # Major library component reside in separate files.
4279 #
4280 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4281 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4282 #
4283 # This code is free software; you can redistribute it and/or modify it
4284 # under the terms of the GNU General Public License version 2 only, as
4285 # published by the Free Software Foundation.  Oracle designates this
4286 # particular file as subject to the "Classpath" exception as provided
4287 # by Oracle in the LICENSE file that accompanied this code.
4288 #
4289 # This code is distributed in the hope that it will be useful, but WITHOUT
4290 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4291 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4292 # version 2 for more details (a copy is included in the LICENSE file that
4293 # accompanied this code).
4294 #
4295 # You should have received a copy of the GNU General Public License version
4296 # 2 along with this work; if not, write to the Free Software Foundation,
4297 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4298 #
4299 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4300 # or visit www.oracle.com if you need additional information or have any
4301 # questions.
4302 #
4303 
4304 ################################################################################
4305 # Setup alsa (Advanced Linux Sound Architecture)
4306 ################################################################################
4307 
4308 
4309 #
4310 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4311 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4312 #
4313 # This code is free software; you can redistribute it and/or modify it
4314 # under the terms of the GNU General Public License version 2 only, as
4315 # published by the Free Software Foundation.  Oracle designates this
4316 # particular file as subject to the "Classpath" exception as provided
4317 # by Oracle in the LICENSE file that accompanied this code.
4318 #
4319 # This code is distributed in the hope that it will be useful, but WITHOUT
4320 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4321 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4322 # version 2 for more details (a copy is included in the LICENSE file that
4323 # accompanied this code).
4324 #
4325 # You should have received a copy of the GNU General Public License version
4326 # 2 along with this work; if not, write to the Free Software Foundation,
4327 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4328 #
4329 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4330 # or visit www.oracle.com if you need additional information or have any
4331 # questions.
4332 #
4333 
4334 ################################################################################
4335 # Setup bundled libraries.
4336 #
4337 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4338 # OpenJDK repository. Default is to use these libraries as bundled, but they
4339 # might be replaced by en external version by the user.
4340 ################################################################################
4341 
4342 
4343 ################################################################################
4344 # Setup libjpeg
4345 ################################################################################
4346 
4347 
4348 ################################################################################
4349 # Setup giflib
4350 ################################################################################
4351 
4352 
4353 ################################################################################
4354 # Setup libpng
4355 ################################################################################
4356 
4357 
4358 ################################################################################
4359 # Setup zlib
4360 ################################################################################
4361 
4362 
4363 ################################################################################
4364 # Setup lcms (Little CMS)
4365 ################################################################################
4366 
4367 
4368 #
4369 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4370 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4371 #
4372 # This code is free software; you can redistribute it and/or modify it
4373 # under the terms of the GNU General Public License version 2 only, as
4374 # published by the Free Software Foundation.  Oracle designates this
4375 # particular file as subject to the "Classpath" exception as provided
4376 # by Oracle in the LICENSE file that accompanied this code.
4377 #
4378 # This code is distributed in the hope that it will be useful, but WITHOUT
4379 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4380 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4381 # version 2 for more details (a copy is included in the LICENSE file that
4382 # accompanied this code).
4383 #
4384 # You should have received a copy of the GNU General Public License version
4385 # 2 along with this work; if not, write to the Free Software Foundation,
4386 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4387 #
4388 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4389 # or visit www.oracle.com if you need additional information or have any
4390 # questions.
4391 #
4392 
4393 ################################################################################
4394 # Setup cups (Common Unix Printing System)
4395 ################################################################################
4396 
4397 
4398 #
4399 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4400 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4401 #
4402 # This code is free software; you can redistribute it and/or modify it
4403 # under the terms of the GNU General Public License version 2 only, as
4404 # published by the Free Software Foundation.  Oracle designates this
4405 # particular file as subject to the "Classpath" exception as provided
4406 # by Oracle in the LICENSE file that accompanied this code.
4407 #
4408 # This code is distributed in the hope that it will be useful, but WITHOUT
4409 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4410 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4411 # version 2 for more details (a copy is included in the LICENSE file that
4412 # accompanied this code).
4413 #
4414 # You should have received a copy of the GNU General Public License version
4415 # 2 along with this work; if not, write to the Free Software Foundation,
4416 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4417 #
4418 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4419 # or visit www.oracle.com if you need additional information or have any
4420 # questions.
4421 #
4422 
4423 ################################################################################
4424 # Setup libffi (Foreign Function Interface)
4425 ################################################################################
4426 
4427 
4428 #
4429 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4430 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4431 #
4432 # This code is free software; you can redistribute it and/or modify it
4433 # under the terms of the GNU General Public License version 2 only, as
4434 # published by the Free Software Foundation.  Oracle designates this
4435 # particular file as subject to the "Classpath" exception as provided
4436 # by Oracle in the LICENSE file that accompanied this code.
4437 #
4438 # This code is distributed in the hope that it will be useful, but WITHOUT
4439 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4440 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4441 # version 2 for more details (a copy is included in the LICENSE file that
4442 # accompanied this code).
4443 #
4444 # You should have received a copy of the GNU General Public License version
4445 # 2 along with this work; if not, write to the Free Software Foundation,
4446 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4447 #
4448 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4449 # or visit www.oracle.com if you need additional information or have any
4450 # questions.
4451 #
4452 
4453 ################################################################################
4454 # Build the freetype lib from source
4455 ################################################################################
4456 
4457 
4458 ################################################################################
4459 # Check if a potential freeype library match is correct and usable
4460 ################################################################################
4461 
4462 
4463 ################################################################################
4464 # Setup freetype (The FreeType2 font rendering library)
4465 ################################################################################
4466 
4467 
4468 #
4469 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4470 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4471 #
4472 # This code is free software; you can redistribute it and/or modify it
4473 # under the terms of the GNU General Public License version 2 only, as
4474 # published by the Free Software Foundation.  Oracle designates this
4475 # particular file as subject to the "Classpath" exception as provided
4476 # by Oracle in the LICENSE file that accompanied this code.
4477 #
4478 # This code is distributed in the hope that it will be useful, but WITHOUT
4479 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4480 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4481 # version 2 for more details (a copy is included in the LICENSE file that
4482 # accompanied this code).
4483 #
4484 # You should have received a copy of the GNU General Public License version
4485 # 2 along with this work; if not, write to the Free Software Foundation,
4486 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4487 #
4488 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4489 # or visit www.oracle.com if you need additional information or have any
4490 # questions.
4491 #
4492 
4493 ################################################################################
4494 # Setup the standard C/C++ runtime libraries.
4495 #
4496 # Most importantly, determine if stdc++ should be linked statically or
4497 # dynamically.
4498 ################################################################################
4499 
4500 
4501 #
4502 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4503 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4504 #
4505 # This code is free software; you can redistribute it and/or modify it
4506 # under the terms of the GNU General Public License version 2 only, as
4507 # published by the Free Software Foundation.  Oracle designates this
4508 # particular file as subject to the "Classpath" exception as provided
4509 # by Oracle in the LICENSE file that accompanied this code.
4510 #
4511 # This code is distributed in the hope that it will be useful, but WITHOUT
4512 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4513 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4514 # version 2 for more details (a copy is included in the LICENSE file that
4515 # accompanied this code).
4516 #
4517 # You should have received a copy of the GNU General Public License version
4518 # 2 along with this work; if not, write to the Free Software Foundation,
4519 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4520 #
4521 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4522 # or visit www.oracle.com if you need additional information or have any
4523 # questions.
4524 #
4525 
4526 ################################################################################
4527 # Setup X11 Windows system
4528 ################################################################################
4529 
4530 
4531 
4532 ################################################################################
4533 # Determine which libraries are needed for this configuration
4534 ################################################################################
4535 
4536 
4537 ################################################################################
4538 # Parse library options, and setup needed libraries
4539 ################################################################################
4540 
4541 
4542 ################################################################################
4543 # Setup llvm (Low-Level VM)
4544 ################################################################################
4545 
4546 
4547 ################################################################################
4548 # Setup various libraries, typically small system libraries
4549 ################################################################################
4550 
4551 
4552 #
4553 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4554 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4555 #
4556 # This code is free software; you can redistribute it and/or modify it
4557 # under the terms of the GNU General Public License version 2 only, as
4558 # published by the Free Software Foundation.  Oracle designates this
4559 # particular file as subject to the "Classpath" exception as provided
4560 # by Oracle in the LICENSE file that accompanied this code.
4561 #
4562 # This code is distributed in the hope that it will be useful, but WITHOUT
4563 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4564 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4565 # version 2 for more details (a copy is included in the LICENSE file that
4566 # accompanied this code).
4567 #
4568 # You should have received a copy of the GNU General Public License version
4569 # 2 along with this work; if not, write to the Free Software Foundation,
4570 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4571 #
4572 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4573 # or visit www.oracle.com if you need additional information or have any
4574 # questions.
4575 #
4576 
4577 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4578 # Converts autoconf style CPU name to OpenJDK style, into
4579 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4580 
4581 
4582 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4583 # Converts autoconf style OS name to OpenJDK style, into
4584 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4585 
4586 
4587 # Expects $host_os $host_cpu $build_os and $build_cpu
4588 # and $with_target_bits to have been setup!
4589 #
4590 # Translate the standard triplet(quadruplet) definition
4591 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4592 # OPENJDK_BUILD_OS, etc.
4593 
4594 
4595 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4596 # accordingly. Must be done after setting up build and target system, but before
4597 # doing anything else with these values.
4598 
4599 
4600 # Setup the legacy variables, for controlling the old makefiles.
4601 #
4602 
4603 
4604 
4605 
4606 #%%% Build and target systems %%%
4607 
4608 
4609 
4610 
4611 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4612 # Add -mX to various FLAGS variables.
4613 
4614 
4615 
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 
4646 
4647 
4648 
4649 
4650 #
4651 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4652 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4653 #
4654 # This code is free software; you can redistribute it and/or modify it
4655 # under the terms of the GNU General Public License version 2 only, as
4656 # published by the Free Software Foundation.  Oracle designates this
4657 # particular file as subject to the "Classpath" exception as provided
4658 # by Oracle in the LICENSE file that accompanied this code.
4659 #
4660 # This code is distributed in the hope that it will be useful, but WITHOUT
4661 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4662 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4663 # version 2 for more details (a copy is included in the LICENSE file that
4664 # accompanied this code).
4665 #
4666 # You should have received a copy of the GNU General Public License version
4667 # 2 along with this work; if not, write to the Free Software Foundation,
4668 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4669 #
4670 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4671 # or visit www.oracle.com if you need additional information or have any
4672 # questions.
4673 #
4674 
4675 ########################################################################
4676 # This file is responsible for detecting, verifying and setting up the
4677 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4678 # proper paths to the binaries, but it will not setup any flags.
4679 #
4680 # The binaries used is determined by the toolchain type, which is the family of
4681 # compilers and related tools that are used.
4682 ########################################################################
4683 
4684 
4685 # All valid toolchains, regardless of platform (used by help.m4)
4686 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4687 
4688 # These toolchains are valid on different platforms
4689 VALID_TOOLCHAINS_linux="gcc clang"
4690 VALID_TOOLCHAINS_solaris="solstudio"
4691 VALID_TOOLCHAINS_macosx="gcc clang"
4692 VALID_TOOLCHAINS_aix="xlc"
4693 VALID_TOOLCHAINS_windows="microsoft"
4694 
4695 # Toolchain descriptions
4696 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4697 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4698 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4699 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4700 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4701 
4702 # Minimum supported versions, empty means unspecified
4703 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4704 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4705 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4706 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4707 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4708 
4709 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4710 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4711 
4712 
4713 # Check if the configured compiler (C and C++) is of a specific version or
4714 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4715 #
4716 # Arguments:
4717 #   VERSION:   The version string to check against the found version
4718 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4719 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4720 
4721 
4722 
4723 
4724 # Setup a number of variables describing how native output files are
4725 # named on this platform/toolchain.
4726 
4727 
4728 # Determine which toolchain type to use, and make sure it is valid for this
4729 # platform. Setup various information about the selected toolchain.
4730 
4731 
4732 # Before we start detecting the toolchain executables, we might need some
4733 # special setup, e.g. additional paths etc.
4734 
4735 
4736 # Restore path, etc
4737 
4738 
4739 # Check if a compiler is of the toolchain type we expect, and save the version
4740 # information from it. If the compiler does not match the expected type,
4741 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4742 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4743 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4744 #
4745 # $1 = compiler to test (CC or CXX)
4746 # $2 = human readable name of compiler (C or C++)
4747 
4748 
4749 # Try to locate the given C or C++ compiler in the path, or otherwise.
4750 #
4751 # $1 = compiler to test (CC or CXX)
4752 # $2 = human readable name of compiler (C or C++)
4753 # $3 = list of compiler names to search for
4754 
4755 
4756 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4757 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4758 # archiver (AR). Verify that the compilers are correct according to the
4759 # toolchain type.
4760 
4761 
4762 # Setup additional tools that is considered a part of the toolchain, but not the
4763 # core part. Many of these are highly platform-specific and do not exist,
4764 # and/or are not needed on all platforms.
4765 
4766 
4767 # Setup the build tools (i.e, the compiler and linker used to build programs
4768 # that should be run on the build platform, not the target platform, as a build
4769 # helper). Since the non-cross-compile case uses the normal, target compilers
4770 # for this, we can only do this after these have been setup.
4771 
4772 
4773 # Setup legacy variables that are still needed as alternative ways to refer to
4774 # parts of the toolchain.
4775 
4776 
4777 # Do some additional checks on the detected tools.
4778 
4779 
4780 # Setup the JTReg Regression Test Harness.
4781 
4782 
4783 #
4784 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4785 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4786 #
4787 # This code is free software; you can redistribute it and/or modify it
4788 # under the terms of the GNU General Public License version 2 only, as
4789 # published by the Free Software Foundation.  Oracle designates this
4790 # particular file as subject to the "Classpath" exception as provided
4791 # by Oracle in the LICENSE file that accompanied this code.
4792 #
4793 # This code is distributed in the hope that it will be useful, but WITHOUT
4794 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4795 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4796 # version 2 for more details (a copy is included in the LICENSE file that
4797 # accompanied this code).
4798 #
4799 # You should have received a copy of the GNU General Public License version
4800 # 2 along with this work; if not, write to the Free Software Foundation,
4801 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4802 #
4803 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4804 # or visit www.oracle.com if you need additional information or have any
4805 # questions.
4806 #
4807 
4808 ################################################################################
4809 # The order of these defines the priority by which we try to find them.
4810 VALID_VS_VERSIONS="2013 2012 2010"
4811 
4812 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4813 VS_VERSION_INTERNAL_2010=100
4814 VS_MSVCR_2010=msvcr100.dll
4815 # We don't use msvcp on Visual Studio 2010
4816 #VS_MSVCP_2010=msvcp100.dll
4817 VS_ENVVAR_2010="VS100COMNTOOLS"
4818 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4819 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4820 VS_VS_PLATFORM_NAME_2010="v100"
4821 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4822 
4823 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4824 VS_VERSION_INTERNAL_2012=110
4825 VS_MSVCR_2012=msvcr110.dll
4826 VS_MSVCP_2012=msvcp110.dll
4827 VS_ENVVAR_2012="VS110COMNTOOLS"
4828 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4829 VS_SDK_INSTALLDIR_2012=
4830 VS_VS_PLATFORM_NAME_2012="v110"
4831 VS_SDK_PLATFORM_NAME_2012=
4832 
4833 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4834 VS_VERSION_INTERNAL_2013=120
4835 VS_MSVCR_2013=msvcr120.dll
4836 VS_MSVCP_2013=msvcp120.dll
4837 VS_ENVVAR_2013="VS120COMNTOOLS"
4838 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4839 VS_SDK_INSTALLDIR_2013=
4840 VS_VS_PLATFORM_NAME_2013="v120"
4841 VS_SDK_PLATFORM_NAME_2013=
4842 
4843 ################################################################################
4844 
4845 
4846 
4847 ################################################################################
4848 
4849 
4850 
4851 ################################################################################
4852 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4853 # build environment and assigns it to VS_ENV_CMD
4854 
4855 
4856 ################################################################################
4857 
4858 
4859 
4860 ################################################################################
4861 # Check if the VS env variables were setup prior to running configure.
4862 # If not, then find vcvarsall.bat and run it automatically, and integrate
4863 # the set env variables into the spec file.
4864 
4865 
4866 
4867 
4868 
4869 
4870 
4871 
4872 
4873 
4874 
4875 
4876 
4877 
4878 # This line needs to be here, verbatim, after all includes and the dummy hook
4879 # definitions. It is replaced with custom functionality when building
4880 # custom sources.
4881 #CUSTOM_AUTOCONF_INCLUDE
4882 
4883 # Do not change or remove the following line, it is needed for consistency checks:
4884 DATE_WHEN_GENERATED=1457981787
4885 
4886 ###############################################################################
4887 #
4888 # Initialization / Boot-strapping
4889 #
4890 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4891 # thus it jumps back and forth, each time gaining something needed later on.
4892 #
4893 ###############################################################################
4894 
4895 # If we are requested to print additional help, do that and then exit.
4896 # This must be the very first call.
4897 
4898   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
4899 
4900     # Print available toolchains
4901     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4902     $PRINTF "Which are valid to use depends on the build platform.\n"
4903     for toolchain in $VALID_TOOLCHAINS_all; do
4904       # Use indirect variable referencing
4905       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4906       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4907       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4908     done
4909 
4910     # And now exit directly
4911     exit 0
4912   fi
4913 
4914 
4915 # Basic initialization that must happen first of all in the normal process.
4916 
4917   # Save the original command line. This is passed to us by the wrapper configure script.
4918 
4919   # Save the path variable before it gets changed
4920   ORIGINAL_PATH="$PATH"
4921 
4922   DATE_WHEN_CONFIGURED=`LANG=C date`
4923 
4924   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4925 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4926   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4927 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4928 
4929 
4930   # Start with tools that do not need have cross compilation support
4931   # and can be expected to be found in the default PATH. These tools are
4932   # used by configure.
4933 
4934   # First are all the simple required tools.
4935 
4936 
4937 
4938   # Publish this variable in the help.
4939 
4940 
4941   if [ -z "${BASENAME+x}" ]; then
4942     # The variable is not set by user, try to locate tool using the code snippet
4943     for ac_prog in basename
4944 do
4945   # Extract the first word of "$ac_prog", so it can be a program name with args.
4946 set dummy $ac_prog; ac_word=$2
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4948 $as_echo_n "checking for $ac_word... " >&6; }
4949 if ${ac_cv_path_BASENAME+:} false; then :
4950   $as_echo_n "(cached) " >&6
4951 else
4952   case $BASENAME in
4953   [\\/]* | ?:[\\/]*)
4954   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4955   ;;
4956   *)
4957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958 for as_dir in $PATH
4959 do
4960   IFS=$as_save_IFS
4961   test -z "$as_dir" && as_dir=.
4962     for ac_exec_ext in '' $ac_executable_extensions; do
4963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4964     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4966     break 2
4967   fi
4968 done
4969   done
4970 IFS=$as_save_IFS
4971 
4972   ;;
4973 esac
4974 fi
4975 BASENAME=$ac_cv_path_BASENAME
4976 if test -n "$BASENAME"; then
4977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4978 $as_echo "$BASENAME" >&6; }
4979 else
4980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4981 $as_echo "no" >&6; }
4982 fi
4983 
4984 
4985   test -n "$BASENAME" && break
4986 done
4987 
4988   else
4989     # The variable is set, but is it from the command line or the environment?
4990 
4991     # Try to remove the string !BASENAME! from our list.
4992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4994       # If it failed, the variable was not from the command line. Ignore it,
4995       # but warn the user (except for BASH, which is always set by the calling BASH).
4996       if test "xBASENAME" != xBASH; then
4997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4998 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4999       fi
5000       # Try to locate tool using the code snippet
5001       for ac_prog in basename
5002 do
5003   # Extract the first word of "$ac_prog", so it can be a program name with args.
5004 set dummy $ac_prog; ac_word=$2
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5006 $as_echo_n "checking for $ac_word... " >&6; }
5007 if ${ac_cv_path_BASENAME+:} false; then :
5008   $as_echo_n "(cached) " >&6
5009 else
5010   case $BASENAME in
5011   [\\/]* | ?:[\\/]*)
5012   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5013   ;;
5014   *)
5015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5016 for as_dir in $PATH
5017 do
5018   IFS=$as_save_IFS
5019   test -z "$as_dir" && as_dir=.
5020     for ac_exec_ext in '' $ac_executable_extensions; do
5021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5022     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5024     break 2
5025   fi
5026 done
5027   done
5028 IFS=$as_save_IFS
5029 
5030   ;;
5031 esac
5032 fi
5033 BASENAME=$ac_cv_path_BASENAME
5034 if test -n "$BASENAME"; then
5035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5036 $as_echo "$BASENAME" >&6; }
5037 else
5038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5039 $as_echo "no" >&6; }
5040 fi
5041 
5042 
5043   test -n "$BASENAME" && break
5044 done
5045 
5046     else
5047       # If it succeeded, then it was overridden by the user. We will use it
5048       # for the tool.
5049 
5050       # First remove it from the list of overridden variables, so we can test
5051       # for unknown variables in the end.
5052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5053 
5054       # Check if we try to supply an empty value
5055       if test "x$BASENAME" = x; then
5056         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5057 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5059 $as_echo_n "checking for BASENAME... " >&6; }
5060         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5061 $as_echo "disabled" >&6; }
5062       else
5063         # Check if the provided tool contains a complete path.
5064         tool_specified="$BASENAME"
5065         tool_basename="${tool_specified##*/}"
5066         if test "x$tool_basename" = "x$tool_specified"; then
5067           # A command without a complete path is provided, search $PATH.
5068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5069 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5070           # Extract the first word of "$tool_basename", so it can be a program name with args.
5071 set dummy $tool_basename; ac_word=$2
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073 $as_echo_n "checking for $ac_word... " >&6; }
5074 if ${ac_cv_path_BASENAME+:} false; then :
5075   $as_echo_n "(cached) " >&6
5076 else
5077   case $BASENAME in
5078   [\\/]* | ?:[\\/]*)
5079   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5080   ;;
5081   *)
5082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083 for as_dir in $PATH
5084 do
5085   IFS=$as_save_IFS
5086   test -z "$as_dir" && as_dir=.
5087     for ac_exec_ext in '' $ac_executable_extensions; do
5088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5089     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091     break 2
5092   fi
5093 done
5094   done
5095 IFS=$as_save_IFS
5096 
5097   ;;
5098 esac
5099 fi
5100 BASENAME=$ac_cv_path_BASENAME
5101 if test -n "$BASENAME"; then
5102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5103 $as_echo "$BASENAME" >&6; }
5104 else
5105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106 $as_echo "no" >&6; }
5107 fi
5108 
5109 
5110           if test "x$BASENAME" = x; then
5111             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5112           fi
5113         else
5114           # Otherwise we believe it is a complete path. Use it as it is.
5115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5116 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5117           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5118 $as_echo_n "checking for BASENAME... " >&6; }
5119           if test ! -x "$tool_specified"; then
5120             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5121 $as_echo "not found" >&6; }
5122             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5123           fi
5124           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5125 $as_echo "$tool_specified" >&6; }
5126         fi
5127       fi
5128     fi
5129 
5130   fi
5131 
5132 
5133 
5134   if test "x$BASENAME" = x; then
5135     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5136   fi
5137 
5138 
5139 
5140 
5141 
5142   # Publish this variable in the help.
5143 
5144 
5145   if [ -z "${BASH+x}" ]; then
5146     # The variable is not set by user, try to locate tool using the code snippet
5147     for ac_prog in bash
5148 do
5149   # Extract the first word of "$ac_prog", so it can be a program name with args.
5150 set dummy $ac_prog; ac_word=$2
5151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5152 $as_echo_n "checking for $ac_word... " >&6; }
5153 if ${ac_cv_path_BASH+:} false; then :
5154   $as_echo_n "(cached) " >&6
5155 else
5156   case $BASH in
5157   [\\/]* | ?:[\\/]*)
5158   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5159   ;;
5160   *)
5161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5162 for as_dir in $PATH
5163 do
5164   IFS=$as_save_IFS
5165   test -z "$as_dir" && as_dir=.
5166     for ac_exec_ext in '' $ac_executable_extensions; do
5167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5168     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5170     break 2
5171   fi
5172 done
5173   done
5174 IFS=$as_save_IFS
5175 
5176   ;;
5177 esac
5178 fi
5179 BASH=$ac_cv_path_BASH
5180 if test -n "$BASH"; then
5181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5182 $as_echo "$BASH" >&6; }
5183 else
5184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5185 $as_echo "no" >&6; }
5186 fi
5187 
5188 
5189   test -n "$BASH" && break
5190 done
5191 
5192   else
5193     # The variable is set, but is it from the command line or the environment?
5194 
5195     # Try to remove the string !BASH! from our list.
5196     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5197     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5198       # If it failed, the variable was not from the command line. Ignore it,
5199       # but warn the user (except for BASH, which is always set by the calling BASH).
5200       if test "xBASH" != xBASH; then
5201         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5202 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5203       fi
5204       # Try to locate tool using the code snippet
5205       for ac_prog in bash
5206 do
5207   # Extract the first word of "$ac_prog", so it can be a program name with args.
5208 set dummy $ac_prog; ac_word=$2
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5210 $as_echo_n "checking for $ac_word... " >&6; }
5211 if ${ac_cv_path_BASH+:} false; then :
5212   $as_echo_n "(cached) " >&6
5213 else
5214   case $BASH in
5215   [\\/]* | ?:[\\/]*)
5216   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5217   ;;
5218   *)
5219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5220 for as_dir in $PATH
5221 do
5222   IFS=$as_save_IFS
5223   test -z "$as_dir" && as_dir=.
5224     for ac_exec_ext in '' $ac_executable_extensions; do
5225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5226     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5228     break 2
5229   fi
5230 done
5231   done
5232 IFS=$as_save_IFS
5233 
5234   ;;
5235 esac
5236 fi
5237 BASH=$ac_cv_path_BASH
5238 if test -n "$BASH"; then
5239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5240 $as_echo "$BASH" >&6; }
5241 else
5242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243 $as_echo "no" >&6; }
5244 fi
5245 
5246 
5247   test -n "$BASH" && break
5248 done
5249 
5250     else
5251       # If it succeeded, then it was overridden by the user. We will use it
5252       # for the tool.
5253 
5254       # First remove it from the list of overridden variables, so we can test
5255       # for unknown variables in the end.
5256       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5257 
5258       # Check if we try to supply an empty value
5259       if test "x$BASH" = x; then
5260         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5261 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5262         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5263 $as_echo_n "checking for BASH... " >&6; }
5264         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5265 $as_echo "disabled" >&6; }
5266       else
5267         # Check if the provided tool contains a complete path.
5268         tool_specified="$BASH"
5269         tool_basename="${tool_specified##*/}"
5270         if test "x$tool_basename" = "x$tool_specified"; then
5271           # A command without a complete path is provided, search $PATH.
5272           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5273 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5274           # Extract the first word of "$tool_basename", so it can be a program name with args.
5275 set dummy $tool_basename; ac_word=$2
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5277 $as_echo_n "checking for $ac_word... " >&6; }
5278 if ${ac_cv_path_BASH+:} false; then :
5279   $as_echo_n "(cached) " >&6
5280 else
5281   case $BASH in
5282   [\\/]* | ?:[\\/]*)
5283   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5284   ;;
5285   *)
5286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5287 for as_dir in $PATH
5288 do
5289   IFS=$as_save_IFS
5290   test -z "$as_dir" && as_dir=.
5291     for ac_exec_ext in '' $ac_executable_extensions; do
5292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5293     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5295     break 2
5296   fi
5297 done
5298   done
5299 IFS=$as_save_IFS
5300 
5301   ;;
5302 esac
5303 fi
5304 BASH=$ac_cv_path_BASH
5305 if test -n "$BASH"; then
5306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5307 $as_echo "$BASH" >&6; }
5308 else
5309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310 $as_echo "no" >&6; }
5311 fi
5312 
5313 
5314           if test "x$BASH" = x; then
5315             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5316           fi
5317         else
5318           # Otherwise we believe it is a complete path. Use it as it is.
5319           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5320 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5321           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5322 $as_echo_n "checking for BASH... " >&6; }
5323           if test ! -x "$tool_specified"; then
5324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5325 $as_echo "not found" >&6; }
5326             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5327           fi
5328           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5329 $as_echo "$tool_specified" >&6; }
5330         fi
5331       fi
5332     fi
5333 
5334   fi
5335 
5336 
5337 
5338   if test "x$BASH" = x; then
5339     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5340   fi
5341 
5342 
5343 
5344 
5345 
5346   # Publish this variable in the help.
5347 
5348 
5349   if [ -z "${CAT+x}" ]; then
5350     # The variable is not set by user, try to locate tool using the code snippet
5351     for ac_prog in cat
5352 do
5353   # Extract the first word of "$ac_prog", so it can be a program name with args.
5354 set dummy $ac_prog; ac_word=$2
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5356 $as_echo_n "checking for $ac_word... " >&6; }
5357 if ${ac_cv_path_CAT+:} false; then :
5358   $as_echo_n "(cached) " >&6
5359 else
5360   case $CAT in
5361   [\\/]* | ?:[\\/]*)
5362   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5363   ;;
5364   *)
5365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5366 for as_dir in $PATH
5367 do
5368   IFS=$as_save_IFS
5369   test -z "$as_dir" && as_dir=.
5370     for ac_exec_ext in '' $ac_executable_extensions; do
5371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5372     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5374     break 2
5375   fi
5376 done
5377   done
5378 IFS=$as_save_IFS
5379 
5380   ;;
5381 esac
5382 fi
5383 CAT=$ac_cv_path_CAT
5384 if test -n "$CAT"; then
5385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5386 $as_echo "$CAT" >&6; }
5387 else
5388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5389 $as_echo "no" >&6; }
5390 fi
5391 
5392 
5393   test -n "$CAT" && break
5394 done
5395 
5396   else
5397     # The variable is set, but is it from the command line or the environment?
5398 
5399     # Try to remove the string !CAT! from our list.
5400     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5401     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5402       # If it failed, the variable was not from the command line. Ignore it,
5403       # but warn the user (except for BASH, which is always set by the calling BASH).
5404       if test "xCAT" != xBASH; then
5405         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5406 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5407       fi
5408       # Try to locate tool using the code snippet
5409       for ac_prog in cat
5410 do
5411   # Extract the first word of "$ac_prog", so it can be a program name with args.
5412 set dummy $ac_prog; ac_word=$2
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5414 $as_echo_n "checking for $ac_word... " >&6; }
5415 if ${ac_cv_path_CAT+:} false; then :
5416   $as_echo_n "(cached) " >&6
5417 else
5418   case $CAT in
5419   [\\/]* | ?:[\\/]*)
5420   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5421   ;;
5422   *)
5423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5424 for as_dir in $PATH
5425 do
5426   IFS=$as_save_IFS
5427   test -z "$as_dir" && as_dir=.
5428     for ac_exec_ext in '' $ac_executable_extensions; do
5429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5430     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5432     break 2
5433   fi
5434 done
5435   done
5436 IFS=$as_save_IFS
5437 
5438   ;;
5439 esac
5440 fi
5441 CAT=$ac_cv_path_CAT
5442 if test -n "$CAT"; then
5443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5444 $as_echo "$CAT" >&6; }
5445 else
5446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5447 $as_echo "no" >&6; }
5448 fi
5449 
5450 
5451   test -n "$CAT" && break
5452 done
5453 
5454     else
5455       # If it succeeded, then it was overridden by the user. We will use it
5456       # for the tool.
5457 
5458       # First remove it from the list of overridden variables, so we can test
5459       # for unknown variables in the end.
5460       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5461 
5462       # Check if we try to supply an empty value
5463       if test "x$CAT" = x; then
5464         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5465 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5466         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5467 $as_echo_n "checking for CAT... " >&6; }
5468         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5469 $as_echo "disabled" >&6; }
5470       else
5471         # Check if the provided tool contains a complete path.
5472         tool_specified="$CAT"
5473         tool_basename="${tool_specified##*/}"
5474         if test "x$tool_basename" = "x$tool_specified"; then
5475           # A command without a complete path is provided, search $PATH.
5476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5477 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5478           # Extract the first word of "$tool_basename", so it can be a program name with args.
5479 set dummy $tool_basename; ac_word=$2
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5481 $as_echo_n "checking for $ac_word... " >&6; }
5482 if ${ac_cv_path_CAT+:} false; then :
5483   $as_echo_n "(cached) " >&6
5484 else
5485   case $CAT in
5486   [\\/]* | ?:[\\/]*)
5487   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5488   ;;
5489   *)
5490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5491 for as_dir in $PATH
5492 do
5493   IFS=$as_save_IFS
5494   test -z "$as_dir" && as_dir=.
5495     for ac_exec_ext in '' $ac_executable_extensions; do
5496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5497     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5499     break 2
5500   fi
5501 done
5502   done
5503 IFS=$as_save_IFS
5504 
5505   ;;
5506 esac
5507 fi
5508 CAT=$ac_cv_path_CAT
5509 if test -n "$CAT"; then
5510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5511 $as_echo "$CAT" >&6; }
5512 else
5513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514 $as_echo "no" >&6; }
5515 fi
5516 
5517 
5518           if test "x$CAT" = x; then
5519             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5520           fi
5521         else
5522           # Otherwise we believe it is a complete path. Use it as it is.
5523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5524 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5525           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5526 $as_echo_n "checking for CAT... " >&6; }
5527           if test ! -x "$tool_specified"; then
5528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5529 $as_echo "not found" >&6; }
5530             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5531           fi
5532           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5533 $as_echo "$tool_specified" >&6; }
5534         fi
5535       fi
5536     fi
5537 
5538   fi
5539 
5540 
5541 
5542   if test "x$CAT" = x; then
5543     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5544   fi
5545 
5546 
5547 
5548 
5549 
5550   # Publish this variable in the help.
5551 
5552 
5553   if [ -z "${CHMOD+x}" ]; then
5554     # The variable is not set by user, try to locate tool using the code snippet
5555     for ac_prog in chmod
5556 do
5557   # Extract the first word of "$ac_prog", so it can be a program name with args.
5558 set dummy $ac_prog; ac_word=$2
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560 $as_echo_n "checking for $ac_word... " >&6; }
5561 if ${ac_cv_path_CHMOD+:} false; then :
5562   $as_echo_n "(cached) " >&6
5563 else
5564   case $CHMOD in
5565   [\\/]* | ?:[\\/]*)
5566   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5567   ;;
5568   *)
5569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5570 for as_dir in $PATH
5571 do
5572   IFS=$as_save_IFS
5573   test -z "$as_dir" && as_dir=.
5574     for ac_exec_ext in '' $ac_executable_extensions; do
5575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5576     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5578     break 2
5579   fi
5580 done
5581   done
5582 IFS=$as_save_IFS
5583 
5584   ;;
5585 esac
5586 fi
5587 CHMOD=$ac_cv_path_CHMOD
5588 if test -n "$CHMOD"; then
5589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5590 $as_echo "$CHMOD" >&6; }
5591 else
5592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593 $as_echo "no" >&6; }
5594 fi
5595 
5596 
5597   test -n "$CHMOD" && break
5598 done
5599 
5600   else
5601     # The variable is set, but is it from the command line or the environment?
5602 
5603     # Try to remove the string !CHMOD! from our list.
5604     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5605     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5606       # If it failed, the variable was not from the command line. Ignore it,
5607       # but warn the user (except for BASH, which is always set by the calling BASH).
5608       if test "xCHMOD" != xBASH; then
5609         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5610 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5611       fi
5612       # Try to locate tool using the code snippet
5613       for ac_prog in chmod
5614 do
5615   # Extract the first word of "$ac_prog", so it can be a program name with args.
5616 set dummy $ac_prog; ac_word=$2
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618 $as_echo_n "checking for $ac_word... " >&6; }
5619 if ${ac_cv_path_CHMOD+:} false; then :
5620   $as_echo_n "(cached) " >&6
5621 else
5622   case $CHMOD in
5623   [\\/]* | ?:[\\/]*)
5624   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5625   ;;
5626   *)
5627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628 for as_dir in $PATH
5629 do
5630   IFS=$as_save_IFS
5631   test -z "$as_dir" && as_dir=.
5632     for ac_exec_ext in '' $ac_executable_extensions; do
5633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636     break 2
5637   fi
5638 done
5639   done
5640 IFS=$as_save_IFS
5641 
5642   ;;
5643 esac
5644 fi
5645 CHMOD=$ac_cv_path_CHMOD
5646 if test -n "$CHMOD"; then
5647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5648 $as_echo "$CHMOD" >&6; }
5649 else
5650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651 $as_echo "no" >&6; }
5652 fi
5653 
5654 
5655   test -n "$CHMOD" && break
5656 done
5657 
5658     else
5659       # If it succeeded, then it was overridden by the user. We will use it
5660       # for the tool.
5661 
5662       # First remove it from the list of overridden variables, so we can test
5663       # for unknown variables in the end.
5664       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5665 
5666       # Check if we try to supply an empty value
5667       if test "x$CHMOD" = x; then
5668         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5669 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5670         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5671 $as_echo_n "checking for CHMOD... " >&6; }
5672         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5673 $as_echo "disabled" >&6; }
5674       else
5675         # Check if the provided tool contains a complete path.
5676         tool_specified="$CHMOD"
5677         tool_basename="${tool_specified##*/}"
5678         if test "x$tool_basename" = "x$tool_specified"; then
5679           # A command without a complete path is provided, search $PATH.
5680           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5681 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5682           # Extract the first word of "$tool_basename", so it can be a program name with args.
5683 set dummy $tool_basename; ac_word=$2
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5685 $as_echo_n "checking for $ac_word... " >&6; }
5686 if ${ac_cv_path_CHMOD+:} false; then :
5687   $as_echo_n "(cached) " >&6
5688 else
5689   case $CHMOD in
5690   [\\/]* | ?:[\\/]*)
5691   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5692   ;;
5693   *)
5694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5695 for as_dir in $PATH
5696 do
5697   IFS=$as_save_IFS
5698   test -z "$as_dir" && as_dir=.
5699     for ac_exec_ext in '' $ac_executable_extensions; do
5700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5701     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703     break 2
5704   fi
5705 done
5706   done
5707 IFS=$as_save_IFS
5708 
5709   ;;
5710 esac
5711 fi
5712 CHMOD=$ac_cv_path_CHMOD
5713 if test -n "$CHMOD"; then
5714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5715 $as_echo "$CHMOD" >&6; }
5716 else
5717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718 $as_echo "no" >&6; }
5719 fi
5720 
5721 
5722           if test "x$CHMOD" = x; then
5723             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5724           fi
5725         else
5726           # Otherwise we believe it is a complete path. Use it as it is.
5727           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5728 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5729           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5730 $as_echo_n "checking for CHMOD... " >&6; }
5731           if test ! -x "$tool_specified"; then
5732             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5733 $as_echo "not found" >&6; }
5734             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5735           fi
5736           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5737 $as_echo "$tool_specified" >&6; }
5738         fi
5739       fi
5740     fi
5741 
5742   fi
5743 
5744 
5745 
5746   if test "x$CHMOD" = x; then
5747     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5748   fi
5749 
5750 
5751 
5752 
5753 
5754   # Publish this variable in the help.
5755 
5756 
5757   if [ -z "${CMP+x}" ]; then
5758     # The variable is not set by user, try to locate tool using the code snippet
5759     for ac_prog in cmp
5760 do
5761   # Extract the first word of "$ac_prog", so it can be a program name with args.
5762 set dummy $ac_prog; ac_word=$2
5763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5764 $as_echo_n "checking for $ac_word... " >&6; }
5765 if ${ac_cv_path_CMP+:} false; then :
5766   $as_echo_n "(cached) " >&6
5767 else
5768   case $CMP in
5769   [\\/]* | ?:[\\/]*)
5770   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5771   ;;
5772   *)
5773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774 for as_dir in $PATH
5775 do
5776   IFS=$as_save_IFS
5777   test -z "$as_dir" && as_dir=.
5778     for ac_exec_ext in '' $ac_executable_extensions; do
5779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5780     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5782     break 2
5783   fi
5784 done
5785   done
5786 IFS=$as_save_IFS
5787 
5788   ;;
5789 esac
5790 fi
5791 CMP=$ac_cv_path_CMP
5792 if test -n "$CMP"; then
5793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5794 $as_echo "$CMP" >&6; }
5795 else
5796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797 $as_echo "no" >&6; }
5798 fi
5799 
5800 
5801   test -n "$CMP" && break
5802 done
5803 
5804   else
5805     # The variable is set, but is it from the command line or the environment?
5806 
5807     # Try to remove the string !CMP! from our list.
5808     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5809     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5810       # If it failed, the variable was not from the command line. Ignore it,
5811       # but warn the user (except for BASH, which is always set by the calling BASH).
5812       if test "xCMP" != xBASH; then
5813         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5814 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5815       fi
5816       # Try to locate tool using the code snippet
5817       for ac_prog in cmp
5818 do
5819   # Extract the first word of "$ac_prog", so it can be a program name with args.
5820 set dummy $ac_prog; ac_word=$2
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822 $as_echo_n "checking for $ac_word... " >&6; }
5823 if ${ac_cv_path_CMP+:} false; then :
5824   $as_echo_n "(cached) " >&6
5825 else
5826   case $CMP in
5827   [\\/]* | ?:[\\/]*)
5828   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5829   ;;
5830   *)
5831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832 for as_dir in $PATH
5833 do
5834   IFS=$as_save_IFS
5835   test -z "$as_dir" && as_dir=.
5836     for ac_exec_ext in '' $ac_executable_extensions; do
5837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5838     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5840     break 2
5841   fi
5842 done
5843   done
5844 IFS=$as_save_IFS
5845 
5846   ;;
5847 esac
5848 fi
5849 CMP=$ac_cv_path_CMP
5850 if test -n "$CMP"; then
5851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5852 $as_echo "$CMP" >&6; }
5853 else
5854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855 $as_echo "no" >&6; }
5856 fi
5857 
5858 
5859   test -n "$CMP" && break
5860 done
5861 
5862     else
5863       # If it succeeded, then it was overridden by the user. We will use it
5864       # for the tool.
5865 
5866       # First remove it from the list of overridden variables, so we can test
5867       # for unknown variables in the end.
5868       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5869 
5870       # Check if we try to supply an empty value
5871       if test "x$CMP" = x; then
5872         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5873 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5874         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5875 $as_echo_n "checking for CMP... " >&6; }
5876         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5877 $as_echo "disabled" >&6; }
5878       else
5879         # Check if the provided tool contains a complete path.
5880         tool_specified="$CMP"
5881         tool_basename="${tool_specified##*/}"
5882         if test "x$tool_basename" = "x$tool_specified"; then
5883           # A command without a complete path is provided, search $PATH.
5884           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5885 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5886           # Extract the first word of "$tool_basename", so it can be a program name with args.
5887 set dummy $tool_basename; ac_word=$2
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5889 $as_echo_n "checking for $ac_word... " >&6; }
5890 if ${ac_cv_path_CMP+:} false; then :
5891   $as_echo_n "(cached) " >&6
5892 else
5893   case $CMP in
5894   [\\/]* | ?:[\\/]*)
5895   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5896   ;;
5897   *)
5898   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899 for as_dir in $PATH
5900 do
5901   IFS=$as_save_IFS
5902   test -z "$as_dir" && as_dir=.
5903     for ac_exec_ext in '' $ac_executable_extensions; do
5904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5905     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5907     break 2
5908   fi
5909 done
5910   done
5911 IFS=$as_save_IFS
5912 
5913   ;;
5914 esac
5915 fi
5916 CMP=$ac_cv_path_CMP
5917 if test -n "$CMP"; then
5918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5919 $as_echo "$CMP" >&6; }
5920 else
5921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5922 $as_echo "no" >&6; }
5923 fi
5924 
5925 
5926           if test "x$CMP" = x; then
5927             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5928           fi
5929         else
5930           # Otherwise we believe it is a complete path. Use it as it is.
5931           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5932 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5933           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5934 $as_echo_n "checking for CMP... " >&6; }
5935           if test ! -x "$tool_specified"; then
5936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5937 $as_echo "not found" >&6; }
5938             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5939           fi
5940           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5941 $as_echo "$tool_specified" >&6; }
5942         fi
5943       fi
5944     fi
5945 
5946   fi
5947 
5948 
5949 
5950   if test "x$CMP" = x; then
5951     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5952   fi
5953 
5954 
5955 
5956 
5957 
5958   # Publish this variable in the help.
5959 
5960 
5961   if [ -z "${COMM+x}" ]; then
5962     # The variable is not set by user, try to locate tool using the code snippet
5963     for ac_prog in comm
5964 do
5965   # Extract the first word of "$ac_prog", so it can be a program name with args.
5966 set dummy $ac_prog; ac_word=$2
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968 $as_echo_n "checking for $ac_word... " >&6; }
5969 if ${ac_cv_path_COMM+:} false; then :
5970   $as_echo_n "(cached) " >&6
5971 else
5972   case $COMM in
5973   [\\/]* | ?:[\\/]*)
5974   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5975   ;;
5976   *)
5977   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5978 for as_dir in $PATH
5979 do
5980   IFS=$as_save_IFS
5981   test -z "$as_dir" && as_dir=.
5982     for ac_exec_ext in '' $ac_executable_extensions; do
5983   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5984     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5985     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5986     break 2
5987   fi
5988 done
5989   done
5990 IFS=$as_save_IFS
5991 
5992   ;;
5993 esac
5994 fi
5995 COMM=$ac_cv_path_COMM
5996 if test -n "$COMM"; then
5997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5998 $as_echo "$COMM" >&6; }
5999 else
6000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6001 $as_echo "no" >&6; }
6002 fi
6003 
6004 
6005   test -n "$COMM" && break
6006 done
6007 
6008   else
6009     # The variable is set, but is it from the command line or the environment?
6010 
6011     # Try to remove the string !COMM! from our list.
6012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6014       # If it failed, the variable was not from the command line. Ignore it,
6015       # but warn the user (except for BASH, which is always set by the calling BASH).
6016       if test "xCOMM" != xBASH; then
6017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6018 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6019       fi
6020       # Try to locate tool using the code snippet
6021       for ac_prog in comm
6022 do
6023   # Extract the first word of "$ac_prog", so it can be a program name with args.
6024 set dummy $ac_prog; ac_word=$2
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026 $as_echo_n "checking for $ac_word... " >&6; }
6027 if ${ac_cv_path_COMM+:} false; then :
6028   $as_echo_n "(cached) " >&6
6029 else
6030   case $COMM in
6031   [\\/]* | ?:[\\/]*)
6032   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6033   ;;
6034   *)
6035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036 for as_dir in $PATH
6037 do
6038   IFS=$as_save_IFS
6039   test -z "$as_dir" && as_dir=.
6040     for ac_exec_ext in '' $ac_executable_extensions; do
6041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6042     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6044     break 2
6045   fi
6046 done
6047   done
6048 IFS=$as_save_IFS
6049 
6050   ;;
6051 esac
6052 fi
6053 COMM=$ac_cv_path_COMM
6054 if test -n "$COMM"; then
6055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6056 $as_echo "$COMM" >&6; }
6057 else
6058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059 $as_echo "no" >&6; }
6060 fi
6061 
6062 
6063   test -n "$COMM" && break
6064 done
6065 
6066     else
6067       # If it succeeded, then it was overridden by the user. We will use it
6068       # for the tool.
6069 
6070       # First remove it from the list of overridden variables, so we can test
6071       # for unknown variables in the end.
6072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6073 
6074       # Check if we try to supply an empty value
6075       if test "x$COMM" = x; then
6076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6077 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6079 $as_echo_n "checking for COMM... " >&6; }
6080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6081 $as_echo "disabled" >&6; }
6082       else
6083         # Check if the provided tool contains a complete path.
6084         tool_specified="$COMM"
6085         tool_basename="${tool_specified##*/}"
6086         if test "x$tool_basename" = "x$tool_specified"; then
6087           # A command without a complete path is provided, search $PATH.
6088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6089 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6090           # Extract the first word of "$tool_basename", so it can be a program name with args.
6091 set dummy $tool_basename; ac_word=$2
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6093 $as_echo_n "checking for $ac_word... " >&6; }
6094 if ${ac_cv_path_COMM+:} false; then :
6095   $as_echo_n "(cached) " >&6
6096 else
6097   case $COMM in
6098   [\\/]* | ?:[\\/]*)
6099   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6100   ;;
6101   *)
6102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6103 for as_dir in $PATH
6104 do
6105   IFS=$as_save_IFS
6106   test -z "$as_dir" && as_dir=.
6107     for ac_exec_ext in '' $ac_executable_extensions; do
6108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6109     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6111     break 2
6112   fi
6113 done
6114   done
6115 IFS=$as_save_IFS
6116 
6117   ;;
6118 esac
6119 fi
6120 COMM=$ac_cv_path_COMM
6121 if test -n "$COMM"; then
6122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6123 $as_echo "$COMM" >&6; }
6124 else
6125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126 $as_echo "no" >&6; }
6127 fi
6128 
6129 
6130           if test "x$COMM" = x; then
6131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6132           fi
6133         else
6134           # Otherwise we believe it is a complete path. Use it as it is.
6135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6136 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6138 $as_echo_n "checking for COMM... " >&6; }
6139           if test ! -x "$tool_specified"; then
6140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6141 $as_echo "not found" >&6; }
6142             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6143           fi
6144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6145 $as_echo "$tool_specified" >&6; }
6146         fi
6147       fi
6148     fi
6149 
6150   fi
6151 
6152 
6153 
6154   if test "x$COMM" = x; then
6155     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6156   fi
6157 
6158 
6159 
6160 
6161 
6162   # Publish this variable in the help.
6163 
6164 
6165   if [ -z "${CP+x}" ]; then
6166     # The variable is not set by user, try to locate tool using the code snippet
6167     for ac_prog in cp
6168 do
6169   # Extract the first word of "$ac_prog", so it can be a program name with args.
6170 set dummy $ac_prog; ac_word=$2
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172 $as_echo_n "checking for $ac_word... " >&6; }
6173 if ${ac_cv_path_CP+:} false; then :
6174   $as_echo_n "(cached) " >&6
6175 else
6176   case $CP in
6177   [\\/]* | ?:[\\/]*)
6178   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6179   ;;
6180   *)
6181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182 for as_dir in $PATH
6183 do
6184   IFS=$as_save_IFS
6185   test -z "$as_dir" && as_dir=.
6186     for ac_exec_ext in '' $ac_executable_extensions; do
6187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6188     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6190     break 2
6191   fi
6192 done
6193   done
6194 IFS=$as_save_IFS
6195 
6196   ;;
6197 esac
6198 fi
6199 CP=$ac_cv_path_CP
6200 if test -n "$CP"; then
6201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6202 $as_echo "$CP" >&6; }
6203 else
6204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205 $as_echo "no" >&6; }
6206 fi
6207 
6208 
6209   test -n "$CP" && break
6210 done
6211 
6212   else
6213     # The variable is set, but is it from the command line or the environment?
6214 
6215     # Try to remove the string !CP! from our list.
6216     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6217     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6218       # If it failed, the variable was not from the command line. Ignore it,
6219       # but warn the user (except for BASH, which is always set by the calling BASH).
6220       if test "xCP" != xBASH; then
6221         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6222 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6223       fi
6224       # Try to locate tool using the code snippet
6225       for ac_prog in cp
6226 do
6227   # Extract the first word of "$ac_prog", so it can be a program name with args.
6228 set dummy $ac_prog; ac_word=$2
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230 $as_echo_n "checking for $ac_word... " >&6; }
6231 if ${ac_cv_path_CP+:} false; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234   case $CP in
6235   [\\/]* | ?:[\\/]*)
6236   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6237   ;;
6238   *)
6239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240 for as_dir in $PATH
6241 do
6242   IFS=$as_save_IFS
6243   test -z "$as_dir" && as_dir=.
6244     for ac_exec_ext in '' $ac_executable_extensions; do
6245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6246     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248     break 2
6249   fi
6250 done
6251   done
6252 IFS=$as_save_IFS
6253 
6254   ;;
6255 esac
6256 fi
6257 CP=$ac_cv_path_CP
6258 if test -n "$CP"; then
6259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6260 $as_echo "$CP" >&6; }
6261 else
6262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263 $as_echo "no" >&6; }
6264 fi
6265 
6266 
6267   test -n "$CP" && break
6268 done
6269 
6270     else
6271       # If it succeeded, then it was overridden by the user. We will use it
6272       # for the tool.
6273 
6274       # First remove it from the list of overridden variables, so we can test
6275       # for unknown variables in the end.
6276       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6277 
6278       # Check if we try to supply an empty value
6279       if test "x$CP" = x; then
6280         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6281 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6282         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6283 $as_echo_n "checking for CP... " >&6; }
6284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6285 $as_echo "disabled" >&6; }
6286       else
6287         # Check if the provided tool contains a complete path.
6288         tool_specified="$CP"
6289         tool_basename="${tool_specified##*/}"
6290         if test "x$tool_basename" = "x$tool_specified"; then
6291           # A command without a complete path is provided, search $PATH.
6292           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6293 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6294           # Extract the first word of "$tool_basename", so it can be a program name with args.
6295 set dummy $tool_basename; ac_word=$2
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6297 $as_echo_n "checking for $ac_word... " >&6; }
6298 if ${ac_cv_path_CP+:} false; then :
6299   $as_echo_n "(cached) " >&6
6300 else
6301   case $CP in
6302   [\\/]* | ?:[\\/]*)
6303   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6304   ;;
6305   *)
6306   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6307 for as_dir in $PATH
6308 do
6309   IFS=$as_save_IFS
6310   test -z "$as_dir" && as_dir=.
6311     for ac_exec_ext in '' $ac_executable_extensions; do
6312   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6313     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6314     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6315     break 2
6316   fi
6317 done
6318   done
6319 IFS=$as_save_IFS
6320 
6321   ;;
6322 esac
6323 fi
6324 CP=$ac_cv_path_CP
6325 if test -n "$CP"; then
6326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6327 $as_echo "$CP" >&6; }
6328 else
6329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330 $as_echo "no" >&6; }
6331 fi
6332 
6333 
6334           if test "x$CP" = x; then
6335             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6336           fi
6337         else
6338           # Otherwise we believe it is a complete path. Use it as it is.
6339           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6340 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6341           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6342 $as_echo_n "checking for CP... " >&6; }
6343           if test ! -x "$tool_specified"; then
6344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6345 $as_echo "not found" >&6; }
6346             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6347           fi
6348           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6349 $as_echo "$tool_specified" >&6; }
6350         fi
6351       fi
6352     fi
6353 
6354   fi
6355 
6356 
6357 
6358   if test "x$CP" = x; then
6359     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6360   fi
6361 
6362 
6363 
6364 
6365 
6366   # Publish this variable in the help.
6367 
6368 
6369   if [ -z "${CUT+x}" ]; then
6370     # The variable is not set by user, try to locate tool using the code snippet
6371     for ac_prog in cut
6372 do
6373   # Extract the first word of "$ac_prog", so it can be a program name with args.
6374 set dummy $ac_prog; ac_word=$2
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6376 $as_echo_n "checking for $ac_word... " >&6; }
6377 if ${ac_cv_path_CUT+:} false; then :
6378   $as_echo_n "(cached) " >&6
6379 else
6380   case $CUT in
6381   [\\/]* | ?:[\\/]*)
6382   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6383   ;;
6384   *)
6385   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6386 for as_dir in $PATH
6387 do
6388   IFS=$as_save_IFS
6389   test -z "$as_dir" && as_dir=.
6390     for ac_exec_ext in '' $ac_executable_extensions; do
6391   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6392     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6393     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6394     break 2
6395   fi
6396 done
6397   done
6398 IFS=$as_save_IFS
6399 
6400   ;;
6401 esac
6402 fi
6403 CUT=$ac_cv_path_CUT
6404 if test -n "$CUT"; then
6405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6406 $as_echo "$CUT" >&6; }
6407 else
6408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409 $as_echo "no" >&6; }
6410 fi
6411 
6412 
6413   test -n "$CUT" && break
6414 done
6415 
6416   else
6417     # The variable is set, but is it from the command line or the environment?
6418 
6419     # Try to remove the string !CUT! from our list.
6420     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6421     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6422       # If it failed, the variable was not from the command line. Ignore it,
6423       # but warn the user (except for BASH, which is always set by the calling BASH).
6424       if test "xCUT" != xBASH; then
6425         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6426 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6427       fi
6428       # Try to locate tool using the code snippet
6429       for ac_prog in cut
6430 do
6431   # Extract the first word of "$ac_prog", so it can be a program name with args.
6432 set dummy $ac_prog; ac_word=$2
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434 $as_echo_n "checking for $ac_word... " >&6; }
6435 if ${ac_cv_path_CUT+:} false; then :
6436   $as_echo_n "(cached) " >&6
6437 else
6438   case $CUT in
6439   [\\/]* | ?:[\\/]*)
6440   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6441   ;;
6442   *)
6443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6444 for as_dir in $PATH
6445 do
6446   IFS=$as_save_IFS
6447   test -z "$as_dir" && as_dir=.
6448     for ac_exec_ext in '' $ac_executable_extensions; do
6449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6450     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6452     break 2
6453   fi
6454 done
6455   done
6456 IFS=$as_save_IFS
6457 
6458   ;;
6459 esac
6460 fi
6461 CUT=$ac_cv_path_CUT
6462 if test -n "$CUT"; then
6463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6464 $as_echo "$CUT" >&6; }
6465 else
6466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6467 $as_echo "no" >&6; }
6468 fi
6469 
6470 
6471   test -n "$CUT" && break
6472 done
6473 
6474     else
6475       # If it succeeded, then it was overridden by the user. We will use it
6476       # for the tool.
6477 
6478       # First remove it from the list of overridden variables, so we can test
6479       # for unknown variables in the end.
6480       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6481 
6482       # Check if we try to supply an empty value
6483       if test "x$CUT" = x; then
6484         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6485 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6486         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6487 $as_echo_n "checking for CUT... " >&6; }
6488         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6489 $as_echo "disabled" >&6; }
6490       else
6491         # Check if the provided tool contains a complete path.
6492         tool_specified="$CUT"
6493         tool_basename="${tool_specified##*/}"
6494         if test "x$tool_basename" = "x$tool_specified"; then
6495           # A command without a complete path is provided, search $PATH.
6496           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6497 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6498           # Extract the first word of "$tool_basename", so it can be a program name with args.
6499 set dummy $tool_basename; ac_word=$2
6500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6501 $as_echo_n "checking for $ac_word... " >&6; }
6502 if ${ac_cv_path_CUT+:} false; then :
6503   $as_echo_n "(cached) " >&6
6504 else
6505   case $CUT in
6506   [\\/]* | ?:[\\/]*)
6507   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6508   ;;
6509   *)
6510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6511 for as_dir in $PATH
6512 do
6513   IFS=$as_save_IFS
6514   test -z "$as_dir" && as_dir=.
6515     for ac_exec_ext in '' $ac_executable_extensions; do
6516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6517     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6519     break 2
6520   fi
6521 done
6522   done
6523 IFS=$as_save_IFS
6524 
6525   ;;
6526 esac
6527 fi
6528 CUT=$ac_cv_path_CUT
6529 if test -n "$CUT"; then
6530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6531 $as_echo "$CUT" >&6; }
6532 else
6533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534 $as_echo "no" >&6; }
6535 fi
6536 
6537 
6538           if test "x$CUT" = x; then
6539             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6540           fi
6541         else
6542           # Otherwise we believe it is a complete path. Use it as it is.
6543           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6544 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6545           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6546 $as_echo_n "checking for CUT... " >&6; }
6547           if test ! -x "$tool_specified"; then
6548             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6549 $as_echo "not found" >&6; }
6550             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6551           fi
6552           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6553 $as_echo "$tool_specified" >&6; }
6554         fi
6555       fi
6556     fi
6557 
6558   fi
6559 
6560 
6561 
6562   if test "x$CUT" = x; then
6563     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6564   fi
6565 
6566 
6567 
6568 
6569 
6570   # Publish this variable in the help.
6571 
6572 
6573   if [ -z "${DATE+x}" ]; then
6574     # The variable is not set by user, try to locate tool using the code snippet
6575     for ac_prog in date
6576 do
6577   # Extract the first word of "$ac_prog", so it can be a program name with args.
6578 set dummy $ac_prog; ac_word=$2
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6580 $as_echo_n "checking for $ac_word... " >&6; }
6581 if ${ac_cv_path_DATE+:} false; then :
6582   $as_echo_n "(cached) " >&6
6583 else
6584   case $DATE in
6585   [\\/]* | ?:[\\/]*)
6586   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6587   ;;
6588   *)
6589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6590 for as_dir in $PATH
6591 do
6592   IFS=$as_save_IFS
6593   test -z "$as_dir" && as_dir=.
6594     for ac_exec_ext in '' $ac_executable_extensions; do
6595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6596     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6598     break 2
6599   fi
6600 done
6601   done
6602 IFS=$as_save_IFS
6603 
6604   ;;
6605 esac
6606 fi
6607 DATE=$ac_cv_path_DATE
6608 if test -n "$DATE"; then
6609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6610 $as_echo "$DATE" >&6; }
6611 else
6612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613 $as_echo "no" >&6; }
6614 fi
6615 
6616 
6617   test -n "$DATE" && break
6618 done
6619 
6620   else
6621     # The variable is set, but is it from the command line or the environment?
6622 
6623     # Try to remove the string !DATE! from our list.
6624     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6625     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6626       # If it failed, the variable was not from the command line. Ignore it,
6627       # but warn the user (except for BASH, which is always set by the calling BASH).
6628       if test "xDATE" != xBASH; then
6629         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6630 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6631       fi
6632       # Try to locate tool using the code snippet
6633       for ac_prog in date
6634 do
6635   # Extract the first word of "$ac_prog", so it can be a program name with args.
6636 set dummy $ac_prog; ac_word=$2
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6638 $as_echo_n "checking for $ac_word... " >&6; }
6639 if ${ac_cv_path_DATE+:} false; then :
6640   $as_echo_n "(cached) " >&6
6641 else
6642   case $DATE in
6643   [\\/]* | ?:[\\/]*)
6644   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6645   ;;
6646   *)
6647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6648 for as_dir in $PATH
6649 do
6650   IFS=$as_save_IFS
6651   test -z "$as_dir" && as_dir=.
6652     for ac_exec_ext in '' $ac_executable_extensions; do
6653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6654     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6656     break 2
6657   fi
6658 done
6659   done
6660 IFS=$as_save_IFS
6661 
6662   ;;
6663 esac
6664 fi
6665 DATE=$ac_cv_path_DATE
6666 if test -n "$DATE"; then
6667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6668 $as_echo "$DATE" >&6; }
6669 else
6670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671 $as_echo "no" >&6; }
6672 fi
6673 
6674 
6675   test -n "$DATE" && break
6676 done
6677 
6678     else
6679       # If it succeeded, then it was overridden by the user. We will use it
6680       # for the tool.
6681 
6682       # First remove it from the list of overridden variables, so we can test
6683       # for unknown variables in the end.
6684       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6685 
6686       # Check if we try to supply an empty value
6687       if test "x$DATE" = x; then
6688         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6689 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6690         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6691 $as_echo_n "checking for DATE... " >&6; }
6692         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6693 $as_echo "disabled" >&6; }
6694       else
6695         # Check if the provided tool contains a complete path.
6696         tool_specified="$DATE"
6697         tool_basename="${tool_specified##*/}"
6698         if test "x$tool_basename" = "x$tool_specified"; then
6699           # A command without a complete path is provided, search $PATH.
6700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6701 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6702           # Extract the first word of "$tool_basename", so it can be a program name with args.
6703 set dummy $tool_basename; ac_word=$2
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6705 $as_echo_n "checking for $ac_word... " >&6; }
6706 if ${ac_cv_path_DATE+:} false; then :
6707   $as_echo_n "(cached) " >&6
6708 else
6709   case $DATE in
6710   [\\/]* | ?:[\\/]*)
6711   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6712   ;;
6713   *)
6714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6715 for as_dir in $PATH
6716 do
6717   IFS=$as_save_IFS
6718   test -z "$as_dir" && as_dir=.
6719     for ac_exec_ext in '' $ac_executable_extensions; do
6720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6721     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6723     break 2
6724   fi
6725 done
6726   done
6727 IFS=$as_save_IFS
6728 
6729   ;;
6730 esac
6731 fi
6732 DATE=$ac_cv_path_DATE
6733 if test -n "$DATE"; then
6734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6735 $as_echo "$DATE" >&6; }
6736 else
6737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738 $as_echo "no" >&6; }
6739 fi
6740 
6741 
6742           if test "x$DATE" = x; then
6743             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6744           fi
6745         else
6746           # Otherwise we believe it is a complete path. Use it as it is.
6747           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6748 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6749           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6750 $as_echo_n "checking for DATE... " >&6; }
6751           if test ! -x "$tool_specified"; then
6752             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6753 $as_echo "not found" >&6; }
6754             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6755           fi
6756           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6757 $as_echo "$tool_specified" >&6; }
6758         fi
6759       fi
6760     fi
6761 
6762   fi
6763 
6764 
6765 
6766   if test "x$DATE" = x; then
6767     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6768   fi
6769 
6770 
6771 
6772 
6773 
6774   # Publish this variable in the help.
6775 
6776 
6777   if [ -z "${DIFF+x}" ]; then
6778     # The variable is not set by user, try to locate tool using the code snippet
6779     for ac_prog in gdiff diff
6780 do
6781   # Extract the first word of "$ac_prog", so it can be a program name with args.
6782 set dummy $ac_prog; ac_word=$2
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6784 $as_echo_n "checking for $ac_word... " >&6; }
6785 if ${ac_cv_path_DIFF+:} false; then :
6786   $as_echo_n "(cached) " >&6
6787 else
6788   case $DIFF in
6789   [\\/]* | ?:[\\/]*)
6790   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6791   ;;
6792   *)
6793   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6794 for as_dir in $PATH
6795 do
6796   IFS=$as_save_IFS
6797   test -z "$as_dir" && as_dir=.
6798     for ac_exec_ext in '' $ac_executable_extensions; do
6799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6800     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6801     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6802     break 2
6803   fi
6804 done
6805   done
6806 IFS=$as_save_IFS
6807 
6808   ;;
6809 esac
6810 fi
6811 DIFF=$ac_cv_path_DIFF
6812 if test -n "$DIFF"; then
6813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6814 $as_echo "$DIFF" >&6; }
6815 else
6816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6817 $as_echo "no" >&6; }
6818 fi
6819 
6820 
6821   test -n "$DIFF" && break
6822 done
6823 
6824   else
6825     # The variable is set, but is it from the command line or the environment?
6826 
6827     # Try to remove the string !DIFF! from our list.
6828     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6829     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6830       # If it failed, the variable was not from the command line. Ignore it,
6831       # but warn the user (except for BASH, which is always set by the calling BASH).
6832       if test "xDIFF" != xBASH; then
6833         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6834 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6835       fi
6836       # Try to locate tool using the code snippet
6837       for ac_prog in gdiff diff
6838 do
6839   # Extract the first word of "$ac_prog", so it can be a program name with args.
6840 set dummy $ac_prog; ac_word=$2
6841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6842 $as_echo_n "checking for $ac_word... " >&6; }
6843 if ${ac_cv_path_DIFF+:} false; then :
6844   $as_echo_n "(cached) " >&6
6845 else
6846   case $DIFF in
6847   [\\/]* | ?:[\\/]*)
6848   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6849   ;;
6850   *)
6851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6852 for as_dir in $PATH
6853 do
6854   IFS=$as_save_IFS
6855   test -z "$as_dir" && as_dir=.
6856     for ac_exec_ext in '' $ac_executable_extensions; do
6857   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6858     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6859     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6860     break 2
6861   fi
6862 done
6863   done
6864 IFS=$as_save_IFS
6865 
6866   ;;
6867 esac
6868 fi
6869 DIFF=$ac_cv_path_DIFF
6870 if test -n "$DIFF"; then
6871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6872 $as_echo "$DIFF" >&6; }
6873 else
6874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875 $as_echo "no" >&6; }
6876 fi
6877 
6878 
6879   test -n "$DIFF" && break
6880 done
6881 
6882     else
6883       # If it succeeded, then it was overridden by the user. We will use it
6884       # for the tool.
6885 
6886       # First remove it from the list of overridden variables, so we can test
6887       # for unknown variables in the end.
6888       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6889 
6890       # Check if we try to supply an empty value
6891       if test "x$DIFF" = x; then
6892         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6893 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6894         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6895 $as_echo_n "checking for DIFF... " >&6; }
6896         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6897 $as_echo "disabled" >&6; }
6898       else
6899         # Check if the provided tool contains a complete path.
6900         tool_specified="$DIFF"
6901         tool_basename="${tool_specified##*/}"
6902         if test "x$tool_basename" = "x$tool_specified"; then
6903           # A command without a complete path is provided, search $PATH.
6904           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6905 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6906           # Extract the first word of "$tool_basename", so it can be a program name with args.
6907 set dummy $tool_basename; ac_word=$2
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6909 $as_echo_n "checking for $ac_word... " >&6; }
6910 if ${ac_cv_path_DIFF+:} false; then :
6911   $as_echo_n "(cached) " >&6
6912 else
6913   case $DIFF in
6914   [\\/]* | ?:[\\/]*)
6915   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6916   ;;
6917   *)
6918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6919 for as_dir in $PATH
6920 do
6921   IFS=$as_save_IFS
6922   test -z "$as_dir" && as_dir=.
6923     for ac_exec_ext in '' $ac_executable_extensions; do
6924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6925     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6927     break 2
6928   fi
6929 done
6930   done
6931 IFS=$as_save_IFS
6932 
6933   ;;
6934 esac
6935 fi
6936 DIFF=$ac_cv_path_DIFF
6937 if test -n "$DIFF"; then
6938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6939 $as_echo "$DIFF" >&6; }
6940 else
6941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942 $as_echo "no" >&6; }
6943 fi
6944 
6945 
6946           if test "x$DIFF" = x; then
6947             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6948           fi
6949         else
6950           # Otherwise we believe it is a complete path. Use it as it is.
6951           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6952 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6953           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6954 $as_echo_n "checking for DIFF... " >&6; }
6955           if test ! -x "$tool_specified"; then
6956             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6957 $as_echo "not found" >&6; }
6958             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6959           fi
6960           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6961 $as_echo "$tool_specified" >&6; }
6962         fi
6963       fi
6964     fi
6965 
6966   fi
6967 
6968 
6969 
6970   if test "x$DIFF" = x; then
6971     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6972   fi
6973 
6974 
6975 
6976 
6977 
6978   # Publish this variable in the help.
6979 
6980 
6981   if [ -z "${DIRNAME+x}" ]; then
6982     # The variable is not set by user, try to locate tool using the code snippet
6983     for ac_prog in dirname
6984 do
6985   # Extract the first word of "$ac_prog", so it can be a program name with args.
6986 set dummy $ac_prog; ac_word=$2
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6988 $as_echo_n "checking for $ac_word... " >&6; }
6989 if ${ac_cv_path_DIRNAME+:} false; then :
6990   $as_echo_n "(cached) " >&6
6991 else
6992   case $DIRNAME in
6993   [\\/]* | ?:[\\/]*)
6994   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6995   ;;
6996   *)
6997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6998 for as_dir in $PATH
6999 do
7000   IFS=$as_save_IFS
7001   test -z "$as_dir" && as_dir=.
7002     for ac_exec_ext in '' $ac_executable_extensions; do
7003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7004     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7006     break 2
7007   fi
7008 done
7009   done
7010 IFS=$as_save_IFS
7011 
7012   ;;
7013 esac
7014 fi
7015 DIRNAME=$ac_cv_path_DIRNAME
7016 if test -n "$DIRNAME"; then
7017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7018 $as_echo "$DIRNAME" >&6; }
7019 else
7020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7021 $as_echo "no" >&6; }
7022 fi
7023 
7024 
7025   test -n "$DIRNAME" && break
7026 done
7027 
7028   else
7029     # The variable is set, but is it from the command line or the environment?
7030 
7031     # Try to remove the string !DIRNAME! from our list.
7032     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7033     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7034       # If it failed, the variable was not from the command line. Ignore it,
7035       # but warn the user (except for BASH, which is always set by the calling BASH).
7036       if test "xDIRNAME" != xBASH; then
7037         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7038 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7039       fi
7040       # Try to locate tool using the code snippet
7041       for ac_prog in dirname
7042 do
7043   # Extract the first word of "$ac_prog", so it can be a program name with args.
7044 set dummy $ac_prog; ac_word=$2
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7046 $as_echo_n "checking for $ac_word... " >&6; }
7047 if ${ac_cv_path_DIRNAME+:} false; then :
7048   $as_echo_n "(cached) " >&6
7049 else
7050   case $DIRNAME in
7051   [\\/]* | ?:[\\/]*)
7052   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7053   ;;
7054   *)
7055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056 for as_dir in $PATH
7057 do
7058   IFS=$as_save_IFS
7059   test -z "$as_dir" && as_dir=.
7060     for ac_exec_ext in '' $ac_executable_extensions; do
7061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7062     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7064     break 2
7065   fi
7066 done
7067   done
7068 IFS=$as_save_IFS
7069 
7070   ;;
7071 esac
7072 fi
7073 DIRNAME=$ac_cv_path_DIRNAME
7074 if test -n "$DIRNAME"; then
7075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7076 $as_echo "$DIRNAME" >&6; }
7077 else
7078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7079 $as_echo "no" >&6; }
7080 fi
7081 
7082 
7083   test -n "$DIRNAME" && break
7084 done
7085 
7086     else
7087       # If it succeeded, then it was overridden by the user. We will use it
7088       # for the tool.
7089 
7090       # First remove it from the list of overridden variables, so we can test
7091       # for unknown variables in the end.
7092       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7093 
7094       # Check if we try to supply an empty value
7095       if test "x$DIRNAME" = x; then
7096         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7097 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7098         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7099 $as_echo_n "checking for DIRNAME... " >&6; }
7100         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7101 $as_echo "disabled" >&6; }
7102       else
7103         # Check if the provided tool contains a complete path.
7104         tool_specified="$DIRNAME"
7105         tool_basename="${tool_specified##*/}"
7106         if test "x$tool_basename" = "x$tool_specified"; then
7107           # A command without a complete path is provided, search $PATH.
7108           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7109 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7110           # Extract the first word of "$tool_basename", so it can be a program name with args.
7111 set dummy $tool_basename; ac_word=$2
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7113 $as_echo_n "checking for $ac_word... " >&6; }
7114 if ${ac_cv_path_DIRNAME+:} false; then :
7115   $as_echo_n "(cached) " >&6
7116 else
7117   case $DIRNAME in
7118   [\\/]* | ?:[\\/]*)
7119   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7120   ;;
7121   *)
7122   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7123 for as_dir in $PATH
7124 do
7125   IFS=$as_save_IFS
7126   test -z "$as_dir" && as_dir=.
7127     for ac_exec_ext in '' $ac_executable_extensions; do
7128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7129     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7131     break 2
7132   fi
7133 done
7134   done
7135 IFS=$as_save_IFS
7136 
7137   ;;
7138 esac
7139 fi
7140 DIRNAME=$ac_cv_path_DIRNAME
7141 if test -n "$DIRNAME"; then
7142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7143 $as_echo "$DIRNAME" >&6; }
7144 else
7145   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7146 $as_echo "no" >&6; }
7147 fi
7148 
7149 
7150           if test "x$DIRNAME" = x; then
7151             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7152           fi
7153         else
7154           # Otherwise we believe it is a complete path. Use it as it is.
7155           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7156 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7157           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7158 $as_echo_n "checking for DIRNAME... " >&6; }
7159           if test ! -x "$tool_specified"; then
7160             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7161 $as_echo "not found" >&6; }
7162             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7163           fi
7164           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7165 $as_echo "$tool_specified" >&6; }
7166         fi
7167       fi
7168     fi
7169 
7170   fi
7171 
7172 
7173 
7174   if test "x$DIRNAME" = x; then
7175     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7176   fi
7177 
7178 
7179 
7180 
7181 
7182   # Publish this variable in the help.
7183 
7184 
7185   if [ -z "${ECHO+x}" ]; then
7186     # The variable is not set by user, try to locate tool using the code snippet
7187     for ac_prog in echo
7188 do
7189   # Extract the first word of "$ac_prog", so it can be a program name with args.
7190 set dummy $ac_prog; ac_word=$2
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7192 $as_echo_n "checking for $ac_word... " >&6; }
7193 if ${ac_cv_path_ECHO+:} false; then :
7194   $as_echo_n "(cached) " >&6
7195 else
7196   case $ECHO in
7197   [\\/]* | ?:[\\/]*)
7198   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7199   ;;
7200   *)
7201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7202 for as_dir in $PATH
7203 do
7204   IFS=$as_save_IFS
7205   test -z "$as_dir" && as_dir=.
7206     for ac_exec_ext in '' $ac_executable_extensions; do
7207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7208     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7210     break 2
7211   fi
7212 done
7213   done
7214 IFS=$as_save_IFS
7215 
7216   ;;
7217 esac
7218 fi
7219 ECHO=$ac_cv_path_ECHO
7220 if test -n "$ECHO"; then
7221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7222 $as_echo "$ECHO" >&6; }
7223 else
7224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225 $as_echo "no" >&6; }
7226 fi
7227 
7228 
7229   test -n "$ECHO" && break
7230 done
7231 
7232   else
7233     # The variable is set, but is it from the command line or the environment?
7234 
7235     # Try to remove the string !ECHO! from our list.
7236     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7237     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7238       # If it failed, the variable was not from the command line. Ignore it,
7239       # but warn the user (except for BASH, which is always set by the calling BASH).
7240       if test "xECHO" != xBASH; then
7241         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7242 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7243       fi
7244       # Try to locate tool using the code snippet
7245       for ac_prog in echo
7246 do
7247   # Extract the first word of "$ac_prog", so it can be a program name with args.
7248 set dummy $ac_prog; ac_word=$2
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250 $as_echo_n "checking for $ac_word... " >&6; }
7251 if ${ac_cv_path_ECHO+:} false; then :
7252   $as_echo_n "(cached) " >&6
7253 else
7254   case $ECHO in
7255   [\\/]* | ?:[\\/]*)
7256   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7257   ;;
7258   *)
7259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260 for as_dir in $PATH
7261 do
7262   IFS=$as_save_IFS
7263   test -z "$as_dir" && as_dir=.
7264     for ac_exec_ext in '' $ac_executable_extensions; do
7265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268     break 2
7269   fi
7270 done
7271   done
7272 IFS=$as_save_IFS
7273 
7274   ;;
7275 esac
7276 fi
7277 ECHO=$ac_cv_path_ECHO
7278 if test -n "$ECHO"; then
7279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7280 $as_echo "$ECHO" >&6; }
7281 else
7282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283 $as_echo "no" >&6; }
7284 fi
7285 
7286 
7287   test -n "$ECHO" && break
7288 done
7289 
7290     else
7291       # If it succeeded, then it was overridden by the user. We will use it
7292       # for the tool.
7293 
7294       # First remove it from the list of overridden variables, so we can test
7295       # for unknown variables in the end.
7296       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7297 
7298       # Check if we try to supply an empty value
7299       if test "x$ECHO" = x; then
7300         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7301 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7302         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7303 $as_echo_n "checking for ECHO... " >&6; }
7304         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7305 $as_echo "disabled" >&6; }
7306       else
7307         # Check if the provided tool contains a complete path.
7308         tool_specified="$ECHO"
7309         tool_basename="${tool_specified##*/}"
7310         if test "x$tool_basename" = "x$tool_specified"; then
7311           # A command without a complete path is provided, search $PATH.
7312           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7313 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7314           # Extract the first word of "$tool_basename", so it can be a program name with args.
7315 set dummy $tool_basename; ac_word=$2
7316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7317 $as_echo_n "checking for $ac_word... " >&6; }
7318 if ${ac_cv_path_ECHO+:} false; then :
7319   $as_echo_n "(cached) " >&6
7320 else
7321   case $ECHO in
7322   [\\/]* | ?:[\\/]*)
7323   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7324   ;;
7325   *)
7326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7327 for as_dir in $PATH
7328 do
7329   IFS=$as_save_IFS
7330   test -z "$as_dir" && as_dir=.
7331     for ac_exec_ext in '' $ac_executable_extensions; do
7332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7333     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7335     break 2
7336   fi
7337 done
7338   done
7339 IFS=$as_save_IFS
7340 
7341   ;;
7342 esac
7343 fi
7344 ECHO=$ac_cv_path_ECHO
7345 if test -n "$ECHO"; then
7346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7347 $as_echo "$ECHO" >&6; }
7348 else
7349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7350 $as_echo "no" >&6; }
7351 fi
7352 
7353 
7354           if test "x$ECHO" = x; then
7355             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7356           fi
7357         else
7358           # Otherwise we believe it is a complete path. Use it as it is.
7359           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7360 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7361           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7362 $as_echo_n "checking for ECHO... " >&6; }
7363           if test ! -x "$tool_specified"; then
7364             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7365 $as_echo "not found" >&6; }
7366             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7367           fi
7368           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7369 $as_echo "$tool_specified" >&6; }
7370         fi
7371       fi
7372     fi
7373 
7374   fi
7375 
7376 
7377 
7378   if test "x$ECHO" = x; then
7379     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7380   fi
7381 
7382 
7383 
7384 
7385 
7386   # Publish this variable in the help.
7387 
7388 
7389   if [ -z "${EXPR+x}" ]; then
7390     # The variable is not set by user, try to locate tool using the code snippet
7391     for ac_prog in expr
7392 do
7393   # Extract the first word of "$ac_prog", so it can be a program name with args.
7394 set dummy $ac_prog; ac_word=$2
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7396 $as_echo_n "checking for $ac_word... " >&6; }
7397 if ${ac_cv_path_EXPR+:} false; then :
7398   $as_echo_n "(cached) " >&6
7399 else
7400   case $EXPR in
7401   [\\/]* | ?:[\\/]*)
7402   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7403   ;;
7404   *)
7405   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7406 for as_dir in $PATH
7407 do
7408   IFS=$as_save_IFS
7409   test -z "$as_dir" && as_dir=.
7410     for ac_exec_ext in '' $ac_executable_extensions; do
7411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7412     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7414     break 2
7415   fi
7416 done
7417   done
7418 IFS=$as_save_IFS
7419 
7420   ;;
7421 esac
7422 fi
7423 EXPR=$ac_cv_path_EXPR
7424 if test -n "$EXPR"; then
7425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7426 $as_echo "$EXPR" >&6; }
7427 else
7428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7429 $as_echo "no" >&6; }
7430 fi
7431 
7432 
7433   test -n "$EXPR" && break
7434 done
7435 
7436   else
7437     # The variable is set, but is it from the command line or the environment?
7438 
7439     # Try to remove the string !EXPR! from our list.
7440     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7441     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7442       # If it failed, the variable was not from the command line. Ignore it,
7443       # but warn the user (except for BASH, which is always set by the calling BASH).
7444       if test "xEXPR" != xBASH; then
7445         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7446 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7447       fi
7448       # Try to locate tool using the code snippet
7449       for ac_prog in expr
7450 do
7451   # Extract the first word of "$ac_prog", so it can be a program name with args.
7452 set dummy $ac_prog; ac_word=$2
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7454 $as_echo_n "checking for $ac_word... " >&6; }
7455 if ${ac_cv_path_EXPR+:} false; then :
7456   $as_echo_n "(cached) " >&6
7457 else
7458   case $EXPR in
7459   [\\/]* | ?:[\\/]*)
7460   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7461   ;;
7462   *)
7463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7464 for as_dir in $PATH
7465 do
7466   IFS=$as_save_IFS
7467   test -z "$as_dir" && as_dir=.
7468     for ac_exec_ext in '' $ac_executable_extensions; do
7469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7470     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7472     break 2
7473   fi
7474 done
7475   done
7476 IFS=$as_save_IFS
7477 
7478   ;;
7479 esac
7480 fi
7481 EXPR=$ac_cv_path_EXPR
7482 if test -n "$EXPR"; then
7483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7484 $as_echo "$EXPR" >&6; }
7485 else
7486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7487 $as_echo "no" >&6; }
7488 fi
7489 
7490 
7491   test -n "$EXPR" && break
7492 done
7493 
7494     else
7495       # If it succeeded, then it was overridden by the user. We will use it
7496       # for the tool.
7497 
7498       # First remove it from the list of overridden variables, so we can test
7499       # for unknown variables in the end.
7500       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7501 
7502       # Check if we try to supply an empty value
7503       if test "x$EXPR" = x; then
7504         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7505 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7507 $as_echo_n "checking for EXPR... " >&6; }
7508         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7509 $as_echo "disabled" >&6; }
7510       else
7511         # Check if the provided tool contains a complete path.
7512         tool_specified="$EXPR"
7513         tool_basename="${tool_specified##*/}"
7514         if test "x$tool_basename" = "x$tool_specified"; then
7515           # A command without a complete path is provided, search $PATH.
7516           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7517 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7518           # Extract the first word of "$tool_basename", so it can be a program name with args.
7519 set dummy $tool_basename; ac_word=$2
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7521 $as_echo_n "checking for $ac_word... " >&6; }
7522 if ${ac_cv_path_EXPR+:} false; then :
7523   $as_echo_n "(cached) " >&6
7524 else
7525   case $EXPR in
7526   [\\/]* | ?:[\\/]*)
7527   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7528   ;;
7529   *)
7530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7531 for as_dir in $PATH
7532 do
7533   IFS=$as_save_IFS
7534   test -z "$as_dir" && as_dir=.
7535     for ac_exec_ext in '' $ac_executable_extensions; do
7536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7537     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7539     break 2
7540   fi
7541 done
7542   done
7543 IFS=$as_save_IFS
7544 
7545   ;;
7546 esac
7547 fi
7548 EXPR=$ac_cv_path_EXPR
7549 if test -n "$EXPR"; then
7550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7551 $as_echo "$EXPR" >&6; }
7552 else
7553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554 $as_echo "no" >&6; }
7555 fi
7556 
7557 
7558           if test "x$EXPR" = x; then
7559             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7560           fi
7561         else
7562           # Otherwise we believe it is a complete path. Use it as it is.
7563           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7564 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7565           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7566 $as_echo_n "checking for EXPR... " >&6; }
7567           if test ! -x "$tool_specified"; then
7568             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7569 $as_echo "not found" >&6; }
7570             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7571           fi
7572           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7573 $as_echo "$tool_specified" >&6; }
7574         fi
7575       fi
7576     fi
7577 
7578   fi
7579 
7580 
7581 
7582   if test "x$EXPR" = x; then
7583     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7584   fi
7585 
7586 
7587 
7588 
7589 
7590   # Publish this variable in the help.
7591 
7592 
7593   if [ -z "${FILE+x}" ]; then
7594     # The variable is not set by user, try to locate tool using the code snippet
7595     for ac_prog in file
7596 do
7597   # Extract the first word of "$ac_prog", so it can be a program name with args.
7598 set dummy $ac_prog; ac_word=$2
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7600 $as_echo_n "checking for $ac_word... " >&6; }
7601 if ${ac_cv_path_FILE+:} false; then :
7602   $as_echo_n "(cached) " >&6
7603 else
7604   case $FILE in
7605   [\\/]* | ?:[\\/]*)
7606   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7607   ;;
7608   *)
7609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7610 for as_dir in $PATH
7611 do
7612   IFS=$as_save_IFS
7613   test -z "$as_dir" && as_dir=.
7614     for ac_exec_ext in '' $ac_executable_extensions; do
7615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7616     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7618     break 2
7619   fi
7620 done
7621   done
7622 IFS=$as_save_IFS
7623 
7624   ;;
7625 esac
7626 fi
7627 FILE=$ac_cv_path_FILE
7628 if test -n "$FILE"; then
7629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7630 $as_echo "$FILE" >&6; }
7631 else
7632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633 $as_echo "no" >&6; }
7634 fi
7635 
7636 
7637   test -n "$FILE" && break
7638 done
7639 
7640   else
7641     # The variable is set, but is it from the command line or the environment?
7642 
7643     # Try to remove the string !FILE! from our list.
7644     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7645     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7646       # If it failed, the variable was not from the command line. Ignore it,
7647       # but warn the user (except for BASH, which is always set by the calling BASH).
7648       if test "xFILE" != xBASH; then
7649         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7650 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7651       fi
7652       # Try to locate tool using the code snippet
7653       for ac_prog in file
7654 do
7655   # Extract the first word of "$ac_prog", so it can be a program name with args.
7656 set dummy $ac_prog; ac_word=$2
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658 $as_echo_n "checking for $ac_word... " >&6; }
7659 if ${ac_cv_path_FILE+:} false; then :
7660   $as_echo_n "(cached) " >&6
7661 else
7662   case $FILE in
7663   [\\/]* | ?:[\\/]*)
7664   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7665   ;;
7666   *)
7667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7668 for as_dir in $PATH
7669 do
7670   IFS=$as_save_IFS
7671   test -z "$as_dir" && as_dir=.
7672     for ac_exec_ext in '' $ac_executable_extensions; do
7673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7674     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7676     break 2
7677   fi
7678 done
7679   done
7680 IFS=$as_save_IFS
7681 
7682   ;;
7683 esac
7684 fi
7685 FILE=$ac_cv_path_FILE
7686 if test -n "$FILE"; then
7687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7688 $as_echo "$FILE" >&6; }
7689 else
7690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691 $as_echo "no" >&6; }
7692 fi
7693 
7694 
7695   test -n "$FILE" && break
7696 done
7697 
7698     else
7699       # If it succeeded, then it was overridden by the user. We will use it
7700       # for the tool.
7701 
7702       # First remove it from the list of overridden variables, so we can test
7703       # for unknown variables in the end.
7704       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7705 
7706       # Check if we try to supply an empty value
7707       if test "x$FILE" = x; then
7708         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7709 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7710         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7711 $as_echo_n "checking for FILE... " >&6; }
7712         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7713 $as_echo "disabled" >&6; }
7714       else
7715         # Check if the provided tool contains a complete path.
7716         tool_specified="$FILE"
7717         tool_basename="${tool_specified##*/}"
7718         if test "x$tool_basename" = "x$tool_specified"; then
7719           # A command without a complete path is provided, search $PATH.
7720           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7721 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7722           # Extract the first word of "$tool_basename", so it can be a program name with args.
7723 set dummy $tool_basename; ac_word=$2
7724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7725 $as_echo_n "checking for $ac_word... " >&6; }
7726 if ${ac_cv_path_FILE+:} false; then :
7727   $as_echo_n "(cached) " >&6
7728 else
7729   case $FILE in
7730   [\\/]* | ?:[\\/]*)
7731   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7732   ;;
7733   *)
7734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7735 for as_dir in $PATH
7736 do
7737   IFS=$as_save_IFS
7738   test -z "$as_dir" && as_dir=.
7739     for ac_exec_ext in '' $ac_executable_extensions; do
7740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7741     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7743     break 2
7744   fi
7745 done
7746   done
7747 IFS=$as_save_IFS
7748 
7749   ;;
7750 esac
7751 fi
7752 FILE=$ac_cv_path_FILE
7753 if test -n "$FILE"; then
7754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7755 $as_echo "$FILE" >&6; }
7756 else
7757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7758 $as_echo "no" >&6; }
7759 fi
7760 
7761 
7762           if test "x$FILE" = x; then
7763             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7764           fi
7765         else
7766           # Otherwise we believe it is a complete path. Use it as it is.
7767           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7768 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7769           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7770 $as_echo_n "checking for FILE... " >&6; }
7771           if test ! -x "$tool_specified"; then
7772             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7773 $as_echo "not found" >&6; }
7774             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7775           fi
7776           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7777 $as_echo "$tool_specified" >&6; }
7778         fi
7779       fi
7780     fi
7781 
7782   fi
7783 
7784 
7785 
7786   if test "x$FILE" = x; then
7787     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7788   fi
7789 
7790 
7791 
7792 
7793 
7794   # Publish this variable in the help.
7795 
7796 
7797   if [ -z "${FIND+x}" ]; then
7798     # The variable is not set by user, try to locate tool using the code snippet
7799     for ac_prog in find
7800 do
7801   # Extract the first word of "$ac_prog", so it can be a program name with args.
7802 set dummy $ac_prog; ac_word=$2
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7804 $as_echo_n "checking for $ac_word... " >&6; }
7805 if ${ac_cv_path_FIND+:} false; then :
7806   $as_echo_n "(cached) " >&6
7807 else
7808   case $FIND in
7809   [\\/]* | ?:[\\/]*)
7810   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7811   ;;
7812   *)
7813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7814 for as_dir in $PATH
7815 do
7816   IFS=$as_save_IFS
7817   test -z "$as_dir" && as_dir=.
7818     for ac_exec_ext in '' $ac_executable_extensions; do
7819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7820     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7822     break 2
7823   fi
7824 done
7825   done
7826 IFS=$as_save_IFS
7827 
7828   ;;
7829 esac
7830 fi
7831 FIND=$ac_cv_path_FIND
7832 if test -n "$FIND"; then
7833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7834 $as_echo "$FIND" >&6; }
7835 else
7836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7837 $as_echo "no" >&6; }
7838 fi
7839 
7840 
7841   test -n "$FIND" && break
7842 done
7843 
7844   else
7845     # The variable is set, but is it from the command line or the environment?
7846 
7847     # Try to remove the string !FIND! from our list.
7848     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7849     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7850       # If it failed, the variable was not from the command line. Ignore it,
7851       # but warn the user (except for BASH, which is always set by the calling BASH).
7852       if test "xFIND" != xBASH; then
7853         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7854 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7855       fi
7856       # Try to locate tool using the code snippet
7857       for ac_prog in find
7858 do
7859   # Extract the first word of "$ac_prog", so it can be a program name with args.
7860 set dummy $ac_prog; ac_word=$2
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7862 $as_echo_n "checking for $ac_word... " >&6; }
7863 if ${ac_cv_path_FIND+:} false; then :
7864   $as_echo_n "(cached) " >&6
7865 else
7866   case $FIND in
7867   [\\/]* | ?:[\\/]*)
7868   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7869   ;;
7870   *)
7871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7872 for as_dir in $PATH
7873 do
7874   IFS=$as_save_IFS
7875   test -z "$as_dir" && as_dir=.
7876     for ac_exec_ext in '' $ac_executable_extensions; do
7877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7878     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7880     break 2
7881   fi
7882 done
7883   done
7884 IFS=$as_save_IFS
7885 
7886   ;;
7887 esac
7888 fi
7889 FIND=$ac_cv_path_FIND
7890 if test -n "$FIND"; then
7891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7892 $as_echo "$FIND" >&6; }
7893 else
7894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7895 $as_echo "no" >&6; }
7896 fi
7897 
7898 
7899   test -n "$FIND" && break
7900 done
7901 
7902     else
7903       # If it succeeded, then it was overridden by the user. We will use it
7904       # for the tool.
7905 
7906       # First remove it from the list of overridden variables, so we can test
7907       # for unknown variables in the end.
7908       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7909 
7910       # Check if we try to supply an empty value
7911       if test "x$FIND" = x; then
7912         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7913 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7914         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7915 $as_echo_n "checking for FIND... " >&6; }
7916         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7917 $as_echo "disabled" >&6; }
7918       else
7919         # Check if the provided tool contains a complete path.
7920         tool_specified="$FIND"
7921         tool_basename="${tool_specified##*/}"
7922         if test "x$tool_basename" = "x$tool_specified"; then
7923           # A command without a complete path is provided, search $PATH.
7924           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7925 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7926           # Extract the first word of "$tool_basename", so it can be a program name with args.
7927 set dummy $tool_basename; ac_word=$2
7928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7929 $as_echo_n "checking for $ac_word... " >&6; }
7930 if ${ac_cv_path_FIND+:} false; then :
7931   $as_echo_n "(cached) " >&6
7932 else
7933   case $FIND in
7934   [\\/]* | ?:[\\/]*)
7935   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7936   ;;
7937   *)
7938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7939 for as_dir in $PATH
7940 do
7941   IFS=$as_save_IFS
7942   test -z "$as_dir" && as_dir=.
7943     for ac_exec_ext in '' $ac_executable_extensions; do
7944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7945     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7947     break 2
7948   fi
7949 done
7950   done
7951 IFS=$as_save_IFS
7952 
7953   ;;
7954 esac
7955 fi
7956 FIND=$ac_cv_path_FIND
7957 if test -n "$FIND"; then
7958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7959 $as_echo "$FIND" >&6; }
7960 else
7961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7962 $as_echo "no" >&6; }
7963 fi
7964 
7965 
7966           if test "x$FIND" = x; then
7967             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7968           fi
7969         else
7970           # Otherwise we believe it is a complete path. Use it as it is.
7971           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7972 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7973           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7974 $as_echo_n "checking for FIND... " >&6; }
7975           if test ! -x "$tool_specified"; then
7976             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7977 $as_echo "not found" >&6; }
7978             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7979           fi
7980           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7981 $as_echo "$tool_specified" >&6; }
7982         fi
7983       fi
7984     fi
7985 
7986   fi
7987 
7988 
7989 
7990   if test "x$FIND" = x; then
7991     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7992   fi
7993 
7994 
7995 
7996 
7997 
7998   # Publish this variable in the help.
7999 
8000 
8001   if [ -z "${HEAD+x}" ]; then
8002     # The variable is not set by user, try to locate tool using the code snippet
8003     for ac_prog in head
8004 do
8005   # Extract the first word of "$ac_prog", so it can be a program name with args.
8006 set dummy $ac_prog; ac_word=$2
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8008 $as_echo_n "checking for $ac_word... " >&6; }
8009 if ${ac_cv_path_HEAD+:} false; then :
8010   $as_echo_n "(cached) " >&6
8011 else
8012   case $HEAD in
8013   [\\/]* | ?:[\\/]*)
8014   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8015   ;;
8016   *)
8017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8018 for as_dir in $PATH
8019 do
8020   IFS=$as_save_IFS
8021   test -z "$as_dir" && as_dir=.
8022     for ac_exec_ext in '' $ac_executable_extensions; do
8023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8024     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8026     break 2
8027   fi
8028 done
8029   done
8030 IFS=$as_save_IFS
8031 
8032   ;;
8033 esac
8034 fi
8035 HEAD=$ac_cv_path_HEAD
8036 if test -n "$HEAD"; then
8037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8038 $as_echo "$HEAD" >&6; }
8039 else
8040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8041 $as_echo "no" >&6; }
8042 fi
8043 
8044 
8045   test -n "$HEAD" && break
8046 done
8047 
8048   else
8049     # The variable is set, but is it from the command line or the environment?
8050 
8051     # Try to remove the string !HEAD! from our list.
8052     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8053     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8054       # If it failed, the variable was not from the command line. Ignore it,
8055       # but warn the user (except for BASH, which is always set by the calling BASH).
8056       if test "xHEAD" != xBASH; then
8057         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8058 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8059       fi
8060       # Try to locate tool using the code snippet
8061       for ac_prog in head
8062 do
8063   # Extract the first word of "$ac_prog", so it can be a program name with args.
8064 set dummy $ac_prog; ac_word=$2
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066 $as_echo_n "checking for $ac_word... " >&6; }
8067 if ${ac_cv_path_HEAD+:} false; then :
8068   $as_echo_n "(cached) " >&6
8069 else
8070   case $HEAD in
8071   [\\/]* | ?:[\\/]*)
8072   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8073   ;;
8074   *)
8075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8076 for as_dir in $PATH
8077 do
8078   IFS=$as_save_IFS
8079   test -z "$as_dir" && as_dir=.
8080     for ac_exec_ext in '' $ac_executable_extensions; do
8081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8082     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8084     break 2
8085   fi
8086 done
8087   done
8088 IFS=$as_save_IFS
8089 
8090   ;;
8091 esac
8092 fi
8093 HEAD=$ac_cv_path_HEAD
8094 if test -n "$HEAD"; then
8095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8096 $as_echo "$HEAD" >&6; }
8097 else
8098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099 $as_echo "no" >&6; }
8100 fi
8101 
8102 
8103   test -n "$HEAD" && break
8104 done
8105 
8106     else
8107       # If it succeeded, then it was overridden by the user. We will use it
8108       # for the tool.
8109 
8110       # First remove it from the list of overridden variables, so we can test
8111       # for unknown variables in the end.
8112       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8113 
8114       # Check if we try to supply an empty value
8115       if test "x$HEAD" = x; then
8116         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8117 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8118         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8119 $as_echo_n "checking for HEAD... " >&6; }
8120         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8121 $as_echo "disabled" >&6; }
8122       else
8123         # Check if the provided tool contains a complete path.
8124         tool_specified="$HEAD"
8125         tool_basename="${tool_specified##*/}"
8126         if test "x$tool_basename" = "x$tool_specified"; then
8127           # A command without a complete path is provided, search $PATH.
8128           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8129 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8130           # Extract the first word of "$tool_basename", so it can be a program name with args.
8131 set dummy $tool_basename; ac_word=$2
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8133 $as_echo_n "checking for $ac_word... " >&6; }
8134 if ${ac_cv_path_HEAD+:} false; then :
8135   $as_echo_n "(cached) " >&6
8136 else
8137   case $HEAD in
8138   [\\/]* | ?:[\\/]*)
8139   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8140   ;;
8141   *)
8142   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8143 for as_dir in $PATH
8144 do
8145   IFS=$as_save_IFS
8146   test -z "$as_dir" && as_dir=.
8147     for ac_exec_ext in '' $ac_executable_extensions; do
8148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8149     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8151     break 2
8152   fi
8153 done
8154   done
8155 IFS=$as_save_IFS
8156 
8157   ;;
8158 esac
8159 fi
8160 HEAD=$ac_cv_path_HEAD
8161 if test -n "$HEAD"; then
8162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8163 $as_echo "$HEAD" >&6; }
8164 else
8165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8166 $as_echo "no" >&6; }
8167 fi
8168 
8169 
8170           if test "x$HEAD" = x; then
8171             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8172           fi
8173         else
8174           # Otherwise we believe it is a complete path. Use it as it is.
8175           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8176 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8177           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8178 $as_echo_n "checking for HEAD... " >&6; }
8179           if test ! -x "$tool_specified"; then
8180             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8181 $as_echo "not found" >&6; }
8182             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8183           fi
8184           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8185 $as_echo "$tool_specified" >&6; }
8186         fi
8187       fi
8188     fi
8189 
8190   fi
8191 
8192 
8193 
8194   if test "x$HEAD" = x; then
8195     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8196   fi
8197 
8198 
8199 
8200 
8201 
8202   # Publish this variable in the help.
8203 
8204 
8205   if [ -z "${LN+x}" ]; then
8206     # The variable is not set by user, try to locate tool using the code snippet
8207     for ac_prog in ln
8208 do
8209   # Extract the first word of "$ac_prog", so it can be a program name with args.
8210 set dummy $ac_prog; ac_word=$2
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212 $as_echo_n "checking for $ac_word... " >&6; }
8213 if ${ac_cv_path_LN+:} false; then :
8214   $as_echo_n "(cached) " >&6
8215 else
8216   case $LN in
8217   [\\/]* | ?:[\\/]*)
8218   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8219   ;;
8220   *)
8221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222 for as_dir in $PATH
8223 do
8224   IFS=$as_save_IFS
8225   test -z "$as_dir" && as_dir=.
8226     for ac_exec_ext in '' $ac_executable_extensions; do
8227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230     break 2
8231   fi
8232 done
8233   done
8234 IFS=$as_save_IFS
8235 
8236   ;;
8237 esac
8238 fi
8239 LN=$ac_cv_path_LN
8240 if test -n "$LN"; then
8241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8242 $as_echo "$LN" >&6; }
8243 else
8244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245 $as_echo "no" >&6; }
8246 fi
8247 
8248 
8249   test -n "$LN" && break
8250 done
8251 
8252   else
8253     # The variable is set, but is it from the command line or the environment?
8254 
8255     # Try to remove the string !LN! from our list.
8256     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8257     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8258       # If it failed, the variable was not from the command line. Ignore it,
8259       # but warn the user (except for BASH, which is always set by the calling BASH).
8260       if test "xLN" != xBASH; then
8261         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8262 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8263       fi
8264       # Try to locate tool using the code snippet
8265       for ac_prog in ln
8266 do
8267   # Extract the first word of "$ac_prog", so it can be a program name with args.
8268 set dummy $ac_prog; ac_word=$2
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8270 $as_echo_n "checking for $ac_word... " >&6; }
8271 if ${ac_cv_path_LN+:} false; then :
8272   $as_echo_n "(cached) " >&6
8273 else
8274   case $LN in
8275   [\\/]* | ?:[\\/]*)
8276   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8277   ;;
8278   *)
8279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8280 for as_dir in $PATH
8281 do
8282   IFS=$as_save_IFS
8283   test -z "$as_dir" && as_dir=.
8284     for ac_exec_ext in '' $ac_executable_extensions; do
8285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8286     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8288     break 2
8289   fi
8290 done
8291   done
8292 IFS=$as_save_IFS
8293 
8294   ;;
8295 esac
8296 fi
8297 LN=$ac_cv_path_LN
8298 if test -n "$LN"; then
8299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8300 $as_echo "$LN" >&6; }
8301 else
8302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303 $as_echo "no" >&6; }
8304 fi
8305 
8306 
8307   test -n "$LN" && break
8308 done
8309 
8310     else
8311       # If it succeeded, then it was overridden by the user. We will use it
8312       # for the tool.
8313 
8314       # First remove it from the list of overridden variables, so we can test
8315       # for unknown variables in the end.
8316       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8317 
8318       # Check if we try to supply an empty value
8319       if test "x$LN" = x; then
8320         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8321 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8322         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8323 $as_echo_n "checking for LN... " >&6; }
8324         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8325 $as_echo "disabled" >&6; }
8326       else
8327         # Check if the provided tool contains a complete path.
8328         tool_specified="$LN"
8329         tool_basename="${tool_specified##*/}"
8330         if test "x$tool_basename" = "x$tool_specified"; then
8331           # A command without a complete path is provided, search $PATH.
8332           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8333 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8334           # Extract the first word of "$tool_basename", so it can be a program name with args.
8335 set dummy $tool_basename; ac_word=$2
8336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8337 $as_echo_n "checking for $ac_word... " >&6; }
8338 if ${ac_cv_path_LN+:} false; then :
8339   $as_echo_n "(cached) " >&6
8340 else
8341   case $LN in
8342   [\\/]* | ?:[\\/]*)
8343   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8344   ;;
8345   *)
8346   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8347 for as_dir in $PATH
8348 do
8349   IFS=$as_save_IFS
8350   test -z "$as_dir" && as_dir=.
8351     for ac_exec_ext in '' $ac_executable_extensions; do
8352   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8353     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8355     break 2
8356   fi
8357 done
8358   done
8359 IFS=$as_save_IFS
8360 
8361   ;;
8362 esac
8363 fi
8364 LN=$ac_cv_path_LN
8365 if test -n "$LN"; then
8366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8367 $as_echo "$LN" >&6; }
8368 else
8369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8370 $as_echo "no" >&6; }
8371 fi
8372 
8373 
8374           if test "x$LN" = x; then
8375             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8376           fi
8377         else
8378           # Otherwise we believe it is a complete path. Use it as it is.
8379           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8380 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8381           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8382 $as_echo_n "checking for LN... " >&6; }
8383           if test ! -x "$tool_specified"; then
8384             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8385 $as_echo "not found" >&6; }
8386             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8387           fi
8388           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8389 $as_echo "$tool_specified" >&6; }
8390         fi
8391       fi
8392     fi
8393 
8394   fi
8395 
8396 
8397 
8398   if test "x$LN" = x; then
8399     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8400   fi
8401 
8402 
8403 
8404 
8405 
8406   # Publish this variable in the help.
8407 
8408 
8409   if [ -z "${LS+x}" ]; then
8410     # The variable is not set by user, try to locate tool using the code snippet
8411     for ac_prog in ls
8412 do
8413   # Extract the first word of "$ac_prog", so it can be a program name with args.
8414 set dummy $ac_prog; ac_word=$2
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8416 $as_echo_n "checking for $ac_word... " >&6; }
8417 if ${ac_cv_path_LS+:} false; then :
8418   $as_echo_n "(cached) " >&6
8419 else
8420   case $LS in
8421   [\\/]* | ?:[\\/]*)
8422   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8423   ;;
8424   *)
8425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8426 for as_dir in $PATH
8427 do
8428   IFS=$as_save_IFS
8429   test -z "$as_dir" && as_dir=.
8430     for ac_exec_ext in '' $ac_executable_extensions; do
8431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8432     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8434     break 2
8435   fi
8436 done
8437   done
8438 IFS=$as_save_IFS
8439 
8440   ;;
8441 esac
8442 fi
8443 LS=$ac_cv_path_LS
8444 if test -n "$LS"; then
8445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8446 $as_echo "$LS" >&6; }
8447 else
8448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8449 $as_echo "no" >&6; }
8450 fi
8451 
8452 
8453   test -n "$LS" && break
8454 done
8455 
8456   else
8457     # The variable is set, but is it from the command line or the environment?
8458 
8459     # Try to remove the string !LS! from our list.
8460     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8461     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8462       # If it failed, the variable was not from the command line. Ignore it,
8463       # but warn the user (except for BASH, which is always set by the calling BASH).
8464       if test "xLS" != xBASH; then
8465         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8466 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8467       fi
8468       # Try to locate tool using the code snippet
8469       for ac_prog in ls
8470 do
8471   # Extract the first word of "$ac_prog", so it can be a program name with args.
8472 set dummy $ac_prog; ac_word=$2
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8474 $as_echo_n "checking for $ac_word... " >&6; }
8475 if ${ac_cv_path_LS+:} false; then :
8476   $as_echo_n "(cached) " >&6
8477 else
8478   case $LS in
8479   [\\/]* | ?:[\\/]*)
8480   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8481   ;;
8482   *)
8483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8484 for as_dir in $PATH
8485 do
8486   IFS=$as_save_IFS
8487   test -z "$as_dir" && as_dir=.
8488     for ac_exec_ext in '' $ac_executable_extensions; do
8489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8490     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8492     break 2
8493   fi
8494 done
8495   done
8496 IFS=$as_save_IFS
8497 
8498   ;;
8499 esac
8500 fi
8501 LS=$ac_cv_path_LS
8502 if test -n "$LS"; then
8503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8504 $as_echo "$LS" >&6; }
8505 else
8506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507 $as_echo "no" >&6; }
8508 fi
8509 
8510 
8511   test -n "$LS" && break
8512 done
8513 
8514     else
8515       # If it succeeded, then it was overridden by the user. We will use it
8516       # for the tool.
8517 
8518       # First remove it from the list of overridden variables, so we can test
8519       # for unknown variables in the end.
8520       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8521 
8522       # Check if we try to supply an empty value
8523       if test "x$LS" = x; then
8524         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8525 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8526         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8527 $as_echo_n "checking for LS... " >&6; }
8528         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8529 $as_echo "disabled" >&6; }
8530       else
8531         # Check if the provided tool contains a complete path.
8532         tool_specified="$LS"
8533         tool_basename="${tool_specified##*/}"
8534         if test "x$tool_basename" = "x$tool_specified"; then
8535           # A command without a complete path is provided, search $PATH.
8536           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8537 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8538           # Extract the first word of "$tool_basename", so it can be a program name with args.
8539 set dummy $tool_basename; ac_word=$2
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8541 $as_echo_n "checking for $ac_word... " >&6; }
8542 if ${ac_cv_path_LS+:} false; then :
8543   $as_echo_n "(cached) " >&6
8544 else
8545   case $LS in
8546   [\\/]* | ?:[\\/]*)
8547   ac_cv_path_LS="$LS" # Let the user override the test with a path.
8548   ;;
8549   *)
8550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551 for as_dir in $PATH
8552 do
8553   IFS=$as_save_IFS
8554   test -z "$as_dir" && as_dir=.
8555     for ac_exec_ext in '' $ac_executable_extensions; do
8556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8557     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8559     break 2
8560   fi
8561 done
8562   done
8563 IFS=$as_save_IFS
8564 
8565   ;;
8566 esac
8567 fi
8568 LS=$ac_cv_path_LS
8569 if test -n "$LS"; then
8570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8571 $as_echo "$LS" >&6; }
8572 else
8573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574 $as_echo "no" >&6; }
8575 fi
8576 
8577 
8578           if test "x$LS" = x; then
8579             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8580           fi
8581         else
8582           # Otherwise we believe it is a complete path. Use it as it is.
8583           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8584 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8585           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8586 $as_echo_n "checking for LS... " >&6; }
8587           if test ! -x "$tool_specified"; then
8588             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8589 $as_echo "not found" >&6; }
8590             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8591           fi
8592           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8593 $as_echo "$tool_specified" >&6; }
8594         fi
8595       fi
8596     fi
8597 
8598   fi
8599 
8600 
8601 
8602   if test "x$LS" = x; then
8603     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8604   fi
8605 
8606 
8607 
8608 
8609 
8610   # Publish this variable in the help.
8611 
8612 
8613   if [ -z "${MKDIR+x}" ]; then
8614     # The variable is not set by user, try to locate tool using the code snippet
8615     for ac_prog in mkdir
8616 do
8617   # Extract the first word of "$ac_prog", so it can be a program name with args.
8618 set dummy $ac_prog; ac_word=$2
8619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8620 $as_echo_n "checking for $ac_word... " >&6; }
8621 if ${ac_cv_path_MKDIR+:} false; then :
8622   $as_echo_n "(cached) " >&6
8623 else
8624   case $MKDIR in
8625   [\\/]* | ?:[\\/]*)
8626   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8627   ;;
8628   *)
8629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8630 for as_dir in $PATH
8631 do
8632   IFS=$as_save_IFS
8633   test -z "$as_dir" && as_dir=.
8634     for ac_exec_ext in '' $ac_executable_extensions; do
8635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8636     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8638     break 2
8639   fi
8640 done
8641   done
8642 IFS=$as_save_IFS
8643 
8644   ;;
8645 esac
8646 fi
8647 MKDIR=$ac_cv_path_MKDIR
8648 if test -n "$MKDIR"; then
8649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8650 $as_echo "$MKDIR" >&6; }
8651 else
8652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8653 $as_echo "no" >&6; }
8654 fi
8655 
8656 
8657   test -n "$MKDIR" && break
8658 done
8659 
8660   else
8661     # The variable is set, but is it from the command line or the environment?
8662 
8663     # Try to remove the string !MKDIR! from our list.
8664     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8665     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8666       # If it failed, the variable was not from the command line. Ignore it,
8667       # but warn the user (except for BASH, which is always set by the calling BASH).
8668       if test "xMKDIR" != xBASH; then
8669         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8670 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8671       fi
8672       # Try to locate tool using the code snippet
8673       for ac_prog in mkdir
8674 do
8675   # Extract the first word of "$ac_prog", so it can be a program name with args.
8676 set dummy $ac_prog; ac_word=$2
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678 $as_echo_n "checking for $ac_word... " >&6; }
8679 if ${ac_cv_path_MKDIR+:} false; then :
8680   $as_echo_n "(cached) " >&6
8681 else
8682   case $MKDIR in
8683   [\\/]* | ?:[\\/]*)
8684   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8685   ;;
8686   *)
8687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688 for as_dir in $PATH
8689 do
8690   IFS=$as_save_IFS
8691   test -z "$as_dir" && as_dir=.
8692     for ac_exec_ext in '' $ac_executable_extensions; do
8693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696     break 2
8697   fi
8698 done
8699   done
8700 IFS=$as_save_IFS
8701 
8702   ;;
8703 esac
8704 fi
8705 MKDIR=$ac_cv_path_MKDIR
8706 if test -n "$MKDIR"; then
8707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8708 $as_echo "$MKDIR" >&6; }
8709 else
8710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711 $as_echo "no" >&6; }
8712 fi
8713 
8714 
8715   test -n "$MKDIR" && break
8716 done
8717 
8718     else
8719       # If it succeeded, then it was overridden by the user. We will use it
8720       # for the tool.
8721 
8722       # First remove it from the list of overridden variables, so we can test
8723       # for unknown variables in the end.
8724       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8725 
8726       # Check if we try to supply an empty value
8727       if test "x$MKDIR" = x; then
8728         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8729 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8731 $as_echo_n "checking for MKDIR... " >&6; }
8732         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8733 $as_echo "disabled" >&6; }
8734       else
8735         # Check if the provided tool contains a complete path.
8736         tool_specified="$MKDIR"
8737         tool_basename="${tool_specified##*/}"
8738         if test "x$tool_basename" = "x$tool_specified"; then
8739           # A command without a complete path is provided, search $PATH.
8740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8741 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8742           # Extract the first word of "$tool_basename", so it can be a program name with args.
8743 set dummy $tool_basename; ac_word=$2
8744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8745 $as_echo_n "checking for $ac_word... " >&6; }
8746 if ${ac_cv_path_MKDIR+:} false; then :
8747   $as_echo_n "(cached) " >&6
8748 else
8749   case $MKDIR in
8750   [\\/]* | ?:[\\/]*)
8751   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8752   ;;
8753   *)
8754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8755 for as_dir in $PATH
8756 do
8757   IFS=$as_save_IFS
8758   test -z "$as_dir" && as_dir=.
8759     for ac_exec_ext in '' $ac_executable_extensions; do
8760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8761     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8763     break 2
8764   fi
8765 done
8766   done
8767 IFS=$as_save_IFS
8768 
8769   ;;
8770 esac
8771 fi
8772 MKDIR=$ac_cv_path_MKDIR
8773 if test -n "$MKDIR"; then
8774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8775 $as_echo "$MKDIR" >&6; }
8776 else
8777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8778 $as_echo "no" >&6; }
8779 fi
8780 
8781 
8782           if test "x$MKDIR" = x; then
8783             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8784           fi
8785         else
8786           # Otherwise we believe it is a complete path. Use it as it is.
8787           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8788 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8789           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8790 $as_echo_n "checking for MKDIR... " >&6; }
8791           if test ! -x "$tool_specified"; then
8792             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8793 $as_echo "not found" >&6; }
8794             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8795           fi
8796           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8797 $as_echo "$tool_specified" >&6; }
8798         fi
8799       fi
8800     fi
8801 
8802   fi
8803 
8804 
8805 
8806   if test "x$MKDIR" = x; then
8807     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8808   fi
8809 
8810 
8811 
8812 
8813 
8814   # Publish this variable in the help.
8815 
8816 
8817   if [ -z "${MKTEMP+x}" ]; then
8818     # The variable is not set by user, try to locate tool using the code snippet
8819     for ac_prog in mktemp
8820 do
8821   # Extract the first word of "$ac_prog", so it can be a program name with args.
8822 set dummy $ac_prog; ac_word=$2
8823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8824 $as_echo_n "checking for $ac_word... " >&6; }
8825 if ${ac_cv_path_MKTEMP+:} false; then :
8826   $as_echo_n "(cached) " >&6
8827 else
8828   case $MKTEMP in
8829   [\\/]* | ?:[\\/]*)
8830   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8831   ;;
8832   *)
8833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8834 for as_dir in $PATH
8835 do
8836   IFS=$as_save_IFS
8837   test -z "$as_dir" && as_dir=.
8838     for ac_exec_ext in '' $ac_executable_extensions; do
8839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8840     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8842     break 2
8843   fi
8844 done
8845   done
8846 IFS=$as_save_IFS
8847 
8848   ;;
8849 esac
8850 fi
8851 MKTEMP=$ac_cv_path_MKTEMP
8852 if test -n "$MKTEMP"; then
8853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8854 $as_echo "$MKTEMP" >&6; }
8855 else
8856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8857 $as_echo "no" >&6; }
8858 fi
8859 
8860 
8861   test -n "$MKTEMP" && break
8862 done
8863 
8864   else
8865     # The variable is set, but is it from the command line or the environment?
8866 
8867     # Try to remove the string !MKTEMP! from our list.
8868     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8869     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8870       # If it failed, the variable was not from the command line. Ignore it,
8871       # but warn the user (except for BASH, which is always set by the calling BASH).
8872       if test "xMKTEMP" != xBASH; then
8873         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8874 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8875       fi
8876       # Try to locate tool using the code snippet
8877       for ac_prog in mktemp
8878 do
8879   # Extract the first word of "$ac_prog", so it can be a program name with args.
8880 set dummy $ac_prog; ac_word=$2
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882 $as_echo_n "checking for $ac_word... " >&6; }
8883 if ${ac_cv_path_MKTEMP+:} false; then :
8884   $as_echo_n "(cached) " >&6
8885 else
8886   case $MKTEMP in
8887   [\\/]* | ?:[\\/]*)
8888   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8889   ;;
8890   *)
8891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892 for as_dir in $PATH
8893 do
8894   IFS=$as_save_IFS
8895   test -z "$as_dir" && as_dir=.
8896     for ac_exec_ext in '' $ac_executable_extensions; do
8897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8898     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900     break 2
8901   fi
8902 done
8903   done
8904 IFS=$as_save_IFS
8905 
8906   ;;
8907 esac
8908 fi
8909 MKTEMP=$ac_cv_path_MKTEMP
8910 if test -n "$MKTEMP"; then
8911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8912 $as_echo "$MKTEMP" >&6; }
8913 else
8914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915 $as_echo "no" >&6; }
8916 fi
8917 
8918 
8919   test -n "$MKTEMP" && break
8920 done
8921 
8922     else
8923       # If it succeeded, then it was overridden by the user. We will use it
8924       # for the tool.
8925 
8926       # First remove it from the list of overridden variables, so we can test
8927       # for unknown variables in the end.
8928       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8929 
8930       # Check if we try to supply an empty value
8931       if test "x$MKTEMP" = x; then
8932         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8933 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8934         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8935 $as_echo_n "checking for MKTEMP... " >&6; }
8936         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8937 $as_echo "disabled" >&6; }
8938       else
8939         # Check if the provided tool contains a complete path.
8940         tool_specified="$MKTEMP"
8941         tool_basename="${tool_specified##*/}"
8942         if test "x$tool_basename" = "x$tool_specified"; then
8943           # A command without a complete path is provided, search $PATH.
8944           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8945 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8946           # Extract the first word of "$tool_basename", so it can be a program name with args.
8947 set dummy $tool_basename; ac_word=$2
8948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8949 $as_echo_n "checking for $ac_word... " >&6; }
8950 if ${ac_cv_path_MKTEMP+:} false; then :
8951   $as_echo_n "(cached) " >&6
8952 else
8953   case $MKTEMP in
8954   [\\/]* | ?:[\\/]*)
8955   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8956   ;;
8957   *)
8958   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8959 for as_dir in $PATH
8960 do
8961   IFS=$as_save_IFS
8962   test -z "$as_dir" && as_dir=.
8963     for ac_exec_ext in '' $ac_executable_extensions; do
8964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8965     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8967     break 2
8968   fi
8969 done
8970   done
8971 IFS=$as_save_IFS
8972 
8973   ;;
8974 esac
8975 fi
8976 MKTEMP=$ac_cv_path_MKTEMP
8977 if test -n "$MKTEMP"; then
8978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8979 $as_echo "$MKTEMP" >&6; }
8980 else
8981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8982 $as_echo "no" >&6; }
8983 fi
8984 
8985 
8986           if test "x$MKTEMP" = x; then
8987             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8988           fi
8989         else
8990           # Otherwise we believe it is a complete path. Use it as it is.
8991           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8992 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8993           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8994 $as_echo_n "checking for MKTEMP... " >&6; }
8995           if test ! -x "$tool_specified"; then
8996             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8997 $as_echo "not found" >&6; }
8998             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8999           fi
9000           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9001 $as_echo "$tool_specified" >&6; }
9002         fi
9003       fi
9004     fi
9005 
9006   fi
9007 
9008 
9009 
9010   if test "x$MKTEMP" = x; then
9011     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9012   fi
9013 
9014 
9015 
9016 
9017 
9018   # Publish this variable in the help.
9019 
9020 
9021   if [ -z "${MV+x}" ]; then
9022     # The variable is not set by user, try to locate tool using the code snippet
9023     for ac_prog in mv
9024 do
9025   # Extract the first word of "$ac_prog", so it can be a program name with args.
9026 set dummy $ac_prog; ac_word=$2
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9028 $as_echo_n "checking for $ac_word... " >&6; }
9029 if ${ac_cv_path_MV+:} false; then :
9030   $as_echo_n "(cached) " >&6
9031 else
9032   case $MV in
9033   [\\/]* | ?:[\\/]*)
9034   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9035   ;;
9036   *)
9037   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9038 for as_dir in $PATH
9039 do
9040   IFS=$as_save_IFS
9041   test -z "$as_dir" && as_dir=.
9042     for ac_exec_ext in '' $ac_executable_extensions; do
9043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9044     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9046     break 2
9047   fi
9048 done
9049   done
9050 IFS=$as_save_IFS
9051 
9052   ;;
9053 esac
9054 fi
9055 MV=$ac_cv_path_MV
9056 if test -n "$MV"; then
9057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9058 $as_echo "$MV" >&6; }
9059 else
9060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9061 $as_echo "no" >&6; }
9062 fi
9063 
9064 
9065   test -n "$MV" && break
9066 done
9067 
9068   else
9069     # The variable is set, but is it from the command line or the environment?
9070 
9071     # Try to remove the string !MV! from our list.
9072     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9073     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9074       # If it failed, the variable was not from the command line. Ignore it,
9075       # but warn the user (except for BASH, which is always set by the calling BASH).
9076       if test "xMV" != xBASH; then
9077         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9078 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9079       fi
9080       # Try to locate tool using the code snippet
9081       for ac_prog in mv
9082 do
9083   # Extract the first word of "$ac_prog", so it can be a program name with args.
9084 set dummy $ac_prog; ac_word=$2
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9086 $as_echo_n "checking for $ac_word... " >&6; }
9087 if ${ac_cv_path_MV+:} false; then :
9088   $as_echo_n "(cached) " >&6
9089 else
9090   case $MV in
9091   [\\/]* | ?:[\\/]*)
9092   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9093   ;;
9094   *)
9095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9096 for as_dir in $PATH
9097 do
9098   IFS=$as_save_IFS
9099   test -z "$as_dir" && as_dir=.
9100     for ac_exec_ext in '' $ac_executable_extensions; do
9101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9102     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9104     break 2
9105   fi
9106 done
9107   done
9108 IFS=$as_save_IFS
9109 
9110   ;;
9111 esac
9112 fi
9113 MV=$ac_cv_path_MV
9114 if test -n "$MV"; then
9115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9116 $as_echo "$MV" >&6; }
9117 else
9118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119 $as_echo "no" >&6; }
9120 fi
9121 
9122 
9123   test -n "$MV" && break
9124 done
9125 
9126     else
9127       # If it succeeded, then it was overridden by the user. We will use it
9128       # for the tool.
9129 
9130       # First remove it from the list of overridden variables, so we can test
9131       # for unknown variables in the end.
9132       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9133 
9134       # Check if we try to supply an empty value
9135       if test "x$MV" = x; then
9136         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9137 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9138         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9139 $as_echo_n "checking for MV... " >&6; }
9140         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9141 $as_echo "disabled" >&6; }
9142       else
9143         # Check if the provided tool contains a complete path.
9144         tool_specified="$MV"
9145         tool_basename="${tool_specified##*/}"
9146         if test "x$tool_basename" = "x$tool_specified"; then
9147           # A command without a complete path is provided, search $PATH.
9148           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9149 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9150           # Extract the first word of "$tool_basename", so it can be a program name with args.
9151 set dummy $tool_basename; ac_word=$2
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9153 $as_echo_n "checking for $ac_word... " >&6; }
9154 if ${ac_cv_path_MV+:} false; then :
9155   $as_echo_n "(cached) " >&6
9156 else
9157   case $MV in
9158   [\\/]* | ?:[\\/]*)
9159   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9160   ;;
9161   *)
9162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9163 for as_dir in $PATH
9164 do
9165   IFS=$as_save_IFS
9166   test -z "$as_dir" && as_dir=.
9167     for ac_exec_ext in '' $ac_executable_extensions; do
9168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9169     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9171     break 2
9172   fi
9173 done
9174   done
9175 IFS=$as_save_IFS
9176 
9177   ;;
9178 esac
9179 fi
9180 MV=$ac_cv_path_MV
9181 if test -n "$MV"; then
9182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9183 $as_echo "$MV" >&6; }
9184 else
9185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9186 $as_echo "no" >&6; }
9187 fi
9188 
9189 
9190           if test "x$MV" = x; then
9191             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9192           fi
9193         else
9194           # Otherwise we believe it is a complete path. Use it as it is.
9195           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9196 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9197           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9198 $as_echo_n "checking for MV... " >&6; }
9199           if test ! -x "$tool_specified"; then
9200             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9201 $as_echo "not found" >&6; }
9202             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9203           fi
9204           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9205 $as_echo "$tool_specified" >&6; }
9206         fi
9207       fi
9208     fi
9209 
9210   fi
9211 
9212 
9213 
9214   if test "x$MV" = x; then
9215     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9216   fi
9217 
9218 
9219 
9220 
9221 
9222   # Publish this variable in the help.
9223 
9224 
9225   if [ -z "${NAWK+x}" ]; then
9226     # The variable is not set by user, try to locate tool using the code snippet
9227     for ac_prog in nawk gawk awk
9228 do
9229   # Extract the first word of "$ac_prog", so it can be a program name with args.
9230 set dummy $ac_prog; ac_word=$2
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9232 $as_echo_n "checking for $ac_word... " >&6; }
9233 if ${ac_cv_path_NAWK+:} false; then :
9234   $as_echo_n "(cached) " >&6
9235 else
9236   case $NAWK in
9237   [\\/]* | ?:[\\/]*)
9238   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9239   ;;
9240   *)
9241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9242 for as_dir in $PATH
9243 do
9244   IFS=$as_save_IFS
9245   test -z "$as_dir" && as_dir=.
9246     for ac_exec_ext in '' $ac_executable_extensions; do
9247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9248     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9250     break 2
9251   fi
9252 done
9253   done
9254 IFS=$as_save_IFS
9255 
9256   ;;
9257 esac
9258 fi
9259 NAWK=$ac_cv_path_NAWK
9260 if test -n "$NAWK"; then
9261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9262 $as_echo "$NAWK" >&6; }
9263 else
9264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9265 $as_echo "no" >&6; }
9266 fi
9267 
9268 
9269   test -n "$NAWK" && break
9270 done
9271 
9272   else
9273     # The variable is set, but is it from the command line or the environment?
9274 
9275     # Try to remove the string !NAWK! from our list.
9276     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9277     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9278       # If it failed, the variable was not from the command line. Ignore it,
9279       # but warn the user (except for BASH, which is always set by the calling BASH).
9280       if test "xNAWK" != xBASH; then
9281         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9282 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9283       fi
9284       # Try to locate tool using the code snippet
9285       for ac_prog in nawk gawk awk
9286 do
9287   # Extract the first word of "$ac_prog", so it can be a program name with args.
9288 set dummy $ac_prog; ac_word=$2
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9290 $as_echo_n "checking for $ac_word... " >&6; }
9291 if ${ac_cv_path_NAWK+:} false; then :
9292   $as_echo_n "(cached) " >&6
9293 else
9294   case $NAWK in
9295   [\\/]* | ?:[\\/]*)
9296   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9297   ;;
9298   *)
9299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9300 for as_dir in $PATH
9301 do
9302   IFS=$as_save_IFS
9303   test -z "$as_dir" && as_dir=.
9304     for ac_exec_ext in '' $ac_executable_extensions; do
9305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9306     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9308     break 2
9309   fi
9310 done
9311   done
9312 IFS=$as_save_IFS
9313 
9314   ;;
9315 esac
9316 fi
9317 NAWK=$ac_cv_path_NAWK
9318 if test -n "$NAWK"; then
9319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9320 $as_echo "$NAWK" >&6; }
9321 else
9322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323 $as_echo "no" >&6; }
9324 fi
9325 
9326 
9327   test -n "$NAWK" && break
9328 done
9329 
9330     else
9331       # If it succeeded, then it was overridden by the user. We will use it
9332       # for the tool.
9333 
9334       # First remove it from the list of overridden variables, so we can test
9335       # for unknown variables in the end.
9336       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9337 
9338       # Check if we try to supply an empty value
9339       if test "x$NAWK" = x; then
9340         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9341 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9342         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9343 $as_echo_n "checking for NAWK... " >&6; }
9344         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9345 $as_echo "disabled" >&6; }
9346       else
9347         # Check if the provided tool contains a complete path.
9348         tool_specified="$NAWK"
9349         tool_basename="${tool_specified##*/}"
9350         if test "x$tool_basename" = "x$tool_specified"; then
9351           # A command without a complete path is provided, search $PATH.
9352           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9353 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9354           # Extract the first word of "$tool_basename", so it can be a program name with args.
9355 set dummy $tool_basename; ac_word=$2
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9357 $as_echo_n "checking for $ac_word... " >&6; }
9358 if ${ac_cv_path_NAWK+:} false; then :
9359   $as_echo_n "(cached) " >&6
9360 else
9361   case $NAWK in
9362   [\\/]* | ?:[\\/]*)
9363   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9364   ;;
9365   *)
9366   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9367 for as_dir in $PATH
9368 do
9369   IFS=$as_save_IFS
9370   test -z "$as_dir" && as_dir=.
9371     for ac_exec_ext in '' $ac_executable_extensions; do
9372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9373     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9375     break 2
9376   fi
9377 done
9378   done
9379 IFS=$as_save_IFS
9380 
9381   ;;
9382 esac
9383 fi
9384 NAWK=$ac_cv_path_NAWK
9385 if test -n "$NAWK"; then
9386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9387 $as_echo "$NAWK" >&6; }
9388 else
9389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9390 $as_echo "no" >&6; }
9391 fi
9392 
9393 
9394           if test "x$NAWK" = x; then
9395             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9396           fi
9397         else
9398           # Otherwise we believe it is a complete path. Use it as it is.
9399           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9400 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9401           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9402 $as_echo_n "checking for NAWK... " >&6; }
9403           if test ! -x "$tool_specified"; then
9404             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9405 $as_echo "not found" >&6; }
9406             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9407           fi
9408           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9409 $as_echo "$tool_specified" >&6; }
9410         fi
9411       fi
9412     fi
9413 
9414   fi
9415 
9416 
9417 
9418   if test "x$NAWK" = x; then
9419     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9420   fi
9421 
9422 
9423 
9424 
9425 
9426   # Publish this variable in the help.
9427 
9428 
9429   if [ -z "${PRINTF+x}" ]; then
9430     # The variable is not set by user, try to locate tool using the code snippet
9431     for ac_prog in printf
9432 do
9433   # Extract the first word of "$ac_prog", so it can be a program name with args.
9434 set dummy $ac_prog; ac_word=$2
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9436 $as_echo_n "checking for $ac_word... " >&6; }
9437 if ${ac_cv_path_PRINTF+:} false; then :
9438   $as_echo_n "(cached) " >&6
9439 else
9440   case $PRINTF in
9441   [\\/]* | ?:[\\/]*)
9442   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9443   ;;
9444   *)
9445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9446 for as_dir in $PATH
9447 do
9448   IFS=$as_save_IFS
9449   test -z "$as_dir" && as_dir=.
9450     for ac_exec_ext in '' $ac_executable_extensions; do
9451   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9452     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9453     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9454     break 2
9455   fi
9456 done
9457   done
9458 IFS=$as_save_IFS
9459 
9460   ;;
9461 esac
9462 fi
9463 PRINTF=$ac_cv_path_PRINTF
9464 if test -n "$PRINTF"; then
9465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9466 $as_echo "$PRINTF" >&6; }
9467 else
9468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9469 $as_echo "no" >&6; }
9470 fi
9471 
9472 
9473   test -n "$PRINTF" && break
9474 done
9475 
9476   else
9477     # The variable is set, but is it from the command line or the environment?
9478 
9479     # Try to remove the string !PRINTF! from our list.
9480     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9481     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9482       # If it failed, the variable was not from the command line. Ignore it,
9483       # but warn the user (except for BASH, which is always set by the calling BASH).
9484       if test "xPRINTF" != xBASH; then
9485         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9486 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9487       fi
9488       # Try to locate tool using the code snippet
9489       for ac_prog in printf
9490 do
9491   # Extract the first word of "$ac_prog", so it can be a program name with args.
9492 set dummy $ac_prog; ac_word=$2
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494 $as_echo_n "checking for $ac_word... " >&6; }
9495 if ${ac_cv_path_PRINTF+:} false; then :
9496   $as_echo_n "(cached) " >&6
9497 else
9498   case $PRINTF in
9499   [\\/]* | ?:[\\/]*)
9500   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9501   ;;
9502   *)
9503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504 for as_dir in $PATH
9505 do
9506   IFS=$as_save_IFS
9507   test -z "$as_dir" && as_dir=.
9508     for ac_exec_ext in '' $ac_executable_extensions; do
9509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9510     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512     break 2
9513   fi
9514 done
9515   done
9516 IFS=$as_save_IFS
9517 
9518   ;;
9519 esac
9520 fi
9521 PRINTF=$ac_cv_path_PRINTF
9522 if test -n "$PRINTF"; then
9523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9524 $as_echo "$PRINTF" >&6; }
9525 else
9526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527 $as_echo "no" >&6; }
9528 fi
9529 
9530 
9531   test -n "$PRINTF" && break
9532 done
9533 
9534     else
9535       # If it succeeded, then it was overridden by the user. We will use it
9536       # for the tool.
9537 
9538       # First remove it from the list of overridden variables, so we can test
9539       # for unknown variables in the end.
9540       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9541 
9542       # Check if we try to supply an empty value
9543       if test "x$PRINTF" = x; then
9544         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9545 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9546         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9547 $as_echo_n "checking for PRINTF... " >&6; }
9548         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9549 $as_echo "disabled" >&6; }
9550       else
9551         # Check if the provided tool contains a complete path.
9552         tool_specified="$PRINTF"
9553         tool_basename="${tool_specified##*/}"
9554         if test "x$tool_basename" = "x$tool_specified"; then
9555           # A command without a complete path is provided, search $PATH.
9556           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9557 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9558           # Extract the first word of "$tool_basename", so it can be a program name with args.
9559 set dummy $tool_basename; ac_word=$2
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9561 $as_echo_n "checking for $ac_word... " >&6; }
9562 if ${ac_cv_path_PRINTF+:} false; then :
9563   $as_echo_n "(cached) " >&6
9564 else
9565   case $PRINTF in
9566   [\\/]* | ?:[\\/]*)
9567   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9568   ;;
9569   *)
9570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9571 for as_dir in $PATH
9572 do
9573   IFS=$as_save_IFS
9574   test -z "$as_dir" && as_dir=.
9575     for ac_exec_ext in '' $ac_executable_extensions; do
9576   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9577     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9579     break 2
9580   fi
9581 done
9582   done
9583 IFS=$as_save_IFS
9584 
9585   ;;
9586 esac
9587 fi
9588 PRINTF=$ac_cv_path_PRINTF
9589 if test -n "$PRINTF"; then
9590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9591 $as_echo "$PRINTF" >&6; }
9592 else
9593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594 $as_echo "no" >&6; }
9595 fi
9596 
9597 
9598           if test "x$PRINTF" = x; then
9599             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9600           fi
9601         else
9602           # Otherwise we believe it is a complete path. Use it as it is.
9603           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9604 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9605           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9606 $as_echo_n "checking for PRINTF... " >&6; }
9607           if test ! -x "$tool_specified"; then
9608             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9609 $as_echo "not found" >&6; }
9610             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9611           fi
9612           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9613 $as_echo "$tool_specified" >&6; }
9614         fi
9615       fi
9616     fi
9617 
9618   fi
9619 
9620 
9621 
9622   if test "x$PRINTF" = x; then
9623     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9624   fi
9625 
9626 
9627 
9628 
9629 
9630   # Publish this variable in the help.
9631 
9632 
9633   if [ -z "${RM+x}" ]; then
9634     # The variable is not set by user, try to locate tool using the code snippet
9635     for ac_prog in rm
9636 do
9637   # Extract the first word of "$ac_prog", so it can be a program name with args.
9638 set dummy $ac_prog; ac_word=$2
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640 $as_echo_n "checking for $ac_word... " >&6; }
9641 if ${ac_cv_path_RM+:} false; then :
9642   $as_echo_n "(cached) " >&6
9643 else
9644   case $RM in
9645   [\\/]* | ?:[\\/]*)
9646   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9647   ;;
9648   *)
9649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9650 for as_dir in $PATH
9651 do
9652   IFS=$as_save_IFS
9653   test -z "$as_dir" && as_dir=.
9654     for ac_exec_ext in '' $ac_executable_extensions; do
9655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9656     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9658     break 2
9659   fi
9660 done
9661   done
9662 IFS=$as_save_IFS
9663 
9664   ;;
9665 esac
9666 fi
9667 RM=$ac_cv_path_RM
9668 if test -n "$RM"; then
9669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9670 $as_echo "$RM" >&6; }
9671 else
9672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673 $as_echo "no" >&6; }
9674 fi
9675 
9676 
9677   test -n "$RM" && break
9678 done
9679 
9680   else
9681     # The variable is set, but is it from the command line or the environment?
9682 
9683     # Try to remove the string !RM! from our list.
9684     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9685     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9686       # If it failed, the variable was not from the command line. Ignore it,
9687       # but warn the user (except for BASH, which is always set by the calling BASH).
9688       if test "xRM" != xBASH; then
9689         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9690 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9691       fi
9692       # Try to locate tool using the code snippet
9693       for ac_prog in rm
9694 do
9695   # Extract the first word of "$ac_prog", so it can be a program name with args.
9696 set dummy $ac_prog; ac_word=$2
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698 $as_echo_n "checking for $ac_word... " >&6; }
9699 if ${ac_cv_path_RM+:} false; then :
9700   $as_echo_n "(cached) " >&6
9701 else
9702   case $RM in
9703   [\\/]* | ?:[\\/]*)
9704   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9705   ;;
9706   *)
9707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708 for as_dir in $PATH
9709 do
9710   IFS=$as_save_IFS
9711   test -z "$as_dir" && as_dir=.
9712     for ac_exec_ext in '' $ac_executable_extensions; do
9713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716     break 2
9717   fi
9718 done
9719   done
9720 IFS=$as_save_IFS
9721 
9722   ;;
9723 esac
9724 fi
9725 RM=$ac_cv_path_RM
9726 if test -n "$RM"; then
9727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9728 $as_echo "$RM" >&6; }
9729 else
9730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731 $as_echo "no" >&6; }
9732 fi
9733 
9734 
9735   test -n "$RM" && break
9736 done
9737 
9738     else
9739       # If it succeeded, then it was overridden by the user. We will use it
9740       # for the tool.
9741 
9742       # First remove it from the list of overridden variables, so we can test
9743       # for unknown variables in the end.
9744       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9745 
9746       # Check if we try to supply an empty value
9747       if test "x$RM" = x; then
9748         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9749 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9751 $as_echo_n "checking for RM... " >&6; }
9752         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9753 $as_echo "disabled" >&6; }
9754       else
9755         # Check if the provided tool contains a complete path.
9756         tool_specified="$RM"
9757         tool_basename="${tool_specified##*/}"
9758         if test "x$tool_basename" = "x$tool_specified"; then
9759           # A command without a complete path is provided, search $PATH.
9760           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9761 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9762           # Extract the first word of "$tool_basename", so it can be a program name with args.
9763 set dummy $tool_basename; ac_word=$2
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9765 $as_echo_n "checking for $ac_word... " >&6; }
9766 if ${ac_cv_path_RM+:} false; then :
9767   $as_echo_n "(cached) " >&6
9768 else
9769   case $RM in
9770   [\\/]* | ?:[\\/]*)
9771   ac_cv_path_RM="$RM" # Let the user override the test with a path.
9772   ;;
9773   *)
9774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9775 for as_dir in $PATH
9776 do
9777   IFS=$as_save_IFS
9778   test -z "$as_dir" && as_dir=.
9779     for ac_exec_ext in '' $ac_executable_extensions; do
9780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9781     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9783     break 2
9784   fi
9785 done
9786   done
9787 IFS=$as_save_IFS
9788 
9789   ;;
9790 esac
9791 fi
9792 RM=$ac_cv_path_RM
9793 if test -n "$RM"; then
9794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9795 $as_echo "$RM" >&6; }
9796 else
9797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9798 $as_echo "no" >&6; }
9799 fi
9800 
9801 
9802           if test "x$RM" = x; then
9803             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9804           fi
9805         else
9806           # Otherwise we believe it is a complete path. Use it as it is.
9807           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9808 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9809           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9810 $as_echo_n "checking for RM... " >&6; }
9811           if test ! -x "$tool_specified"; then
9812             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9813 $as_echo "not found" >&6; }
9814             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9815           fi
9816           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9817 $as_echo "$tool_specified" >&6; }
9818         fi
9819       fi
9820     fi
9821 
9822   fi
9823 
9824 
9825 
9826   if test "x$RM" = x; then
9827     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9828   fi
9829 
9830 
9831 
9832 
9833 
9834   # Publish this variable in the help.
9835 
9836 
9837   if [ -z "${RMDIR+x}" ]; then
9838     # The variable is not set by user, try to locate tool using the code snippet
9839     for ac_prog in rmdir
9840 do
9841   # Extract the first word of "$ac_prog", so it can be a program name with args.
9842 set dummy $ac_prog; ac_word=$2
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9844 $as_echo_n "checking for $ac_word... " >&6; }
9845 if ${ac_cv_path_RMDIR+:} false; then :
9846   $as_echo_n "(cached) " >&6
9847 else
9848   case $RMDIR in
9849   [\\/]* | ?:[\\/]*)
9850   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9851   ;;
9852   *)
9853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9854 for as_dir in $PATH
9855 do
9856   IFS=$as_save_IFS
9857   test -z "$as_dir" && as_dir=.
9858     for ac_exec_ext in '' $ac_executable_extensions; do
9859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9860     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9862     break 2
9863   fi
9864 done
9865   done
9866 IFS=$as_save_IFS
9867 
9868   ;;
9869 esac
9870 fi
9871 RMDIR=$ac_cv_path_RMDIR
9872 if test -n "$RMDIR"; then
9873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9874 $as_echo "$RMDIR" >&6; }
9875 else
9876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9877 $as_echo "no" >&6; }
9878 fi
9879 
9880 
9881   test -n "$RMDIR" && break
9882 done
9883 
9884   else
9885     # The variable is set, but is it from the command line or the environment?
9886 
9887     # Try to remove the string !RMDIR! from our list.
9888     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9889     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9890       # If it failed, the variable was not from the command line. Ignore it,
9891       # but warn the user (except for BASH, which is always set by the calling BASH).
9892       if test "xRMDIR" != xBASH; then
9893         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9894 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9895       fi
9896       # Try to locate tool using the code snippet
9897       for ac_prog in rmdir
9898 do
9899   # Extract the first word of "$ac_prog", so it can be a program name with args.
9900 set dummy $ac_prog; ac_word=$2
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902 $as_echo_n "checking for $ac_word... " >&6; }
9903 if ${ac_cv_path_RMDIR+:} false; then :
9904   $as_echo_n "(cached) " >&6
9905 else
9906   case $RMDIR in
9907   [\\/]* | ?:[\\/]*)
9908   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9909   ;;
9910   *)
9911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912 for as_dir in $PATH
9913 do
9914   IFS=$as_save_IFS
9915   test -z "$as_dir" && as_dir=.
9916     for ac_exec_ext in '' $ac_executable_extensions; do
9917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9918     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9920     break 2
9921   fi
9922 done
9923   done
9924 IFS=$as_save_IFS
9925 
9926   ;;
9927 esac
9928 fi
9929 RMDIR=$ac_cv_path_RMDIR
9930 if test -n "$RMDIR"; then
9931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9932 $as_echo "$RMDIR" >&6; }
9933 else
9934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935 $as_echo "no" >&6; }
9936 fi
9937 
9938 
9939   test -n "$RMDIR" && break
9940 done
9941 
9942     else
9943       # If it succeeded, then it was overridden by the user. We will use it
9944       # for the tool.
9945 
9946       # First remove it from the list of overridden variables, so we can test
9947       # for unknown variables in the end.
9948       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9949 
9950       # Check if we try to supply an empty value
9951       if test "x$RMDIR" = x; then
9952         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9953 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9954         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9955 $as_echo_n "checking for RMDIR... " >&6; }
9956         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9957 $as_echo "disabled" >&6; }
9958       else
9959         # Check if the provided tool contains a complete path.
9960         tool_specified="$RMDIR"
9961         tool_basename="${tool_specified##*/}"
9962         if test "x$tool_basename" = "x$tool_specified"; then
9963           # A command without a complete path is provided, search $PATH.
9964           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9965 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9966           # Extract the first word of "$tool_basename", so it can be a program name with args.
9967 set dummy $tool_basename; ac_word=$2
9968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9969 $as_echo_n "checking for $ac_word... " >&6; }
9970 if ${ac_cv_path_RMDIR+:} false; then :
9971   $as_echo_n "(cached) " >&6
9972 else
9973   case $RMDIR in
9974   [\\/]* | ?:[\\/]*)
9975   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9976   ;;
9977   *)
9978   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9979 for as_dir in $PATH
9980 do
9981   IFS=$as_save_IFS
9982   test -z "$as_dir" && as_dir=.
9983     for ac_exec_ext in '' $ac_executable_extensions; do
9984   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9985     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9986     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9987     break 2
9988   fi
9989 done
9990   done
9991 IFS=$as_save_IFS
9992 
9993   ;;
9994 esac
9995 fi
9996 RMDIR=$ac_cv_path_RMDIR
9997 if test -n "$RMDIR"; then
9998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9999 $as_echo "$RMDIR" >&6; }
10000 else
10001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002 $as_echo "no" >&6; }
10003 fi
10004 
10005 
10006           if test "x$RMDIR" = x; then
10007             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10008           fi
10009         else
10010           # Otherwise we believe it is a complete path. Use it as it is.
10011           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10012 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10013           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10014 $as_echo_n "checking for RMDIR... " >&6; }
10015           if test ! -x "$tool_specified"; then
10016             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10017 $as_echo "not found" >&6; }
10018             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10019           fi
10020           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10021 $as_echo "$tool_specified" >&6; }
10022         fi
10023       fi
10024     fi
10025 
10026   fi
10027 
10028 
10029 
10030   if test "x$RMDIR" = x; then
10031     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10032   fi
10033 
10034 
10035 
10036 
10037 
10038   # Publish this variable in the help.
10039 
10040 
10041   if [ -z "${SH+x}" ]; then
10042     # The variable is not set by user, try to locate tool using the code snippet
10043     for ac_prog in sh
10044 do
10045   # Extract the first word of "$ac_prog", so it can be a program name with args.
10046 set dummy $ac_prog; ac_word=$2
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048 $as_echo_n "checking for $ac_word... " >&6; }
10049 if ${ac_cv_path_SH+:} false; then :
10050   $as_echo_n "(cached) " >&6
10051 else
10052   case $SH in
10053   [\\/]* | ?:[\\/]*)
10054   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10055   ;;
10056   *)
10057   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058 for as_dir in $PATH
10059 do
10060   IFS=$as_save_IFS
10061   test -z "$as_dir" && as_dir=.
10062     for ac_exec_ext in '' $ac_executable_extensions; do
10063   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066     break 2
10067   fi
10068 done
10069   done
10070 IFS=$as_save_IFS
10071 
10072   ;;
10073 esac
10074 fi
10075 SH=$ac_cv_path_SH
10076 if test -n "$SH"; then
10077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10078 $as_echo "$SH" >&6; }
10079 else
10080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081 $as_echo "no" >&6; }
10082 fi
10083 
10084 
10085   test -n "$SH" && break
10086 done
10087 
10088   else
10089     # The variable is set, but is it from the command line or the environment?
10090 
10091     # Try to remove the string !SH! from our list.
10092     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10093     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10094       # If it failed, the variable was not from the command line. Ignore it,
10095       # but warn the user (except for BASH, which is always set by the calling BASH).
10096       if test "xSH" != xBASH; then
10097         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10098 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10099       fi
10100       # Try to locate tool using the code snippet
10101       for ac_prog in sh
10102 do
10103   # Extract the first word of "$ac_prog", so it can be a program name with args.
10104 set dummy $ac_prog; ac_word=$2
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106 $as_echo_n "checking for $ac_word... " >&6; }
10107 if ${ac_cv_path_SH+:} false; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   case $SH in
10111   [\\/]* | ?:[\\/]*)
10112   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10113   ;;
10114   *)
10115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116 for as_dir in $PATH
10117 do
10118   IFS=$as_save_IFS
10119   test -z "$as_dir" && as_dir=.
10120     for ac_exec_ext in '' $ac_executable_extensions; do
10121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124     break 2
10125   fi
10126 done
10127   done
10128 IFS=$as_save_IFS
10129 
10130   ;;
10131 esac
10132 fi
10133 SH=$ac_cv_path_SH
10134 if test -n "$SH"; then
10135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10136 $as_echo "$SH" >&6; }
10137 else
10138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139 $as_echo "no" >&6; }
10140 fi
10141 
10142 
10143   test -n "$SH" && break
10144 done
10145 
10146     else
10147       # If it succeeded, then it was overridden by the user. We will use it
10148       # for the tool.
10149 
10150       # First remove it from the list of overridden variables, so we can test
10151       # for unknown variables in the end.
10152       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10153 
10154       # Check if we try to supply an empty value
10155       if test "x$SH" = x; then
10156         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10157 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10158         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10159 $as_echo_n "checking for SH... " >&6; }
10160         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10161 $as_echo "disabled" >&6; }
10162       else
10163         # Check if the provided tool contains a complete path.
10164         tool_specified="$SH"
10165         tool_basename="${tool_specified##*/}"
10166         if test "x$tool_basename" = "x$tool_specified"; then
10167           # A command without a complete path is provided, search $PATH.
10168           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10169 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10170           # Extract the first word of "$tool_basename", so it can be a program name with args.
10171 set dummy $tool_basename; ac_word=$2
10172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10173 $as_echo_n "checking for $ac_word... " >&6; }
10174 if ${ac_cv_path_SH+:} false; then :
10175   $as_echo_n "(cached) " >&6
10176 else
10177   case $SH in
10178   [\\/]* | ?:[\\/]*)
10179   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10180   ;;
10181   *)
10182   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10183 for as_dir in $PATH
10184 do
10185   IFS=$as_save_IFS
10186   test -z "$as_dir" && as_dir=.
10187     for ac_exec_ext in '' $ac_executable_extensions; do
10188   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10189     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10190     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10191     break 2
10192   fi
10193 done
10194   done
10195 IFS=$as_save_IFS
10196 
10197   ;;
10198 esac
10199 fi
10200 SH=$ac_cv_path_SH
10201 if test -n "$SH"; then
10202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10203 $as_echo "$SH" >&6; }
10204 else
10205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10206 $as_echo "no" >&6; }
10207 fi
10208 
10209 
10210           if test "x$SH" = x; then
10211             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10212           fi
10213         else
10214           # Otherwise we believe it is a complete path. Use it as it is.
10215           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10216 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10217           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10218 $as_echo_n "checking for SH... " >&6; }
10219           if test ! -x "$tool_specified"; then
10220             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10221 $as_echo "not found" >&6; }
10222             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10223           fi
10224           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10225 $as_echo "$tool_specified" >&6; }
10226         fi
10227       fi
10228     fi
10229 
10230   fi
10231 
10232 
10233 
10234   if test "x$SH" = x; then
10235     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10236   fi
10237 
10238 
10239 
10240 
10241 
10242   # Publish this variable in the help.
10243 
10244 
10245   if [ -z "${SORT+x}" ]; then
10246     # The variable is not set by user, try to locate tool using the code snippet
10247     for ac_prog in sort
10248 do
10249   # Extract the first word of "$ac_prog", so it can be a program name with args.
10250 set dummy $ac_prog; ac_word=$2
10251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10252 $as_echo_n "checking for $ac_word... " >&6; }
10253 if ${ac_cv_path_SORT+:} false; then :
10254   $as_echo_n "(cached) " >&6
10255 else
10256   case $SORT in
10257   [\\/]* | ?:[\\/]*)
10258   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10259   ;;
10260   *)
10261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10262 for as_dir in $PATH
10263 do
10264   IFS=$as_save_IFS
10265   test -z "$as_dir" && as_dir=.
10266     for ac_exec_ext in '' $ac_executable_extensions; do
10267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10268     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10270     break 2
10271   fi
10272 done
10273   done
10274 IFS=$as_save_IFS
10275 
10276   ;;
10277 esac
10278 fi
10279 SORT=$ac_cv_path_SORT
10280 if test -n "$SORT"; then
10281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10282 $as_echo "$SORT" >&6; }
10283 else
10284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285 $as_echo "no" >&6; }
10286 fi
10287 
10288 
10289   test -n "$SORT" && break
10290 done
10291 
10292   else
10293     # The variable is set, but is it from the command line or the environment?
10294 
10295     # Try to remove the string !SORT! from our list.
10296     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10297     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10298       # If it failed, the variable was not from the command line. Ignore it,
10299       # but warn the user (except for BASH, which is always set by the calling BASH).
10300       if test "xSORT" != xBASH; then
10301         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10302 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10303       fi
10304       # Try to locate tool using the code snippet
10305       for ac_prog in sort
10306 do
10307   # Extract the first word of "$ac_prog", so it can be a program name with args.
10308 set dummy $ac_prog; ac_word=$2
10309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10310 $as_echo_n "checking for $ac_word... " >&6; }
10311 if ${ac_cv_path_SORT+:} false; then :
10312   $as_echo_n "(cached) " >&6
10313 else
10314   case $SORT in
10315   [\\/]* | ?:[\\/]*)
10316   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10317   ;;
10318   *)
10319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10320 for as_dir in $PATH
10321 do
10322   IFS=$as_save_IFS
10323   test -z "$as_dir" && as_dir=.
10324     for ac_exec_ext in '' $ac_executable_extensions; do
10325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10326     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10328     break 2
10329   fi
10330 done
10331   done
10332 IFS=$as_save_IFS
10333 
10334   ;;
10335 esac
10336 fi
10337 SORT=$ac_cv_path_SORT
10338 if test -n "$SORT"; then
10339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10340 $as_echo "$SORT" >&6; }
10341 else
10342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343 $as_echo "no" >&6; }
10344 fi
10345 
10346 
10347   test -n "$SORT" && break
10348 done
10349 
10350     else
10351       # If it succeeded, then it was overridden by the user. We will use it
10352       # for the tool.
10353 
10354       # First remove it from the list of overridden variables, so we can test
10355       # for unknown variables in the end.
10356       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10357 
10358       # Check if we try to supply an empty value
10359       if test "x$SORT" = x; then
10360         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10361 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10362         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10363 $as_echo_n "checking for SORT... " >&6; }
10364         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10365 $as_echo "disabled" >&6; }
10366       else
10367         # Check if the provided tool contains a complete path.
10368         tool_specified="$SORT"
10369         tool_basename="${tool_specified##*/}"
10370         if test "x$tool_basename" = "x$tool_specified"; then
10371           # A command without a complete path is provided, search $PATH.
10372           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10373 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10374           # Extract the first word of "$tool_basename", so it can be a program name with args.
10375 set dummy $tool_basename; ac_word=$2
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10377 $as_echo_n "checking for $ac_word... " >&6; }
10378 if ${ac_cv_path_SORT+:} false; then :
10379   $as_echo_n "(cached) " >&6
10380 else
10381   case $SORT in
10382   [\\/]* | ?:[\\/]*)
10383   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10384   ;;
10385   *)
10386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10387 for as_dir in $PATH
10388 do
10389   IFS=$as_save_IFS
10390   test -z "$as_dir" && as_dir=.
10391     for ac_exec_ext in '' $ac_executable_extensions; do
10392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10393     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10395     break 2
10396   fi
10397 done
10398   done
10399 IFS=$as_save_IFS
10400 
10401   ;;
10402 esac
10403 fi
10404 SORT=$ac_cv_path_SORT
10405 if test -n "$SORT"; then
10406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10407 $as_echo "$SORT" >&6; }
10408 else
10409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410 $as_echo "no" >&6; }
10411 fi
10412 
10413 
10414           if test "x$SORT" = x; then
10415             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10416           fi
10417         else
10418           # Otherwise we believe it is a complete path. Use it as it is.
10419           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10420 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10421           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10422 $as_echo_n "checking for SORT... " >&6; }
10423           if test ! -x "$tool_specified"; then
10424             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10425 $as_echo "not found" >&6; }
10426             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10427           fi
10428           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10429 $as_echo "$tool_specified" >&6; }
10430         fi
10431       fi
10432     fi
10433 
10434   fi
10435 
10436 
10437 
10438   if test "x$SORT" = x; then
10439     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10440   fi
10441 
10442 
10443 
10444 
10445 
10446   # Publish this variable in the help.
10447 
10448 
10449   if [ -z "${TAIL+x}" ]; then
10450     # The variable is not set by user, try to locate tool using the code snippet
10451     for ac_prog in tail
10452 do
10453   # Extract the first word of "$ac_prog", so it can be a program name with args.
10454 set dummy $ac_prog; ac_word=$2
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10456 $as_echo_n "checking for $ac_word... " >&6; }
10457 if ${ac_cv_path_TAIL+:} false; then :
10458   $as_echo_n "(cached) " >&6
10459 else
10460   case $TAIL in
10461   [\\/]* | ?:[\\/]*)
10462   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10463   ;;
10464   *)
10465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10466 for as_dir in $PATH
10467 do
10468   IFS=$as_save_IFS
10469   test -z "$as_dir" && as_dir=.
10470     for ac_exec_ext in '' $ac_executable_extensions; do
10471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10472     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10474     break 2
10475   fi
10476 done
10477   done
10478 IFS=$as_save_IFS
10479 
10480   ;;
10481 esac
10482 fi
10483 TAIL=$ac_cv_path_TAIL
10484 if test -n "$TAIL"; then
10485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10486 $as_echo "$TAIL" >&6; }
10487 else
10488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10489 $as_echo "no" >&6; }
10490 fi
10491 
10492 
10493   test -n "$TAIL" && break
10494 done
10495 
10496   else
10497     # The variable is set, but is it from the command line or the environment?
10498 
10499     # Try to remove the string !TAIL! from our list.
10500     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10501     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10502       # If it failed, the variable was not from the command line. Ignore it,
10503       # but warn the user (except for BASH, which is always set by the calling BASH).
10504       if test "xTAIL" != xBASH; then
10505         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10506 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10507       fi
10508       # Try to locate tool using the code snippet
10509       for ac_prog in tail
10510 do
10511   # Extract the first word of "$ac_prog", so it can be a program name with args.
10512 set dummy $ac_prog; ac_word=$2
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10514 $as_echo_n "checking for $ac_word... " >&6; }
10515 if ${ac_cv_path_TAIL+:} false; then :
10516   $as_echo_n "(cached) " >&6
10517 else
10518   case $TAIL in
10519   [\\/]* | ?:[\\/]*)
10520   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10521   ;;
10522   *)
10523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10524 for as_dir in $PATH
10525 do
10526   IFS=$as_save_IFS
10527   test -z "$as_dir" && as_dir=.
10528     for ac_exec_ext in '' $ac_executable_extensions; do
10529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10530     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10532     break 2
10533   fi
10534 done
10535   done
10536 IFS=$as_save_IFS
10537 
10538   ;;
10539 esac
10540 fi
10541 TAIL=$ac_cv_path_TAIL
10542 if test -n "$TAIL"; then
10543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10544 $as_echo "$TAIL" >&6; }
10545 else
10546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547 $as_echo "no" >&6; }
10548 fi
10549 
10550 
10551   test -n "$TAIL" && break
10552 done
10553 
10554     else
10555       # If it succeeded, then it was overridden by the user. We will use it
10556       # for the tool.
10557 
10558       # First remove it from the list of overridden variables, so we can test
10559       # for unknown variables in the end.
10560       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10561 
10562       # Check if we try to supply an empty value
10563       if test "x$TAIL" = x; then
10564         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10565 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10566         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10567 $as_echo_n "checking for TAIL... " >&6; }
10568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10569 $as_echo "disabled" >&6; }
10570       else
10571         # Check if the provided tool contains a complete path.
10572         tool_specified="$TAIL"
10573         tool_basename="${tool_specified##*/}"
10574         if test "x$tool_basename" = "x$tool_specified"; then
10575           # A command without a complete path is provided, search $PATH.
10576           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10577 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10578           # Extract the first word of "$tool_basename", so it can be a program name with args.
10579 set dummy $tool_basename; ac_word=$2
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581 $as_echo_n "checking for $ac_word... " >&6; }
10582 if ${ac_cv_path_TAIL+:} false; then :
10583   $as_echo_n "(cached) " >&6
10584 else
10585   case $TAIL in
10586   [\\/]* | ?:[\\/]*)
10587   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10588   ;;
10589   *)
10590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10591 for as_dir in $PATH
10592 do
10593   IFS=$as_save_IFS
10594   test -z "$as_dir" && as_dir=.
10595     for ac_exec_ext in '' $ac_executable_extensions; do
10596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10597     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10599     break 2
10600   fi
10601 done
10602   done
10603 IFS=$as_save_IFS
10604 
10605   ;;
10606 esac
10607 fi
10608 TAIL=$ac_cv_path_TAIL
10609 if test -n "$TAIL"; then
10610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10611 $as_echo "$TAIL" >&6; }
10612 else
10613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10614 $as_echo "no" >&6; }
10615 fi
10616 
10617 
10618           if test "x$TAIL" = x; then
10619             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10620           fi
10621         else
10622           # Otherwise we believe it is a complete path. Use it as it is.
10623           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10624 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10625           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10626 $as_echo_n "checking for TAIL... " >&6; }
10627           if test ! -x "$tool_specified"; then
10628             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10629 $as_echo "not found" >&6; }
10630             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10631           fi
10632           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10633 $as_echo "$tool_specified" >&6; }
10634         fi
10635       fi
10636     fi
10637 
10638   fi
10639 
10640 
10641 
10642   if test "x$TAIL" = x; then
10643     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10644   fi
10645 
10646 
10647 
10648 
10649 
10650   # Publish this variable in the help.
10651 
10652 
10653   if [ -z "${TAR+x}" ]; then
10654     # The variable is not set by user, try to locate tool using the code snippet
10655     for ac_prog in tar
10656 do
10657   # Extract the first word of "$ac_prog", so it can be a program name with args.
10658 set dummy $ac_prog; ac_word=$2
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10660 $as_echo_n "checking for $ac_word... " >&6; }
10661 if ${ac_cv_path_TAR+:} false; then :
10662   $as_echo_n "(cached) " >&6
10663 else
10664   case $TAR in
10665   [\\/]* | ?:[\\/]*)
10666   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10667   ;;
10668   *)
10669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10670 for as_dir in $PATH
10671 do
10672   IFS=$as_save_IFS
10673   test -z "$as_dir" && as_dir=.
10674     for ac_exec_ext in '' $ac_executable_extensions; do
10675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10676     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10678     break 2
10679   fi
10680 done
10681   done
10682 IFS=$as_save_IFS
10683 
10684   ;;
10685 esac
10686 fi
10687 TAR=$ac_cv_path_TAR
10688 if test -n "$TAR"; then
10689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10690 $as_echo "$TAR" >&6; }
10691 else
10692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10693 $as_echo "no" >&6; }
10694 fi
10695 
10696 
10697   test -n "$TAR" && break
10698 done
10699 
10700   else
10701     # The variable is set, but is it from the command line or the environment?
10702 
10703     # Try to remove the string !TAR! from our list.
10704     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10705     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10706       # If it failed, the variable was not from the command line. Ignore it,
10707       # but warn the user (except for BASH, which is always set by the calling BASH).
10708       if test "xTAR" != xBASH; then
10709         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10710 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10711       fi
10712       # Try to locate tool using the code snippet
10713       for ac_prog in tar
10714 do
10715   # Extract the first word of "$ac_prog", so it can be a program name with args.
10716 set dummy $ac_prog; ac_word=$2
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718 $as_echo_n "checking for $ac_word... " >&6; }
10719 if ${ac_cv_path_TAR+:} false; then :
10720   $as_echo_n "(cached) " >&6
10721 else
10722   case $TAR in
10723   [\\/]* | ?:[\\/]*)
10724   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10725   ;;
10726   *)
10727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728 for as_dir in $PATH
10729 do
10730   IFS=$as_save_IFS
10731   test -z "$as_dir" && as_dir=.
10732     for ac_exec_ext in '' $ac_executable_extensions; do
10733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10734     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736     break 2
10737   fi
10738 done
10739   done
10740 IFS=$as_save_IFS
10741 
10742   ;;
10743 esac
10744 fi
10745 TAR=$ac_cv_path_TAR
10746 if test -n "$TAR"; then
10747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10748 $as_echo "$TAR" >&6; }
10749 else
10750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751 $as_echo "no" >&6; }
10752 fi
10753 
10754 
10755   test -n "$TAR" && break
10756 done
10757 
10758     else
10759       # If it succeeded, then it was overridden by the user. We will use it
10760       # for the tool.
10761 
10762       # First remove it from the list of overridden variables, so we can test
10763       # for unknown variables in the end.
10764       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10765 
10766       # Check if we try to supply an empty value
10767       if test "x$TAR" = x; then
10768         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10769 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10770         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10771 $as_echo_n "checking for TAR... " >&6; }
10772         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10773 $as_echo "disabled" >&6; }
10774       else
10775         # Check if the provided tool contains a complete path.
10776         tool_specified="$TAR"
10777         tool_basename="${tool_specified##*/}"
10778         if test "x$tool_basename" = "x$tool_specified"; then
10779           # A command without a complete path is provided, search $PATH.
10780           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10781 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10782           # Extract the first word of "$tool_basename", so it can be a program name with args.
10783 set dummy $tool_basename; ac_word=$2
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10785 $as_echo_n "checking for $ac_word... " >&6; }
10786 if ${ac_cv_path_TAR+:} false; then :
10787   $as_echo_n "(cached) " >&6
10788 else
10789   case $TAR in
10790   [\\/]* | ?:[\\/]*)
10791   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10792   ;;
10793   *)
10794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10795 for as_dir in $PATH
10796 do
10797   IFS=$as_save_IFS
10798   test -z "$as_dir" && as_dir=.
10799     for ac_exec_ext in '' $ac_executable_extensions; do
10800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10801     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10803     break 2
10804   fi
10805 done
10806   done
10807 IFS=$as_save_IFS
10808 
10809   ;;
10810 esac
10811 fi
10812 TAR=$ac_cv_path_TAR
10813 if test -n "$TAR"; then
10814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10815 $as_echo "$TAR" >&6; }
10816 else
10817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818 $as_echo "no" >&6; }
10819 fi
10820 
10821 
10822           if test "x$TAR" = x; then
10823             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10824           fi
10825         else
10826           # Otherwise we believe it is a complete path. Use it as it is.
10827           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10828 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10829           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10830 $as_echo_n "checking for TAR... " >&6; }
10831           if test ! -x "$tool_specified"; then
10832             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10833 $as_echo "not found" >&6; }
10834             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10835           fi
10836           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10837 $as_echo "$tool_specified" >&6; }
10838         fi
10839       fi
10840     fi
10841 
10842   fi
10843 
10844 
10845 
10846   if test "x$TAR" = x; then
10847     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10848   fi
10849 
10850 
10851 
10852 
10853 
10854   # Publish this variable in the help.
10855 
10856 
10857   if [ -z "${TEE+x}" ]; then
10858     # The variable is not set by user, try to locate tool using the code snippet
10859     for ac_prog in tee
10860 do
10861   # Extract the first word of "$ac_prog", so it can be a program name with args.
10862 set dummy $ac_prog; ac_word=$2
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10864 $as_echo_n "checking for $ac_word... " >&6; }
10865 if ${ac_cv_path_TEE+:} false; then :
10866   $as_echo_n "(cached) " >&6
10867 else
10868   case $TEE in
10869   [\\/]* | ?:[\\/]*)
10870   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10871   ;;
10872   *)
10873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10874 for as_dir in $PATH
10875 do
10876   IFS=$as_save_IFS
10877   test -z "$as_dir" && as_dir=.
10878     for ac_exec_ext in '' $ac_executable_extensions; do
10879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10880     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10882     break 2
10883   fi
10884 done
10885   done
10886 IFS=$as_save_IFS
10887 
10888   ;;
10889 esac
10890 fi
10891 TEE=$ac_cv_path_TEE
10892 if test -n "$TEE"; then
10893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10894 $as_echo "$TEE" >&6; }
10895 else
10896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10897 $as_echo "no" >&6; }
10898 fi
10899 
10900 
10901   test -n "$TEE" && break
10902 done
10903 
10904   else
10905     # The variable is set, but is it from the command line or the environment?
10906 
10907     # Try to remove the string !TEE! from our list.
10908     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10909     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10910       # If it failed, the variable was not from the command line. Ignore it,
10911       # but warn the user (except for BASH, which is always set by the calling BASH).
10912       if test "xTEE" != xBASH; then
10913         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10914 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10915       fi
10916       # Try to locate tool using the code snippet
10917       for ac_prog in tee
10918 do
10919   # Extract the first word of "$ac_prog", so it can be a program name with args.
10920 set dummy $ac_prog; ac_word=$2
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10922 $as_echo_n "checking for $ac_word... " >&6; }
10923 if ${ac_cv_path_TEE+:} false; then :
10924   $as_echo_n "(cached) " >&6
10925 else
10926   case $TEE in
10927   [\\/]* | ?:[\\/]*)
10928   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10929   ;;
10930   *)
10931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10932 for as_dir in $PATH
10933 do
10934   IFS=$as_save_IFS
10935   test -z "$as_dir" && as_dir=.
10936     for ac_exec_ext in '' $ac_executable_extensions; do
10937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10938     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10940     break 2
10941   fi
10942 done
10943   done
10944 IFS=$as_save_IFS
10945 
10946   ;;
10947 esac
10948 fi
10949 TEE=$ac_cv_path_TEE
10950 if test -n "$TEE"; then
10951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10952 $as_echo "$TEE" >&6; }
10953 else
10954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955 $as_echo "no" >&6; }
10956 fi
10957 
10958 
10959   test -n "$TEE" && break
10960 done
10961 
10962     else
10963       # If it succeeded, then it was overridden by the user. We will use it
10964       # for the tool.
10965 
10966       # First remove it from the list of overridden variables, so we can test
10967       # for unknown variables in the end.
10968       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10969 
10970       # Check if we try to supply an empty value
10971       if test "x$TEE" = x; then
10972         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10973 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10974         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10975 $as_echo_n "checking for TEE... " >&6; }
10976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10977 $as_echo "disabled" >&6; }
10978       else
10979         # Check if the provided tool contains a complete path.
10980         tool_specified="$TEE"
10981         tool_basename="${tool_specified##*/}"
10982         if test "x$tool_basename" = "x$tool_specified"; then
10983           # A command without a complete path is provided, search $PATH.
10984           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10985 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10986           # Extract the first word of "$tool_basename", so it can be a program name with args.
10987 set dummy $tool_basename; ac_word=$2
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10989 $as_echo_n "checking for $ac_word... " >&6; }
10990 if ${ac_cv_path_TEE+:} false; then :
10991   $as_echo_n "(cached) " >&6
10992 else
10993   case $TEE in
10994   [\\/]* | ?:[\\/]*)
10995   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10996   ;;
10997   *)
10998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10999 for as_dir in $PATH
11000 do
11001   IFS=$as_save_IFS
11002   test -z "$as_dir" && as_dir=.
11003     for ac_exec_ext in '' $ac_executable_extensions; do
11004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11005     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11007     break 2
11008   fi
11009 done
11010   done
11011 IFS=$as_save_IFS
11012 
11013   ;;
11014 esac
11015 fi
11016 TEE=$ac_cv_path_TEE
11017 if test -n "$TEE"; then
11018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11019 $as_echo "$TEE" >&6; }
11020 else
11021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11022 $as_echo "no" >&6; }
11023 fi
11024 
11025 
11026           if test "x$TEE" = x; then
11027             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11028           fi
11029         else
11030           # Otherwise we believe it is a complete path. Use it as it is.
11031           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11032 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11033           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11034 $as_echo_n "checking for TEE... " >&6; }
11035           if test ! -x "$tool_specified"; then
11036             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11037 $as_echo "not found" >&6; }
11038             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11039           fi
11040           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11041 $as_echo "$tool_specified" >&6; }
11042         fi
11043       fi
11044     fi
11045 
11046   fi
11047 
11048 
11049 
11050   if test "x$TEE" = x; then
11051     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11052   fi
11053 
11054 
11055 
11056 
11057 
11058   # Publish this variable in the help.
11059 
11060 
11061   if [ -z "${TOUCH+x}" ]; then
11062     # The variable is not set by user, try to locate tool using the code snippet
11063     for ac_prog in touch
11064 do
11065   # Extract the first word of "$ac_prog", so it can be a program name with args.
11066 set dummy $ac_prog; ac_word=$2
11067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11068 $as_echo_n "checking for $ac_word... " >&6; }
11069 if ${ac_cv_path_TOUCH+:} false; then :
11070   $as_echo_n "(cached) " >&6
11071 else
11072   case $TOUCH in
11073   [\\/]* | ?:[\\/]*)
11074   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11075   ;;
11076   *)
11077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11078 for as_dir in $PATH
11079 do
11080   IFS=$as_save_IFS
11081   test -z "$as_dir" && as_dir=.
11082     for ac_exec_ext in '' $ac_executable_extensions; do
11083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11084     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11086     break 2
11087   fi
11088 done
11089   done
11090 IFS=$as_save_IFS
11091 
11092   ;;
11093 esac
11094 fi
11095 TOUCH=$ac_cv_path_TOUCH
11096 if test -n "$TOUCH"; then
11097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11098 $as_echo "$TOUCH" >&6; }
11099 else
11100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11101 $as_echo "no" >&6; }
11102 fi
11103 
11104 
11105   test -n "$TOUCH" && break
11106 done
11107 
11108   else
11109     # The variable is set, but is it from the command line or the environment?
11110 
11111     # Try to remove the string !TOUCH! from our list.
11112     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11113     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11114       # If it failed, the variable was not from the command line. Ignore it,
11115       # but warn the user (except for BASH, which is always set by the calling BASH).
11116       if test "xTOUCH" != xBASH; then
11117         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11118 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11119       fi
11120       # Try to locate tool using the code snippet
11121       for ac_prog in touch
11122 do
11123   # Extract the first word of "$ac_prog", so it can be a program name with args.
11124 set dummy $ac_prog; ac_word=$2
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11126 $as_echo_n "checking for $ac_word... " >&6; }
11127 if ${ac_cv_path_TOUCH+:} false; then :
11128   $as_echo_n "(cached) " >&6
11129 else
11130   case $TOUCH in
11131   [\\/]* | ?:[\\/]*)
11132   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11133   ;;
11134   *)
11135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11136 for as_dir in $PATH
11137 do
11138   IFS=$as_save_IFS
11139   test -z "$as_dir" && as_dir=.
11140     for ac_exec_ext in '' $ac_executable_extensions; do
11141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11142     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11144     break 2
11145   fi
11146 done
11147   done
11148 IFS=$as_save_IFS
11149 
11150   ;;
11151 esac
11152 fi
11153 TOUCH=$ac_cv_path_TOUCH
11154 if test -n "$TOUCH"; then
11155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11156 $as_echo "$TOUCH" >&6; }
11157 else
11158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11159 $as_echo "no" >&6; }
11160 fi
11161 
11162 
11163   test -n "$TOUCH" && break
11164 done
11165 
11166     else
11167       # If it succeeded, then it was overridden by the user. We will use it
11168       # for the tool.
11169 
11170       # First remove it from the list of overridden variables, so we can test
11171       # for unknown variables in the end.
11172       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11173 
11174       # Check if we try to supply an empty value
11175       if test "x$TOUCH" = x; then
11176         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11177 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11178         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11179 $as_echo_n "checking for TOUCH... " >&6; }
11180         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11181 $as_echo "disabled" >&6; }
11182       else
11183         # Check if the provided tool contains a complete path.
11184         tool_specified="$TOUCH"
11185         tool_basename="${tool_specified##*/}"
11186         if test "x$tool_basename" = "x$tool_specified"; then
11187           # A command without a complete path is provided, search $PATH.
11188           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11189 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11190           # Extract the first word of "$tool_basename", so it can be a program name with args.
11191 set dummy $tool_basename; ac_word=$2
11192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11193 $as_echo_n "checking for $ac_word... " >&6; }
11194 if ${ac_cv_path_TOUCH+:} false; then :
11195   $as_echo_n "(cached) " >&6
11196 else
11197   case $TOUCH in
11198   [\\/]* | ?:[\\/]*)
11199   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11200   ;;
11201   *)
11202   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11203 for as_dir in $PATH
11204 do
11205   IFS=$as_save_IFS
11206   test -z "$as_dir" && as_dir=.
11207     for ac_exec_ext in '' $ac_executable_extensions; do
11208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11209     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11211     break 2
11212   fi
11213 done
11214   done
11215 IFS=$as_save_IFS
11216 
11217   ;;
11218 esac
11219 fi
11220 TOUCH=$ac_cv_path_TOUCH
11221 if test -n "$TOUCH"; then
11222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11223 $as_echo "$TOUCH" >&6; }
11224 else
11225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11226 $as_echo "no" >&6; }
11227 fi
11228 
11229 
11230           if test "x$TOUCH" = x; then
11231             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11232           fi
11233         else
11234           # Otherwise we believe it is a complete path. Use it as it is.
11235           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11236 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11237           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11238 $as_echo_n "checking for TOUCH... " >&6; }
11239           if test ! -x "$tool_specified"; then
11240             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11241 $as_echo "not found" >&6; }
11242             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11243           fi
11244           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11245 $as_echo "$tool_specified" >&6; }
11246         fi
11247       fi
11248     fi
11249 
11250   fi
11251 
11252 
11253 
11254   if test "x$TOUCH" = x; then
11255     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11256   fi
11257 
11258 
11259 
11260 
11261 
11262   # Publish this variable in the help.
11263 
11264 
11265   if [ -z "${TR+x}" ]; then
11266     # The variable is not set by user, try to locate tool using the code snippet
11267     for ac_prog in tr
11268 do
11269   # Extract the first word of "$ac_prog", so it can be a program name with args.
11270 set dummy $ac_prog; ac_word=$2
11271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11272 $as_echo_n "checking for $ac_word... " >&6; }
11273 if ${ac_cv_path_TR+:} false; then :
11274   $as_echo_n "(cached) " >&6
11275 else
11276   case $TR in
11277   [\\/]* | ?:[\\/]*)
11278   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11279   ;;
11280   *)
11281   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11282 for as_dir in $PATH
11283 do
11284   IFS=$as_save_IFS
11285   test -z "$as_dir" && as_dir=.
11286     for ac_exec_ext in '' $ac_executable_extensions; do
11287   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11288     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11289     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11290     break 2
11291   fi
11292 done
11293   done
11294 IFS=$as_save_IFS
11295 
11296   ;;
11297 esac
11298 fi
11299 TR=$ac_cv_path_TR
11300 if test -n "$TR"; then
11301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11302 $as_echo "$TR" >&6; }
11303 else
11304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11305 $as_echo "no" >&6; }
11306 fi
11307 
11308 
11309   test -n "$TR" && break
11310 done
11311 
11312   else
11313     # The variable is set, but is it from the command line or the environment?
11314 
11315     # Try to remove the string !TR! from our list.
11316     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11317     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11318       # If it failed, the variable was not from the command line. Ignore it,
11319       # but warn the user (except for BASH, which is always set by the calling BASH).
11320       if test "xTR" != xBASH; then
11321         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11322 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11323       fi
11324       # Try to locate tool using the code snippet
11325       for ac_prog in tr
11326 do
11327   # Extract the first word of "$ac_prog", so it can be a program name with args.
11328 set dummy $ac_prog; ac_word=$2
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11330 $as_echo_n "checking for $ac_word... " >&6; }
11331 if ${ac_cv_path_TR+:} false; then :
11332   $as_echo_n "(cached) " >&6
11333 else
11334   case $TR in
11335   [\\/]* | ?:[\\/]*)
11336   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11337   ;;
11338   *)
11339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11340 for as_dir in $PATH
11341 do
11342   IFS=$as_save_IFS
11343   test -z "$as_dir" && as_dir=.
11344     for ac_exec_ext in '' $ac_executable_extensions; do
11345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11346     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348     break 2
11349   fi
11350 done
11351   done
11352 IFS=$as_save_IFS
11353 
11354   ;;
11355 esac
11356 fi
11357 TR=$ac_cv_path_TR
11358 if test -n "$TR"; then
11359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11360 $as_echo "$TR" >&6; }
11361 else
11362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363 $as_echo "no" >&6; }
11364 fi
11365 
11366 
11367   test -n "$TR" && break
11368 done
11369 
11370     else
11371       # If it succeeded, then it was overridden by the user. We will use it
11372       # for the tool.
11373 
11374       # First remove it from the list of overridden variables, so we can test
11375       # for unknown variables in the end.
11376       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11377 
11378       # Check if we try to supply an empty value
11379       if test "x$TR" = x; then
11380         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11381 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11382         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11383 $as_echo_n "checking for TR... " >&6; }
11384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11385 $as_echo "disabled" >&6; }
11386       else
11387         # Check if the provided tool contains a complete path.
11388         tool_specified="$TR"
11389         tool_basename="${tool_specified##*/}"
11390         if test "x$tool_basename" = "x$tool_specified"; then
11391           # A command without a complete path is provided, search $PATH.
11392           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11393 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11394           # Extract the first word of "$tool_basename", so it can be a program name with args.
11395 set dummy $tool_basename; ac_word=$2
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11397 $as_echo_n "checking for $ac_word... " >&6; }
11398 if ${ac_cv_path_TR+:} false; then :
11399   $as_echo_n "(cached) " >&6
11400 else
11401   case $TR in
11402   [\\/]* | ?:[\\/]*)
11403   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11404   ;;
11405   *)
11406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11407 for as_dir in $PATH
11408 do
11409   IFS=$as_save_IFS
11410   test -z "$as_dir" && as_dir=.
11411     for ac_exec_ext in '' $ac_executable_extensions; do
11412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11413     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11415     break 2
11416   fi
11417 done
11418   done
11419 IFS=$as_save_IFS
11420 
11421   ;;
11422 esac
11423 fi
11424 TR=$ac_cv_path_TR
11425 if test -n "$TR"; then
11426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11427 $as_echo "$TR" >&6; }
11428 else
11429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430 $as_echo "no" >&6; }
11431 fi
11432 
11433 
11434           if test "x$TR" = x; then
11435             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11436           fi
11437         else
11438           # Otherwise we believe it is a complete path. Use it as it is.
11439           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11440 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11441           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11442 $as_echo_n "checking for TR... " >&6; }
11443           if test ! -x "$tool_specified"; then
11444             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11445 $as_echo "not found" >&6; }
11446             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11447           fi
11448           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11449 $as_echo "$tool_specified" >&6; }
11450         fi
11451       fi
11452     fi
11453 
11454   fi
11455 
11456 
11457 
11458   if test "x$TR" = x; then
11459     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11460   fi
11461 
11462 
11463 
11464 
11465 
11466   # Publish this variable in the help.
11467 
11468 
11469   if [ -z "${UNAME+x}" ]; then
11470     # The variable is not set by user, try to locate tool using the code snippet
11471     for ac_prog in uname
11472 do
11473   # Extract the first word of "$ac_prog", so it can be a program name with args.
11474 set dummy $ac_prog; ac_word=$2
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11476 $as_echo_n "checking for $ac_word... " >&6; }
11477 if ${ac_cv_path_UNAME+:} false; then :
11478   $as_echo_n "(cached) " >&6
11479 else
11480   case $UNAME in
11481   [\\/]* | ?:[\\/]*)
11482   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11483   ;;
11484   *)
11485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11486 for as_dir in $PATH
11487 do
11488   IFS=$as_save_IFS
11489   test -z "$as_dir" && as_dir=.
11490     for ac_exec_ext in '' $ac_executable_extensions; do
11491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11492     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11494     break 2
11495   fi
11496 done
11497   done
11498 IFS=$as_save_IFS
11499 
11500   ;;
11501 esac
11502 fi
11503 UNAME=$ac_cv_path_UNAME
11504 if test -n "$UNAME"; then
11505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11506 $as_echo "$UNAME" >&6; }
11507 else
11508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11509 $as_echo "no" >&6; }
11510 fi
11511 
11512 
11513   test -n "$UNAME" && break
11514 done
11515 
11516   else
11517     # The variable is set, but is it from the command line or the environment?
11518 
11519     # Try to remove the string !UNAME! from our list.
11520     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11521     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11522       # If it failed, the variable was not from the command line. Ignore it,
11523       # but warn the user (except for BASH, which is always set by the calling BASH).
11524       if test "xUNAME" != xBASH; then
11525         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11526 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11527       fi
11528       # Try to locate tool using the code snippet
11529       for ac_prog in uname
11530 do
11531   # Extract the first word of "$ac_prog", so it can be a program name with args.
11532 set dummy $ac_prog; ac_word=$2
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11534 $as_echo_n "checking for $ac_word... " >&6; }
11535 if ${ac_cv_path_UNAME+:} false; then :
11536   $as_echo_n "(cached) " >&6
11537 else
11538   case $UNAME in
11539   [\\/]* | ?:[\\/]*)
11540   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11541   ;;
11542   *)
11543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11544 for as_dir in $PATH
11545 do
11546   IFS=$as_save_IFS
11547   test -z "$as_dir" && as_dir=.
11548     for ac_exec_ext in '' $ac_executable_extensions; do
11549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11550     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11552     break 2
11553   fi
11554 done
11555   done
11556 IFS=$as_save_IFS
11557 
11558   ;;
11559 esac
11560 fi
11561 UNAME=$ac_cv_path_UNAME
11562 if test -n "$UNAME"; then
11563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11564 $as_echo "$UNAME" >&6; }
11565 else
11566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567 $as_echo "no" >&6; }
11568 fi
11569 
11570 
11571   test -n "$UNAME" && break
11572 done
11573 
11574     else
11575       # If it succeeded, then it was overridden by the user. We will use it
11576       # for the tool.
11577 
11578       # First remove it from the list of overridden variables, so we can test
11579       # for unknown variables in the end.
11580       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11581 
11582       # Check if we try to supply an empty value
11583       if test "x$UNAME" = x; then
11584         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11585 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11586         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11587 $as_echo_n "checking for UNAME... " >&6; }
11588         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11589 $as_echo "disabled" >&6; }
11590       else
11591         # Check if the provided tool contains a complete path.
11592         tool_specified="$UNAME"
11593         tool_basename="${tool_specified##*/}"
11594         if test "x$tool_basename" = "x$tool_specified"; then
11595           # A command without a complete path is provided, search $PATH.
11596           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11597 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11598           # Extract the first word of "$tool_basename", so it can be a program name with args.
11599 set dummy $tool_basename; ac_word=$2
11600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11601 $as_echo_n "checking for $ac_word... " >&6; }
11602 if ${ac_cv_path_UNAME+:} false; then :
11603   $as_echo_n "(cached) " >&6
11604 else
11605   case $UNAME in
11606   [\\/]* | ?:[\\/]*)
11607   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11608   ;;
11609   *)
11610   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11611 for as_dir in $PATH
11612 do
11613   IFS=$as_save_IFS
11614   test -z "$as_dir" && as_dir=.
11615     for ac_exec_ext in '' $ac_executable_extensions; do
11616   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11617     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11618     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11619     break 2
11620   fi
11621 done
11622   done
11623 IFS=$as_save_IFS
11624 
11625   ;;
11626 esac
11627 fi
11628 UNAME=$ac_cv_path_UNAME
11629 if test -n "$UNAME"; then
11630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11631 $as_echo "$UNAME" >&6; }
11632 else
11633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11634 $as_echo "no" >&6; }
11635 fi
11636 
11637 
11638           if test "x$UNAME" = x; then
11639             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11640           fi
11641         else
11642           # Otherwise we believe it is a complete path. Use it as it is.
11643           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11644 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11645           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11646 $as_echo_n "checking for UNAME... " >&6; }
11647           if test ! -x "$tool_specified"; then
11648             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11649 $as_echo "not found" >&6; }
11650             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11651           fi
11652           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11653 $as_echo "$tool_specified" >&6; }
11654         fi
11655       fi
11656     fi
11657 
11658   fi
11659 
11660 
11661 
11662   if test "x$UNAME" = x; then
11663     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11664   fi
11665 
11666 
11667 
11668 
11669 
11670   # Publish this variable in the help.
11671 
11672 
11673   if [ -z "${UNIQ+x}" ]; then
11674     # The variable is not set by user, try to locate tool using the code snippet
11675     for ac_prog in uniq
11676 do
11677   # Extract the first word of "$ac_prog", so it can be a program name with args.
11678 set dummy $ac_prog; ac_word=$2
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11680 $as_echo_n "checking for $ac_word... " >&6; }
11681 if ${ac_cv_path_UNIQ+:} false; then :
11682   $as_echo_n "(cached) " >&6
11683 else
11684   case $UNIQ in
11685   [\\/]* | ?:[\\/]*)
11686   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11687   ;;
11688   *)
11689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11690 for as_dir in $PATH
11691 do
11692   IFS=$as_save_IFS
11693   test -z "$as_dir" && as_dir=.
11694     for ac_exec_ext in '' $ac_executable_extensions; do
11695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11696     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11698     break 2
11699   fi
11700 done
11701   done
11702 IFS=$as_save_IFS
11703 
11704   ;;
11705 esac
11706 fi
11707 UNIQ=$ac_cv_path_UNIQ
11708 if test -n "$UNIQ"; then
11709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11710 $as_echo "$UNIQ" >&6; }
11711 else
11712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713 $as_echo "no" >&6; }
11714 fi
11715 
11716 
11717   test -n "$UNIQ" && break
11718 done
11719 
11720   else
11721     # The variable is set, but is it from the command line or the environment?
11722 
11723     # Try to remove the string !UNIQ! from our list.
11724     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11725     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11726       # If it failed, the variable was not from the command line. Ignore it,
11727       # but warn the user (except for BASH, which is always set by the calling BASH).
11728       if test "xUNIQ" != xBASH; then
11729         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11730 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11731       fi
11732       # Try to locate tool using the code snippet
11733       for ac_prog in uniq
11734 do
11735   # Extract the first word of "$ac_prog", so it can be a program name with args.
11736 set dummy $ac_prog; ac_word=$2
11737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11738 $as_echo_n "checking for $ac_word... " >&6; }
11739 if ${ac_cv_path_UNIQ+:} false; then :
11740   $as_echo_n "(cached) " >&6
11741 else
11742   case $UNIQ in
11743   [\\/]* | ?:[\\/]*)
11744   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11745   ;;
11746   *)
11747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11748 for as_dir in $PATH
11749 do
11750   IFS=$as_save_IFS
11751   test -z "$as_dir" && as_dir=.
11752     for ac_exec_ext in '' $ac_executable_extensions; do
11753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11754     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11756     break 2
11757   fi
11758 done
11759   done
11760 IFS=$as_save_IFS
11761 
11762   ;;
11763 esac
11764 fi
11765 UNIQ=$ac_cv_path_UNIQ
11766 if test -n "$UNIQ"; then
11767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11768 $as_echo "$UNIQ" >&6; }
11769 else
11770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771 $as_echo "no" >&6; }
11772 fi
11773 
11774 
11775   test -n "$UNIQ" && break
11776 done
11777 
11778     else
11779       # If it succeeded, then it was overridden by the user. We will use it
11780       # for the tool.
11781 
11782       # First remove it from the list of overridden variables, so we can test
11783       # for unknown variables in the end.
11784       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11785 
11786       # Check if we try to supply an empty value
11787       if test "x$UNIQ" = x; then
11788         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11789 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11791 $as_echo_n "checking for UNIQ... " >&6; }
11792         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11793 $as_echo "disabled" >&6; }
11794       else
11795         # Check if the provided tool contains a complete path.
11796         tool_specified="$UNIQ"
11797         tool_basename="${tool_specified##*/}"
11798         if test "x$tool_basename" = "x$tool_specified"; then
11799           # A command without a complete path is provided, search $PATH.
11800           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11801 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11802           # Extract the first word of "$tool_basename", so it can be a program name with args.
11803 set dummy $tool_basename; ac_word=$2
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11805 $as_echo_n "checking for $ac_word... " >&6; }
11806 if ${ac_cv_path_UNIQ+:} false; then :
11807   $as_echo_n "(cached) " >&6
11808 else
11809   case $UNIQ in
11810   [\\/]* | ?:[\\/]*)
11811   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11812   ;;
11813   *)
11814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11815 for as_dir in $PATH
11816 do
11817   IFS=$as_save_IFS
11818   test -z "$as_dir" && as_dir=.
11819     for ac_exec_ext in '' $ac_executable_extensions; do
11820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11821     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11823     break 2
11824   fi
11825 done
11826   done
11827 IFS=$as_save_IFS
11828 
11829   ;;
11830 esac
11831 fi
11832 UNIQ=$ac_cv_path_UNIQ
11833 if test -n "$UNIQ"; then
11834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11835 $as_echo "$UNIQ" >&6; }
11836 else
11837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11838 $as_echo "no" >&6; }
11839 fi
11840 
11841 
11842           if test "x$UNIQ" = x; then
11843             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11844           fi
11845         else
11846           # Otherwise we believe it is a complete path. Use it as it is.
11847           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11848 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11849           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11850 $as_echo_n "checking for UNIQ... " >&6; }
11851           if test ! -x "$tool_specified"; then
11852             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11853 $as_echo "not found" >&6; }
11854             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11855           fi
11856           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11857 $as_echo "$tool_specified" >&6; }
11858         fi
11859       fi
11860     fi
11861 
11862   fi
11863 
11864 
11865 
11866   if test "x$UNIQ" = x; then
11867     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11868   fi
11869 
11870 
11871 
11872 
11873 
11874   # Publish this variable in the help.
11875 
11876 
11877   if [ -z "${WC+x}" ]; then
11878     # The variable is not set by user, try to locate tool using the code snippet
11879     for ac_prog in wc
11880 do
11881   # Extract the first word of "$ac_prog", so it can be a program name with args.
11882 set dummy $ac_prog; ac_word=$2
11883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11884 $as_echo_n "checking for $ac_word... " >&6; }
11885 if ${ac_cv_path_WC+:} false; then :
11886   $as_echo_n "(cached) " >&6
11887 else
11888   case $WC in
11889   [\\/]* | ?:[\\/]*)
11890   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11891   ;;
11892   *)
11893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11894 for as_dir in $PATH
11895 do
11896   IFS=$as_save_IFS
11897   test -z "$as_dir" && as_dir=.
11898     for ac_exec_ext in '' $ac_executable_extensions; do
11899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11900     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11902     break 2
11903   fi
11904 done
11905   done
11906 IFS=$as_save_IFS
11907 
11908   ;;
11909 esac
11910 fi
11911 WC=$ac_cv_path_WC
11912 if test -n "$WC"; then
11913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11914 $as_echo "$WC" >&6; }
11915 else
11916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11917 $as_echo "no" >&6; }
11918 fi
11919 
11920 
11921   test -n "$WC" && break
11922 done
11923 
11924   else
11925     # The variable is set, but is it from the command line or the environment?
11926 
11927     # Try to remove the string !WC! from our list.
11928     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11929     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11930       # If it failed, the variable was not from the command line. Ignore it,
11931       # but warn the user (except for BASH, which is always set by the calling BASH).
11932       if test "xWC" != xBASH; then
11933         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11934 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11935       fi
11936       # Try to locate tool using the code snippet
11937       for ac_prog in wc
11938 do
11939   # Extract the first word of "$ac_prog", so it can be a program name with args.
11940 set dummy $ac_prog; ac_word=$2
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11942 $as_echo_n "checking for $ac_word... " >&6; }
11943 if ${ac_cv_path_WC+:} false; then :
11944   $as_echo_n "(cached) " >&6
11945 else
11946   case $WC in
11947   [\\/]* | ?:[\\/]*)
11948   ac_cv_path_WC="$WC" # Let the user override the test with a path.
11949   ;;
11950   *)
11951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11952 for as_dir in $PATH
11953 do
11954   IFS=$as_save_IFS
11955   test -z "$as_dir" && as_dir=.
11956     for ac_exec_ext in '' $ac_executable_extensions; do
11957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11958     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11960     break 2
11961   fi
11962 done
11963   done
11964 IFS=$as_save_IFS
11965 
11966   ;;
11967 esac
11968 fi
11969 WC=$ac_cv_path_WC
11970 if test -n "$WC"; then
11971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11972 $as_echo "$WC" >&6; }
11973 else
11974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975 $as_echo "no" >&6; }
11976 fi
11977 
11978 
11979   test -n "$WC" && break
11980 done
11981 
11982     else
11983       # If it succeeded, then it was overridden by the user. We will use it
11984       # for the tool.
11985 
11986       # First remove it from the list of overridden variables, so we can test
11987       # for unknown variables in the end.
11988       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11989 
11990       # Check if we try to supply an empty value
11991       if test "x$WC" = x; then
11992         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11993 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11994         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11995 $as_echo_n "checking for WC... " >&6; }
11996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11997 $as_echo "disabled" >&6; }
11998       else
11999         # Check if the provided tool contains a complete path.
12000         tool_specified="$WC"
12001         tool_basename="${tool_specified##*/}"
12002         if test "x$tool_basename" = "x$tool_specified"; then
12003           # A command without a complete path is provided, search $PATH.
12004           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12005 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12006           # Extract the first word of "$tool_basename", so it can be a program name with args.
12007 set dummy $tool_basename; ac_word=$2
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12009 $as_echo_n "checking for $ac_word... " >&6; }
12010 if ${ac_cv_path_WC+:} false; then :
12011   $as_echo_n "(cached) " >&6
12012 else
12013   case $WC in
12014   [\\/]* | ?:[\\/]*)
12015   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12016   ;;
12017   *)
12018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12019 for as_dir in $PATH
12020 do
12021   IFS=$as_save_IFS
12022   test -z "$as_dir" && as_dir=.
12023     for ac_exec_ext in '' $ac_executable_extensions; do
12024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12025     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12027     break 2
12028   fi
12029 done
12030   done
12031 IFS=$as_save_IFS
12032 
12033   ;;
12034 esac
12035 fi
12036 WC=$ac_cv_path_WC
12037 if test -n "$WC"; then
12038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12039 $as_echo "$WC" >&6; }
12040 else
12041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12042 $as_echo "no" >&6; }
12043 fi
12044 
12045 
12046           if test "x$WC" = x; then
12047             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12048           fi
12049         else
12050           # Otherwise we believe it is a complete path. Use it as it is.
12051           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12052 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12053           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12054 $as_echo_n "checking for WC... " >&6; }
12055           if test ! -x "$tool_specified"; then
12056             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12057 $as_echo "not found" >&6; }
12058             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12059           fi
12060           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12061 $as_echo "$tool_specified" >&6; }
12062         fi
12063       fi
12064     fi
12065 
12066   fi
12067 
12068 
12069 
12070   if test "x$WC" = x; then
12071     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12072   fi
12073 
12074 
12075 
12076 
12077 
12078   # Publish this variable in the help.
12079 
12080 
12081   if [ -z "${WHICH+x}" ]; then
12082     # The variable is not set by user, try to locate tool using the code snippet
12083     for ac_prog in which
12084 do
12085   # Extract the first word of "$ac_prog", so it can be a program name with args.
12086 set dummy $ac_prog; ac_word=$2
12087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12088 $as_echo_n "checking for $ac_word... " >&6; }
12089 if ${ac_cv_path_WHICH+:} false; then :
12090   $as_echo_n "(cached) " >&6
12091 else
12092   case $WHICH in
12093   [\\/]* | ?:[\\/]*)
12094   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12095   ;;
12096   *)
12097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12098 for as_dir in $PATH
12099 do
12100   IFS=$as_save_IFS
12101   test -z "$as_dir" && as_dir=.
12102     for ac_exec_ext in '' $ac_executable_extensions; do
12103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12104     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12106     break 2
12107   fi
12108 done
12109   done
12110 IFS=$as_save_IFS
12111 
12112   ;;
12113 esac
12114 fi
12115 WHICH=$ac_cv_path_WHICH
12116 if test -n "$WHICH"; then
12117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12118 $as_echo "$WHICH" >&6; }
12119 else
12120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12121 $as_echo "no" >&6; }
12122 fi
12123 
12124 
12125   test -n "$WHICH" && break
12126 done
12127 
12128   else
12129     # The variable is set, but is it from the command line or the environment?
12130 
12131     # Try to remove the string !WHICH! from our list.
12132     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12133     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12134       # If it failed, the variable was not from the command line. Ignore it,
12135       # but warn the user (except for BASH, which is always set by the calling BASH).
12136       if test "xWHICH" != xBASH; then
12137         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12138 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12139       fi
12140       # Try to locate tool using the code snippet
12141       for ac_prog in which
12142 do
12143   # Extract the first word of "$ac_prog", so it can be a program name with args.
12144 set dummy $ac_prog; ac_word=$2
12145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12146 $as_echo_n "checking for $ac_word... " >&6; }
12147 if ${ac_cv_path_WHICH+:} false; then :
12148   $as_echo_n "(cached) " >&6
12149 else
12150   case $WHICH in
12151   [\\/]* | ?:[\\/]*)
12152   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12153   ;;
12154   *)
12155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12156 for as_dir in $PATH
12157 do
12158   IFS=$as_save_IFS
12159   test -z "$as_dir" && as_dir=.
12160     for ac_exec_ext in '' $ac_executable_extensions; do
12161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12162     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12164     break 2
12165   fi
12166 done
12167   done
12168 IFS=$as_save_IFS
12169 
12170   ;;
12171 esac
12172 fi
12173 WHICH=$ac_cv_path_WHICH
12174 if test -n "$WHICH"; then
12175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12176 $as_echo "$WHICH" >&6; }
12177 else
12178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179 $as_echo "no" >&6; }
12180 fi
12181 
12182 
12183   test -n "$WHICH" && break
12184 done
12185 
12186     else
12187       # If it succeeded, then it was overridden by the user. We will use it
12188       # for the tool.
12189 
12190       # First remove it from the list of overridden variables, so we can test
12191       # for unknown variables in the end.
12192       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12193 
12194       # Check if we try to supply an empty value
12195       if test "x$WHICH" = x; then
12196         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12197 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12199 $as_echo_n "checking for WHICH... " >&6; }
12200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12201 $as_echo "disabled" >&6; }
12202       else
12203         # Check if the provided tool contains a complete path.
12204         tool_specified="$WHICH"
12205         tool_basename="${tool_specified##*/}"
12206         if test "x$tool_basename" = "x$tool_specified"; then
12207           # A command without a complete path is provided, search $PATH.
12208           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12209 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12210           # Extract the first word of "$tool_basename", so it can be a program name with args.
12211 set dummy $tool_basename; ac_word=$2
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12213 $as_echo_n "checking for $ac_word... " >&6; }
12214 if ${ac_cv_path_WHICH+:} false; then :
12215   $as_echo_n "(cached) " >&6
12216 else
12217   case $WHICH in
12218   [\\/]* | ?:[\\/]*)
12219   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12220   ;;
12221   *)
12222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12223 for as_dir in $PATH
12224 do
12225   IFS=$as_save_IFS
12226   test -z "$as_dir" && as_dir=.
12227     for ac_exec_ext in '' $ac_executable_extensions; do
12228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12229     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12231     break 2
12232   fi
12233 done
12234   done
12235 IFS=$as_save_IFS
12236 
12237   ;;
12238 esac
12239 fi
12240 WHICH=$ac_cv_path_WHICH
12241 if test -n "$WHICH"; then
12242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12243 $as_echo "$WHICH" >&6; }
12244 else
12245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12246 $as_echo "no" >&6; }
12247 fi
12248 
12249 
12250           if test "x$WHICH" = x; then
12251             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12252           fi
12253         else
12254           # Otherwise we believe it is a complete path. Use it as it is.
12255           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12256 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12257           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12258 $as_echo_n "checking for WHICH... " >&6; }
12259           if test ! -x "$tool_specified"; then
12260             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12261 $as_echo "not found" >&6; }
12262             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12263           fi
12264           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12265 $as_echo "$tool_specified" >&6; }
12266         fi
12267       fi
12268     fi
12269 
12270   fi
12271 
12272 
12273 
12274   if test "x$WHICH" = x; then
12275     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12276   fi
12277 
12278 
12279 
12280 
12281 
12282   # Publish this variable in the help.
12283 
12284 
12285   if [ -z "${XARGS+x}" ]; then
12286     # The variable is not set by user, try to locate tool using the code snippet
12287     for ac_prog in xargs
12288 do
12289   # Extract the first word of "$ac_prog", so it can be a program name with args.
12290 set dummy $ac_prog; ac_word=$2
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12292 $as_echo_n "checking for $ac_word... " >&6; }
12293 if ${ac_cv_path_XARGS+:} false; then :
12294   $as_echo_n "(cached) " >&6
12295 else
12296   case $XARGS in
12297   [\\/]* | ?:[\\/]*)
12298   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12299   ;;
12300   *)
12301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12302 for as_dir in $PATH
12303 do
12304   IFS=$as_save_IFS
12305   test -z "$as_dir" && as_dir=.
12306     for ac_exec_ext in '' $ac_executable_extensions; do
12307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12308     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12310     break 2
12311   fi
12312 done
12313   done
12314 IFS=$as_save_IFS
12315 
12316   ;;
12317 esac
12318 fi
12319 XARGS=$ac_cv_path_XARGS
12320 if test -n "$XARGS"; then
12321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12322 $as_echo "$XARGS" >&6; }
12323 else
12324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12325 $as_echo "no" >&6; }
12326 fi
12327 
12328 
12329   test -n "$XARGS" && break
12330 done
12331 
12332   else
12333     # The variable is set, but is it from the command line or the environment?
12334 
12335     # Try to remove the string !XARGS! from our list.
12336     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12337     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12338       # If it failed, the variable was not from the command line. Ignore it,
12339       # but warn the user (except for BASH, which is always set by the calling BASH).
12340       if test "xXARGS" != xBASH; then
12341         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12342 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12343       fi
12344       # Try to locate tool using the code snippet
12345       for ac_prog in xargs
12346 do
12347   # Extract the first word of "$ac_prog", so it can be a program name with args.
12348 set dummy $ac_prog; ac_word=$2
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12350 $as_echo_n "checking for $ac_word... " >&6; }
12351 if ${ac_cv_path_XARGS+:} false; then :
12352   $as_echo_n "(cached) " >&6
12353 else
12354   case $XARGS in
12355   [\\/]* | ?:[\\/]*)
12356   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12357   ;;
12358   *)
12359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12360 for as_dir in $PATH
12361 do
12362   IFS=$as_save_IFS
12363   test -z "$as_dir" && as_dir=.
12364     for ac_exec_ext in '' $ac_executable_extensions; do
12365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12366     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12368     break 2
12369   fi
12370 done
12371   done
12372 IFS=$as_save_IFS
12373 
12374   ;;
12375 esac
12376 fi
12377 XARGS=$ac_cv_path_XARGS
12378 if test -n "$XARGS"; then
12379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12380 $as_echo "$XARGS" >&6; }
12381 else
12382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12383 $as_echo "no" >&6; }
12384 fi
12385 
12386 
12387   test -n "$XARGS" && break
12388 done
12389 
12390     else
12391       # If it succeeded, then it was overridden by the user. We will use it
12392       # for the tool.
12393 
12394       # First remove it from the list of overridden variables, so we can test
12395       # for unknown variables in the end.
12396       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12397 
12398       # Check if we try to supply an empty value
12399       if test "x$XARGS" = x; then
12400         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12401 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12402         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12403 $as_echo_n "checking for XARGS... " >&6; }
12404         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12405 $as_echo "disabled" >&6; }
12406       else
12407         # Check if the provided tool contains a complete path.
12408         tool_specified="$XARGS"
12409         tool_basename="${tool_specified##*/}"
12410         if test "x$tool_basename" = "x$tool_specified"; then
12411           # A command without a complete path is provided, search $PATH.
12412           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12413 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12414           # Extract the first word of "$tool_basename", so it can be a program name with args.
12415 set dummy $tool_basename; ac_word=$2
12416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12417 $as_echo_n "checking for $ac_word... " >&6; }
12418 if ${ac_cv_path_XARGS+:} false; then :
12419   $as_echo_n "(cached) " >&6
12420 else
12421   case $XARGS in
12422   [\\/]* | ?:[\\/]*)
12423   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12424   ;;
12425   *)
12426   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12427 for as_dir in $PATH
12428 do
12429   IFS=$as_save_IFS
12430   test -z "$as_dir" && as_dir=.
12431     for ac_exec_ext in '' $ac_executable_extensions; do
12432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12433     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12435     break 2
12436   fi
12437 done
12438   done
12439 IFS=$as_save_IFS
12440 
12441   ;;
12442 esac
12443 fi
12444 XARGS=$ac_cv_path_XARGS
12445 if test -n "$XARGS"; then
12446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12447 $as_echo "$XARGS" >&6; }
12448 else
12449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12450 $as_echo "no" >&6; }
12451 fi
12452 
12453 
12454           if test "x$XARGS" = x; then
12455             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12456           fi
12457         else
12458           # Otherwise we believe it is a complete path. Use it as it is.
12459           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12460 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12461           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12462 $as_echo_n "checking for XARGS... " >&6; }
12463           if test ! -x "$tool_specified"; then
12464             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12465 $as_echo "not found" >&6; }
12466             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12467           fi
12468           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12469 $as_echo "$tool_specified" >&6; }
12470         fi
12471       fi
12472     fi
12473 
12474   fi
12475 
12476 
12477 
12478   if test "x$XARGS" = x; then
12479     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12480   fi
12481 
12482 
12483 
12484   # Then required tools that require some special treatment.
12485 
12486 
12487   # Publish this variable in the help.
12488 
12489 
12490   if [ -z "${AWK+x}" ]; then
12491     # The variable is not set by user, try to locate tool using the code snippet
12492     for ac_prog in gawk mawk nawk awk
12493 do
12494   # Extract the first word of "$ac_prog", so it can be a program name with args.
12495 set dummy $ac_prog; ac_word=$2
12496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12497 $as_echo_n "checking for $ac_word... " >&6; }
12498 if ${ac_cv_prog_AWK+:} false; then :
12499   $as_echo_n "(cached) " >&6
12500 else
12501   if test -n "$AWK"; then
12502   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12503 else
12504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12505 for as_dir in $PATH
12506 do
12507   IFS=$as_save_IFS
12508   test -z "$as_dir" && as_dir=.
12509     for ac_exec_ext in '' $ac_executable_extensions; do
12510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12511     ac_cv_prog_AWK="$ac_prog"
12512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12513     break 2
12514   fi
12515 done
12516   done
12517 IFS=$as_save_IFS
12518 
12519 fi
12520 fi
12521 AWK=$ac_cv_prog_AWK
12522 if test -n "$AWK"; then
12523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12524 $as_echo "$AWK" >&6; }
12525 else
12526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12527 $as_echo "no" >&6; }
12528 fi
12529 
12530 
12531   test -n "$AWK" && break
12532 done
12533 
12534   else
12535     # The variable is set, but is it from the command line or the environment?
12536 
12537     # Try to remove the string !AWK! from our list.
12538     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12539     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12540       # If it failed, the variable was not from the command line. Ignore it,
12541       # but warn the user (except for BASH, which is always set by the calling BASH).
12542       if test "xAWK" != xBASH; then
12543         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12544 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12545       fi
12546       # Try to locate tool using the code snippet
12547       for ac_prog in gawk mawk nawk awk
12548 do
12549   # Extract the first word of "$ac_prog", so it can be a program name with args.
12550 set dummy $ac_prog; ac_word=$2
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12552 $as_echo_n "checking for $ac_word... " >&6; }
12553 if ${ac_cv_prog_AWK+:} false; then :
12554   $as_echo_n "(cached) " >&6
12555 else
12556   if test -n "$AWK"; then
12557   ac_cv_prog_AWK="$AWK" # Let the user override the test.
12558 else
12559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12560 for as_dir in $PATH
12561 do
12562   IFS=$as_save_IFS
12563   test -z "$as_dir" && as_dir=.
12564     for ac_exec_ext in '' $ac_executable_extensions; do
12565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12566     ac_cv_prog_AWK="$ac_prog"
12567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12568     break 2
12569   fi
12570 done
12571   done
12572 IFS=$as_save_IFS
12573 
12574 fi
12575 fi
12576 AWK=$ac_cv_prog_AWK
12577 if test -n "$AWK"; then
12578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12579 $as_echo "$AWK" >&6; }
12580 else
12581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12582 $as_echo "no" >&6; }
12583 fi
12584 
12585 
12586   test -n "$AWK" && break
12587 done
12588 
12589     else
12590       # If it succeeded, then it was overridden by the user. We will use it
12591       # for the tool.
12592 
12593       # First remove it from the list of overridden variables, so we can test
12594       # for unknown variables in the end.
12595       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12596 
12597       # Check if we try to supply an empty value
12598       if test "x$AWK" = x; then
12599         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12600 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12601         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12602 $as_echo_n "checking for AWK... " >&6; }
12603         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12604 $as_echo "disabled" >&6; }
12605       else
12606         # Check if the provided tool contains a complete path.
12607         tool_specified="$AWK"
12608         tool_basename="${tool_specified##*/}"
12609         if test "x$tool_basename" = "x$tool_specified"; then
12610           # A command without a complete path is provided, search $PATH.
12611           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12612 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12613           # Extract the first word of "$tool_basename", so it can be a program name with args.
12614 set dummy $tool_basename; ac_word=$2
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12616 $as_echo_n "checking for $ac_word... " >&6; }
12617 if ${ac_cv_path_AWK+:} false; then :
12618   $as_echo_n "(cached) " >&6
12619 else
12620   case $AWK in
12621   [\\/]* | ?:[\\/]*)
12622   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12623   ;;
12624   *)
12625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12626 for as_dir in $PATH
12627 do
12628   IFS=$as_save_IFS
12629   test -z "$as_dir" && as_dir=.
12630     for ac_exec_ext in '' $ac_executable_extensions; do
12631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12632     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12634     break 2
12635   fi
12636 done
12637   done
12638 IFS=$as_save_IFS
12639 
12640   ;;
12641 esac
12642 fi
12643 AWK=$ac_cv_path_AWK
12644 if test -n "$AWK"; then
12645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12646 $as_echo "$AWK" >&6; }
12647 else
12648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12649 $as_echo "no" >&6; }
12650 fi
12651 
12652 
12653           if test "x$AWK" = x; then
12654             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12655           fi
12656         else
12657           # Otherwise we believe it is a complete path. Use it as it is.
12658           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12659 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12660           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12661 $as_echo_n "checking for AWK... " >&6; }
12662           if test ! -x "$tool_specified"; then
12663             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12664 $as_echo "not found" >&6; }
12665             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12666           fi
12667           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12668 $as_echo "$tool_specified" >&6; }
12669         fi
12670       fi
12671     fi
12672 
12673   fi
12674 
12675 
12676   if test "x$AWK" = x; then
12677     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12678   fi
12679 
12680 
12681 
12682 
12683   # Publish this variable in the help.
12684 
12685 
12686   if [ -z "${GREP+x}" ]; then
12687     # The variable is not set by user, try to locate tool using the code snippet
12688     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12689 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12690 if ${ac_cv_path_GREP+:} false; then :
12691   $as_echo_n "(cached) " >&6
12692 else
12693   if test -z "$GREP"; then
12694   ac_path_GREP_found=false
12695   # Loop through the user's path and test for each of PROGNAME-LIST
12696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12697 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12698 do
12699   IFS=$as_save_IFS
12700   test -z "$as_dir" && as_dir=.
12701     for ac_prog in grep ggrep; do
12702     for ac_exec_ext in '' $ac_executable_extensions; do
12703       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12704       as_fn_executable_p "$ac_path_GREP" || continue
12705 # Check for GNU ac_path_GREP and select it if it is found.
12706   # Check for GNU $ac_path_GREP
12707 case `"$ac_path_GREP" --version 2>&1` in
12708 *GNU*)
12709   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12710 *)
12711   ac_count=0
12712   $as_echo_n 0123456789 >"conftest.in"
12713   while :
12714   do
12715     cat "conftest.in" "conftest.in" >"conftest.tmp"
12716     mv "conftest.tmp" "conftest.in"
12717     cp "conftest.in" "conftest.nl"
12718     $as_echo 'GREP' >> "conftest.nl"
12719     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12720     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12721     as_fn_arith $ac_count + 1 && ac_count=$as_val
12722     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12723       # Best one so far, save it but keep looking for a better one
12724       ac_cv_path_GREP="$ac_path_GREP"
12725       ac_path_GREP_max=$ac_count
12726     fi
12727     # 10*(2^10) chars as input seems more than enough
12728     test $ac_count -gt 10 && break
12729   done
12730   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12731 esac
12732 
12733       $ac_path_GREP_found && break 3
12734     done
12735   done
12736   done
12737 IFS=$as_save_IFS
12738   if test -z "$ac_cv_path_GREP"; then
12739     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12740   fi
12741 else
12742   ac_cv_path_GREP=$GREP
12743 fi
12744 
12745 fi
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12747 $as_echo "$ac_cv_path_GREP" >&6; }
12748  GREP="$ac_cv_path_GREP"
12749 
12750 
12751   else
12752     # The variable is set, but is it from the command line or the environment?
12753 
12754     # Try to remove the string !GREP! from our list.
12755     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12756     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12757       # If it failed, the variable was not from the command line. Ignore it,
12758       # but warn the user (except for BASH, which is always set by the calling BASH).
12759       if test "xGREP" != xBASH; then
12760         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12761 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12762       fi
12763       # Try to locate tool using the code snippet
12764       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12765 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12766 if ${ac_cv_path_GREP+:} false; then :
12767   $as_echo_n "(cached) " >&6
12768 else
12769   if test -z "$GREP"; then
12770   ac_path_GREP_found=false
12771   # Loop through the user's path and test for each of PROGNAME-LIST
12772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12773 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12774 do
12775   IFS=$as_save_IFS
12776   test -z "$as_dir" && as_dir=.
12777     for ac_prog in grep ggrep; do
12778     for ac_exec_ext in '' $ac_executable_extensions; do
12779       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12780       as_fn_executable_p "$ac_path_GREP" || continue
12781 # Check for GNU ac_path_GREP and select it if it is found.
12782   # Check for GNU $ac_path_GREP
12783 case `"$ac_path_GREP" --version 2>&1` in
12784 *GNU*)
12785   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12786 *)
12787   ac_count=0
12788   $as_echo_n 0123456789 >"conftest.in"
12789   while :
12790   do
12791     cat "conftest.in" "conftest.in" >"conftest.tmp"
12792     mv "conftest.tmp" "conftest.in"
12793     cp "conftest.in" "conftest.nl"
12794     $as_echo 'GREP' >> "conftest.nl"
12795     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12796     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12797     as_fn_arith $ac_count + 1 && ac_count=$as_val
12798     if test $ac_count -gt ${ac_path_GREP_max-0}; then
12799       # Best one so far, save it but keep looking for a better one
12800       ac_cv_path_GREP="$ac_path_GREP"
12801       ac_path_GREP_max=$ac_count
12802     fi
12803     # 10*(2^10) chars as input seems more than enough
12804     test $ac_count -gt 10 && break
12805   done
12806   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12807 esac
12808 
12809       $ac_path_GREP_found && break 3
12810     done
12811   done
12812   done
12813 IFS=$as_save_IFS
12814   if test -z "$ac_cv_path_GREP"; then
12815     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12816   fi
12817 else
12818   ac_cv_path_GREP=$GREP
12819 fi
12820 
12821 fi
12822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12823 $as_echo "$ac_cv_path_GREP" >&6; }
12824  GREP="$ac_cv_path_GREP"
12825 
12826 
12827     else
12828       # If it succeeded, then it was overridden by the user. We will use it
12829       # for the tool.
12830 
12831       # First remove it from the list of overridden variables, so we can test
12832       # for unknown variables in the end.
12833       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12834 
12835       # Check if we try to supply an empty value
12836       if test "x$GREP" = x; then
12837         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12838 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12839         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12840 $as_echo_n "checking for GREP... " >&6; }
12841         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12842 $as_echo "disabled" >&6; }
12843       else
12844         # Check if the provided tool contains a complete path.
12845         tool_specified="$GREP"
12846         tool_basename="${tool_specified##*/}"
12847         if test "x$tool_basename" = "x$tool_specified"; then
12848           # A command without a complete path is provided, search $PATH.
12849           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12850 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12851           # Extract the first word of "$tool_basename", so it can be a program name with args.
12852 set dummy $tool_basename; ac_word=$2
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12854 $as_echo_n "checking for $ac_word... " >&6; }
12855 if ${ac_cv_path_GREP+:} false; then :
12856   $as_echo_n "(cached) " >&6
12857 else
12858   case $GREP in
12859   [\\/]* | ?:[\\/]*)
12860   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12861   ;;
12862   *)
12863   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12864 for as_dir in $PATH
12865 do
12866   IFS=$as_save_IFS
12867   test -z "$as_dir" && as_dir=.
12868     for ac_exec_ext in '' $ac_executable_extensions; do
12869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12870     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12872     break 2
12873   fi
12874 done
12875   done
12876 IFS=$as_save_IFS
12877 
12878   ;;
12879 esac
12880 fi
12881 GREP=$ac_cv_path_GREP
12882 if test -n "$GREP"; then
12883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12884 $as_echo "$GREP" >&6; }
12885 else
12886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12887 $as_echo "no" >&6; }
12888 fi
12889 
12890 
12891           if test "x$GREP" = x; then
12892             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12893           fi
12894         else
12895           # Otherwise we believe it is a complete path. Use it as it is.
12896           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12897 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12898           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12899 $as_echo_n "checking for GREP... " >&6; }
12900           if test ! -x "$tool_specified"; then
12901             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12902 $as_echo "not found" >&6; }
12903             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12904           fi
12905           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12906 $as_echo "$tool_specified" >&6; }
12907         fi
12908       fi
12909     fi
12910 
12911   fi
12912 
12913 
12914   if test "x$GREP" = x; then
12915     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12916   fi
12917 
12918 
12919 
12920 
12921   # Publish this variable in the help.
12922 
12923 
12924   if [ -z "${EGREP+x}" ]; then
12925     # The variable is not set by user, try to locate tool using the code snippet
12926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12927 $as_echo_n "checking for egrep... " >&6; }
12928 if ${ac_cv_path_EGREP+:} false; then :
12929   $as_echo_n "(cached) " >&6
12930 else
12931   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12932    then ac_cv_path_EGREP="$GREP -E"
12933    else
12934      if test -z "$EGREP"; then
12935   ac_path_EGREP_found=false
12936   # Loop through the user's path and test for each of PROGNAME-LIST
12937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12938 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12939 do
12940   IFS=$as_save_IFS
12941   test -z "$as_dir" && as_dir=.
12942     for ac_prog in egrep; do
12943     for ac_exec_ext in '' $ac_executable_extensions; do
12944       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12945       as_fn_executable_p "$ac_path_EGREP" || continue
12946 # Check for GNU ac_path_EGREP and select it if it is found.
12947   # Check for GNU $ac_path_EGREP
12948 case `"$ac_path_EGREP" --version 2>&1` in
12949 *GNU*)
12950   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12951 *)
12952   ac_count=0
12953   $as_echo_n 0123456789 >"conftest.in"
12954   while :
12955   do
12956     cat "conftest.in" "conftest.in" >"conftest.tmp"
12957     mv "conftest.tmp" "conftest.in"
12958     cp "conftest.in" "conftest.nl"
12959     $as_echo 'EGREP' >> "conftest.nl"
12960     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12961     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12962     as_fn_arith $ac_count + 1 && ac_count=$as_val
12963     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12964       # Best one so far, save it but keep looking for a better one
12965       ac_cv_path_EGREP="$ac_path_EGREP"
12966       ac_path_EGREP_max=$ac_count
12967     fi
12968     # 10*(2^10) chars as input seems more than enough
12969     test $ac_count -gt 10 && break
12970   done
12971   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12972 esac
12973 
12974       $ac_path_EGREP_found && break 3
12975     done
12976   done
12977   done
12978 IFS=$as_save_IFS
12979   if test -z "$ac_cv_path_EGREP"; then
12980     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12981   fi
12982 else
12983   ac_cv_path_EGREP=$EGREP
12984 fi
12985 
12986    fi
12987 fi
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12989 $as_echo "$ac_cv_path_EGREP" >&6; }
12990  EGREP="$ac_cv_path_EGREP"
12991 
12992 
12993   else
12994     # The variable is set, but is it from the command line or the environment?
12995 
12996     # Try to remove the string !EGREP! from our list.
12997     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12998     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12999       # If it failed, the variable was not from the command line. Ignore it,
13000       # but warn the user (except for BASH, which is always set by the calling BASH).
13001       if test "xEGREP" != xBASH; then
13002         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13003 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13004       fi
13005       # Try to locate tool using the code snippet
13006       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13007 $as_echo_n "checking for egrep... " >&6; }
13008 if ${ac_cv_path_EGREP+:} false; then :
13009   $as_echo_n "(cached) " >&6
13010 else
13011   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13012    then ac_cv_path_EGREP="$GREP -E"
13013    else
13014      if test -z "$EGREP"; then
13015   ac_path_EGREP_found=false
13016   # Loop through the user's path and test for each of PROGNAME-LIST
13017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13018 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13019 do
13020   IFS=$as_save_IFS
13021   test -z "$as_dir" && as_dir=.
13022     for ac_prog in egrep; do
13023     for ac_exec_ext in '' $ac_executable_extensions; do
13024       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13025       as_fn_executable_p "$ac_path_EGREP" || continue
13026 # Check for GNU ac_path_EGREP and select it if it is found.
13027   # Check for GNU $ac_path_EGREP
13028 case `"$ac_path_EGREP" --version 2>&1` in
13029 *GNU*)
13030   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13031 *)
13032   ac_count=0
13033   $as_echo_n 0123456789 >"conftest.in"
13034   while :
13035   do
13036     cat "conftest.in" "conftest.in" >"conftest.tmp"
13037     mv "conftest.tmp" "conftest.in"
13038     cp "conftest.in" "conftest.nl"
13039     $as_echo 'EGREP' >> "conftest.nl"
13040     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13041     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13042     as_fn_arith $ac_count + 1 && ac_count=$as_val
13043     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13044       # Best one so far, save it but keep looking for a better one
13045       ac_cv_path_EGREP="$ac_path_EGREP"
13046       ac_path_EGREP_max=$ac_count
13047     fi
13048     # 10*(2^10) chars as input seems more than enough
13049     test $ac_count -gt 10 && break
13050   done
13051   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13052 esac
13053 
13054       $ac_path_EGREP_found && break 3
13055     done
13056   done
13057   done
13058 IFS=$as_save_IFS
13059   if test -z "$ac_cv_path_EGREP"; then
13060     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13061   fi
13062 else
13063   ac_cv_path_EGREP=$EGREP
13064 fi
13065 
13066    fi
13067 fi
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13069 $as_echo "$ac_cv_path_EGREP" >&6; }
13070  EGREP="$ac_cv_path_EGREP"
13071 
13072 
13073     else
13074       # If it succeeded, then it was overridden by the user. We will use it
13075       # for the tool.
13076 
13077       # First remove it from the list of overridden variables, so we can test
13078       # for unknown variables in the end.
13079       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13080 
13081       # Check if we try to supply an empty value
13082       if test "x$EGREP" = x; then
13083         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13084 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13086 $as_echo_n "checking for EGREP... " >&6; }
13087         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13088 $as_echo "disabled" >&6; }
13089       else
13090         # Check if the provided tool contains a complete path.
13091         tool_specified="$EGREP"
13092         tool_basename="${tool_specified##*/}"
13093         if test "x$tool_basename" = "x$tool_specified"; then
13094           # A command without a complete path is provided, search $PATH.
13095           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13096 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13097           # Extract the first word of "$tool_basename", so it can be a program name with args.
13098 set dummy $tool_basename; ac_word=$2
13099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13100 $as_echo_n "checking for $ac_word... " >&6; }
13101 if ${ac_cv_path_EGREP+:} false; then :
13102   $as_echo_n "(cached) " >&6
13103 else
13104   case $EGREP in
13105   [\\/]* | ?:[\\/]*)
13106   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13107   ;;
13108   *)
13109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13110 for as_dir in $PATH
13111 do
13112   IFS=$as_save_IFS
13113   test -z "$as_dir" && as_dir=.
13114     for ac_exec_ext in '' $ac_executable_extensions; do
13115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13116     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13118     break 2
13119   fi
13120 done
13121   done
13122 IFS=$as_save_IFS
13123 
13124   ;;
13125 esac
13126 fi
13127 EGREP=$ac_cv_path_EGREP
13128 if test -n "$EGREP"; then
13129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13130 $as_echo "$EGREP" >&6; }
13131 else
13132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13133 $as_echo "no" >&6; }
13134 fi
13135 
13136 
13137           if test "x$EGREP" = x; then
13138             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13139           fi
13140         else
13141           # Otherwise we believe it is a complete path. Use it as it is.
13142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13143 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13144           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13145 $as_echo_n "checking for EGREP... " >&6; }
13146           if test ! -x "$tool_specified"; then
13147             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13148 $as_echo "not found" >&6; }
13149             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13150           fi
13151           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13152 $as_echo "$tool_specified" >&6; }
13153         fi
13154       fi
13155     fi
13156 
13157   fi
13158 
13159 
13160   if test "x$EGREP" = x; then
13161     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13162   fi
13163 
13164 
13165 
13166 
13167   # Publish this variable in the help.
13168 
13169 
13170   if [ -z "${FGREP+x}" ]; then
13171     # The variable is not set by user, try to locate tool using the code snippet
13172     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13173 $as_echo_n "checking for fgrep... " >&6; }
13174 if ${ac_cv_path_FGREP+:} false; then :
13175   $as_echo_n "(cached) " >&6
13176 else
13177   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13178    then ac_cv_path_FGREP="$GREP -F"
13179    else
13180      if test -z "$FGREP"; then
13181   ac_path_FGREP_found=false
13182   # Loop through the user's path and test for each of PROGNAME-LIST
13183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13184 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13185 do
13186   IFS=$as_save_IFS
13187   test -z "$as_dir" && as_dir=.
13188     for ac_prog in fgrep; do
13189     for ac_exec_ext in '' $ac_executable_extensions; do
13190       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13191       as_fn_executable_p "$ac_path_FGREP" || continue
13192 # Check for GNU ac_path_FGREP and select it if it is found.
13193   # Check for GNU $ac_path_FGREP
13194 case `"$ac_path_FGREP" --version 2>&1` in
13195 *GNU*)
13196   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13197 *)
13198   ac_count=0
13199   $as_echo_n 0123456789 >"conftest.in"
13200   while :
13201   do
13202     cat "conftest.in" "conftest.in" >"conftest.tmp"
13203     mv "conftest.tmp" "conftest.in"
13204     cp "conftest.in" "conftest.nl"
13205     $as_echo 'FGREP' >> "conftest.nl"
13206     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13207     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13208     as_fn_arith $ac_count + 1 && ac_count=$as_val
13209     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13210       # Best one so far, save it but keep looking for a better one
13211       ac_cv_path_FGREP="$ac_path_FGREP"
13212       ac_path_FGREP_max=$ac_count
13213     fi
13214     # 10*(2^10) chars as input seems more than enough
13215     test $ac_count -gt 10 && break
13216   done
13217   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13218 esac
13219 
13220       $ac_path_FGREP_found && break 3
13221     done
13222   done
13223   done
13224 IFS=$as_save_IFS
13225   if test -z "$ac_cv_path_FGREP"; then
13226     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13227   fi
13228 else
13229   ac_cv_path_FGREP=$FGREP
13230 fi
13231 
13232    fi
13233 fi
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13235 $as_echo "$ac_cv_path_FGREP" >&6; }
13236  FGREP="$ac_cv_path_FGREP"
13237 
13238 
13239   else
13240     # The variable is set, but is it from the command line or the environment?
13241 
13242     # Try to remove the string !FGREP! from our list.
13243     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13244     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13245       # If it failed, the variable was not from the command line. Ignore it,
13246       # but warn the user (except for BASH, which is always set by the calling BASH).
13247       if test "xFGREP" != xBASH; then
13248         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13249 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13250       fi
13251       # Try to locate tool using the code snippet
13252       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13253 $as_echo_n "checking for fgrep... " >&6; }
13254 if ${ac_cv_path_FGREP+:} false; then :
13255   $as_echo_n "(cached) " >&6
13256 else
13257   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13258    then ac_cv_path_FGREP="$GREP -F"
13259    else
13260      if test -z "$FGREP"; then
13261   ac_path_FGREP_found=false
13262   # Loop through the user's path and test for each of PROGNAME-LIST
13263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13264 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13265 do
13266   IFS=$as_save_IFS
13267   test -z "$as_dir" && as_dir=.
13268     for ac_prog in fgrep; do
13269     for ac_exec_ext in '' $ac_executable_extensions; do
13270       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13271       as_fn_executable_p "$ac_path_FGREP" || continue
13272 # Check for GNU ac_path_FGREP and select it if it is found.
13273   # Check for GNU $ac_path_FGREP
13274 case `"$ac_path_FGREP" --version 2>&1` in
13275 *GNU*)
13276   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13277 *)
13278   ac_count=0
13279   $as_echo_n 0123456789 >"conftest.in"
13280   while :
13281   do
13282     cat "conftest.in" "conftest.in" >"conftest.tmp"
13283     mv "conftest.tmp" "conftest.in"
13284     cp "conftest.in" "conftest.nl"
13285     $as_echo 'FGREP' >> "conftest.nl"
13286     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13287     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13288     as_fn_arith $ac_count + 1 && ac_count=$as_val
13289     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13290       # Best one so far, save it but keep looking for a better one
13291       ac_cv_path_FGREP="$ac_path_FGREP"
13292       ac_path_FGREP_max=$ac_count
13293     fi
13294     # 10*(2^10) chars as input seems more than enough
13295     test $ac_count -gt 10 && break
13296   done
13297   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13298 esac
13299 
13300       $ac_path_FGREP_found && break 3
13301     done
13302   done
13303   done
13304 IFS=$as_save_IFS
13305   if test -z "$ac_cv_path_FGREP"; then
13306     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13307   fi
13308 else
13309   ac_cv_path_FGREP=$FGREP
13310 fi
13311 
13312    fi
13313 fi
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13315 $as_echo "$ac_cv_path_FGREP" >&6; }
13316  FGREP="$ac_cv_path_FGREP"
13317 
13318 
13319     else
13320       # If it succeeded, then it was overridden by the user. We will use it
13321       # for the tool.
13322 
13323       # First remove it from the list of overridden variables, so we can test
13324       # for unknown variables in the end.
13325       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13326 
13327       # Check if we try to supply an empty value
13328       if test "x$FGREP" = x; then
13329         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13330 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13332 $as_echo_n "checking for FGREP... " >&6; }
13333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13334 $as_echo "disabled" >&6; }
13335       else
13336         # Check if the provided tool contains a complete path.
13337         tool_specified="$FGREP"
13338         tool_basename="${tool_specified##*/}"
13339         if test "x$tool_basename" = "x$tool_specified"; then
13340           # A command without a complete path is provided, search $PATH.
13341           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13342 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13343           # Extract the first word of "$tool_basename", so it can be a program name with args.
13344 set dummy $tool_basename; ac_word=$2
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13346 $as_echo_n "checking for $ac_word... " >&6; }
13347 if ${ac_cv_path_FGREP+:} false; then :
13348   $as_echo_n "(cached) " >&6
13349 else
13350   case $FGREP in
13351   [\\/]* | ?:[\\/]*)
13352   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13353   ;;
13354   *)
13355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13356 for as_dir in $PATH
13357 do
13358   IFS=$as_save_IFS
13359   test -z "$as_dir" && as_dir=.
13360     for ac_exec_ext in '' $ac_executable_extensions; do
13361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13362     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13364     break 2
13365   fi
13366 done
13367   done
13368 IFS=$as_save_IFS
13369 
13370   ;;
13371 esac
13372 fi
13373 FGREP=$ac_cv_path_FGREP
13374 if test -n "$FGREP"; then
13375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13376 $as_echo "$FGREP" >&6; }
13377 else
13378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13379 $as_echo "no" >&6; }
13380 fi
13381 
13382 
13383           if test "x$FGREP" = x; then
13384             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13385           fi
13386         else
13387           # Otherwise we believe it is a complete path. Use it as it is.
13388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13389 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13390           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13391 $as_echo_n "checking for FGREP... " >&6; }
13392           if test ! -x "$tool_specified"; then
13393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13394 $as_echo "not found" >&6; }
13395             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13396           fi
13397           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13398 $as_echo "$tool_specified" >&6; }
13399         fi
13400       fi
13401     fi
13402 
13403   fi
13404 
13405 
13406   if test "x$FGREP" = x; then
13407     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13408   fi
13409 
13410 
13411 
13412 
13413   # Publish this variable in the help.
13414 
13415 
13416   if [ -z "${SED+x}" ]; then
13417     # The variable is not set by user, try to locate tool using the code snippet
13418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13419 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13420 if ${ac_cv_path_SED+:} false; then :
13421   $as_echo_n "(cached) " >&6
13422 else
13423             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13424      for ac_i in 1 2 3 4 5 6 7; do
13425        ac_script="$ac_script$as_nl$ac_script"
13426      done
13427      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13428      { ac_script=; unset ac_script;}
13429      if test -z "$SED"; then
13430   ac_path_SED_found=false
13431   # Loop through the user's path and test for each of PROGNAME-LIST
13432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13433 for as_dir in $PATH
13434 do
13435   IFS=$as_save_IFS
13436   test -z "$as_dir" && as_dir=.
13437     for ac_prog in sed gsed; do
13438     for ac_exec_ext in '' $ac_executable_extensions; do
13439       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13440       as_fn_executable_p "$ac_path_SED" || continue
13441 # Check for GNU ac_path_SED and select it if it is found.
13442   # Check for GNU $ac_path_SED
13443 case `"$ac_path_SED" --version 2>&1` in
13444 *GNU*)
13445   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13446 *)
13447   ac_count=0
13448   $as_echo_n 0123456789 >"conftest.in"
13449   while :
13450   do
13451     cat "conftest.in" "conftest.in" >"conftest.tmp"
13452     mv "conftest.tmp" "conftest.in"
13453     cp "conftest.in" "conftest.nl"
13454     $as_echo '' >> "conftest.nl"
13455     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13456     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13457     as_fn_arith $ac_count + 1 && ac_count=$as_val
13458     if test $ac_count -gt ${ac_path_SED_max-0}; then
13459       # Best one so far, save it but keep looking for a better one
13460       ac_cv_path_SED="$ac_path_SED"
13461       ac_path_SED_max=$ac_count
13462     fi
13463     # 10*(2^10) chars as input seems more than enough
13464     test $ac_count -gt 10 && break
13465   done
13466   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13467 esac
13468 
13469       $ac_path_SED_found && break 3
13470     done
13471   done
13472   done
13473 IFS=$as_save_IFS
13474   if test -z "$ac_cv_path_SED"; then
13475     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13476   fi
13477 else
13478   ac_cv_path_SED=$SED
13479 fi
13480 
13481 fi
13482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13483 $as_echo "$ac_cv_path_SED" >&6; }
13484  SED="$ac_cv_path_SED"
13485   rm -f conftest.sed
13486 
13487   else
13488     # The variable is set, but is it from the command line or the environment?
13489 
13490     # Try to remove the string !SED! from our list.
13491     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13492     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13493       # If it failed, the variable was not from the command line. Ignore it,
13494       # but warn the user (except for BASH, which is always set by the calling BASH).
13495       if test "xSED" != xBASH; then
13496         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13497 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13498       fi
13499       # Try to locate tool using the code snippet
13500       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13501 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13502 if ${ac_cv_path_SED+:} false; then :
13503   $as_echo_n "(cached) " >&6
13504 else
13505             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13506      for ac_i in 1 2 3 4 5 6 7; do
13507        ac_script="$ac_script$as_nl$ac_script"
13508      done
13509      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13510      { ac_script=; unset ac_script;}
13511      if test -z "$SED"; then
13512   ac_path_SED_found=false
13513   # Loop through the user's path and test for each of PROGNAME-LIST
13514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13515 for as_dir in $PATH
13516 do
13517   IFS=$as_save_IFS
13518   test -z "$as_dir" && as_dir=.
13519     for ac_prog in sed gsed; do
13520     for ac_exec_ext in '' $ac_executable_extensions; do
13521       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13522       as_fn_executable_p "$ac_path_SED" || continue
13523 # Check for GNU ac_path_SED and select it if it is found.
13524   # Check for GNU $ac_path_SED
13525 case `"$ac_path_SED" --version 2>&1` in
13526 *GNU*)
13527   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13528 *)
13529   ac_count=0
13530   $as_echo_n 0123456789 >"conftest.in"
13531   while :
13532   do
13533     cat "conftest.in" "conftest.in" >"conftest.tmp"
13534     mv "conftest.tmp" "conftest.in"
13535     cp "conftest.in" "conftest.nl"
13536     $as_echo '' >> "conftest.nl"
13537     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13538     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13539     as_fn_arith $ac_count + 1 && ac_count=$as_val
13540     if test $ac_count -gt ${ac_path_SED_max-0}; then
13541       # Best one so far, save it but keep looking for a better one
13542       ac_cv_path_SED="$ac_path_SED"
13543       ac_path_SED_max=$ac_count
13544     fi
13545     # 10*(2^10) chars as input seems more than enough
13546     test $ac_count -gt 10 && break
13547   done
13548   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13549 esac
13550 
13551       $ac_path_SED_found && break 3
13552     done
13553   done
13554   done
13555 IFS=$as_save_IFS
13556   if test -z "$ac_cv_path_SED"; then
13557     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13558   fi
13559 else
13560   ac_cv_path_SED=$SED
13561 fi
13562 
13563 fi
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13565 $as_echo "$ac_cv_path_SED" >&6; }
13566  SED="$ac_cv_path_SED"
13567   rm -f conftest.sed
13568 
13569     else
13570       # If it succeeded, then it was overridden by the user. We will use it
13571       # for the tool.
13572 
13573       # First remove it from the list of overridden variables, so we can test
13574       # for unknown variables in the end.
13575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13576 
13577       # Check if we try to supply an empty value
13578       if test "x$SED" = x; then
13579         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13580 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13582 $as_echo_n "checking for SED... " >&6; }
13583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13584 $as_echo "disabled" >&6; }
13585       else
13586         # Check if the provided tool contains a complete path.
13587         tool_specified="$SED"
13588         tool_basename="${tool_specified##*/}"
13589         if test "x$tool_basename" = "x$tool_specified"; then
13590           # A command without a complete path is provided, search $PATH.
13591           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13592 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13593           # Extract the first word of "$tool_basename", so it can be a program name with args.
13594 set dummy $tool_basename; ac_word=$2
13595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13596 $as_echo_n "checking for $ac_word... " >&6; }
13597 if ${ac_cv_path_SED+:} false; then :
13598   $as_echo_n "(cached) " >&6
13599 else
13600   case $SED in
13601   [\\/]* | ?:[\\/]*)
13602   ac_cv_path_SED="$SED" # Let the user override the test with a path.
13603   ;;
13604   *)
13605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13606 for as_dir in $PATH
13607 do
13608   IFS=$as_save_IFS
13609   test -z "$as_dir" && as_dir=.
13610     for ac_exec_ext in '' $ac_executable_extensions; do
13611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13612     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13614     break 2
13615   fi
13616 done
13617   done
13618 IFS=$as_save_IFS
13619 
13620   ;;
13621 esac
13622 fi
13623 SED=$ac_cv_path_SED
13624 if test -n "$SED"; then
13625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13626 $as_echo "$SED" >&6; }
13627 else
13628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13629 $as_echo "no" >&6; }
13630 fi
13631 
13632 
13633           if test "x$SED" = x; then
13634             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13635           fi
13636         else
13637           # Otherwise we believe it is a complete path. Use it as it is.
13638           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13639 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13640           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13641 $as_echo_n "checking for SED... " >&6; }
13642           if test ! -x "$tool_specified"; then
13643             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13644 $as_echo "not found" >&6; }
13645             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13646           fi
13647           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13648 $as_echo "$tool_specified" >&6; }
13649         fi
13650       fi
13651     fi
13652 
13653   fi
13654 
13655 
13656   if test "x$SED" = x; then
13657     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13658   fi
13659 
13660 
13661 
13662   # Always force rm.
13663   RM="$RM -f"
13664 
13665   # pwd behaves differently on various platforms and some don't support the -L flag.
13666   # Always use the bash builtin pwd to get uniform behavior.
13667   THEPWDCMD=pwd
13668 
13669   # These are not required on all platforms
13670 
13671 
13672   # Publish this variable in the help.
13673 
13674 
13675   if [ -z "${CYGPATH+x}" ]; then
13676     # The variable is not set by user, try to locate tool using the code snippet
13677     for ac_prog in cygpath
13678 do
13679   # Extract the first word of "$ac_prog", so it can be a program name with args.
13680 set dummy $ac_prog; ac_word=$2
13681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13682 $as_echo_n "checking for $ac_word... " >&6; }
13683 if ${ac_cv_path_CYGPATH+:} false; then :
13684   $as_echo_n "(cached) " >&6
13685 else
13686   case $CYGPATH in
13687   [\\/]* | ?:[\\/]*)
13688   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13689   ;;
13690   *)
13691   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13692 for as_dir in $PATH
13693 do
13694   IFS=$as_save_IFS
13695   test -z "$as_dir" && as_dir=.
13696     for ac_exec_ext in '' $ac_executable_extensions; do
13697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13698     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13700     break 2
13701   fi
13702 done
13703   done
13704 IFS=$as_save_IFS
13705 
13706   ;;
13707 esac
13708 fi
13709 CYGPATH=$ac_cv_path_CYGPATH
13710 if test -n "$CYGPATH"; then
13711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13712 $as_echo "$CYGPATH" >&6; }
13713 else
13714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13715 $as_echo "no" >&6; }
13716 fi
13717 
13718 
13719   test -n "$CYGPATH" && break
13720 done
13721 
13722   else
13723     # The variable is set, but is it from the command line or the environment?
13724 
13725     # Try to remove the string !CYGPATH! from our list.
13726     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13727     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13728       # If it failed, the variable was not from the command line. Ignore it,
13729       # but warn the user (except for BASH, which is always set by the calling BASH).
13730       if test "xCYGPATH" != xBASH; then
13731         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13732 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13733       fi
13734       # Try to locate tool using the code snippet
13735       for ac_prog in cygpath
13736 do
13737   # Extract the first word of "$ac_prog", so it can be a program name with args.
13738 set dummy $ac_prog; ac_word=$2
13739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13740 $as_echo_n "checking for $ac_word... " >&6; }
13741 if ${ac_cv_path_CYGPATH+:} false; then :
13742   $as_echo_n "(cached) " >&6
13743 else
13744   case $CYGPATH in
13745   [\\/]* | ?:[\\/]*)
13746   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13747   ;;
13748   *)
13749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13750 for as_dir in $PATH
13751 do
13752   IFS=$as_save_IFS
13753   test -z "$as_dir" && as_dir=.
13754     for ac_exec_ext in '' $ac_executable_extensions; do
13755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13756     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13758     break 2
13759   fi
13760 done
13761   done
13762 IFS=$as_save_IFS
13763 
13764   ;;
13765 esac
13766 fi
13767 CYGPATH=$ac_cv_path_CYGPATH
13768 if test -n "$CYGPATH"; then
13769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13770 $as_echo "$CYGPATH" >&6; }
13771 else
13772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13773 $as_echo "no" >&6; }
13774 fi
13775 
13776 
13777   test -n "$CYGPATH" && break
13778 done
13779 
13780     else
13781       # If it succeeded, then it was overridden by the user. We will use it
13782       # for the tool.
13783 
13784       # First remove it from the list of overridden variables, so we can test
13785       # for unknown variables in the end.
13786       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13787 
13788       # Check if we try to supply an empty value
13789       if test "x$CYGPATH" = x; then
13790         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13791 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13792         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13793 $as_echo_n "checking for CYGPATH... " >&6; }
13794         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13795 $as_echo "disabled" >&6; }
13796       else
13797         # Check if the provided tool contains a complete path.
13798         tool_specified="$CYGPATH"
13799         tool_basename="${tool_specified##*/}"
13800         if test "x$tool_basename" = "x$tool_specified"; then
13801           # A command without a complete path is provided, search $PATH.
13802           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13803 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13804           # Extract the first word of "$tool_basename", so it can be a program name with args.
13805 set dummy $tool_basename; ac_word=$2
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13807 $as_echo_n "checking for $ac_word... " >&6; }
13808 if ${ac_cv_path_CYGPATH+:} false; then :
13809   $as_echo_n "(cached) " >&6
13810 else
13811   case $CYGPATH in
13812   [\\/]* | ?:[\\/]*)
13813   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13814   ;;
13815   *)
13816   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13817 for as_dir in $PATH
13818 do
13819   IFS=$as_save_IFS
13820   test -z "$as_dir" && as_dir=.
13821     for ac_exec_ext in '' $ac_executable_extensions; do
13822   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13823     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13824     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13825     break 2
13826   fi
13827 done
13828   done
13829 IFS=$as_save_IFS
13830 
13831   ;;
13832 esac
13833 fi
13834 CYGPATH=$ac_cv_path_CYGPATH
13835 if test -n "$CYGPATH"; then
13836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13837 $as_echo "$CYGPATH" >&6; }
13838 else
13839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13840 $as_echo "no" >&6; }
13841 fi
13842 
13843 
13844           if test "x$CYGPATH" = x; then
13845             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13846           fi
13847         else
13848           # Otherwise we believe it is a complete path. Use it as it is.
13849           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13850 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13851           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13852 $as_echo_n "checking for CYGPATH... " >&6; }
13853           if test ! -x "$tool_specified"; then
13854             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13855 $as_echo "not found" >&6; }
13856             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13857           fi
13858           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13859 $as_echo "$tool_specified" >&6; }
13860         fi
13861       fi
13862     fi
13863 
13864   fi
13865 
13866 
13867 
13868 
13869   # Publish this variable in the help.
13870 
13871 
13872   if [ -z "${READLINK+x}" ]; then
13873     # The variable is not set by user, try to locate tool using the code snippet
13874     for ac_prog in greadlink readlink
13875 do
13876   # Extract the first word of "$ac_prog", so it can be a program name with args.
13877 set dummy $ac_prog; ac_word=$2
13878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13879 $as_echo_n "checking for $ac_word... " >&6; }
13880 if ${ac_cv_path_READLINK+:} false; then :
13881   $as_echo_n "(cached) " >&6
13882 else
13883   case $READLINK in
13884   [\\/]* | ?:[\\/]*)
13885   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13886   ;;
13887   *)
13888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13889 for as_dir in $PATH
13890 do
13891   IFS=$as_save_IFS
13892   test -z "$as_dir" && as_dir=.
13893     for ac_exec_ext in '' $ac_executable_extensions; do
13894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13895     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13897     break 2
13898   fi
13899 done
13900   done
13901 IFS=$as_save_IFS
13902 
13903   ;;
13904 esac
13905 fi
13906 READLINK=$ac_cv_path_READLINK
13907 if test -n "$READLINK"; then
13908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13909 $as_echo "$READLINK" >&6; }
13910 else
13911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13912 $as_echo "no" >&6; }
13913 fi
13914 
13915 
13916   test -n "$READLINK" && break
13917 done
13918 
13919   else
13920     # The variable is set, but is it from the command line or the environment?
13921 
13922     # Try to remove the string !READLINK! from our list.
13923     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13924     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13925       # If it failed, the variable was not from the command line. Ignore it,
13926       # but warn the user (except for BASH, which is always set by the calling BASH).
13927       if test "xREADLINK" != xBASH; then
13928         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13929 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13930       fi
13931       # Try to locate tool using the code snippet
13932       for ac_prog in greadlink readlink
13933 do
13934   # Extract the first word of "$ac_prog", so it can be a program name with args.
13935 set dummy $ac_prog; ac_word=$2
13936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13937 $as_echo_n "checking for $ac_word... " >&6; }
13938 if ${ac_cv_path_READLINK+:} false; then :
13939   $as_echo_n "(cached) " >&6
13940 else
13941   case $READLINK in
13942   [\\/]* | ?:[\\/]*)
13943   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13944   ;;
13945   *)
13946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13947 for as_dir in $PATH
13948 do
13949   IFS=$as_save_IFS
13950   test -z "$as_dir" && as_dir=.
13951     for ac_exec_ext in '' $ac_executable_extensions; do
13952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13953     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13955     break 2
13956   fi
13957 done
13958   done
13959 IFS=$as_save_IFS
13960 
13961   ;;
13962 esac
13963 fi
13964 READLINK=$ac_cv_path_READLINK
13965 if test -n "$READLINK"; then
13966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13967 $as_echo "$READLINK" >&6; }
13968 else
13969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13970 $as_echo "no" >&6; }
13971 fi
13972 
13973 
13974   test -n "$READLINK" && break
13975 done
13976 
13977     else
13978       # If it succeeded, then it was overridden by the user. We will use it
13979       # for the tool.
13980 
13981       # First remove it from the list of overridden variables, so we can test
13982       # for unknown variables in the end.
13983       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13984 
13985       # Check if we try to supply an empty value
13986       if test "x$READLINK" = x; then
13987         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13988 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13989         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13990 $as_echo_n "checking for READLINK... " >&6; }
13991         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13992 $as_echo "disabled" >&6; }
13993       else
13994         # Check if the provided tool contains a complete path.
13995         tool_specified="$READLINK"
13996         tool_basename="${tool_specified##*/}"
13997         if test "x$tool_basename" = "x$tool_specified"; then
13998           # A command without a complete path is provided, search $PATH.
13999           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14000 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14001           # Extract the first word of "$tool_basename", so it can be a program name with args.
14002 set dummy $tool_basename; ac_word=$2
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14004 $as_echo_n "checking for $ac_word... " >&6; }
14005 if ${ac_cv_path_READLINK+:} false; then :
14006   $as_echo_n "(cached) " >&6
14007 else
14008   case $READLINK in
14009   [\\/]* | ?:[\\/]*)
14010   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14011   ;;
14012   *)
14013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14014 for as_dir in $PATH
14015 do
14016   IFS=$as_save_IFS
14017   test -z "$as_dir" && as_dir=.
14018     for ac_exec_ext in '' $ac_executable_extensions; do
14019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14020     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14022     break 2
14023   fi
14024 done
14025   done
14026 IFS=$as_save_IFS
14027 
14028   ;;
14029 esac
14030 fi
14031 READLINK=$ac_cv_path_READLINK
14032 if test -n "$READLINK"; then
14033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14034 $as_echo "$READLINK" >&6; }
14035 else
14036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14037 $as_echo "no" >&6; }
14038 fi
14039 
14040 
14041           if test "x$READLINK" = x; then
14042             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14043           fi
14044         else
14045           # Otherwise we believe it is a complete path. Use it as it is.
14046           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14047 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14048           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14049 $as_echo_n "checking for READLINK... " >&6; }
14050           if test ! -x "$tool_specified"; then
14051             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14052 $as_echo "not found" >&6; }
14053             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14054           fi
14055           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14056 $as_echo "$tool_specified" >&6; }
14057         fi
14058       fi
14059     fi
14060 
14061   fi
14062 
14063 
14064 
14065 
14066   # Publish this variable in the help.
14067 
14068 
14069   if [ -z "${DF+x}" ]; then
14070     # The variable is not set by user, try to locate tool using the code snippet
14071     for ac_prog in df
14072 do
14073   # Extract the first word of "$ac_prog", so it can be a program name with args.
14074 set dummy $ac_prog; ac_word=$2
14075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14076 $as_echo_n "checking for $ac_word... " >&6; }
14077 if ${ac_cv_path_DF+:} false; then :
14078   $as_echo_n "(cached) " >&6
14079 else
14080   case $DF in
14081   [\\/]* | ?:[\\/]*)
14082   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14083   ;;
14084   *)
14085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14086 for as_dir in $PATH
14087 do
14088   IFS=$as_save_IFS
14089   test -z "$as_dir" && as_dir=.
14090     for ac_exec_ext in '' $ac_executable_extensions; do
14091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14092     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14094     break 2
14095   fi
14096 done
14097   done
14098 IFS=$as_save_IFS
14099 
14100   ;;
14101 esac
14102 fi
14103 DF=$ac_cv_path_DF
14104 if test -n "$DF"; then
14105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14106 $as_echo "$DF" >&6; }
14107 else
14108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14109 $as_echo "no" >&6; }
14110 fi
14111 
14112 
14113   test -n "$DF" && break
14114 done
14115 
14116   else
14117     # The variable is set, but is it from the command line or the environment?
14118 
14119     # Try to remove the string !DF! from our list.
14120     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14121     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14122       # If it failed, the variable was not from the command line. Ignore it,
14123       # but warn the user (except for BASH, which is always set by the calling BASH).
14124       if test "xDF" != xBASH; then
14125         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14126 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14127       fi
14128       # Try to locate tool using the code snippet
14129       for ac_prog in df
14130 do
14131   # Extract the first word of "$ac_prog", so it can be a program name with args.
14132 set dummy $ac_prog; ac_word=$2
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14134 $as_echo_n "checking for $ac_word... " >&6; }
14135 if ${ac_cv_path_DF+:} false; then :
14136   $as_echo_n "(cached) " >&6
14137 else
14138   case $DF in
14139   [\\/]* | ?:[\\/]*)
14140   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14141   ;;
14142   *)
14143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144 for as_dir in $PATH
14145 do
14146   IFS=$as_save_IFS
14147   test -z "$as_dir" && as_dir=.
14148     for ac_exec_ext in '' $ac_executable_extensions; do
14149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14150     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14152     break 2
14153   fi
14154 done
14155   done
14156 IFS=$as_save_IFS
14157 
14158   ;;
14159 esac
14160 fi
14161 DF=$ac_cv_path_DF
14162 if test -n "$DF"; then
14163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14164 $as_echo "$DF" >&6; }
14165 else
14166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14167 $as_echo "no" >&6; }
14168 fi
14169 
14170 
14171   test -n "$DF" && break
14172 done
14173 
14174     else
14175       # If it succeeded, then it was overridden by the user. We will use it
14176       # for the tool.
14177 
14178       # First remove it from the list of overridden variables, so we can test
14179       # for unknown variables in the end.
14180       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14181 
14182       # Check if we try to supply an empty value
14183       if test "x$DF" = x; then
14184         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14185 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14187 $as_echo_n "checking for DF... " >&6; }
14188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14189 $as_echo "disabled" >&6; }
14190       else
14191         # Check if the provided tool contains a complete path.
14192         tool_specified="$DF"
14193         tool_basename="${tool_specified##*/}"
14194         if test "x$tool_basename" = "x$tool_specified"; then
14195           # A command without a complete path is provided, search $PATH.
14196           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14197 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14198           # Extract the first word of "$tool_basename", so it can be a program name with args.
14199 set dummy $tool_basename; ac_word=$2
14200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14201 $as_echo_n "checking for $ac_word... " >&6; }
14202 if ${ac_cv_path_DF+:} false; then :
14203   $as_echo_n "(cached) " >&6
14204 else
14205   case $DF in
14206   [\\/]* | ?:[\\/]*)
14207   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14208   ;;
14209   *)
14210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14211 for as_dir in $PATH
14212 do
14213   IFS=$as_save_IFS
14214   test -z "$as_dir" && as_dir=.
14215     for ac_exec_ext in '' $ac_executable_extensions; do
14216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14217     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14219     break 2
14220   fi
14221 done
14222   done
14223 IFS=$as_save_IFS
14224 
14225   ;;
14226 esac
14227 fi
14228 DF=$ac_cv_path_DF
14229 if test -n "$DF"; then
14230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14231 $as_echo "$DF" >&6; }
14232 else
14233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14234 $as_echo "no" >&6; }
14235 fi
14236 
14237 
14238           if test "x$DF" = x; then
14239             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14240           fi
14241         else
14242           # Otherwise we believe it is a complete path. Use it as it is.
14243           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14244 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14245           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14246 $as_echo_n "checking for DF... " >&6; }
14247           if test ! -x "$tool_specified"; then
14248             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14249 $as_echo "not found" >&6; }
14250             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14251           fi
14252           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14253 $as_echo "$tool_specified" >&6; }
14254         fi
14255       fi
14256     fi
14257 
14258   fi
14259 
14260 
14261 
14262 
14263   # Publish this variable in the help.
14264 
14265 
14266   if [ -z "${CPIO+x}" ]; then
14267     # The variable is not set by user, try to locate tool using the code snippet
14268     for ac_prog in cpio bsdcpio
14269 do
14270   # Extract the first word of "$ac_prog", so it can be a program name with args.
14271 set dummy $ac_prog; ac_word=$2
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14273 $as_echo_n "checking for $ac_word... " >&6; }
14274 if ${ac_cv_path_CPIO+:} false; then :
14275   $as_echo_n "(cached) " >&6
14276 else
14277   case $CPIO in
14278   [\\/]* | ?:[\\/]*)
14279   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14280   ;;
14281   *)
14282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14283 for as_dir in $PATH
14284 do
14285   IFS=$as_save_IFS
14286   test -z "$as_dir" && as_dir=.
14287     for ac_exec_ext in '' $ac_executable_extensions; do
14288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14289     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14291     break 2
14292   fi
14293 done
14294   done
14295 IFS=$as_save_IFS
14296 
14297   ;;
14298 esac
14299 fi
14300 CPIO=$ac_cv_path_CPIO
14301 if test -n "$CPIO"; then
14302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14303 $as_echo "$CPIO" >&6; }
14304 else
14305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14306 $as_echo "no" >&6; }
14307 fi
14308 
14309 
14310   test -n "$CPIO" && break
14311 done
14312 
14313   else
14314     # The variable is set, but is it from the command line or the environment?
14315 
14316     # Try to remove the string !CPIO! from our list.
14317     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14318     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14319       # If it failed, the variable was not from the command line. Ignore it,
14320       # but warn the user (except for BASH, which is always set by the calling BASH).
14321       if test "xCPIO" != xBASH; then
14322         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14323 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14324       fi
14325       # Try to locate tool using the code snippet
14326       for ac_prog in cpio bsdcpio
14327 do
14328   # Extract the first word of "$ac_prog", so it can be a program name with args.
14329 set dummy $ac_prog; ac_word=$2
14330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14331 $as_echo_n "checking for $ac_word... " >&6; }
14332 if ${ac_cv_path_CPIO+:} false; then :
14333   $as_echo_n "(cached) " >&6
14334 else
14335   case $CPIO in
14336   [\\/]* | ?:[\\/]*)
14337   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14338   ;;
14339   *)
14340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14341 for as_dir in $PATH
14342 do
14343   IFS=$as_save_IFS
14344   test -z "$as_dir" && as_dir=.
14345     for ac_exec_ext in '' $ac_executable_extensions; do
14346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14347     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14349     break 2
14350   fi
14351 done
14352   done
14353 IFS=$as_save_IFS
14354 
14355   ;;
14356 esac
14357 fi
14358 CPIO=$ac_cv_path_CPIO
14359 if test -n "$CPIO"; then
14360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14361 $as_echo "$CPIO" >&6; }
14362 else
14363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14364 $as_echo "no" >&6; }
14365 fi
14366 
14367 
14368   test -n "$CPIO" && break
14369 done
14370 
14371     else
14372       # If it succeeded, then it was overridden by the user. We will use it
14373       # for the tool.
14374 
14375       # First remove it from the list of overridden variables, so we can test
14376       # for unknown variables in the end.
14377       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14378 
14379       # Check if we try to supply an empty value
14380       if test "x$CPIO" = x; then
14381         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14382 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14383         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14384 $as_echo_n "checking for CPIO... " >&6; }
14385         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14386 $as_echo "disabled" >&6; }
14387       else
14388         # Check if the provided tool contains a complete path.
14389         tool_specified="$CPIO"
14390         tool_basename="${tool_specified##*/}"
14391         if test "x$tool_basename" = "x$tool_specified"; then
14392           # A command without a complete path is provided, search $PATH.
14393           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14394 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14395           # Extract the first word of "$tool_basename", so it can be a program name with args.
14396 set dummy $tool_basename; ac_word=$2
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14398 $as_echo_n "checking for $ac_word... " >&6; }
14399 if ${ac_cv_path_CPIO+:} false; then :
14400   $as_echo_n "(cached) " >&6
14401 else
14402   case $CPIO in
14403   [\\/]* | ?:[\\/]*)
14404   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14405   ;;
14406   *)
14407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14408 for as_dir in $PATH
14409 do
14410   IFS=$as_save_IFS
14411   test -z "$as_dir" && as_dir=.
14412     for ac_exec_ext in '' $ac_executable_extensions; do
14413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14414     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14416     break 2
14417   fi
14418 done
14419   done
14420 IFS=$as_save_IFS
14421 
14422   ;;
14423 esac
14424 fi
14425 CPIO=$ac_cv_path_CPIO
14426 if test -n "$CPIO"; then
14427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14428 $as_echo "$CPIO" >&6; }
14429 else
14430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14431 $as_echo "no" >&6; }
14432 fi
14433 
14434 
14435           if test "x$CPIO" = x; then
14436             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14437           fi
14438         else
14439           # Otherwise we believe it is a complete path. Use it as it is.
14440           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14441 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14442           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14443 $as_echo_n "checking for CPIO... " >&6; }
14444           if test ! -x "$tool_specified"; then
14445             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14446 $as_echo "not found" >&6; }
14447             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14448           fi
14449           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14450 $as_echo "$tool_specified" >&6; }
14451         fi
14452       fi
14453     fi
14454 
14455   fi
14456 
14457 
14458 
14459 
14460   # Publish this variable in the help.
14461 
14462 
14463   if [ -z "${NICE+x}" ]; then
14464     # The variable is not set by user, try to locate tool using the code snippet
14465     for ac_prog in nice
14466 do
14467   # Extract the first word of "$ac_prog", so it can be a program name with args.
14468 set dummy $ac_prog; ac_word=$2
14469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14470 $as_echo_n "checking for $ac_word... " >&6; }
14471 if ${ac_cv_path_NICE+:} false; then :
14472   $as_echo_n "(cached) " >&6
14473 else
14474   case $NICE in
14475   [\\/]* | ?:[\\/]*)
14476   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14477   ;;
14478   *)
14479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14480 for as_dir in $PATH
14481 do
14482   IFS=$as_save_IFS
14483   test -z "$as_dir" && as_dir=.
14484     for ac_exec_ext in '' $ac_executable_extensions; do
14485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14486     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14488     break 2
14489   fi
14490 done
14491   done
14492 IFS=$as_save_IFS
14493 
14494   ;;
14495 esac
14496 fi
14497 NICE=$ac_cv_path_NICE
14498 if test -n "$NICE"; then
14499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14500 $as_echo "$NICE" >&6; }
14501 else
14502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14503 $as_echo "no" >&6; }
14504 fi
14505 
14506 
14507   test -n "$NICE" && break
14508 done
14509 
14510   else
14511     # The variable is set, but is it from the command line or the environment?
14512 
14513     # Try to remove the string !NICE! from our list.
14514     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14515     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14516       # If it failed, the variable was not from the command line. Ignore it,
14517       # but warn the user (except for BASH, which is always set by the calling BASH).
14518       if test "xNICE" != xBASH; then
14519         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14520 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14521       fi
14522       # Try to locate tool using the code snippet
14523       for ac_prog in nice
14524 do
14525   # Extract the first word of "$ac_prog", so it can be a program name with args.
14526 set dummy $ac_prog; ac_word=$2
14527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14528 $as_echo_n "checking for $ac_word... " >&6; }
14529 if ${ac_cv_path_NICE+:} false; then :
14530   $as_echo_n "(cached) " >&6
14531 else
14532   case $NICE in
14533   [\\/]* | ?:[\\/]*)
14534   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14535   ;;
14536   *)
14537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14538 for as_dir in $PATH
14539 do
14540   IFS=$as_save_IFS
14541   test -z "$as_dir" && as_dir=.
14542     for ac_exec_ext in '' $ac_executable_extensions; do
14543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14544     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14546     break 2
14547   fi
14548 done
14549   done
14550 IFS=$as_save_IFS
14551 
14552   ;;
14553 esac
14554 fi
14555 NICE=$ac_cv_path_NICE
14556 if test -n "$NICE"; then
14557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14558 $as_echo "$NICE" >&6; }
14559 else
14560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14561 $as_echo "no" >&6; }
14562 fi
14563 
14564 
14565   test -n "$NICE" && break
14566 done
14567 
14568     else
14569       # If it succeeded, then it was overridden by the user. We will use it
14570       # for the tool.
14571 
14572       # First remove it from the list of overridden variables, so we can test
14573       # for unknown variables in the end.
14574       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14575 
14576       # Check if we try to supply an empty value
14577       if test "x$NICE" = x; then
14578         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14579 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14580         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14581 $as_echo_n "checking for NICE... " >&6; }
14582         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14583 $as_echo "disabled" >&6; }
14584       else
14585         # Check if the provided tool contains a complete path.
14586         tool_specified="$NICE"
14587         tool_basename="${tool_specified##*/}"
14588         if test "x$tool_basename" = "x$tool_specified"; then
14589           # A command without a complete path is provided, search $PATH.
14590           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14591 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14592           # Extract the first word of "$tool_basename", so it can be a program name with args.
14593 set dummy $tool_basename; ac_word=$2
14594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14595 $as_echo_n "checking for $ac_word... " >&6; }
14596 if ${ac_cv_path_NICE+:} false; then :
14597   $as_echo_n "(cached) " >&6
14598 else
14599   case $NICE in
14600   [\\/]* | ?:[\\/]*)
14601   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14602   ;;
14603   *)
14604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14605 for as_dir in $PATH
14606 do
14607   IFS=$as_save_IFS
14608   test -z "$as_dir" && as_dir=.
14609     for ac_exec_ext in '' $ac_executable_extensions; do
14610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14611     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14613     break 2
14614   fi
14615 done
14616   done
14617 IFS=$as_save_IFS
14618 
14619   ;;
14620 esac
14621 fi
14622 NICE=$ac_cv_path_NICE
14623 if test -n "$NICE"; then
14624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14625 $as_echo "$NICE" >&6; }
14626 else
14627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14628 $as_echo "no" >&6; }
14629 fi
14630 
14631 
14632           if test "x$NICE" = x; then
14633             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14634           fi
14635         else
14636           # Otherwise we believe it is a complete path. Use it as it is.
14637           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14638 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14639           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14640 $as_echo_n "checking for NICE... " >&6; }
14641           if test ! -x "$tool_specified"; then
14642             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14643 $as_echo "not found" >&6; }
14644             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14645           fi
14646           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14647 $as_echo "$tool_specified" >&6; }
14648         fi
14649       fi
14650     fi
14651 
14652   fi
14653 
14654 
14655 
14656 
14657 # Now we can determine OpenJDK build and target platforms. This is required to
14658 # have early on.
14659 # Make sure we can run config.sub.
14660 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14661   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14662 
14663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14664 $as_echo_n "checking build system type... " >&6; }
14665 if ${ac_cv_build+:} false; then :
14666   $as_echo_n "(cached) " >&6
14667 else
14668   ac_build_alias=$build_alias
14669 test "x$ac_build_alias" = x &&
14670   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14671 test "x$ac_build_alias" = x &&
14672   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14673 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14674   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14675 
14676 fi
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14678 $as_echo "$ac_cv_build" >&6; }
14679 case $ac_cv_build in
14680 *-*-*) ;;
14681 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14682 esac
14683 build=$ac_cv_build
14684 ac_save_IFS=$IFS; IFS='-'
14685 set x $ac_cv_build
14686 shift
14687 build_cpu=$1
14688 build_vendor=$2
14689 shift; shift
14690 # Remember, the first character of IFS is used to create $*,
14691 # except with old shells:
14692 build_os=$*
14693 IFS=$ac_save_IFS
14694 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14695 
14696 
14697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14698 $as_echo_n "checking host system type... " >&6; }
14699 if ${ac_cv_host+:} false; then :
14700   $as_echo_n "(cached) " >&6
14701 else
14702   if test "x$host_alias" = x; then
14703   ac_cv_host=$ac_cv_build
14704 else
14705   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14706     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14707 fi
14708 
14709 fi
14710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14711 $as_echo "$ac_cv_host" >&6; }
14712 case $ac_cv_host in
14713 *-*-*) ;;
14714 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14715 esac
14716 host=$ac_cv_host
14717 ac_save_IFS=$IFS; IFS='-'
14718 set x $ac_cv_host
14719 shift
14720 host_cpu=$1
14721 host_vendor=$2
14722 shift; shift
14723 # Remember, the first character of IFS is used to create $*,
14724 # except with old shells:
14725 host_os=$*
14726 IFS=$ac_save_IFS
14727 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14728 
14729 
14730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14731 $as_echo_n "checking target system type... " >&6; }
14732 if ${ac_cv_target+:} false; then :
14733   $as_echo_n "(cached) " >&6
14734 else
14735   if test "x$target_alias" = x; then
14736   ac_cv_target=$ac_cv_host
14737 else
14738   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14739     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14740 fi
14741 
14742 fi
14743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14744 $as_echo "$ac_cv_target" >&6; }
14745 case $ac_cv_target in
14746 *-*-*) ;;
14747 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14748 esac
14749 target=$ac_cv_target
14750 ac_save_IFS=$IFS; IFS='-'
14751 set x $ac_cv_target
14752 shift
14753 target_cpu=$1
14754 target_vendor=$2
14755 shift; shift
14756 # Remember, the first character of IFS is used to create $*,
14757 # except with old shells:
14758 target_os=$*
14759 IFS=$ac_save_IFS
14760 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14761 
14762 
14763 # The aliases save the names the user supplied, while $host etc.
14764 # will get canonicalized.
14765 test -n "$target_alias" &&
14766   test "$program_prefix$program_suffix$program_transform_name" = \
14767     NONENONEs,x,x, &&
14768   program_prefix=${target_alias}-
14769 
14770   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14771   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14772   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14773   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14774   # to use the configure naming style.
14775 
14776 
14777 
14778 
14779 
14780   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14781   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14782   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14783   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14784   OPENJDK_TARGET_AUTOCONF_NAME="$host"
14785   OPENJDK_BUILD_AUTOCONF_NAME="$build"
14786 
14787 
14788 
14789   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14790 
14791   case "$build_os" in
14792     *linux*)
14793       VAR_OS=linux
14794       VAR_OS_TYPE=unix
14795       ;;
14796     *solaris*)
14797       VAR_OS=solaris
14798       VAR_OS_TYPE=unix
14799       ;;
14800     *darwin*)
14801       VAR_OS=macosx
14802       VAR_OS_TYPE=unix
14803       ;;
14804     *bsd*)
14805       VAR_OS=bsd
14806       VAR_OS_TYPE=unix
14807       ;;
14808     *cygwin*)
14809       VAR_OS=windows
14810       VAR_OS_ENV=windows.cygwin
14811       ;;
14812     *mingw*)
14813       VAR_OS=windows
14814       VAR_OS_ENV=windows.msys
14815       ;;
14816     *aix*)
14817       VAR_OS=aix
14818       VAR_OS_TYPE=unix
14819       ;;
14820     *)
14821       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14822       ;;
14823   esac
14824 
14825 
14826   # First argument is the cpu name from the trip/quad
14827   case "$build_cpu" in
14828     x86_64)
14829       VAR_CPU=x86_64
14830       VAR_CPU_ARCH=x86
14831       VAR_CPU_BITS=64
14832       VAR_CPU_ENDIAN=little
14833       ;;
14834     i?86)
14835       VAR_CPU=x86
14836       VAR_CPU_ARCH=x86
14837       VAR_CPU_BITS=32
14838       VAR_CPU_ENDIAN=little
14839       ;;
14840     arm*)
14841       VAR_CPU=arm
14842       VAR_CPU_ARCH=arm
14843       VAR_CPU_BITS=32
14844       VAR_CPU_ENDIAN=little
14845       ;;
14846     aarch64)
14847       VAR_CPU=aarch64
14848       VAR_CPU_ARCH=aarch64
14849       VAR_CPU_BITS=64
14850       VAR_CPU_ENDIAN=little
14851       ;;
14852     powerpc)
14853       VAR_CPU=ppc
14854       VAR_CPU_ARCH=ppc
14855       VAR_CPU_BITS=32
14856       VAR_CPU_ENDIAN=big
14857       ;;
14858     powerpc64)
14859       VAR_CPU=ppc64
14860       VAR_CPU_ARCH=ppc
14861       VAR_CPU_BITS=64
14862       VAR_CPU_ENDIAN=big
14863       ;;
14864     powerpc64le)
14865       VAR_CPU=ppc64le
14866       VAR_CPU_ARCH=ppc
14867       VAR_CPU_BITS=64
14868       VAR_CPU_ENDIAN=little
14869       ;;
14870     s390)
14871       VAR_CPU=s390
14872       VAR_CPU_ARCH=s390
14873       VAR_CPU_BITS=32
14874       VAR_CPU_ENDIAN=big
14875       ;;
14876     s390x)
14877       VAR_CPU=s390x
14878       VAR_CPU_ARCH=s390
14879       VAR_CPU_BITS=64
14880       VAR_CPU_ENDIAN=big
14881       ;;
14882     sparc)
14883       VAR_CPU=sparc
14884       VAR_CPU_ARCH=sparc
14885       VAR_CPU_BITS=32
14886       VAR_CPU_ENDIAN=big
14887       ;;
14888     sparcv9|sparc64)
14889       VAR_CPU=sparcv9
14890       VAR_CPU_ARCH=sparc
14891       VAR_CPU_BITS=64
14892       VAR_CPU_ENDIAN=big
14893       ;;
14894     *)
14895       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14896       ;;
14897   esac
14898 
14899   # ..and setup our own variables. (Do this explicitely to facilitate searching)
14900   OPENJDK_BUILD_OS="$VAR_OS"
14901   if test "x$VAR_OS_TYPE" != x; then
14902     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14903   else
14904     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14905   fi
14906   if test "x$VAR_OS_ENV" != x; then
14907     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14908   else
14909     OPENJDK_BUILD_OS_ENV="$VAR_OS"
14910   fi
14911   OPENJDK_BUILD_CPU="$VAR_CPU"
14912   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14913   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14914   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14915 
14916 
14917 
14918 
14919 
14920 
14921 
14922 
14923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14924 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
14925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14926 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14927 
14928   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14929 
14930   case "$host_os" in
14931     *linux*)
14932       VAR_OS=linux
14933       VAR_OS_TYPE=unix
14934       ;;
14935     *solaris*)
14936       VAR_OS=solaris
14937       VAR_OS_TYPE=unix
14938       ;;
14939     *darwin*)
14940       VAR_OS=macosx
14941       VAR_OS_TYPE=unix
14942       ;;
14943     *bsd*)
14944       VAR_OS=bsd
14945       VAR_OS_TYPE=unix
14946       ;;
14947     *cygwin*)
14948       VAR_OS=windows
14949       VAR_OS_ENV=windows.cygwin
14950       ;;
14951     *mingw*)
14952       VAR_OS=windows
14953       VAR_OS_ENV=windows.msys
14954       ;;
14955     *aix*)
14956       VAR_OS=aix
14957       VAR_OS_TYPE=unix
14958       ;;
14959     *)
14960       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14961       ;;
14962   esac
14963 
14964 
14965   # First argument is the cpu name from the trip/quad
14966   case "$host_cpu" in
14967     x86_64)
14968       VAR_CPU=x86_64
14969       VAR_CPU_ARCH=x86
14970       VAR_CPU_BITS=64
14971       VAR_CPU_ENDIAN=little
14972       ;;
14973     i?86)
14974       VAR_CPU=x86
14975       VAR_CPU_ARCH=x86
14976       VAR_CPU_BITS=32
14977       VAR_CPU_ENDIAN=little
14978       ;;
14979     arm*)
14980       VAR_CPU=arm
14981       VAR_CPU_ARCH=arm
14982       VAR_CPU_BITS=32
14983       VAR_CPU_ENDIAN=little
14984       ;;
14985     aarch64)
14986       VAR_CPU=aarch64
14987       VAR_CPU_ARCH=aarch64
14988       VAR_CPU_BITS=64
14989       VAR_CPU_ENDIAN=little
14990       ;;
14991     powerpc)
14992       VAR_CPU=ppc
14993       VAR_CPU_ARCH=ppc
14994       VAR_CPU_BITS=32
14995       VAR_CPU_ENDIAN=big
14996       ;;
14997     powerpc64)
14998       VAR_CPU=ppc64
14999       VAR_CPU_ARCH=ppc
15000       VAR_CPU_BITS=64
15001       VAR_CPU_ENDIAN=big
15002       ;;
15003     powerpc64le)
15004       VAR_CPU=ppc64le
15005       VAR_CPU_ARCH=ppc
15006       VAR_CPU_BITS=64
15007       VAR_CPU_ENDIAN=little
15008       ;;
15009     s390)
15010       VAR_CPU=s390
15011       VAR_CPU_ARCH=s390
15012       VAR_CPU_BITS=32
15013       VAR_CPU_ENDIAN=big
15014       ;;
15015     s390x)
15016       VAR_CPU=s390x
15017       VAR_CPU_ARCH=s390
15018       VAR_CPU_BITS=64
15019       VAR_CPU_ENDIAN=big
15020       ;;
15021     sparc)
15022       VAR_CPU=sparc
15023       VAR_CPU_ARCH=sparc
15024       VAR_CPU_BITS=32
15025       VAR_CPU_ENDIAN=big
15026       ;;
15027     sparcv9|sparc64)
15028       VAR_CPU=sparcv9
15029       VAR_CPU_ARCH=sparc
15030       VAR_CPU_BITS=64
15031       VAR_CPU_ENDIAN=big
15032       ;;
15033     *)
15034       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15035       ;;
15036   esac
15037 
15038   # ... and setup our own variables. (Do this explicitely to facilitate searching)
15039   OPENJDK_TARGET_OS="$VAR_OS"
15040   if test "x$VAR_OS_TYPE" != x; then
15041     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15042   else
15043     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15044   fi
15045   if test "x$VAR_OS_ENV" != x; then
15046     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15047   else
15048     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15049   fi
15050   OPENJDK_TARGET_CPU="$VAR_CPU"
15051   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15052   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15053   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15054 
15055 
15056 
15057 
15058 
15059 
15060 
15061 
15062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15063 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15065 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15066 
15067 
15068 
15069 # Check whether --with-target-bits was given.
15070 if test "${with_target_bits+set}" = set; then :
15071   withval=$with_target_bits;
15072 fi
15073 
15074 
15075   # We have three types of compiles:
15076   # native  == normal compilation, target system == build system
15077   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15078   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15079   #
15080   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15081     # We're doing a proper cross-compilation
15082     COMPILE_TYPE="cross"
15083   else
15084     COMPILE_TYPE="native"
15085   fi
15086 
15087   if test "x$with_target_bits" != x; then
15088     if test "x$COMPILE_TYPE" = "xcross"; then
15089       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15090     fi
15091 
15092     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15093       # A reduced build is requested
15094       COMPILE_TYPE="reduced"
15095       OPENJDK_TARGET_CPU_BITS=32
15096       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15097         OPENJDK_TARGET_CPU=x86
15098       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15099         OPENJDK_TARGET_CPU=sparc
15100       else
15101         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15102       fi
15103     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15104       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
15105     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15106       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15107 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15108     else
15109       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15110     fi
15111   fi
15112 
15113 
15114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15115 $as_echo_n "checking compilation type... " >&6; }
15116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15117 $as_echo "$COMPILE_TYPE" >&6; }
15118 
15119 
15120   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15121     REQUIRED_OS_NAME=SunOS
15122     REQUIRED_OS_VERSION=5.10
15123   fi
15124   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15125     REQUIRED_OS_NAME=Linux
15126     REQUIRED_OS_VERSION=2.6
15127   fi
15128   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15129     REQUIRED_OS_NAME=Windows
15130     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15131       REQUIRED_OS_VERSION=5.2
15132     else
15133       REQUIRED_OS_VERSION=5.1
15134     fi
15135   fi
15136   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15137     REQUIRED_OS_NAME=Darwin
15138     REQUIRED_OS_VERSION=11.2
15139   fi
15140 
15141 
15142 
15143 
15144 
15145   # Also store the legacy naming of the cpu.
15146   # Ie i586 and amd64 instead of x86 and x86_64
15147   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15148   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15149     OPENJDK_TARGET_CPU_LEGACY="i586"
15150   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15151     # On all platforms except MacOSX replace x86_64 with amd64.
15152     OPENJDK_TARGET_CPU_LEGACY="amd64"
15153   fi
15154 
15155 
15156   # And the second legacy naming of the cpu.
15157   # Ie i386 and amd64 instead of x86 and x86_64.
15158   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15159   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15160     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15161   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15162     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15163   fi
15164 
15165 
15166   # This is the name of the cpu (but using i386 and amd64 instead of
15167   # x86 and x86_64, respectively), preceeded by a /, to be used when
15168   # locating libraries. On macosx, it's empty, though.
15169   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15170   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15171     OPENJDK_TARGET_CPU_LIBDIR=""
15172   fi
15173 
15174 
15175   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15176   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15177   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15178   OPENJDK_TARGET_CPU_ISADIR=""
15179   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15180     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15181       OPENJDK_TARGET_CPU_ISADIR="/amd64"
15182     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15183       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15184     fi
15185   fi
15186 
15187 
15188   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15189   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15190   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15191     # On linux only, we replace x86 with i386.
15192     OPENJDK_TARGET_CPU_OSARCH="i386"
15193   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15194     # On all platforms except macosx, we replace x86_64 with amd64.
15195     OPENJDK_TARGET_CPU_OSARCH="amd64"
15196   fi
15197 
15198 
15199   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15200   if test "x$OPENJDK_TARGET_CPU" = xx86; then
15201     OPENJDK_TARGET_CPU_JLI="i386"
15202   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15203     # On all platforms except macosx, we replace x86_64 with amd64.
15204     OPENJDK_TARGET_CPU_JLI="amd64"
15205   fi
15206   # Now setup the -D flags for building libjli.
15207   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15208   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15209     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15210       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15211     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15212       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15213     fi
15214   fi
15215 
15216 
15217   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15218       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15219   else
15220       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15221   fi
15222 
15223 
15224   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15225     A_LP64="LP64:="
15226     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15227     # unpack200.exe
15228     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15229       ADD_LP64="-D_LP64=1"
15230     fi
15231   fi
15232   LP64=$A_LP64
15233 
15234 
15235   if test "x$COMPILE_TYPE" = "xcross"; then
15236     # FIXME: ... or should this include reduced builds..?
15237     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15238   else
15239     DEFINE_CROSS_COMPILE_ARCH=""
15240   fi
15241 
15242 
15243   # ZERO_ARCHDEF is used to enable architecture-specific code
15244   case "${OPENJDK_TARGET_CPU}" in
15245     ppc)     ZERO_ARCHDEF=PPC32 ;;
15246     ppc64)   ZERO_ARCHDEF=PPC64 ;;
15247     s390*)   ZERO_ARCHDEF=S390  ;;
15248     sparc*)  ZERO_ARCHDEF=SPARC ;;
15249     x86_64*) ZERO_ARCHDEF=AMD64 ;;
15250     x86)     ZERO_ARCHDEF=IA32  ;;
15251     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15252   esac
15253 
15254 
15255 
15256 
15257 # Continue setting up basic stuff. Most remaining code require fundamental tools.
15258 
15259   # Save the current directory this script was started from
15260   CURDIR="$PWD"
15261 
15262   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15263   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15264   # was not available at that time.
15265   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15266   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15267     ORIGINAL_PATH="$REWRITTEN_PATH"
15268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15269 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15270   fi
15271 
15272   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15273     PATH_SEP=";"
15274 
15275   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15276   if test $SRC_ROOT_LENGTH -gt 100; then
15277     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15278   fi
15279 
15280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15281     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15282 $as_echo_n "checking cygwin release... " >&6; }
15283     CYGWIN_VERSION=`$UNAME -r`
15284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15285 $as_echo "$CYGWIN_VERSION" >&6; }
15286     WINDOWS_ENV_VENDOR='cygwin'
15287     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15288 
15289     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15290     if test "x$CYGWIN_VERSION_OLD" != x; then
15291       { $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
15292 $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;}
15293       as_fn_error $? "Cannot continue" "$LINENO" 5
15294     fi
15295     if test "x$CYGPATH" = x; then
15296       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15297     fi
15298     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15299 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15300     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15301     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15302     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15303     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15304     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15305 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
15306     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15307     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15308     if test "x$test_cygdrive_prefix" = x; then
15309       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15310     fi
15311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15312     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15313 $as_echo_n "checking msys release... " >&6; }
15314     MSYS_VERSION=`$UNAME -r`
15315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15316 $as_echo "$MSYS_VERSION" >&6; }
15317 
15318     WINDOWS_ENV_VENDOR='msys'
15319     WINDOWS_ENV_VERSION="$MSYS_VERSION"
15320 
15321     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15322 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
15323     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15324     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15325 
15326   windows_path="$MSYS_ROOT_PATH"
15327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15328     unix_path=`$CYGPATH -u "$windows_path"`
15329     MSYS_ROOT_PATH="$unix_path"
15330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15332     MSYS_ROOT_PATH="$unix_path"
15333   fi
15334 
15335     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15336 $as_echo "$MSYS_ROOT_PATH" >&6; }
15337     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15338   else
15339     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15340   fi
15341 
15342   # Test if windows or unix (cygwin/msys) find is first in path.
15343   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15344 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15345   FIND_BINARY_OUTPUT=`find --version 2>&1`
15346   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15347     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15348 $as_echo "unix style" >&6; }
15349   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15351 $as_echo "Windows" >&6; }
15352     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15353 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15354     { $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
15355 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15356     as_fn_error $? "Cannot continue" "$LINENO" 5
15357   else
15358     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15359 $as_echo "unknown" >&6; }
15360     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15361 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15362   fi
15363 
15364   else
15365     PATH_SEP=":"
15366   fi
15367 
15368 
15369   # We get the top-level directory from the supporting wrappers.
15370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15371 $as_echo_n "checking for top-level directory... " >&6; }
15372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15373 $as_echo "$TOPDIR" >&6; }
15374 
15375 
15376   # Save the original version of TOPDIR for string comparisons
15377   ORIGINAL_TOPDIR="$TOPDIR"
15378 
15379 
15380   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15381 
15382   # Only process if variable expands to non-empty
15383 
15384   if test "x$CURDIR" != x; then
15385     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15386 
15387   # Input might be given as Windows format, start by converting to
15388   # unix format.
15389   path="$CURDIR"
15390   new_path=`$CYGPATH -u "$path"`
15391 
15392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15395   # "foo.exe" is OK but "foo" is an error.
15396   #
15397   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15398   # It is also a way to make sure we got the proper file name for the real test later on.
15399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15400   if test "x$test_shortpath" = x; then
15401     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15402 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15403     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15404   fi
15405 
15406   # Call helper function which possibly converts this using DOS-style short mode.
15407   # If so, the updated path is stored in $new_path.
15408 
15409   input_path="$new_path"
15410   # Check if we need to convert this using DOS-style short mode. If the path
15411   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15412   # take no chances and rewrite it.
15413   # Note: m4 eats our [], so we need to use [ and ] instead.
15414   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15415   if test "x$has_forbidden_chars" != x; then
15416     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15417     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15418     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15419     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15420       # Going to short mode and back again did indeed matter. Since short mode is
15421       # case insensitive, let's make it lowercase to improve readability.
15422       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423       # Now convert it back to Unix-style (cygpath)
15424       input_path=`$CYGPATH -u "$shortmode_path"`
15425       new_path="$input_path"
15426     fi
15427   fi
15428 
15429   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15430   if test "x$test_cygdrive_prefix" = x; then
15431     # As a simple fix, exclude /usr/bin since it's not a real path.
15432     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15433       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15434       # a path prefixed by /cygdrive for fixpath to work.
15435       new_path="$CYGWIN_ROOT_PATH$input_path"
15436     fi
15437   fi
15438 
15439 
15440   if test "x$path" != "x$new_path"; then
15441     CURDIR="$new_path"
15442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15443 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15444   fi
15445 
15446     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15447 
15448   path="$CURDIR"
15449   has_colon=`$ECHO $path | $GREP ^.:`
15450   new_path="$path"
15451   if test "x$has_colon" = x; then
15452     # Not in mixed or Windows style, start by that.
15453     new_path=`cmd //c echo $path`
15454   fi
15455 
15456 
15457   input_path="$new_path"
15458   # Check if we need to convert this using DOS-style short mode. If the path
15459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15460   # take no chances and rewrite it.
15461   # Note: m4 eats our [], so we need to use [ and ] instead.
15462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15463   if test "x$has_forbidden_chars" != x; then
15464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15466   fi
15467 
15468 
15469   windows_path="$new_path"
15470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15471     unix_path=`$CYGPATH -u "$windows_path"`
15472     new_path="$unix_path"
15473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15475     new_path="$unix_path"
15476   fi
15477 
15478   if test "x$path" != "x$new_path"; then
15479     CURDIR="$new_path"
15480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15481 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15482   fi
15483 
15484   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15485   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15486 
15487     else
15488       # We're on a unix platform. Hooray! :)
15489       path="$CURDIR"
15490       has_space=`$ECHO "$path" | $GREP " "`
15491       if test "x$has_space" != x; then
15492         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15493 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15494         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15495       fi
15496 
15497       # Use eval to expand a potential ~
15498       eval path="$path"
15499       if test ! -f "$path" && test ! -d "$path"; then
15500         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15501       fi
15502 
15503       if test -d "$path"; then
15504         CURDIR="`cd "$path"; $THEPWDCMD -L`"
15505       else
15506         dir="`$DIRNAME "$path"`"
15507         base="`$BASENAME "$path"`"
15508         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15509       fi
15510     fi
15511   fi
15512 
15513 
15514   # Only process if variable expands to non-empty
15515 
15516   if test "x$TOPDIR" != x; then
15517     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15518 
15519   # Input might be given as Windows format, start by converting to
15520   # unix format.
15521   path="$TOPDIR"
15522   new_path=`$CYGPATH -u "$path"`
15523 
15524   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15525   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15526   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15527   # "foo.exe" is OK but "foo" is an error.
15528   #
15529   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15530   # It is also a way to make sure we got the proper file name for the real test later on.
15531   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15532   if test "x$test_shortpath" = x; then
15533     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15534 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15535     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15536   fi
15537 
15538   # Call helper function which possibly converts this using DOS-style short mode.
15539   # If so, the updated path is stored in $new_path.
15540 
15541   input_path="$new_path"
15542   # Check if we need to convert this using DOS-style short mode. If the path
15543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15544   # take no chances and rewrite it.
15545   # Note: m4 eats our [], so we need to use [ and ] instead.
15546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15547   if test "x$has_forbidden_chars" != x; then
15548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15552       # Going to short mode and back again did indeed matter. Since short mode is
15553       # case insensitive, let's make it lowercase to improve readability.
15554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15555       # Now convert it back to Unix-style (cygpath)
15556       input_path=`$CYGPATH -u "$shortmode_path"`
15557       new_path="$input_path"
15558     fi
15559   fi
15560 
15561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15562   if test "x$test_cygdrive_prefix" = x; then
15563     # As a simple fix, exclude /usr/bin since it's not a real path.
15564     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15566       # a path prefixed by /cygdrive for fixpath to work.
15567       new_path="$CYGWIN_ROOT_PATH$input_path"
15568     fi
15569   fi
15570 
15571 
15572   if test "x$path" != "x$new_path"; then
15573     TOPDIR="$new_path"
15574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15575 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15576   fi
15577 
15578     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15579 
15580   path="$TOPDIR"
15581   has_colon=`$ECHO $path | $GREP ^.:`
15582   new_path="$path"
15583   if test "x$has_colon" = x; then
15584     # Not in mixed or Windows style, start by that.
15585     new_path=`cmd //c echo $path`
15586   fi
15587 
15588 
15589   input_path="$new_path"
15590   # Check if we need to convert this using DOS-style short mode. If the path
15591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15592   # take no chances and rewrite it.
15593   # Note: m4 eats our [], so we need to use [ and ] instead.
15594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15595   if test "x$has_forbidden_chars" != x; then
15596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15597     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15598   fi
15599 
15600 
15601   windows_path="$new_path"
15602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15603     unix_path=`$CYGPATH -u "$windows_path"`
15604     new_path="$unix_path"
15605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15607     new_path="$unix_path"
15608   fi
15609 
15610   if test "x$path" != "x$new_path"; then
15611     TOPDIR="$new_path"
15612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15613 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15614   fi
15615 
15616   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15617   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15618 
15619     else
15620       # We're on a unix platform. Hooray! :)
15621       path="$TOPDIR"
15622       has_space=`$ECHO "$path" | $GREP " "`
15623       if test "x$has_space" != x; then
15624         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15625 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15626         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15627       fi
15628 
15629       # Use eval to expand a potential ~
15630       eval path="$path"
15631       if test ! -f "$path" && test ! -d "$path"; then
15632         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15633       fi
15634 
15635       if test -d "$path"; then
15636         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15637       else
15638         dir="`$DIRNAME "$path"`"
15639         base="`$BASENAME "$path"`"
15640         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15641       fi
15642     fi
15643   fi
15644 
15645   # SRC_ROOT is a traditional alias for TOPDIR.
15646   SRC_ROOT=$TOPDIR
15647 
15648   # Calculate a canonical version of TOPDIR for string comparisons
15649   CANONICAL_TOPDIR=$TOPDIR
15650 
15651   if test "x$OPENJDK_BUILD_OS" != xwindows; then
15652     # Follow a chain of symbolic links. Use readlink
15653     # where it exists, else fall back to horribly
15654     # complicated shell code.
15655     if test "x$READLINK_TESTED" != yes; then
15656       # On MacOSX there is a readlink tool with a different
15657       # purpose than the GNU readlink tool. Check the found readlink.
15658       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15659       if test "x$ISGNU" = x; then
15660         # A readlink that we do not know how to use.
15661         # Are there other non-GNU readlinks out there?
15662         READLINK_TESTED=yes
15663         READLINK=
15664       fi
15665     fi
15666 
15667     if test "x$READLINK" != x; then
15668       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15669     else
15670       # Save the current directory for restoring afterwards
15671       STARTDIR=$PWD
15672       COUNTER=0
15673       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15674       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15675       cd $sym_link_dir
15676       # Use -P flag to resolve symlinks in directories.
15677       cd `$THEPWDCMD -P`
15678       sym_link_dir=`$THEPWDCMD -P`
15679       # Resolve file symlinks
15680       while test $COUNTER -lt 20; do
15681         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15682         if test "x$ISLINK" == x; then
15683           # This is not a symbolic link! We are done!
15684           break
15685         fi
15686         # Again resolve directory symlinks since the target of the just found
15687         # link could be in a different directory
15688         cd `$DIRNAME $ISLINK`
15689         sym_link_dir=`$THEPWDCMD -P`
15690         sym_link_file=`$BASENAME $ISLINK`
15691         let COUNTER=COUNTER+1
15692       done
15693       cd $STARTDIR
15694       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15695     fi
15696   fi
15697 
15698 
15699 
15700   # Locate the directory of this script.
15701   AUTOCONF_DIR=$TOPDIR/common/autoconf
15702 
15703   # Setup username (for use in adhoc version strings etc)
15704   # Outer [ ] to quote m4.
15705    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
15706 
15707 
15708 
15709 # Check if it's a pure open build or if custom sources are to be used.
15710 
15711   # Check whether --enable-openjdk-only was given.
15712 if test "${enable_openjdk_only+set}" = set; then :
15713   enableval=$enable_openjdk_only;
15714 else
15715   enable_openjdk_only="no"
15716 fi
15717 
15718 
15719   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15720 $as_echo_n "checking for presence of closed sources... " >&6; }
15721   if test -d "$SRC_ROOT/jdk/src/closed"; then
15722     CLOSED_SOURCE_PRESENT=yes
15723   else
15724     CLOSED_SOURCE_PRESENT=no
15725   fi
15726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15727 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15728 
15729   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15730 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15731   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15733 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15734 
15735   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15736     OPENJDK=true
15737     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15738       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15739 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15740     fi
15741   else
15742     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15743       OPENJDK=true
15744     else
15745       OPENJDK=false
15746     fi
15747   fi
15748 
15749   if test "x$OPENJDK" = "xtrue"; then
15750     SET_OPENJDK="OPENJDK=true"
15751   fi
15752 
15753 
15754 
15755   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15756   # the IncludeCustomExtension macro.
15757 
15758 
15759 # Check whether --with-custom-make-dir was given.
15760 if test "${with_custom_make_dir+set}" = set; then :
15761   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
15762 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15763 fi
15764 
15765 
15766 
15767 
15768 # These are needed to be able to create a configuration name (and thus the output directory)
15769 
15770   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15771 $as_echo_n "checking which variant of the JDK to build... " >&6; }
15772 
15773 # Check whether --with-jdk-variant was given.
15774 if test "${with_jdk_variant+set}" = set; then :
15775   withval=$with_jdk_variant;
15776 fi
15777 
15778 
15779   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15780     JDK_VARIANT="normal"
15781   else
15782     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15783   fi
15784 
15785 
15786 
15787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15788 $as_echo "$JDK_VARIANT" >&6; }
15789 
15790 
15791 
15792 # Check whether --with-jvm-interpreter was given.
15793 if test "${with_jvm_interpreter+set}" = set; then :
15794   withval=$with_jvm_interpreter;
15795 fi
15796 
15797 
15798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15799 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15800   if test "x$with_jvm_interpreter" = x; then
15801     JVM_INTERPRETER="template"
15802   else
15803     JVM_INTERPRETER="$with_jvm_interpreter"
15804   fi
15805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15806 $as_echo "$JVM_INTERPRETER" >&6; }
15807 
15808   if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15809     as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15810   fi
15811 
15812 
15813 
15814 
15815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15816 $as_echo_n "checking which variants of the JVM to build... " >&6; }
15817 
15818 # Check whether --with-jvm-variants was given.
15819 if test "${with_jvm_variants+set}" = set; then :
15820   withval=$with_jvm_variants;
15821 fi
15822 
15823 
15824   if test "x$with_jvm_variants" = x; then
15825     with_jvm_variants="server"
15826   fi
15827 
15828   JVM_VARIANTS=",$with_jvm_variants,"
15829   TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15830 
15831   if test "x$TEST_VARIANTS" != "x,"; then
15832     as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15833   fi
15834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15835 $as_echo "$with_jvm_variants" >&6; }
15836 
15837   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15838   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15839   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15840   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15841   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15842   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15843 
15844   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15845     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15846       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15847     fi
15848   fi
15849   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15850     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15851       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15852     fi
15853   fi
15854 
15855   # Replace the commas with AND for use in the build directory name.
15856   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15857   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15858   if test "x$COUNT_VARIANTS" != "x,1"; then
15859     BUILDING_MULTIPLE_JVM_VARIANTS=yes
15860   else
15861     BUILDING_MULTIPLE_JVM_VARIANTS=no
15862   fi
15863 
15864   if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15865     as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15866   fi
15867 
15868 
15869 
15870 
15871 
15872 
15873 
15874 
15875 
15876   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15877     MACOSX_UNIVERSAL="true"
15878   fi
15879 
15880 
15881 
15882 
15883   DEBUG_LEVEL="release"
15884   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15885 $as_echo_n "checking which debug level to use... " >&6; }
15886   # Check whether --enable-debug was given.
15887 if test "${enable_debug+set}" = set; then :
15888   enableval=$enable_debug;
15889         ENABLE_DEBUG="${enableval}"
15890         DEBUG_LEVEL="fastdebug"
15891 
15892 else
15893   ENABLE_DEBUG="no"
15894 fi
15895 
15896 
15897 
15898 # Check whether --with-debug-level was given.
15899 if test "${with_debug_level+set}" = set; then :
15900   withval=$with_debug_level;
15901         DEBUG_LEVEL="${withval}"
15902         if test "x$ENABLE_DEBUG" = xyes; then
15903           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15904         fi
15905 
15906 fi
15907 
15908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15909 $as_echo "$DEBUG_LEVEL" >&6; }
15910 
15911   if test "x$DEBUG_LEVEL" != xrelease && \
15912       test "x$DEBUG_LEVEL" != xoptimized && \
15913       test "x$DEBUG_LEVEL" != xfastdebug && \
15914       test "x$DEBUG_LEVEL" != xslowdebug; then
15915     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
15916   fi
15917 
15918 
15919   case $DEBUG_LEVEL in
15920     release )
15921       VARIANT="OPT"
15922       FASTDEBUG="false"
15923       DEBUG_CLASSFILES="false"
15924       BUILD_VARIANT_RELEASE=""
15925       HOTSPOT_DEBUG_LEVEL="product"
15926       HOTSPOT_EXPORT="product"
15927       ;;
15928     fastdebug )
15929       VARIANT="DBG"
15930       FASTDEBUG="true"
15931       DEBUG_CLASSFILES="true"
15932       BUILD_VARIANT_RELEASE="-fastdebug"
15933       HOTSPOT_DEBUG_LEVEL="fastdebug"
15934       HOTSPOT_EXPORT="fastdebug"
15935       ;;
15936     slowdebug )
15937       VARIANT="DBG"
15938       FASTDEBUG="false"
15939       DEBUG_CLASSFILES="true"
15940       BUILD_VARIANT_RELEASE="-debug"
15941       HOTSPOT_DEBUG_LEVEL="debug"
15942       HOTSPOT_EXPORT="debug"
15943       ;;
15944     optimized )
15945       VARIANT="OPT"
15946       FASTDEBUG="false"
15947       DEBUG_CLASSFILES="false"
15948       BUILD_VARIANT_RELEASE="-optimized"
15949       HOTSPOT_DEBUG_LEVEL="optimized"
15950       HOTSPOT_EXPORT="optimized"
15951       ;;
15952   esac
15953 
15954   # The debug level 'optimized' is a little special because it is currently only
15955   # applicable to the HotSpot build where it means to build a completely
15956   # optimized version of the VM without any debugging code (like for the
15957   # 'release' debug level which is called 'product' in the HotSpot build) but
15958   # with the exception that it can contain additional code which is otherwise
15959   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15960   # test new and/or experimental features which are not intended for customer
15961   # shipment. Because these new features need to be tested and benchmarked in
15962   # real world scenarios, we want to build the containing JDK at the 'release'
15963   # debug level.
15964   if test "x$DEBUG_LEVEL" = xoptimized; then
15965     DEBUG_LEVEL="release"
15966   fi
15967 
15968   #####
15969   # Generate the legacy makefile targets for hotspot.
15970   # The hotspot api for selecting the build artifacts, really, needs to be improved.
15971   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15972   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15973   # But until then ...
15974   HOTSPOT_TARGET=""
15975 
15976   if test "x$JVM_VARIANT_SERVER" = xtrue; then
15977     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15978   fi
15979 
15980   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15981     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15982   fi
15983 
15984   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15985     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15986   fi
15987 
15988   if test "x$JVM_VARIANT_ZERO" = xtrue; then
15989     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15990   fi
15991 
15992   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15993     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15994   fi
15995 
15996   if test "x$JVM_VARIANT_CORE" = xtrue; then
15997     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15998   fi
15999 
16000   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
16001 
16002   # On Macosx universal binaries are produced, but they only contain
16003   # 64 bit intel. This invalidates control of which jvms are built
16004   # from configure, but only server is valid anyway. Fix this
16005   # when hotspot makefiles are rewritten.
16006   if test "x$MACOSX_UNIVERSAL" = xtrue; then
16007     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
16008   fi
16009 
16010   #####
16011 
16012 
16013 
16014 
16015 
16016 
16017 
16018 
16019 # With basic setup done, call the custom early hook.
16020 
16021 
16022 # Check if we have devkits, extra paths or sysroot set.
16023 
16024 
16025 # Check whether --with-devkit was given.
16026 if test "${with_devkit+set}" = set; then :
16027   withval=$with_devkit;
16028 
16029   # Only process if variable expands to non-empty
16030 
16031   if test "x$with_devkit" != x; then
16032     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16033 
16034   # Input might be given as Windows format, start by converting to
16035   # unix format.
16036   path="$with_devkit"
16037   new_path=`$CYGPATH -u "$path"`
16038 
16039   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16040   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16041   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16042   # "foo.exe" is OK but "foo" is an error.
16043   #
16044   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16045   # It is also a way to make sure we got the proper file name for the real test later on.
16046   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16047   if test "x$test_shortpath" = x; then
16048     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16049 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16050     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16051   fi
16052 
16053   # Call helper function which possibly converts this using DOS-style short mode.
16054   # If so, the updated path is stored in $new_path.
16055 
16056   input_path="$new_path"
16057   # Check if we need to convert this using DOS-style short mode. If the path
16058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16059   # take no chances and rewrite it.
16060   # Note: m4 eats our [], so we need to use [ and ] instead.
16061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16062   if test "x$has_forbidden_chars" != x; then
16063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16067       # Going to short mode and back again did indeed matter. Since short mode is
16068       # case insensitive, let's make it lowercase to improve readability.
16069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16070       # Now convert it back to Unix-style (cygpath)
16071       input_path=`$CYGPATH -u "$shortmode_path"`
16072       new_path="$input_path"
16073     fi
16074   fi
16075 
16076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16077   if test "x$test_cygdrive_prefix" = x; then
16078     # As a simple fix, exclude /usr/bin since it's not a real path.
16079     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16081       # a path prefixed by /cygdrive for fixpath to work.
16082       new_path="$CYGWIN_ROOT_PATH$input_path"
16083     fi
16084   fi
16085 
16086 
16087   if test "x$path" != "x$new_path"; then
16088     with_devkit="$new_path"
16089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16090 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16091   fi
16092 
16093     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16094 
16095   path="$with_devkit"
16096   has_colon=`$ECHO $path | $GREP ^.:`
16097   new_path="$path"
16098   if test "x$has_colon" = x; then
16099     # Not in mixed or Windows style, start by that.
16100     new_path=`cmd //c echo $path`
16101   fi
16102 
16103 
16104   input_path="$new_path"
16105   # Check if we need to convert this using DOS-style short mode. If the path
16106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16107   # take no chances and rewrite it.
16108   # Note: m4 eats our [], so we need to use [ and ] instead.
16109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16110   if test "x$has_forbidden_chars" != x; then
16111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16112     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16113   fi
16114 
16115 
16116   windows_path="$new_path"
16117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16118     unix_path=`$CYGPATH -u "$windows_path"`
16119     new_path="$unix_path"
16120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16122     new_path="$unix_path"
16123   fi
16124 
16125   if test "x$path" != "x$new_path"; then
16126     with_devkit="$new_path"
16127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16128 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16129   fi
16130 
16131   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16132   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16133 
16134     else
16135       # We're on a unix platform. Hooray! :)
16136       path="$with_devkit"
16137       has_space=`$ECHO "$path" | $GREP " "`
16138       if test "x$has_space" != x; then
16139         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16140 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16141         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16142       fi
16143 
16144       # Use eval to expand a potential ~
16145       eval path="$path"
16146       if test ! -f "$path" && test ! -d "$path"; then
16147         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16148       fi
16149 
16150       if test -d "$path"; then
16151         with_devkit="`cd "$path"; $THEPWDCMD -L`"
16152       else
16153         dir="`$DIRNAME "$path"`"
16154         base="`$BASENAME "$path"`"
16155         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16156       fi
16157     fi
16158   fi
16159 
16160         DEVKIT_ROOT="$with_devkit"
16161         # Check for a meta data info file in the root of the devkit
16162         if test -f "$DEVKIT_ROOT/devkit.info"; then
16163           . $DEVKIT_ROOT/devkit.info
16164           # This potentially sets the following:
16165           # A descriptive name of the devkit
16166 
16167   if test "x$DEVKIT_NAME" = x; then
16168     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16169   fi
16170 
16171           # Corresponds to --with-extra-path
16172 
16173   if test "x$DEVKIT_EXTRA_PATH" = x; then
16174     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16175   fi
16176 
16177           # Corresponds to --with-toolchain-path
16178 
16179   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16180     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16181   fi
16182 
16183           # Corresponds to --with-sysroot
16184 
16185   if test "x$DEVKIT_SYSROOT" = x; then
16186     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16187   fi
16188 
16189 
16190           # Identifies the Visual Studio version in the devkit
16191 
16192   if test "x$DEVKIT_VS_VERSION" = x; then
16193     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16194   fi
16195 
16196           # The Visual Studio include environment variable
16197 
16198   if test "x$DEVKIT_VS_INCLUDE" = x; then
16199     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16200   fi
16201 
16202           # The Visual Studio lib environment variable
16203 
16204   if test "x$DEVKIT_VS_LIB" = x; then
16205     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16206   fi
16207 
16208           # Corresponds to --with-msvcr-dll
16209 
16210   if test "x$DEVKIT_MSVCR_DLL" = x; then
16211     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16212   fi
16213 
16214           # Corresponds to --with-msvcp-dll
16215 
16216   if test "x$DEVKIT_MSVCP_DLL" = x; then
16217     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16218   fi
16219 
16220         fi
16221 
16222         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16223 $as_echo_n "checking for devkit... " >&6; }
16224         if test "x$DEVKIT_NAME" != x; then
16225           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16226 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16227         else
16228           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16229 $as_echo "$DEVKIT_ROOT" >&6; }
16230         fi
16231 
16232 
16233   if test "x$DEVKIT_EXTRA_PATH" != x; then
16234     if test "x$EXTRA_PATH" = x; then
16235       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16236     else
16237       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16238     fi
16239   fi
16240 
16241 
16242         # Fallback default of just /bin if DEVKIT_PATH is not defined
16243         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16244           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16245         fi
16246 
16247   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16248     if test "x$TOOLCHAIN_PATH" = x; then
16249       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16250     else
16251       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16252     fi
16253   fi
16254 
16255 
16256         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16257         # places for backwards compatiblity.
16258         if test "x$DEVKIT_SYSROOT" != x; then
16259           SYSROOT="$DEVKIT_SYSROOT"
16260         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16261           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16262         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16263           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16264         fi
16265 
16266 
16267 fi
16268 
16269 
16270   # You can force the sysroot if the sysroot encoded into the compiler tools
16271   # is not correct.
16272 
16273 # Check whether --with-sys-root was given.
16274 if test "${with_sys_root+set}" = set; then :
16275   withval=$with_sys_root; SYSROOT=$with_sys_root
16276 
16277 fi
16278 
16279 
16280 
16281 # Check whether --with-sysroot was given.
16282 if test "${with_sysroot+set}" = set; then :
16283   withval=$with_sysroot; SYSROOT=$with_sysroot
16284 
16285 fi
16286 
16287 
16288 
16289 # Check whether --with-tools-dir was given.
16290 if test "${with_tools_dir+set}" = set; then :
16291   withval=$with_tools_dir;
16292   if test "x$with_tools_dir" != x; then
16293     if test "x$TOOLCHAIN_PATH" = x; then
16294       TOOLCHAIN_PATH="$with_tools_dir"
16295     else
16296       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16297     fi
16298   fi
16299 
16300 
16301 fi
16302 
16303 
16304 
16305 # Check whether --with-toolchain-path was given.
16306 if test "${with_toolchain_path+set}" = set; then :
16307   withval=$with_toolchain_path;
16308   if test "x$with_toolchain_path" != x; then
16309     if test "x$TOOLCHAIN_PATH" = x; then
16310       TOOLCHAIN_PATH="$with_toolchain_path"
16311     else
16312       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16313     fi
16314   fi
16315 
16316 
16317 fi
16318 
16319 
16320 
16321 # Check whether --with-extra-path was given.
16322 if test "${with_extra_path+set}" = set; then :
16323   withval=$with_extra_path;
16324   if test "x$with_extra_path" != x; then
16325     if test "x$EXTRA_PATH" = x; then
16326       EXTRA_PATH="$with_extra_path"
16327     else
16328       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16329     fi
16330   fi
16331 
16332 
16333 fi
16334 
16335 
16336   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16337     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16338     # If not, detect if Xcode is installed by running xcodebuild -version
16339     # if no Xcode installed, xcodebuild exits with 1
16340     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16341     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16342       # We need to use xcodebuild in the toolchain dir provided by the user, this will
16343       # fall back on the stub binary in /usr/bin/xcodebuild
16344       # Extract the first word of "xcodebuild", so it can be a program name with args.
16345 set dummy xcodebuild; ac_word=$2
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16347 $as_echo_n "checking for $ac_word... " >&6; }
16348 if ${ac_cv_path_XCODEBUILD+:} false; then :
16349   $as_echo_n "(cached) " >&6
16350 else
16351   case $XCODEBUILD in
16352   [\\/]* | ?:[\\/]*)
16353   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16354   ;;
16355   *)
16356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16357 for as_dir in $TOOLCHAIN_PATH
16358 do
16359   IFS=$as_save_IFS
16360   test -z "$as_dir" && as_dir=.
16361     for ac_exec_ext in '' $ac_executable_extensions; do
16362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16363     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16365     break 2
16366   fi
16367 done
16368   done
16369 IFS=$as_save_IFS
16370 
16371   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16372   ;;
16373 esac
16374 fi
16375 XCODEBUILD=$ac_cv_path_XCODEBUILD
16376 if test -n "$XCODEBUILD"; then
16377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16378 $as_echo "$XCODEBUILD" >&6; }
16379 else
16380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16381 $as_echo "no" >&6; }
16382 fi
16383 
16384 
16385     else
16386       # this should result in SYSROOT being empty, unless --with-sysroot is provided
16387       # when only the command line tools are installed there are no SDKs, so headers
16388       # are copied into the system frameworks
16389       XCODEBUILD=
16390 
16391     fi
16392 
16393     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16394 $as_echo_n "checking for sdk name... " >&6; }
16395 
16396 # Check whether --with-sdk-name was given.
16397 if test "${with_sdk_name+set}" = set; then :
16398   withval=$with_sdk_name; SDKNAME=$with_sdk_name
16399 
16400 fi
16401 
16402     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16403 $as_echo "$SDKNAME" >&6; }
16404 
16405     # if toolchain path is specified then don't rely on system headers, they may not compile
16406     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16407     test -z "$TOOLCHAIN_PATH" && \
16408       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16409 
16410     if test -z "$SYSROOT"; then
16411       if test -n "$XCODEBUILD"; then
16412         # if we don't have system headers, use default SDK name (last resort)
16413         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16414           SDKNAME=${SDKNAME:-macosx}
16415         fi
16416 
16417         if test -n "$SDKNAME"; then
16418           # Call xcodebuild to determine SYSROOT
16419           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16420         fi
16421       else
16422         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16423           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
16424         fi
16425       fi
16426     else
16427       # warn user if --with-sdk-name was also set
16428       if test -n "$with_sdk_name"; then
16429         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16430 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16431       fi
16432     fi
16433 
16434     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16435       # If no system framework headers, then SYSROOT must be set, or we won't build
16436       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
16437     fi
16438 
16439     # Perform a basic sanity test
16440     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16441       if test -z "$SYSROOT"; then
16442         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
16443       else
16444         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16445       fi
16446     fi
16447 
16448     # set SDKROOT too, Xcode tools will pick it up
16449     SDKROOT=$SYSROOT
16450 
16451   fi
16452 
16453   # Prepend the extra path to the global path
16454 
16455   if test "x$EXTRA_PATH" != x; then
16456     if test "x$PATH" = x; then
16457       PATH="$EXTRA_PATH"
16458     else
16459       PATH="$EXTRA_PATH:$PATH"
16460     fi
16461   fi
16462 
16463 
16464   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16465     # Add extra search paths on solaris for utilities like ar and as etc...
16466     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16467   fi
16468 
16469   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16470 $as_echo_n "checking for sysroot... " >&6; }
16471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16472 $as_echo "$SYSROOT" >&6; }
16473   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16474 $as_echo_n "checking for toolchain path... " >&6; }
16475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16476 $as_echo "$TOOLCHAIN_PATH" >&6; }
16477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16478 $as_echo_n "checking for extra path... " >&6; }
16479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16480 $as_echo "$EXTRA_PATH" >&6; }
16481 
16482 
16483 # To properly create a configuration name, we need to have the OpenJDK target
16484 # and options (variants and debug level) parsed.
16485 
16486 
16487 
16488 # Check whether --with-conf-name was given.
16489 if test "${with_conf_name+set}" = set; then :
16490   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16491 fi
16492 
16493 
16494   # Test from where we are running configure, in or outside of src root.
16495   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16496 $as_echo_n "checking where to store configuration... " >&6; }
16497   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16498       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16499       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16500     # We are running configure from the src root.
16501     # Create a default ./build/target-variant-debuglevel output root.
16502     if test "x${CONF_NAME}" = x; then
16503       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16504 $as_echo "in default location" >&6; }
16505       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16506     else
16507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16508 $as_echo "in build directory with custom name" >&6; }
16509     fi
16510     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16511     $MKDIR -p "$OUTPUT_ROOT"
16512     if test ! -d "$OUTPUT_ROOT"; then
16513       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16514     fi
16515   else
16516     # We are running configure from outside of the src dir.
16517     # Then use the current directory as output dir!
16518     # If configuration is situated in normal build directory, just use the build
16519     # directory name as configuration name, otherwise use the complete path.
16520     if test "x${CONF_NAME}" = x; then
16521       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16522     fi
16523     OUTPUT_ROOT="$CURDIR"
16524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16525 $as_echo "in current directory" >&6; }
16526 
16527     # WARNING: This might be a bad thing to do. You need to be sure you want to
16528     # have a configuration in this directory. Do some sanity checks!
16529 
16530     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16531       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16532       # other files
16533       files_present=`$LS $OUTPUT_ROOT`
16534       # Configure has already touched config.log and confdefs.h in the current dir when this check
16535       # is performed.
16536       filtered_files=`$ECHO "$files_present" \
16537           | $SED -e 's/config.log//g' \
16538               -e 's/configure.log//g' \
16539               -e 's/confdefs.h//g' \
16540               -e 's/ //g' \
16541           | $TR -d '\n'`
16542       if test "x$filtered_files" != x; then
16543         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16544 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
16545         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16546 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16547         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16548 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16549         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16550 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16551         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16552 $as_echo "$as_me: seriously mess up just about everything." >&6;}
16553         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16554 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16555         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16556 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16557         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16558       fi
16559     fi
16560   fi
16561   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16562 $as_echo_n "checking what configuration name to use... " >&6; }
16563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16564 $as_echo "$CONF_NAME" >&6; }
16565 
16566 
16567   # Only process if variable expands to non-empty
16568 
16569   if test "x$OUTPUT_ROOT" != x; then
16570     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16571 
16572   # Input might be given as Windows format, start by converting to
16573   # unix format.
16574   path="$OUTPUT_ROOT"
16575   new_path=`$CYGPATH -u "$path"`
16576 
16577   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16578   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16579   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16580   # "foo.exe" is OK but "foo" is an error.
16581   #
16582   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16583   # It is also a way to make sure we got the proper file name for the real test later on.
16584   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16585   if test "x$test_shortpath" = x; then
16586     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16587 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16588     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16589   fi
16590 
16591   # Call helper function which possibly converts this using DOS-style short mode.
16592   # If so, the updated path is stored in $new_path.
16593 
16594   input_path="$new_path"
16595   # Check if we need to convert this using DOS-style short mode. If the path
16596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16597   # take no chances and rewrite it.
16598   # Note: m4 eats our [], so we need to use [ and ] instead.
16599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16600   if test "x$has_forbidden_chars" != x; then
16601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16602     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16603     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16604     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16605       # Going to short mode and back again did indeed matter. Since short mode is
16606       # case insensitive, let's make it lowercase to improve readability.
16607       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16608       # Now convert it back to Unix-style (cygpath)
16609       input_path=`$CYGPATH -u "$shortmode_path"`
16610       new_path="$input_path"
16611     fi
16612   fi
16613 
16614   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16615   if test "x$test_cygdrive_prefix" = x; then
16616     # As a simple fix, exclude /usr/bin since it's not a real path.
16617     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16618       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16619       # a path prefixed by /cygdrive for fixpath to work.
16620       new_path="$CYGWIN_ROOT_PATH$input_path"
16621     fi
16622   fi
16623 
16624 
16625   if test "x$path" != "x$new_path"; then
16626     OUTPUT_ROOT="$new_path"
16627     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16628 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16629   fi
16630 
16631     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16632 
16633   path="$OUTPUT_ROOT"
16634   has_colon=`$ECHO $path | $GREP ^.:`
16635   new_path="$path"
16636   if test "x$has_colon" = x; then
16637     # Not in mixed or Windows style, start by that.
16638     new_path=`cmd //c echo $path`
16639   fi
16640 
16641 
16642   input_path="$new_path"
16643   # Check if we need to convert this using DOS-style short mode. If the path
16644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16645   # take no chances and rewrite it.
16646   # Note: m4 eats our [], so we need to use [ and ] instead.
16647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16648   if test "x$has_forbidden_chars" != x; then
16649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16650     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16651   fi
16652 
16653 
16654   windows_path="$new_path"
16655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16656     unix_path=`$CYGPATH -u "$windows_path"`
16657     new_path="$unix_path"
16658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16660     new_path="$unix_path"
16661   fi
16662 
16663   if test "x$path" != "x$new_path"; then
16664     OUTPUT_ROOT="$new_path"
16665     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16666 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16667   fi
16668 
16669   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16670   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16671 
16672     else
16673       # We're on a unix platform. Hooray! :)
16674       path="$OUTPUT_ROOT"
16675       has_space=`$ECHO "$path" | $GREP " "`
16676       if test "x$has_space" != x; then
16677         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16678 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16679         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16680       fi
16681 
16682       # Use eval to expand a potential ~
16683       eval path="$path"
16684       if test ! -f "$path" && test ! -d "$path"; then
16685         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16686       fi
16687 
16688       if test -d "$path"; then
16689         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16690       else
16691         dir="`$DIRNAME "$path"`"
16692         base="`$BASENAME "$path"`"
16693         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16694       fi
16695     fi
16696   fi
16697 
16698 
16699   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16700   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16701 
16702   SPEC=$OUTPUT_ROOT/spec.gmk
16703 
16704   CONF_NAME=$CONF_NAME
16705 
16706   OUTPUT_ROOT=$OUTPUT_ROOT
16707 
16708 
16709 
16710   # The spec.gmk file contains all variables for the make system.
16711   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16712 
16713   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16714   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16715 
16716   # The bootcycle-spec.gmk file contains support for boot cycle builds.
16717   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16718 
16719   # The compare.sh is used to compare the build output to other builds.
16720   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16721 
16722   # The generated Makefile knows where the spec.gmk is and where the source is.
16723   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16724   # which will look for generated configurations
16725   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16726 
16727 
16728 
16729 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16730 
16731   for ac_prog in apt-get yum port pkgutil pkgadd
16732 do
16733   # Extract the first word of "$ac_prog", so it can be a program name with args.
16734 set dummy $ac_prog; ac_word=$2
16735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16736 $as_echo_n "checking for $ac_word... " >&6; }
16737 if ${ac_cv_prog_PKGHANDLER+:} false; then :
16738   $as_echo_n "(cached) " >&6
16739 else
16740   if test -n "$PKGHANDLER"; then
16741   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16742 else
16743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16744 for as_dir in $PATH
16745 do
16746   IFS=$as_save_IFS
16747   test -z "$as_dir" && as_dir=.
16748     for ac_exec_ext in '' $ac_executable_extensions; do
16749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16750     ac_cv_prog_PKGHANDLER="$ac_prog"
16751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16752     break 2
16753   fi
16754 done
16755   done
16756 IFS=$as_save_IFS
16757 
16758 fi
16759 fi
16760 PKGHANDLER=$ac_cv_prog_PKGHANDLER
16761 if test -n "$PKGHANDLER"; then
16762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16763 $as_echo "$PKGHANDLER" >&6; }
16764 else
16765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16766 $as_echo "no" >&6; }
16767 fi
16768 
16769 
16770   test -n "$PKGHANDLER" && break
16771 done
16772 
16773 
16774 
16775 # Setup tools that requires more complex handling, or that is not needed by the configure script.
16776 
16777 
16778 
16779   # Publish this variable in the help.
16780 
16781 
16782   if [ -z "${MAKE+x}" ]; then
16783     # The variable is not set by user, try to locate tool using the code snippet
16784 
16785     # Try our hardest to locate a correct version of GNU make
16786     for ac_prog in gmake
16787 do
16788   # Extract the first word of "$ac_prog", so it can be a program name with args.
16789 set dummy $ac_prog; ac_word=$2
16790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16791 $as_echo_n "checking for $ac_word... " >&6; }
16792 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16793   $as_echo_n "(cached) " >&6
16794 else
16795   case $CHECK_GMAKE in
16796   [\\/]* | ?:[\\/]*)
16797   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16798   ;;
16799   *)
16800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16801 for as_dir in $PATH
16802 do
16803   IFS=$as_save_IFS
16804   test -z "$as_dir" && as_dir=.
16805     for ac_exec_ext in '' $ac_executable_extensions; do
16806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16807     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16809     break 2
16810   fi
16811 done
16812   done
16813 IFS=$as_save_IFS
16814 
16815   ;;
16816 esac
16817 fi
16818 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16819 if test -n "$CHECK_GMAKE"; then
16820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16821 $as_echo "$CHECK_GMAKE" >&6; }
16822 else
16823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16824 $as_echo "no" >&6; }
16825 fi
16826 
16827 
16828   test -n "$CHECK_GMAKE" && break
16829 done
16830 
16831 
16832   MAKE_CANDIDATE=""$CHECK_GMAKE""
16833   DESCRIPTION="gmake in PATH"
16834 
16835   # On Cygwin, we require a newer version of make than on other platforms
16836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16837     MAKE_VERSION_EXPR="-e 4\."
16838     MAKE_REQUIRED_VERSION="4.0"
16839    else
16840     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16841     MAKE_REQUIRED_VERSION="3.81"
16842   fi
16843 
16844   if test "x$MAKE_CANDIDATE" != x; then
16845     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16846 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16847     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16848     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16849     if test "x$IS_GNU_MAKE" = x; then
16850       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16851 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16852     else
16853       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16854       if test "x$IS_MODERN_MAKE" = x; then
16855         { $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
16856 $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;}
16857       else
16858         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16859           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16860             MAKE_EXPECTED_ENV='cygwin'
16861           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16862             MAKE_EXPECTED_ENV='msys'
16863           else
16864             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16865           fi
16866           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16867           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16868         else
16869           # Not relevant for non-Windows
16870           IS_MAKE_CORRECT_ENV=true
16871         fi
16872         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16873           { $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
16874 $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;}
16875         else
16876           FOUND_MAKE=$MAKE_CANDIDATE
16877 
16878   # Only process if variable expands to non-empty
16879 
16880   if test "x$FOUND_MAKE" != x; then
16881     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16882 
16883   # First separate the path from the arguments. This will split at the first
16884   # space.
16885   complete="$FOUND_MAKE"
16886   path="${complete%% *}"
16887   tmp="$complete EOL"
16888   arguments="${tmp#* }"
16889 
16890   # Input might be given as Windows format, start by converting to
16891   # unix format.
16892   new_path=`$CYGPATH -u "$path"`
16893 
16894   # Now try to locate executable using which
16895   new_path=`$WHICH "$new_path" 2> /dev/null`
16896   # bat and cmd files are not always considered executable in cygwin causing which
16897   # to not find them
16898   if test "x$new_path" = x \
16899       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16900       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16901     new_path=`$CYGPATH -u "$path"`
16902   fi
16903   if test "x$new_path" = x; then
16904     # Oops. Which didn't find the executable.
16905     # The splitting of arguments from the executable at a space might have been incorrect,
16906     # since paths with space are more likely in Windows. Give it another try with the whole
16907     # argument.
16908     path="$complete"
16909     arguments="EOL"
16910     new_path=`$CYGPATH -u "$path"`
16911     new_path=`$WHICH "$new_path" 2> /dev/null`
16912     # bat and cmd files are not always considered executable in cygwin causing which
16913     # to not find them
16914     if test "x$new_path" = x \
16915         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16916         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16917       new_path=`$CYGPATH -u "$path"`
16918     fi
16919     if test "x$new_path" = x; then
16920       # It's still not found. Now this is an unrecoverable error.
16921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16922 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16923       has_space=`$ECHO "$complete" | $GREP " "`
16924       if test "x$has_space" != x; then
16925         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16926 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16927       fi
16928       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16929     fi
16930   fi
16931 
16932   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16933   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16934   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16935   # "foo.exe" is OK but "foo" is an error.
16936   #
16937   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16938   # It is also a way to make sure we got the proper file name for the real test later on.
16939   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16940   if test "x$test_shortpath" = x; then
16941     # Short path failed, file does not exist as specified.
16942     # Try adding .exe or .cmd
16943     if test -f "${new_path}.exe"; then
16944       input_to_shortpath="${new_path}.exe"
16945     elif test -f "${new_path}.cmd"; then
16946       input_to_shortpath="${new_path}.cmd"
16947     else
16948       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16949 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16950       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16951 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16952       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16953     fi
16954   else
16955     input_to_shortpath="$new_path"
16956   fi
16957 
16958   # Call helper function which possibly converts this using DOS-style short mode.
16959   # If so, the updated path is stored in $new_path.
16960   new_path="$input_to_shortpath"
16961 
16962   input_path="$input_to_shortpath"
16963   # Check if we need to convert this using DOS-style short mode. If the path
16964   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16965   # take no chances and rewrite it.
16966   # Note: m4 eats our [], so we need to use [ and ] instead.
16967   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16968   if test "x$has_forbidden_chars" != x; then
16969     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16970     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16971     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16972     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16973       # Going to short mode and back again did indeed matter. Since short mode is
16974       # case insensitive, let's make it lowercase to improve readability.
16975       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16976       # Now convert it back to Unix-style (cygpath)
16977       input_path=`$CYGPATH -u "$shortmode_path"`
16978       new_path="$input_path"
16979     fi
16980   fi
16981 
16982   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16983   if test "x$test_cygdrive_prefix" = x; then
16984     # As a simple fix, exclude /usr/bin since it's not a real path.
16985     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16986       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16987       # a path prefixed by /cygdrive for fixpath to work.
16988       new_path="$CYGWIN_ROOT_PATH$input_path"
16989     fi
16990   fi
16991 
16992   # remove trailing .exe if any
16993   new_path="${new_path/%.exe/}"
16994 
16995     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16996 
16997   # First separate the path from the arguments. This will split at the first
16998   # space.
16999   complete="$FOUND_MAKE"
17000   path="${complete%% *}"
17001   tmp="$complete EOL"
17002   arguments="${tmp#* }"
17003 
17004   # Input might be given as Windows format, start by converting to
17005   # unix format.
17006   new_path="$path"
17007 
17008   windows_path="$new_path"
17009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17010     unix_path=`$CYGPATH -u "$windows_path"`
17011     new_path="$unix_path"
17012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17014     new_path="$unix_path"
17015   fi
17016 
17017 
17018   # Now try to locate executable using which
17019   new_path=`$WHICH "$new_path" 2> /dev/null`
17020 
17021   if test "x$new_path" = x; then
17022     # Oops. Which didn't find the executable.
17023     # The splitting of arguments from the executable at a space might have been incorrect,
17024     # since paths with space are more likely in Windows. Give it another try with the whole
17025     # argument.
17026     path="$complete"
17027     arguments="EOL"
17028     new_path="$path"
17029 
17030   windows_path="$new_path"
17031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17032     unix_path=`$CYGPATH -u "$windows_path"`
17033     new_path="$unix_path"
17034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17036     new_path="$unix_path"
17037   fi
17038 
17039 
17040     new_path=`$WHICH "$new_path" 2> /dev/null`
17041     # bat and cmd files are not always considered executable in MSYS causing which
17042     # to not find them
17043     if test "x$new_path" = x \
17044         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17045         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17046       new_path="$path"
17047 
17048   windows_path="$new_path"
17049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17050     unix_path=`$CYGPATH -u "$windows_path"`
17051     new_path="$unix_path"
17052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17053     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17054     new_path="$unix_path"
17055   fi
17056 
17057     fi
17058 
17059     if test "x$new_path" = x; then
17060       # It's still not found. Now this is an unrecoverable error.
17061       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17062 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17063       has_space=`$ECHO "$complete" | $GREP " "`
17064       if test "x$has_space" != x; then
17065         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17066 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17067       fi
17068       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17069     fi
17070   fi
17071 
17072   # Now new_path has a complete unix path to the binary
17073   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17074     # Keep paths in /bin as-is, but remove trailing .exe if any
17075     new_path="${new_path/%.exe/}"
17076     # Do not save /bin paths to all_fixpath_prefixes!
17077   else
17078     # Not in mixed or Windows style, start by that.
17079     new_path=`cmd //c echo $new_path`
17080 
17081   input_path="$new_path"
17082   # Check if we need to convert this using DOS-style short mode. If the path
17083   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17084   # take no chances and rewrite it.
17085   # Note: m4 eats our [], so we need to use [ and ] instead.
17086   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17087   if test "x$has_forbidden_chars" != x; then
17088     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17089     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17090   fi
17091 
17092     # Output is in $new_path
17093 
17094   windows_path="$new_path"
17095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17096     unix_path=`$CYGPATH -u "$windows_path"`
17097     new_path="$unix_path"
17098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17100     new_path="$unix_path"
17101   fi
17102 
17103     # remove trailing .exe if any
17104     new_path="${new_path/%.exe/}"
17105 
17106     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17107     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17108   fi
17109 
17110     else
17111       # We're on a unix platform. Hooray! :)
17112       # First separate the path from the arguments. This will split at the first
17113       # space.
17114       complete="$FOUND_MAKE"
17115       path="${complete%% *}"
17116       tmp="$complete EOL"
17117       arguments="${tmp#* }"
17118 
17119       # Cannot rely on the command "which" here since it doesn't always work.
17120       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17121       if test -z "$is_absolute_path"; then
17122         # Path to executable is not absolute. Find it.
17123         IFS_save="$IFS"
17124         IFS=:
17125         for p in $PATH; do
17126           if test -f "$p/$path" && test -x "$p/$path"; then
17127             new_path="$p/$path"
17128             break
17129           fi
17130         done
17131         IFS="$IFS_save"
17132       else
17133         # This is an absolute path, we can use it without further modifications.
17134         new_path="$path"
17135       fi
17136 
17137       if test "x$new_path" = x; then
17138         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17139 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17140         has_space=`$ECHO "$complete" | $GREP " "`
17141         if test "x$has_space" != x; then
17142           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17143 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17144         fi
17145         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17146       fi
17147     fi
17148 
17149     # Now join together the path and the arguments once again
17150     if test "x$arguments" != xEOL; then
17151       new_complete="$new_path ${arguments% *}"
17152     else
17153       new_complete="$new_path"
17154     fi
17155 
17156     if test "x$complete" != "x$new_complete"; then
17157       FOUND_MAKE="$new_complete"
17158       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17159 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17160     fi
17161   fi
17162 
17163         fi
17164       fi
17165     fi
17166   fi
17167 
17168 
17169     if test "x$FOUND_MAKE" = x; then
17170       for ac_prog in make
17171 do
17172   # Extract the first word of "$ac_prog", so it can be a program name with args.
17173 set dummy $ac_prog; ac_word=$2
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17175 $as_echo_n "checking for $ac_word... " >&6; }
17176 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17177   $as_echo_n "(cached) " >&6
17178 else
17179   case $CHECK_MAKE in
17180   [\\/]* | ?:[\\/]*)
17181   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17182   ;;
17183   *)
17184   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17185 for as_dir in $PATH
17186 do
17187   IFS=$as_save_IFS
17188   test -z "$as_dir" && as_dir=.
17189     for ac_exec_ext in '' $ac_executable_extensions; do
17190   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17191     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17192     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17193     break 2
17194   fi
17195 done
17196   done
17197 IFS=$as_save_IFS
17198 
17199   ;;
17200 esac
17201 fi
17202 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17203 if test -n "$CHECK_MAKE"; then
17204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17205 $as_echo "$CHECK_MAKE" >&6; }
17206 else
17207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17208 $as_echo "no" >&6; }
17209 fi
17210 
17211 
17212   test -n "$CHECK_MAKE" && break
17213 done
17214 
17215 
17216   MAKE_CANDIDATE=""$CHECK_MAKE""
17217   DESCRIPTION="make in PATH"
17218 
17219   # On Cygwin, we require a newer version of make than on other platforms
17220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17221     MAKE_VERSION_EXPR="-e 4\."
17222     MAKE_REQUIRED_VERSION="4.0"
17223    else
17224     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17225     MAKE_REQUIRED_VERSION="3.81"
17226   fi
17227 
17228   if test "x$MAKE_CANDIDATE" != x; then
17229     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17230 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17231     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17232     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17233     if test "x$IS_GNU_MAKE" = x; then
17234       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17235 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17236     else
17237       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17238       if test "x$IS_MODERN_MAKE" = x; then
17239         { $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
17240 $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;}
17241       else
17242         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17243           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17244             MAKE_EXPECTED_ENV='cygwin'
17245           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17246             MAKE_EXPECTED_ENV='msys'
17247           else
17248             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17249           fi
17250           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17251           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17252         else
17253           # Not relevant for non-Windows
17254           IS_MAKE_CORRECT_ENV=true
17255         fi
17256         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17257           { $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
17258 $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;}
17259         else
17260           FOUND_MAKE=$MAKE_CANDIDATE
17261 
17262   # Only process if variable expands to non-empty
17263 
17264   if test "x$FOUND_MAKE" != x; then
17265     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17266 
17267   # First separate the path from the arguments. This will split at the first
17268   # space.
17269   complete="$FOUND_MAKE"
17270   path="${complete%% *}"
17271   tmp="$complete EOL"
17272   arguments="${tmp#* }"
17273 
17274   # Input might be given as Windows format, start by converting to
17275   # unix format.
17276   new_path=`$CYGPATH -u "$path"`
17277 
17278   # Now try to locate executable using which
17279   new_path=`$WHICH "$new_path" 2> /dev/null`
17280   # bat and cmd files are not always considered executable in cygwin causing which
17281   # to not find them
17282   if test "x$new_path" = x \
17283       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17284       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17285     new_path=`$CYGPATH -u "$path"`
17286   fi
17287   if test "x$new_path" = x; then
17288     # Oops. Which didn't find the executable.
17289     # The splitting of arguments from the executable at a space might have been incorrect,
17290     # since paths with space are more likely in Windows. Give it another try with the whole
17291     # argument.
17292     path="$complete"
17293     arguments="EOL"
17294     new_path=`$CYGPATH -u "$path"`
17295     new_path=`$WHICH "$new_path" 2> /dev/null`
17296     # bat and cmd files are not always considered executable in cygwin causing which
17297     # to not find them
17298     if test "x$new_path" = x \
17299         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17300         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17301       new_path=`$CYGPATH -u "$path"`
17302     fi
17303     if test "x$new_path" = x; then
17304       # It's still not found. Now this is an unrecoverable error.
17305       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17306 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17307       has_space=`$ECHO "$complete" | $GREP " "`
17308       if test "x$has_space" != x; then
17309         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17310 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17311       fi
17312       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17313     fi
17314   fi
17315 
17316   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17317   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17318   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17319   # "foo.exe" is OK but "foo" is an error.
17320   #
17321   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17322   # It is also a way to make sure we got the proper file name for the real test later on.
17323   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17324   if test "x$test_shortpath" = x; then
17325     # Short path failed, file does not exist as specified.
17326     # Try adding .exe or .cmd
17327     if test -f "${new_path}.exe"; then
17328       input_to_shortpath="${new_path}.exe"
17329     elif test -f "${new_path}.cmd"; then
17330       input_to_shortpath="${new_path}.cmd"
17331     else
17332       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17333 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17334       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17335 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17336       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17337     fi
17338   else
17339     input_to_shortpath="$new_path"
17340   fi
17341 
17342   # Call helper function which possibly converts this using DOS-style short mode.
17343   # If so, the updated path is stored in $new_path.
17344   new_path="$input_to_shortpath"
17345 
17346   input_path="$input_to_shortpath"
17347   # Check if we need to convert this using DOS-style short mode. If the path
17348   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17349   # take no chances and rewrite it.
17350   # Note: m4 eats our [], so we need to use [ and ] instead.
17351   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17352   if test "x$has_forbidden_chars" != x; then
17353     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17354     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17355     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17356     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17357       # Going to short mode and back again did indeed matter. Since short mode is
17358       # case insensitive, let's make it lowercase to improve readability.
17359       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17360       # Now convert it back to Unix-style (cygpath)
17361       input_path=`$CYGPATH -u "$shortmode_path"`
17362       new_path="$input_path"
17363     fi
17364   fi
17365 
17366   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17367   if test "x$test_cygdrive_prefix" = x; then
17368     # As a simple fix, exclude /usr/bin since it's not a real path.
17369     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17370       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17371       # a path prefixed by /cygdrive for fixpath to work.
17372       new_path="$CYGWIN_ROOT_PATH$input_path"
17373     fi
17374   fi
17375 
17376   # remove trailing .exe if any
17377   new_path="${new_path/%.exe/}"
17378 
17379     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17380 
17381   # First separate the path from the arguments. This will split at the first
17382   # space.
17383   complete="$FOUND_MAKE"
17384   path="${complete%% *}"
17385   tmp="$complete EOL"
17386   arguments="${tmp#* }"
17387 
17388   # Input might be given as Windows format, start by converting to
17389   # unix format.
17390   new_path="$path"
17391 
17392   windows_path="$new_path"
17393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17394     unix_path=`$CYGPATH -u "$windows_path"`
17395     new_path="$unix_path"
17396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17398     new_path="$unix_path"
17399   fi
17400 
17401 
17402   # Now try to locate executable using which
17403   new_path=`$WHICH "$new_path" 2> /dev/null`
17404 
17405   if test "x$new_path" = x; then
17406     # Oops. Which didn't find the executable.
17407     # The splitting of arguments from the executable at a space might have been incorrect,
17408     # since paths with space are more likely in Windows. Give it another try with the whole
17409     # argument.
17410     path="$complete"
17411     arguments="EOL"
17412     new_path="$path"
17413 
17414   windows_path="$new_path"
17415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17416     unix_path=`$CYGPATH -u "$windows_path"`
17417     new_path="$unix_path"
17418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17420     new_path="$unix_path"
17421   fi
17422 
17423 
17424     new_path=`$WHICH "$new_path" 2> /dev/null`
17425     # bat and cmd files are not always considered executable in MSYS causing which
17426     # to not find them
17427     if test "x$new_path" = x \
17428         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17429         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17430       new_path="$path"
17431 
17432   windows_path="$new_path"
17433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17434     unix_path=`$CYGPATH -u "$windows_path"`
17435     new_path="$unix_path"
17436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17438     new_path="$unix_path"
17439   fi
17440 
17441     fi
17442 
17443     if test "x$new_path" = x; then
17444       # It's still not found. Now this is an unrecoverable error.
17445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17446 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17447       has_space=`$ECHO "$complete" | $GREP " "`
17448       if test "x$has_space" != x; then
17449         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17450 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17451       fi
17452       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17453     fi
17454   fi
17455 
17456   # Now new_path has a complete unix path to the binary
17457   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17458     # Keep paths in /bin as-is, but remove trailing .exe if any
17459     new_path="${new_path/%.exe/}"
17460     # Do not save /bin paths to all_fixpath_prefixes!
17461   else
17462     # Not in mixed or Windows style, start by that.
17463     new_path=`cmd //c echo $new_path`
17464 
17465   input_path="$new_path"
17466   # Check if we need to convert this using DOS-style short mode. If the path
17467   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17468   # take no chances and rewrite it.
17469   # Note: m4 eats our [], so we need to use [ and ] instead.
17470   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17471   if test "x$has_forbidden_chars" != x; then
17472     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17473     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17474   fi
17475 
17476     # Output is in $new_path
17477 
17478   windows_path="$new_path"
17479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17480     unix_path=`$CYGPATH -u "$windows_path"`
17481     new_path="$unix_path"
17482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17484     new_path="$unix_path"
17485   fi
17486 
17487     # remove trailing .exe if any
17488     new_path="${new_path/%.exe/}"
17489 
17490     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17491     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17492   fi
17493 
17494     else
17495       # We're on a unix platform. Hooray! :)
17496       # First separate the path from the arguments. This will split at the first
17497       # space.
17498       complete="$FOUND_MAKE"
17499       path="${complete%% *}"
17500       tmp="$complete EOL"
17501       arguments="${tmp#* }"
17502 
17503       # Cannot rely on the command "which" here since it doesn't always work.
17504       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17505       if test -z "$is_absolute_path"; then
17506         # Path to executable is not absolute. Find it.
17507         IFS_save="$IFS"
17508         IFS=:
17509         for p in $PATH; do
17510           if test -f "$p/$path" && test -x "$p/$path"; then
17511             new_path="$p/$path"
17512             break
17513           fi
17514         done
17515         IFS="$IFS_save"
17516       else
17517         # This is an absolute path, we can use it without further modifications.
17518         new_path="$path"
17519       fi
17520 
17521       if test "x$new_path" = x; then
17522         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17523 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17524         has_space=`$ECHO "$complete" | $GREP " "`
17525         if test "x$has_space" != x; then
17526           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17527 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17528         fi
17529         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17530       fi
17531     fi
17532 
17533     # Now join together the path and the arguments once again
17534     if test "x$arguments" != xEOL; then
17535       new_complete="$new_path ${arguments% *}"
17536     else
17537       new_complete="$new_path"
17538     fi
17539 
17540     if test "x$complete" != "x$new_complete"; then
17541       FOUND_MAKE="$new_complete"
17542       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17543 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17544     fi
17545   fi
17546 
17547         fi
17548       fi
17549     fi
17550   fi
17551 
17552     fi
17553 
17554     if test "x$FOUND_MAKE" = x; then
17555       if test "x$TOOLCHAIN_PATH" != x; then
17556         # We have a toolchain path, check that as well before giving up.
17557         OLD_PATH=$PATH
17558         PATH=$TOOLCHAIN_PATH:$PATH
17559         for ac_prog in gmake
17560 do
17561   # Extract the first word of "$ac_prog", so it can be a program name with args.
17562 set dummy $ac_prog; ac_word=$2
17563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17564 $as_echo_n "checking for $ac_word... " >&6; }
17565 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17566   $as_echo_n "(cached) " >&6
17567 else
17568   case $CHECK_TOOLSDIR_GMAKE in
17569   [\\/]* | ?:[\\/]*)
17570   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17571   ;;
17572   *)
17573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17574 for as_dir in $PATH
17575 do
17576   IFS=$as_save_IFS
17577   test -z "$as_dir" && as_dir=.
17578     for ac_exec_ext in '' $ac_executable_extensions; do
17579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17580     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17582     break 2
17583   fi
17584 done
17585   done
17586 IFS=$as_save_IFS
17587 
17588   ;;
17589 esac
17590 fi
17591 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17592 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17594 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17595 else
17596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17597 $as_echo "no" >&6; }
17598 fi
17599 
17600 
17601   test -n "$CHECK_TOOLSDIR_GMAKE" && break
17602 done
17603 
17604 
17605   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17606   DESCRIPTION="gmake in tools-dir"
17607 
17608   # On Cygwin, we require a newer version of make than on other platforms
17609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17610     MAKE_VERSION_EXPR="-e 4\."
17611     MAKE_REQUIRED_VERSION="4.0"
17612    else
17613     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17614     MAKE_REQUIRED_VERSION="3.81"
17615   fi
17616 
17617   if test "x$MAKE_CANDIDATE" != x; then
17618     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17619 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17620     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17621     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17622     if test "x$IS_GNU_MAKE" = x; then
17623       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17624 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17625     else
17626       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17627       if test "x$IS_MODERN_MAKE" = x; then
17628         { $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
17629 $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;}
17630       else
17631         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17632           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17633             MAKE_EXPECTED_ENV='cygwin'
17634           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17635             MAKE_EXPECTED_ENV='msys'
17636           else
17637             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17638           fi
17639           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17640           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17641         else
17642           # Not relevant for non-Windows
17643           IS_MAKE_CORRECT_ENV=true
17644         fi
17645         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17646           { $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
17647 $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;}
17648         else
17649           FOUND_MAKE=$MAKE_CANDIDATE
17650 
17651   # Only process if variable expands to non-empty
17652 
17653   if test "x$FOUND_MAKE" != x; then
17654     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17655 
17656   # First separate the path from the arguments. This will split at the first
17657   # space.
17658   complete="$FOUND_MAKE"
17659   path="${complete%% *}"
17660   tmp="$complete EOL"
17661   arguments="${tmp#* }"
17662 
17663   # Input might be given as Windows format, start by converting to
17664   # unix format.
17665   new_path=`$CYGPATH -u "$path"`
17666 
17667   # Now try to locate executable using which
17668   new_path=`$WHICH "$new_path" 2> /dev/null`
17669   # bat and cmd files are not always considered executable in cygwin causing which
17670   # to not find them
17671   if test "x$new_path" = x \
17672       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17673       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17674     new_path=`$CYGPATH -u "$path"`
17675   fi
17676   if test "x$new_path" = x; then
17677     # Oops. Which didn't find the executable.
17678     # The splitting of arguments from the executable at a space might have been incorrect,
17679     # since paths with space are more likely in Windows. Give it another try with the whole
17680     # argument.
17681     path="$complete"
17682     arguments="EOL"
17683     new_path=`$CYGPATH -u "$path"`
17684     new_path=`$WHICH "$new_path" 2> /dev/null`
17685     # bat and cmd files are not always considered executable in cygwin causing which
17686     # to not find them
17687     if test "x$new_path" = x \
17688         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17689         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17690       new_path=`$CYGPATH -u "$path"`
17691     fi
17692     if test "x$new_path" = x; then
17693       # It's still not found. Now this is an unrecoverable error.
17694       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17695 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17696       has_space=`$ECHO "$complete" | $GREP " "`
17697       if test "x$has_space" != x; then
17698         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17699 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17700       fi
17701       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17702     fi
17703   fi
17704 
17705   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17706   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17707   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17708   # "foo.exe" is OK but "foo" is an error.
17709   #
17710   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17711   # It is also a way to make sure we got the proper file name for the real test later on.
17712   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17713   if test "x$test_shortpath" = x; then
17714     # Short path failed, file does not exist as specified.
17715     # Try adding .exe or .cmd
17716     if test -f "${new_path}.exe"; then
17717       input_to_shortpath="${new_path}.exe"
17718     elif test -f "${new_path}.cmd"; then
17719       input_to_shortpath="${new_path}.cmd"
17720     else
17721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17722 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17723       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17724 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17725       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17726     fi
17727   else
17728     input_to_shortpath="$new_path"
17729   fi
17730 
17731   # Call helper function which possibly converts this using DOS-style short mode.
17732   # If so, the updated path is stored in $new_path.
17733   new_path="$input_to_shortpath"
17734 
17735   input_path="$input_to_shortpath"
17736   # Check if we need to convert this using DOS-style short mode. If the path
17737   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17738   # take no chances and rewrite it.
17739   # Note: m4 eats our [], so we need to use [ and ] instead.
17740   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17741   if test "x$has_forbidden_chars" != x; then
17742     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17743     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17744     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17745     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17746       # Going to short mode and back again did indeed matter. Since short mode is
17747       # case insensitive, let's make it lowercase to improve readability.
17748       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17749       # Now convert it back to Unix-style (cygpath)
17750       input_path=`$CYGPATH -u "$shortmode_path"`
17751       new_path="$input_path"
17752     fi
17753   fi
17754 
17755   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17756   if test "x$test_cygdrive_prefix" = x; then
17757     # As a simple fix, exclude /usr/bin since it's not a real path.
17758     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17759       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17760       # a path prefixed by /cygdrive for fixpath to work.
17761       new_path="$CYGWIN_ROOT_PATH$input_path"
17762     fi
17763   fi
17764 
17765   # remove trailing .exe if any
17766   new_path="${new_path/%.exe/}"
17767 
17768     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17769 
17770   # First separate the path from the arguments. This will split at the first
17771   # space.
17772   complete="$FOUND_MAKE"
17773   path="${complete%% *}"
17774   tmp="$complete EOL"
17775   arguments="${tmp#* }"
17776 
17777   # Input might be given as Windows format, start by converting to
17778   # unix format.
17779   new_path="$path"
17780 
17781   windows_path="$new_path"
17782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17783     unix_path=`$CYGPATH -u "$windows_path"`
17784     new_path="$unix_path"
17785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17787     new_path="$unix_path"
17788   fi
17789 
17790 
17791   # Now try to locate executable using which
17792   new_path=`$WHICH "$new_path" 2> /dev/null`
17793 
17794   if test "x$new_path" = x; then
17795     # Oops. Which didn't find the executable.
17796     # The splitting of arguments from the executable at a space might have been incorrect,
17797     # since paths with space are more likely in Windows. Give it another try with the whole
17798     # argument.
17799     path="$complete"
17800     arguments="EOL"
17801     new_path="$path"
17802 
17803   windows_path="$new_path"
17804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17805     unix_path=`$CYGPATH -u "$windows_path"`
17806     new_path="$unix_path"
17807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17809     new_path="$unix_path"
17810   fi
17811 
17812 
17813     new_path=`$WHICH "$new_path" 2> /dev/null`
17814     # bat and cmd files are not always considered executable in MSYS causing which
17815     # to not find them
17816     if test "x$new_path" = x \
17817         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17818         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17819       new_path="$path"
17820 
17821   windows_path="$new_path"
17822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17823     unix_path=`$CYGPATH -u "$windows_path"`
17824     new_path="$unix_path"
17825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17827     new_path="$unix_path"
17828   fi
17829 
17830     fi
17831 
17832     if test "x$new_path" = x; then
17833       # It's still not found. Now this is an unrecoverable error.
17834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17835 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17836       has_space=`$ECHO "$complete" | $GREP " "`
17837       if test "x$has_space" != x; then
17838         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17840       fi
17841       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17842     fi
17843   fi
17844 
17845   # Now new_path has a complete unix path to the binary
17846   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17847     # Keep paths in /bin as-is, but remove trailing .exe if any
17848     new_path="${new_path/%.exe/}"
17849     # Do not save /bin paths to all_fixpath_prefixes!
17850   else
17851     # Not in mixed or Windows style, start by that.
17852     new_path=`cmd //c echo $new_path`
17853 
17854   input_path="$new_path"
17855   # Check if we need to convert this using DOS-style short mode. If the path
17856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17857   # take no chances and rewrite it.
17858   # Note: m4 eats our [], so we need to use [ and ] instead.
17859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17860   if test "x$has_forbidden_chars" != x; then
17861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17862     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17863   fi
17864 
17865     # Output is in $new_path
17866 
17867   windows_path="$new_path"
17868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17869     unix_path=`$CYGPATH -u "$windows_path"`
17870     new_path="$unix_path"
17871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17873     new_path="$unix_path"
17874   fi
17875 
17876     # remove trailing .exe if any
17877     new_path="${new_path/%.exe/}"
17878 
17879     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17880     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17881   fi
17882 
17883     else
17884       # We're on a unix platform. Hooray! :)
17885       # First separate the path from the arguments. This will split at the first
17886       # space.
17887       complete="$FOUND_MAKE"
17888       path="${complete%% *}"
17889       tmp="$complete EOL"
17890       arguments="${tmp#* }"
17891 
17892       # Cannot rely on the command "which" here since it doesn't always work.
17893       is_absolute_path=`$ECHO "$path" | $GREP ^/`
17894       if test -z "$is_absolute_path"; then
17895         # Path to executable is not absolute. Find it.
17896         IFS_save="$IFS"
17897         IFS=:
17898         for p in $PATH; do
17899           if test -f "$p/$path" && test -x "$p/$path"; then
17900             new_path="$p/$path"
17901             break
17902           fi
17903         done
17904         IFS="$IFS_save"
17905       else
17906         # This is an absolute path, we can use it without further modifications.
17907         new_path="$path"
17908       fi
17909 
17910       if test "x$new_path" = x; then
17911         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17912 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17913         has_space=`$ECHO "$complete" | $GREP " "`
17914         if test "x$has_space" != x; then
17915           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17916 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17917         fi
17918         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17919       fi
17920     fi
17921 
17922     # Now join together the path and the arguments once again
17923     if test "x$arguments" != xEOL; then
17924       new_complete="$new_path ${arguments% *}"
17925     else
17926       new_complete="$new_path"
17927     fi
17928 
17929     if test "x$complete" != "x$new_complete"; then
17930       FOUND_MAKE="$new_complete"
17931       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17932 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17933     fi
17934   fi
17935 
17936         fi
17937       fi
17938     fi
17939   fi
17940 
17941         if test "x$FOUND_MAKE" = x; then
17942           for ac_prog in make
17943 do
17944   # Extract the first word of "$ac_prog", so it can be a program name with args.
17945 set dummy $ac_prog; ac_word=$2
17946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17947 $as_echo_n "checking for $ac_word... " >&6; }
17948 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17949   $as_echo_n "(cached) " >&6
17950 else
17951   case $CHECK_TOOLSDIR_MAKE in
17952   [\\/]* | ?:[\\/]*)
17953   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17954   ;;
17955   *)
17956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17957 for as_dir in $PATH
17958 do
17959   IFS=$as_save_IFS
17960   test -z "$as_dir" && as_dir=.
17961     for ac_exec_ext in '' $ac_executable_extensions; do
17962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17963     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17965     break 2
17966   fi
17967 done
17968   done
17969 IFS=$as_save_IFS
17970 
17971   ;;
17972 esac
17973 fi
17974 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17975 if test -n "$CHECK_TOOLSDIR_MAKE"; then
17976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17977 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17978 else
17979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17980 $as_echo "no" >&6; }
17981 fi
17982 
17983 
17984   test -n "$CHECK_TOOLSDIR_MAKE" && break
17985 done
17986 
17987 
17988   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17989   DESCRIPTION="make in tools-dir"
17990 
17991   # On Cygwin, we require a newer version of make than on other platforms
17992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17993     MAKE_VERSION_EXPR="-e 4\."
17994     MAKE_REQUIRED_VERSION="4.0"
17995    else
17996     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17997     MAKE_REQUIRED_VERSION="3.81"
17998   fi
17999 
18000   if test "x$MAKE_CANDIDATE" != x; then
18001     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18002 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18003     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18004     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18005     if test "x$IS_GNU_MAKE" = x; then
18006       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18007 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18008     else
18009       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18010       if test "x$IS_MODERN_MAKE" = x; then
18011         { $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
18012 $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;}
18013       else
18014         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18015           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18016             MAKE_EXPECTED_ENV='cygwin'
18017           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18018             MAKE_EXPECTED_ENV='msys'
18019           else
18020             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18021           fi
18022           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18023           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18024         else
18025           # Not relevant for non-Windows
18026           IS_MAKE_CORRECT_ENV=true
18027         fi
18028         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18029           { $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
18030 $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;}
18031         else
18032           FOUND_MAKE=$MAKE_CANDIDATE
18033 
18034   # Only process if variable expands to non-empty
18035 
18036   if test "x$FOUND_MAKE" != x; then
18037     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18038 
18039   # First separate the path from the arguments. This will split at the first
18040   # space.
18041   complete="$FOUND_MAKE"
18042   path="${complete%% *}"
18043   tmp="$complete EOL"
18044   arguments="${tmp#* }"
18045 
18046   # Input might be given as Windows format, start by converting to
18047   # unix format.
18048   new_path=`$CYGPATH -u "$path"`
18049 
18050   # Now try to locate executable using which
18051   new_path=`$WHICH "$new_path" 2> /dev/null`
18052   # bat and cmd files are not always considered executable in cygwin causing which
18053   # to not find them
18054   if test "x$new_path" = x \
18055       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18056       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18057     new_path=`$CYGPATH -u "$path"`
18058   fi
18059   if test "x$new_path" = x; then
18060     # Oops. Which didn't find the executable.
18061     # The splitting of arguments from the executable at a space might have been incorrect,
18062     # since paths with space are more likely in Windows. Give it another try with the whole
18063     # argument.
18064     path="$complete"
18065     arguments="EOL"
18066     new_path=`$CYGPATH -u "$path"`
18067     new_path=`$WHICH "$new_path" 2> /dev/null`
18068     # bat and cmd files are not always considered executable in cygwin causing which
18069     # to not find them
18070     if test "x$new_path" = x \
18071         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18072         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18073       new_path=`$CYGPATH -u "$path"`
18074     fi
18075     if test "x$new_path" = x; then
18076       # It's still not found. Now this is an unrecoverable error.
18077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18078 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18079       has_space=`$ECHO "$complete" | $GREP " "`
18080       if test "x$has_space" != x; then
18081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18083       fi
18084       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18085     fi
18086   fi
18087 
18088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18091   # "foo.exe" is OK but "foo" is an error.
18092   #
18093   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18094   # It is also a way to make sure we got the proper file name for the real test later on.
18095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18096   if test "x$test_shortpath" = x; then
18097     # Short path failed, file does not exist as specified.
18098     # Try adding .exe or .cmd
18099     if test -f "${new_path}.exe"; then
18100       input_to_shortpath="${new_path}.exe"
18101     elif test -f "${new_path}.cmd"; then
18102       input_to_shortpath="${new_path}.cmd"
18103     else
18104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18105 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18106       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18107 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18108       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18109     fi
18110   else
18111     input_to_shortpath="$new_path"
18112   fi
18113 
18114   # Call helper function which possibly converts this using DOS-style short mode.
18115   # If so, the updated path is stored in $new_path.
18116   new_path="$input_to_shortpath"
18117 
18118   input_path="$input_to_shortpath"
18119   # Check if we need to convert this using DOS-style short mode. If the path
18120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18121   # take no chances and rewrite it.
18122   # Note: m4 eats our [], so we need to use [ and ] instead.
18123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18124   if test "x$has_forbidden_chars" != x; then
18125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18126     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18127     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18128     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18129       # Going to short mode and back again did indeed matter. Since short mode is
18130       # case insensitive, let's make it lowercase to improve readability.
18131       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18132       # Now convert it back to Unix-style (cygpath)
18133       input_path=`$CYGPATH -u "$shortmode_path"`
18134       new_path="$input_path"
18135     fi
18136   fi
18137 
18138   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18139   if test "x$test_cygdrive_prefix" = x; then
18140     # As a simple fix, exclude /usr/bin since it's not a real path.
18141     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18142       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18143       # a path prefixed by /cygdrive for fixpath to work.
18144       new_path="$CYGWIN_ROOT_PATH$input_path"
18145     fi
18146   fi
18147 
18148   # remove trailing .exe if any
18149   new_path="${new_path/%.exe/}"
18150 
18151     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18152 
18153   # First separate the path from the arguments. This will split at the first
18154   # space.
18155   complete="$FOUND_MAKE"
18156   path="${complete%% *}"
18157   tmp="$complete EOL"
18158   arguments="${tmp#* }"
18159 
18160   # Input might be given as Windows format, start by converting to
18161   # unix format.
18162   new_path="$path"
18163 
18164   windows_path="$new_path"
18165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18166     unix_path=`$CYGPATH -u "$windows_path"`
18167     new_path="$unix_path"
18168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18170     new_path="$unix_path"
18171   fi
18172 
18173 
18174   # Now try to locate executable using which
18175   new_path=`$WHICH "$new_path" 2> /dev/null`
18176 
18177   if test "x$new_path" = x; then
18178     # Oops. Which didn't find the executable.
18179     # The splitting of arguments from the executable at a space might have been incorrect,
18180     # since paths with space are more likely in Windows. Give it another try with the whole
18181     # argument.
18182     path="$complete"
18183     arguments="EOL"
18184     new_path="$path"
18185 
18186   windows_path="$new_path"
18187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18188     unix_path=`$CYGPATH -u "$windows_path"`
18189     new_path="$unix_path"
18190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18192     new_path="$unix_path"
18193   fi
18194 
18195 
18196     new_path=`$WHICH "$new_path" 2> /dev/null`
18197     # bat and cmd files are not always considered executable in MSYS causing which
18198     # to not find them
18199     if test "x$new_path" = x \
18200         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18201         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18202       new_path="$path"
18203 
18204   windows_path="$new_path"
18205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18206     unix_path=`$CYGPATH -u "$windows_path"`
18207     new_path="$unix_path"
18208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18210     new_path="$unix_path"
18211   fi
18212 
18213     fi
18214 
18215     if test "x$new_path" = x; then
18216       # It's still not found. Now this is an unrecoverable error.
18217       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18218 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18219       has_space=`$ECHO "$complete" | $GREP " "`
18220       if test "x$has_space" != x; then
18221         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18222 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18223       fi
18224       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18225     fi
18226   fi
18227 
18228   # Now new_path has a complete unix path to the binary
18229   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18230     # Keep paths in /bin as-is, but remove trailing .exe if any
18231     new_path="${new_path/%.exe/}"
18232     # Do not save /bin paths to all_fixpath_prefixes!
18233   else
18234     # Not in mixed or Windows style, start by that.
18235     new_path=`cmd //c echo $new_path`
18236 
18237   input_path="$new_path"
18238   # Check if we need to convert this using DOS-style short mode. If the path
18239   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18240   # take no chances and rewrite it.
18241   # Note: m4 eats our [], so we need to use [ and ] instead.
18242   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18243   if test "x$has_forbidden_chars" != x; then
18244     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18245     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18246   fi
18247 
18248     # Output is in $new_path
18249 
18250   windows_path="$new_path"
18251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18252     unix_path=`$CYGPATH -u "$windows_path"`
18253     new_path="$unix_path"
18254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18255     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18256     new_path="$unix_path"
18257   fi
18258 
18259     # remove trailing .exe if any
18260     new_path="${new_path/%.exe/}"
18261 
18262     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18263     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18264   fi
18265 
18266     else
18267       # We're on a unix platform. Hooray! :)
18268       # First separate the path from the arguments. This will split at the first
18269       # space.
18270       complete="$FOUND_MAKE"
18271       path="${complete%% *}"
18272       tmp="$complete EOL"
18273       arguments="${tmp#* }"
18274 
18275       # Cannot rely on the command "which" here since it doesn't always work.
18276       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18277       if test -z "$is_absolute_path"; then
18278         # Path to executable is not absolute. Find it.
18279         IFS_save="$IFS"
18280         IFS=:
18281         for p in $PATH; do
18282           if test -f "$p/$path" && test -x "$p/$path"; then
18283             new_path="$p/$path"
18284             break
18285           fi
18286         done
18287         IFS="$IFS_save"
18288       else
18289         # This is an absolute path, we can use it without further modifications.
18290         new_path="$path"
18291       fi
18292 
18293       if test "x$new_path" = x; then
18294         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18295 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18296         has_space=`$ECHO "$complete" | $GREP " "`
18297         if test "x$has_space" != x; then
18298           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18299 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18300         fi
18301         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18302       fi
18303     fi
18304 
18305     # Now join together the path and the arguments once again
18306     if test "x$arguments" != xEOL; then
18307       new_complete="$new_path ${arguments% *}"
18308     else
18309       new_complete="$new_path"
18310     fi
18311 
18312     if test "x$complete" != "x$new_complete"; then
18313       FOUND_MAKE="$new_complete"
18314       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18315 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18316     fi
18317   fi
18318 
18319         fi
18320       fi
18321     fi
18322   fi
18323 
18324         fi
18325         PATH=$OLD_PATH
18326       fi
18327     fi
18328 
18329     if test "x$FOUND_MAKE" = x; then
18330       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
18331     fi
18332 
18333   else
18334     # The variable is set, but is it from the command line or the environment?
18335 
18336     # Try to remove the string !MAKE! from our list.
18337     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18338     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18339       # If it failed, the variable was not from the command line. Ignore it,
18340       # but warn the user (except for BASH, which is always set by the calling BASH).
18341       if test "xMAKE" != xBASH; then
18342         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18343 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18344       fi
18345       # Try to locate tool using the code snippet
18346 
18347     # Try our hardest to locate a correct version of GNU make
18348     for ac_prog in gmake
18349 do
18350   # Extract the first word of "$ac_prog", so it can be a program name with args.
18351 set dummy $ac_prog; ac_word=$2
18352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18353 $as_echo_n "checking for $ac_word... " >&6; }
18354 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18355   $as_echo_n "(cached) " >&6
18356 else
18357   case $CHECK_GMAKE in
18358   [\\/]* | ?:[\\/]*)
18359   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18360   ;;
18361   *)
18362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18363 for as_dir in $PATH
18364 do
18365   IFS=$as_save_IFS
18366   test -z "$as_dir" && as_dir=.
18367     for ac_exec_ext in '' $ac_executable_extensions; do
18368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18369     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18371     break 2
18372   fi
18373 done
18374   done
18375 IFS=$as_save_IFS
18376 
18377   ;;
18378 esac
18379 fi
18380 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18381 if test -n "$CHECK_GMAKE"; then
18382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18383 $as_echo "$CHECK_GMAKE" >&6; }
18384 else
18385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18386 $as_echo "no" >&6; }
18387 fi
18388 
18389 
18390   test -n "$CHECK_GMAKE" && break
18391 done
18392 
18393 
18394   MAKE_CANDIDATE=""$CHECK_GMAKE""
18395   DESCRIPTION="gmake in PATH"
18396 
18397   # On Cygwin, we require a newer version of make than on other platforms
18398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18399     MAKE_VERSION_EXPR="-e 4\."
18400     MAKE_REQUIRED_VERSION="4.0"
18401    else
18402     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18403     MAKE_REQUIRED_VERSION="3.81"
18404   fi
18405 
18406   if test "x$MAKE_CANDIDATE" != x; then
18407     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18408 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18409     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18410     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18411     if test "x$IS_GNU_MAKE" = x; then
18412       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18413 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18414     else
18415       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18416       if test "x$IS_MODERN_MAKE" = x; then
18417         { $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
18418 $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;}
18419       else
18420         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18421           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18422             MAKE_EXPECTED_ENV='cygwin'
18423           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18424             MAKE_EXPECTED_ENV='msys'
18425           else
18426             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18427           fi
18428           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18429           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18430         else
18431           # Not relevant for non-Windows
18432           IS_MAKE_CORRECT_ENV=true
18433         fi
18434         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18435           { $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
18436 $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;}
18437         else
18438           FOUND_MAKE=$MAKE_CANDIDATE
18439 
18440   # Only process if variable expands to non-empty
18441 
18442   if test "x$FOUND_MAKE" != x; then
18443     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18444 
18445   # First separate the path from the arguments. This will split at the first
18446   # space.
18447   complete="$FOUND_MAKE"
18448   path="${complete%% *}"
18449   tmp="$complete EOL"
18450   arguments="${tmp#* }"
18451 
18452   # Input might be given as Windows format, start by converting to
18453   # unix format.
18454   new_path=`$CYGPATH -u "$path"`
18455 
18456   # Now try to locate executable using which
18457   new_path=`$WHICH "$new_path" 2> /dev/null`
18458   # bat and cmd files are not always considered executable in cygwin causing which
18459   # to not find them
18460   if test "x$new_path" = x \
18461       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18462       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18463     new_path=`$CYGPATH -u "$path"`
18464   fi
18465   if test "x$new_path" = x; then
18466     # Oops. Which didn't find the executable.
18467     # The splitting of arguments from the executable at a space might have been incorrect,
18468     # since paths with space are more likely in Windows. Give it another try with the whole
18469     # argument.
18470     path="$complete"
18471     arguments="EOL"
18472     new_path=`$CYGPATH -u "$path"`
18473     new_path=`$WHICH "$new_path" 2> /dev/null`
18474     # bat and cmd files are not always considered executable in cygwin causing which
18475     # to not find them
18476     if test "x$new_path" = x \
18477         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18478         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18479       new_path=`$CYGPATH -u "$path"`
18480     fi
18481     if test "x$new_path" = x; then
18482       # It's still not found. Now this is an unrecoverable error.
18483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18484 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18485       has_space=`$ECHO "$complete" | $GREP " "`
18486       if test "x$has_space" != x; then
18487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18489       fi
18490       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18491     fi
18492   fi
18493 
18494   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18495   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18496   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18497   # "foo.exe" is OK but "foo" is an error.
18498   #
18499   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18500   # It is also a way to make sure we got the proper file name for the real test later on.
18501   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18502   if test "x$test_shortpath" = x; then
18503     # Short path failed, file does not exist as specified.
18504     # Try adding .exe or .cmd
18505     if test -f "${new_path}.exe"; then
18506       input_to_shortpath="${new_path}.exe"
18507     elif test -f "${new_path}.cmd"; then
18508       input_to_shortpath="${new_path}.cmd"
18509     else
18510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18511 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18512       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18513 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18514       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18515     fi
18516   else
18517     input_to_shortpath="$new_path"
18518   fi
18519 
18520   # Call helper function which possibly converts this using DOS-style short mode.
18521   # If so, the updated path is stored in $new_path.
18522   new_path="$input_to_shortpath"
18523 
18524   input_path="$input_to_shortpath"
18525   # Check if we need to convert this using DOS-style short mode. If the path
18526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18527   # take no chances and rewrite it.
18528   # Note: m4 eats our [], so we need to use [ and ] instead.
18529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18530   if test "x$has_forbidden_chars" != x; then
18531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18535       # Going to short mode and back again did indeed matter. Since short mode is
18536       # case insensitive, let's make it lowercase to improve readability.
18537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18538       # Now convert it back to Unix-style (cygpath)
18539       input_path=`$CYGPATH -u "$shortmode_path"`
18540       new_path="$input_path"
18541     fi
18542   fi
18543 
18544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18545   if test "x$test_cygdrive_prefix" = x; then
18546     # As a simple fix, exclude /usr/bin since it's not a real path.
18547     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18549       # a path prefixed by /cygdrive for fixpath to work.
18550       new_path="$CYGWIN_ROOT_PATH$input_path"
18551     fi
18552   fi
18553 
18554   # remove trailing .exe if any
18555   new_path="${new_path/%.exe/}"
18556 
18557     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18558 
18559   # First separate the path from the arguments. This will split at the first
18560   # space.
18561   complete="$FOUND_MAKE"
18562   path="${complete%% *}"
18563   tmp="$complete EOL"
18564   arguments="${tmp#* }"
18565 
18566   # Input might be given as Windows format, start by converting to
18567   # unix format.
18568   new_path="$path"
18569 
18570   windows_path="$new_path"
18571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18572     unix_path=`$CYGPATH -u "$windows_path"`
18573     new_path="$unix_path"
18574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18576     new_path="$unix_path"
18577   fi
18578 
18579 
18580   # Now try to locate executable using which
18581   new_path=`$WHICH "$new_path" 2> /dev/null`
18582 
18583   if test "x$new_path" = x; then
18584     # Oops. Which didn't find the executable.
18585     # The splitting of arguments from the executable at a space might have been incorrect,
18586     # since paths with space are more likely in Windows. Give it another try with the whole
18587     # argument.
18588     path="$complete"
18589     arguments="EOL"
18590     new_path="$path"
18591 
18592   windows_path="$new_path"
18593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18594     unix_path=`$CYGPATH -u "$windows_path"`
18595     new_path="$unix_path"
18596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18598     new_path="$unix_path"
18599   fi
18600 
18601 
18602     new_path=`$WHICH "$new_path" 2> /dev/null`
18603     # bat and cmd files are not always considered executable in MSYS causing which
18604     # to not find them
18605     if test "x$new_path" = x \
18606         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18607         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18608       new_path="$path"
18609 
18610   windows_path="$new_path"
18611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18612     unix_path=`$CYGPATH -u "$windows_path"`
18613     new_path="$unix_path"
18614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18616     new_path="$unix_path"
18617   fi
18618 
18619     fi
18620 
18621     if test "x$new_path" = x; then
18622       # It's still not found. Now this is an unrecoverable error.
18623       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18624 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18625       has_space=`$ECHO "$complete" | $GREP " "`
18626       if test "x$has_space" != x; then
18627         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18628 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18629       fi
18630       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18631     fi
18632   fi
18633 
18634   # Now new_path has a complete unix path to the binary
18635   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18636     # Keep paths in /bin as-is, but remove trailing .exe if any
18637     new_path="${new_path/%.exe/}"
18638     # Do not save /bin paths to all_fixpath_prefixes!
18639   else
18640     # Not in mixed or Windows style, start by that.
18641     new_path=`cmd //c echo $new_path`
18642 
18643   input_path="$new_path"
18644   # Check if we need to convert this using DOS-style short mode. If the path
18645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18646   # take no chances and rewrite it.
18647   # Note: m4 eats our [], so we need to use [ and ] instead.
18648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18649   if test "x$has_forbidden_chars" != x; then
18650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18651     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18652   fi
18653 
18654     # Output is in $new_path
18655 
18656   windows_path="$new_path"
18657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18658     unix_path=`$CYGPATH -u "$windows_path"`
18659     new_path="$unix_path"
18660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18662     new_path="$unix_path"
18663   fi
18664 
18665     # remove trailing .exe if any
18666     new_path="${new_path/%.exe/}"
18667 
18668     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18669     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18670   fi
18671 
18672     else
18673       # We're on a unix platform. Hooray! :)
18674       # First separate the path from the arguments. This will split at the first
18675       # space.
18676       complete="$FOUND_MAKE"
18677       path="${complete%% *}"
18678       tmp="$complete EOL"
18679       arguments="${tmp#* }"
18680 
18681       # Cannot rely on the command "which" here since it doesn't always work.
18682       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18683       if test -z "$is_absolute_path"; then
18684         # Path to executable is not absolute. Find it.
18685         IFS_save="$IFS"
18686         IFS=:
18687         for p in $PATH; do
18688           if test -f "$p/$path" && test -x "$p/$path"; then
18689             new_path="$p/$path"
18690             break
18691           fi
18692         done
18693         IFS="$IFS_save"
18694       else
18695         # This is an absolute path, we can use it without further modifications.
18696         new_path="$path"
18697       fi
18698 
18699       if test "x$new_path" = x; then
18700         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18701 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18702         has_space=`$ECHO "$complete" | $GREP " "`
18703         if test "x$has_space" != x; then
18704           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18705 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18706         fi
18707         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18708       fi
18709     fi
18710 
18711     # Now join together the path and the arguments once again
18712     if test "x$arguments" != xEOL; then
18713       new_complete="$new_path ${arguments% *}"
18714     else
18715       new_complete="$new_path"
18716     fi
18717 
18718     if test "x$complete" != "x$new_complete"; then
18719       FOUND_MAKE="$new_complete"
18720       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18721 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18722     fi
18723   fi
18724 
18725         fi
18726       fi
18727     fi
18728   fi
18729 
18730 
18731     if test "x$FOUND_MAKE" = x; then
18732       for ac_prog in make
18733 do
18734   # Extract the first word of "$ac_prog", so it can be a program name with args.
18735 set dummy $ac_prog; ac_word=$2
18736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18737 $as_echo_n "checking for $ac_word... " >&6; }
18738 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18739   $as_echo_n "(cached) " >&6
18740 else
18741   case $CHECK_MAKE in
18742   [\\/]* | ?:[\\/]*)
18743   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18744   ;;
18745   *)
18746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18747 for as_dir in $PATH
18748 do
18749   IFS=$as_save_IFS
18750   test -z "$as_dir" && as_dir=.
18751     for ac_exec_ext in '' $ac_executable_extensions; do
18752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18753     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18755     break 2
18756   fi
18757 done
18758   done
18759 IFS=$as_save_IFS
18760 
18761   ;;
18762 esac
18763 fi
18764 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18765 if test -n "$CHECK_MAKE"; then
18766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18767 $as_echo "$CHECK_MAKE" >&6; }
18768 else
18769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18770 $as_echo "no" >&6; }
18771 fi
18772 
18773 
18774   test -n "$CHECK_MAKE" && break
18775 done
18776 
18777 
18778   MAKE_CANDIDATE=""$CHECK_MAKE""
18779   DESCRIPTION="make in PATH"
18780 
18781   # On Cygwin, we require a newer version of make than on other platforms
18782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783     MAKE_VERSION_EXPR="-e 4\."
18784     MAKE_REQUIRED_VERSION="4.0"
18785    else
18786     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18787     MAKE_REQUIRED_VERSION="3.81"
18788   fi
18789 
18790   if test "x$MAKE_CANDIDATE" != x; then
18791     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18792 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18793     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18794     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18795     if test "x$IS_GNU_MAKE" = x; then
18796       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18797 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18798     else
18799       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18800       if test "x$IS_MODERN_MAKE" = x; then
18801         { $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
18802 $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;}
18803       else
18804         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18805           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18806             MAKE_EXPECTED_ENV='cygwin'
18807           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18808             MAKE_EXPECTED_ENV='msys'
18809           else
18810             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18811           fi
18812           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18813           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18814         else
18815           # Not relevant for non-Windows
18816           IS_MAKE_CORRECT_ENV=true
18817         fi
18818         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18819           { $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
18820 $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;}
18821         else
18822           FOUND_MAKE=$MAKE_CANDIDATE
18823 
18824   # Only process if variable expands to non-empty
18825 
18826   if test "x$FOUND_MAKE" != x; then
18827     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18828 
18829   # First separate the path from the arguments. This will split at the first
18830   # space.
18831   complete="$FOUND_MAKE"
18832   path="${complete%% *}"
18833   tmp="$complete EOL"
18834   arguments="${tmp#* }"
18835 
18836   # Input might be given as Windows format, start by converting to
18837   # unix format.
18838   new_path=`$CYGPATH -u "$path"`
18839 
18840   # Now try to locate executable using which
18841   new_path=`$WHICH "$new_path" 2> /dev/null`
18842   # bat and cmd files are not always considered executable in cygwin causing which
18843   # to not find them
18844   if test "x$new_path" = x \
18845       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18846       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18847     new_path=`$CYGPATH -u "$path"`
18848   fi
18849   if test "x$new_path" = x; then
18850     # Oops. Which didn't find the executable.
18851     # The splitting of arguments from the executable at a space might have been incorrect,
18852     # since paths with space are more likely in Windows. Give it another try with the whole
18853     # argument.
18854     path="$complete"
18855     arguments="EOL"
18856     new_path=`$CYGPATH -u "$path"`
18857     new_path=`$WHICH "$new_path" 2> /dev/null`
18858     # bat and cmd files are not always considered executable in cygwin causing which
18859     # to not find them
18860     if test "x$new_path" = x \
18861         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18862         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18863       new_path=`$CYGPATH -u "$path"`
18864     fi
18865     if test "x$new_path" = x; then
18866       # It's still not found. Now this is an unrecoverable error.
18867       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18868 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18869       has_space=`$ECHO "$complete" | $GREP " "`
18870       if test "x$has_space" != x; then
18871         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18872 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18873       fi
18874       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18875     fi
18876   fi
18877 
18878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18881   # "foo.exe" is OK but "foo" is an error.
18882   #
18883   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18884   # It is also a way to make sure we got the proper file name for the real test later on.
18885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18886   if test "x$test_shortpath" = x; then
18887     # Short path failed, file does not exist as specified.
18888     # Try adding .exe or .cmd
18889     if test -f "${new_path}.exe"; then
18890       input_to_shortpath="${new_path}.exe"
18891     elif test -f "${new_path}.cmd"; then
18892       input_to_shortpath="${new_path}.cmd"
18893     else
18894       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18895 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18896       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18897 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18898       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18899     fi
18900   else
18901     input_to_shortpath="$new_path"
18902   fi
18903 
18904   # Call helper function which possibly converts this using DOS-style short mode.
18905   # If so, the updated path is stored in $new_path.
18906   new_path="$input_to_shortpath"
18907 
18908   input_path="$input_to_shortpath"
18909   # Check if we need to convert this using DOS-style short mode. If the path
18910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18911   # take no chances and rewrite it.
18912   # Note: m4 eats our [], so we need to use [ and ] instead.
18913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18914   if test "x$has_forbidden_chars" != x; then
18915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18916     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18917     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18918     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18919       # Going to short mode and back again did indeed matter. Since short mode is
18920       # case insensitive, let's make it lowercase to improve readability.
18921       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18922       # Now convert it back to Unix-style (cygpath)
18923       input_path=`$CYGPATH -u "$shortmode_path"`
18924       new_path="$input_path"
18925     fi
18926   fi
18927 
18928   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18929   if test "x$test_cygdrive_prefix" = x; then
18930     # As a simple fix, exclude /usr/bin since it's not a real path.
18931     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18932       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18933       # a path prefixed by /cygdrive for fixpath to work.
18934       new_path="$CYGWIN_ROOT_PATH$input_path"
18935     fi
18936   fi
18937 
18938   # remove trailing .exe if any
18939   new_path="${new_path/%.exe/}"
18940 
18941     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18942 
18943   # First separate the path from the arguments. This will split at the first
18944   # space.
18945   complete="$FOUND_MAKE"
18946   path="${complete%% *}"
18947   tmp="$complete EOL"
18948   arguments="${tmp#* }"
18949 
18950   # Input might be given as Windows format, start by converting to
18951   # unix format.
18952   new_path="$path"
18953 
18954   windows_path="$new_path"
18955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18956     unix_path=`$CYGPATH -u "$windows_path"`
18957     new_path="$unix_path"
18958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18960     new_path="$unix_path"
18961   fi
18962 
18963 
18964   # Now try to locate executable using which
18965   new_path=`$WHICH "$new_path" 2> /dev/null`
18966 
18967   if test "x$new_path" = x; then
18968     # Oops. Which didn't find the executable.
18969     # The splitting of arguments from the executable at a space might have been incorrect,
18970     # since paths with space are more likely in Windows. Give it another try with the whole
18971     # argument.
18972     path="$complete"
18973     arguments="EOL"
18974     new_path="$path"
18975 
18976   windows_path="$new_path"
18977   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18978     unix_path=`$CYGPATH -u "$windows_path"`
18979     new_path="$unix_path"
18980   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18981     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18982     new_path="$unix_path"
18983   fi
18984 
18985 
18986     new_path=`$WHICH "$new_path" 2> /dev/null`
18987     # bat and cmd files are not always considered executable in MSYS causing which
18988     # to not find them
18989     if test "x$new_path" = x \
18990         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18991         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18992       new_path="$path"
18993 
18994   windows_path="$new_path"
18995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18996     unix_path=`$CYGPATH -u "$windows_path"`
18997     new_path="$unix_path"
18998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19000     new_path="$unix_path"
19001   fi
19002 
19003     fi
19004 
19005     if test "x$new_path" = x; then
19006       # It's still not found. Now this is an unrecoverable error.
19007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19008 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19009       has_space=`$ECHO "$complete" | $GREP " "`
19010       if test "x$has_space" != x; then
19011         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19012 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19013       fi
19014       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19015     fi
19016   fi
19017 
19018   # Now new_path has a complete unix path to the binary
19019   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19020     # Keep paths in /bin as-is, but remove trailing .exe if any
19021     new_path="${new_path/%.exe/}"
19022     # Do not save /bin paths to all_fixpath_prefixes!
19023   else
19024     # Not in mixed or Windows style, start by that.
19025     new_path=`cmd //c echo $new_path`
19026 
19027   input_path="$new_path"
19028   # Check if we need to convert this using DOS-style short mode. If the path
19029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19030   # take no chances and rewrite it.
19031   # Note: m4 eats our [], so we need to use [ and ] instead.
19032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19033   if test "x$has_forbidden_chars" != x; then
19034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19035     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19036   fi
19037 
19038     # Output is in $new_path
19039 
19040   windows_path="$new_path"
19041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19042     unix_path=`$CYGPATH -u "$windows_path"`
19043     new_path="$unix_path"
19044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19046     new_path="$unix_path"
19047   fi
19048 
19049     # remove trailing .exe if any
19050     new_path="${new_path/%.exe/}"
19051 
19052     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19053     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19054   fi
19055 
19056     else
19057       # We're on a unix platform. Hooray! :)
19058       # First separate the path from the arguments. This will split at the first
19059       # space.
19060       complete="$FOUND_MAKE"
19061       path="${complete%% *}"
19062       tmp="$complete EOL"
19063       arguments="${tmp#* }"
19064 
19065       # Cannot rely on the command "which" here since it doesn't always work.
19066       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19067       if test -z "$is_absolute_path"; then
19068         # Path to executable is not absolute. Find it.
19069         IFS_save="$IFS"
19070         IFS=:
19071         for p in $PATH; do
19072           if test -f "$p/$path" && test -x "$p/$path"; then
19073             new_path="$p/$path"
19074             break
19075           fi
19076         done
19077         IFS="$IFS_save"
19078       else
19079         # This is an absolute path, we can use it without further modifications.
19080         new_path="$path"
19081       fi
19082 
19083       if test "x$new_path" = x; then
19084         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19085 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19086         has_space=`$ECHO "$complete" | $GREP " "`
19087         if test "x$has_space" != x; then
19088           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19089 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19090         fi
19091         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19092       fi
19093     fi
19094 
19095     # Now join together the path and the arguments once again
19096     if test "x$arguments" != xEOL; then
19097       new_complete="$new_path ${arguments% *}"
19098     else
19099       new_complete="$new_path"
19100     fi
19101 
19102     if test "x$complete" != "x$new_complete"; then
19103       FOUND_MAKE="$new_complete"
19104       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19105 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19106     fi
19107   fi
19108 
19109         fi
19110       fi
19111     fi
19112   fi
19113 
19114     fi
19115 
19116     if test "x$FOUND_MAKE" = x; then
19117       if test "x$TOOLCHAIN_PATH" != x; then
19118         # We have a toolchain path, check that as well before giving up.
19119         OLD_PATH=$PATH
19120         PATH=$TOOLCHAIN_PATH:$PATH
19121         for ac_prog in gmake
19122 do
19123   # Extract the first word of "$ac_prog", so it can be a program name with args.
19124 set dummy $ac_prog; ac_word=$2
19125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19126 $as_echo_n "checking for $ac_word... " >&6; }
19127 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19128   $as_echo_n "(cached) " >&6
19129 else
19130   case $CHECK_TOOLSDIR_GMAKE in
19131   [\\/]* | ?:[\\/]*)
19132   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19133   ;;
19134   *)
19135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19136 for as_dir in $PATH
19137 do
19138   IFS=$as_save_IFS
19139   test -z "$as_dir" && as_dir=.
19140     for ac_exec_ext in '' $ac_executable_extensions; do
19141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19142     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19144     break 2
19145   fi
19146 done
19147   done
19148 IFS=$as_save_IFS
19149 
19150   ;;
19151 esac
19152 fi
19153 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19154 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19156 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19157 else
19158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19159 $as_echo "no" >&6; }
19160 fi
19161 
19162 
19163   test -n "$CHECK_TOOLSDIR_GMAKE" && break
19164 done
19165 
19166 
19167   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19168   DESCRIPTION="gmake in tools-dir"
19169 
19170   # On Cygwin, we require a newer version of make than on other platforms
19171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19172     MAKE_VERSION_EXPR="-e 4\."
19173     MAKE_REQUIRED_VERSION="4.0"
19174    else
19175     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19176     MAKE_REQUIRED_VERSION="3.81"
19177   fi
19178 
19179   if test "x$MAKE_CANDIDATE" != x; then
19180     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19181 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19182     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19183     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19184     if test "x$IS_GNU_MAKE" = x; then
19185       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19186 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19187     else
19188       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19189       if test "x$IS_MODERN_MAKE" = x; then
19190         { $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
19191 $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;}
19192       else
19193         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19194           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19195             MAKE_EXPECTED_ENV='cygwin'
19196           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19197             MAKE_EXPECTED_ENV='msys'
19198           else
19199             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19200           fi
19201           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19202           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19203         else
19204           # Not relevant for non-Windows
19205           IS_MAKE_CORRECT_ENV=true
19206         fi
19207         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19208           { $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
19209 $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;}
19210         else
19211           FOUND_MAKE=$MAKE_CANDIDATE
19212 
19213   # Only process if variable expands to non-empty
19214 
19215   if test "x$FOUND_MAKE" != x; then
19216     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19217 
19218   # First separate the path from the arguments. This will split at the first
19219   # space.
19220   complete="$FOUND_MAKE"
19221   path="${complete%% *}"
19222   tmp="$complete EOL"
19223   arguments="${tmp#* }"
19224 
19225   # Input might be given as Windows format, start by converting to
19226   # unix format.
19227   new_path=`$CYGPATH -u "$path"`
19228 
19229   # Now try to locate executable using which
19230   new_path=`$WHICH "$new_path" 2> /dev/null`
19231   # bat and cmd files are not always considered executable in cygwin causing which
19232   # to not find them
19233   if test "x$new_path" = x \
19234       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19235       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19236     new_path=`$CYGPATH -u "$path"`
19237   fi
19238   if test "x$new_path" = x; then
19239     # Oops. Which didn't find the executable.
19240     # The splitting of arguments from the executable at a space might have been incorrect,
19241     # since paths with space are more likely in Windows. Give it another try with the whole
19242     # argument.
19243     path="$complete"
19244     arguments="EOL"
19245     new_path=`$CYGPATH -u "$path"`
19246     new_path=`$WHICH "$new_path" 2> /dev/null`
19247     # bat and cmd files are not always considered executable in cygwin causing which
19248     # to not find them
19249     if test "x$new_path" = x \
19250         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19251         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19252       new_path=`$CYGPATH -u "$path"`
19253     fi
19254     if test "x$new_path" = x; then
19255       # It's still not found. Now this is an unrecoverable error.
19256       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19257 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19258       has_space=`$ECHO "$complete" | $GREP " "`
19259       if test "x$has_space" != x; then
19260         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19261 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19262       fi
19263       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19264     fi
19265   fi
19266 
19267   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19268   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19269   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19270   # "foo.exe" is OK but "foo" is an error.
19271   #
19272   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19273   # It is also a way to make sure we got the proper file name for the real test later on.
19274   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19275   if test "x$test_shortpath" = x; then
19276     # Short path failed, file does not exist as specified.
19277     # Try adding .exe or .cmd
19278     if test -f "${new_path}.exe"; then
19279       input_to_shortpath="${new_path}.exe"
19280     elif test -f "${new_path}.cmd"; then
19281       input_to_shortpath="${new_path}.cmd"
19282     else
19283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19284 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19285       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19286 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19287       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19288     fi
19289   else
19290     input_to_shortpath="$new_path"
19291   fi
19292 
19293   # Call helper function which possibly converts this using DOS-style short mode.
19294   # If so, the updated path is stored in $new_path.
19295   new_path="$input_to_shortpath"
19296 
19297   input_path="$input_to_shortpath"
19298   # Check if we need to convert this using DOS-style short mode. If the path
19299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19300   # take no chances and rewrite it.
19301   # Note: m4 eats our [], so we need to use [ and ] instead.
19302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19303   if test "x$has_forbidden_chars" != x; then
19304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19308       # Going to short mode and back again did indeed matter. Since short mode is
19309       # case insensitive, let's make it lowercase to improve readability.
19310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19311       # Now convert it back to Unix-style (cygpath)
19312       input_path=`$CYGPATH -u "$shortmode_path"`
19313       new_path="$input_path"
19314     fi
19315   fi
19316 
19317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19318   if test "x$test_cygdrive_prefix" = x; then
19319     # As a simple fix, exclude /usr/bin since it's not a real path.
19320     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19322       # a path prefixed by /cygdrive for fixpath to work.
19323       new_path="$CYGWIN_ROOT_PATH$input_path"
19324     fi
19325   fi
19326 
19327   # remove trailing .exe if any
19328   new_path="${new_path/%.exe/}"
19329 
19330     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19331 
19332   # First separate the path from the arguments. This will split at the first
19333   # space.
19334   complete="$FOUND_MAKE"
19335   path="${complete%% *}"
19336   tmp="$complete EOL"
19337   arguments="${tmp#* }"
19338 
19339   # Input might be given as Windows format, start by converting to
19340   # unix format.
19341   new_path="$path"
19342 
19343   windows_path="$new_path"
19344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19345     unix_path=`$CYGPATH -u "$windows_path"`
19346     new_path="$unix_path"
19347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19349     new_path="$unix_path"
19350   fi
19351 
19352 
19353   # Now try to locate executable using which
19354   new_path=`$WHICH "$new_path" 2> /dev/null`
19355 
19356   if test "x$new_path" = x; then
19357     # Oops. Which didn't find the executable.
19358     # The splitting of arguments from the executable at a space might have been incorrect,
19359     # since paths with space are more likely in Windows. Give it another try with the whole
19360     # argument.
19361     path="$complete"
19362     arguments="EOL"
19363     new_path="$path"
19364 
19365   windows_path="$new_path"
19366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19367     unix_path=`$CYGPATH -u "$windows_path"`
19368     new_path="$unix_path"
19369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19371     new_path="$unix_path"
19372   fi
19373 
19374 
19375     new_path=`$WHICH "$new_path" 2> /dev/null`
19376     # bat and cmd files are not always considered executable in MSYS causing which
19377     # to not find them
19378     if test "x$new_path" = x \
19379         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19380         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19381       new_path="$path"
19382 
19383   windows_path="$new_path"
19384   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19385     unix_path=`$CYGPATH -u "$windows_path"`
19386     new_path="$unix_path"
19387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19388     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19389     new_path="$unix_path"
19390   fi
19391 
19392     fi
19393 
19394     if test "x$new_path" = x; then
19395       # It's still not found. Now this is an unrecoverable error.
19396       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19397 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19398       has_space=`$ECHO "$complete" | $GREP " "`
19399       if test "x$has_space" != x; then
19400         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19401 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19402       fi
19403       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19404     fi
19405   fi
19406 
19407   # Now new_path has a complete unix path to the binary
19408   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19409     # Keep paths in /bin as-is, but remove trailing .exe if any
19410     new_path="${new_path/%.exe/}"
19411     # Do not save /bin paths to all_fixpath_prefixes!
19412   else
19413     # Not in mixed or Windows style, start by that.
19414     new_path=`cmd //c echo $new_path`
19415 
19416   input_path="$new_path"
19417   # Check if we need to convert this using DOS-style short mode. If the path
19418   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19419   # take no chances and rewrite it.
19420   # Note: m4 eats our [], so we need to use [ and ] instead.
19421   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19422   if test "x$has_forbidden_chars" != x; then
19423     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19424     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19425   fi
19426 
19427     # Output is in $new_path
19428 
19429   windows_path="$new_path"
19430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19431     unix_path=`$CYGPATH -u "$windows_path"`
19432     new_path="$unix_path"
19433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19435     new_path="$unix_path"
19436   fi
19437 
19438     # remove trailing .exe if any
19439     new_path="${new_path/%.exe/}"
19440 
19441     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19442     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19443   fi
19444 
19445     else
19446       # We're on a unix platform. Hooray! :)
19447       # First separate the path from the arguments. This will split at the first
19448       # space.
19449       complete="$FOUND_MAKE"
19450       path="${complete%% *}"
19451       tmp="$complete EOL"
19452       arguments="${tmp#* }"
19453 
19454       # Cannot rely on the command "which" here since it doesn't always work.
19455       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19456       if test -z "$is_absolute_path"; then
19457         # Path to executable is not absolute. Find it.
19458         IFS_save="$IFS"
19459         IFS=:
19460         for p in $PATH; do
19461           if test -f "$p/$path" && test -x "$p/$path"; then
19462             new_path="$p/$path"
19463             break
19464           fi
19465         done
19466         IFS="$IFS_save"
19467       else
19468         # This is an absolute path, we can use it without further modifications.
19469         new_path="$path"
19470       fi
19471 
19472       if test "x$new_path" = x; then
19473         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19474 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19475         has_space=`$ECHO "$complete" | $GREP " "`
19476         if test "x$has_space" != x; then
19477           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19478 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19479         fi
19480         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19481       fi
19482     fi
19483 
19484     # Now join together the path and the arguments once again
19485     if test "x$arguments" != xEOL; then
19486       new_complete="$new_path ${arguments% *}"
19487     else
19488       new_complete="$new_path"
19489     fi
19490 
19491     if test "x$complete" != "x$new_complete"; then
19492       FOUND_MAKE="$new_complete"
19493       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19494 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19495     fi
19496   fi
19497 
19498         fi
19499       fi
19500     fi
19501   fi
19502 
19503         if test "x$FOUND_MAKE" = x; then
19504           for ac_prog in make
19505 do
19506   # Extract the first word of "$ac_prog", so it can be a program name with args.
19507 set dummy $ac_prog; ac_word=$2
19508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19509 $as_echo_n "checking for $ac_word... " >&6; }
19510 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19511   $as_echo_n "(cached) " >&6
19512 else
19513   case $CHECK_TOOLSDIR_MAKE in
19514   [\\/]* | ?:[\\/]*)
19515   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19516   ;;
19517   *)
19518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19519 for as_dir in $PATH
19520 do
19521   IFS=$as_save_IFS
19522   test -z "$as_dir" && as_dir=.
19523     for ac_exec_ext in '' $ac_executable_extensions; do
19524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19525     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19527     break 2
19528   fi
19529 done
19530   done
19531 IFS=$as_save_IFS
19532 
19533   ;;
19534 esac
19535 fi
19536 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19537 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19539 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19540 else
19541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19542 $as_echo "no" >&6; }
19543 fi
19544 
19545 
19546   test -n "$CHECK_TOOLSDIR_MAKE" && break
19547 done
19548 
19549 
19550   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19551   DESCRIPTION="make in tools-dir"
19552 
19553   # On Cygwin, we require a newer version of make than on other platforms
19554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19555     MAKE_VERSION_EXPR="-e 4\."
19556     MAKE_REQUIRED_VERSION="4.0"
19557    else
19558     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19559     MAKE_REQUIRED_VERSION="3.81"
19560   fi
19561 
19562   if test "x$MAKE_CANDIDATE" != x; then
19563     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19564 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19565     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19566     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19567     if test "x$IS_GNU_MAKE" = x; then
19568       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19569 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19570     else
19571       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19572       if test "x$IS_MODERN_MAKE" = x; then
19573         { $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
19574 $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;}
19575       else
19576         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19577           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19578             MAKE_EXPECTED_ENV='cygwin'
19579           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19580             MAKE_EXPECTED_ENV='msys'
19581           else
19582             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19583           fi
19584           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19585           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19586         else
19587           # Not relevant for non-Windows
19588           IS_MAKE_CORRECT_ENV=true
19589         fi
19590         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19591           { $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
19592 $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;}
19593         else
19594           FOUND_MAKE=$MAKE_CANDIDATE
19595 
19596   # Only process if variable expands to non-empty
19597 
19598   if test "x$FOUND_MAKE" != x; then
19599     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19600 
19601   # First separate the path from the arguments. This will split at the first
19602   # space.
19603   complete="$FOUND_MAKE"
19604   path="${complete%% *}"
19605   tmp="$complete EOL"
19606   arguments="${tmp#* }"
19607 
19608   # Input might be given as Windows format, start by converting to
19609   # unix format.
19610   new_path=`$CYGPATH -u "$path"`
19611 
19612   # Now try to locate executable using which
19613   new_path=`$WHICH "$new_path" 2> /dev/null`
19614   # bat and cmd files are not always considered executable in cygwin causing which
19615   # to not find them
19616   if test "x$new_path" = x \
19617       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19618       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19619     new_path=`$CYGPATH -u "$path"`
19620   fi
19621   if test "x$new_path" = x; then
19622     # Oops. Which didn't find the executable.
19623     # The splitting of arguments from the executable at a space might have been incorrect,
19624     # since paths with space are more likely in Windows. Give it another try with the whole
19625     # argument.
19626     path="$complete"
19627     arguments="EOL"
19628     new_path=`$CYGPATH -u "$path"`
19629     new_path=`$WHICH "$new_path" 2> /dev/null`
19630     # bat and cmd files are not always considered executable in cygwin causing which
19631     # to not find them
19632     if test "x$new_path" = x \
19633         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19634         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19635       new_path=`$CYGPATH -u "$path"`
19636     fi
19637     if test "x$new_path" = x; then
19638       # It's still not found. Now this is an unrecoverable error.
19639       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19640 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19641       has_space=`$ECHO "$complete" | $GREP " "`
19642       if test "x$has_space" != x; then
19643         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19644 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19645       fi
19646       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19647     fi
19648   fi
19649 
19650   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19651   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19652   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19653   # "foo.exe" is OK but "foo" is an error.
19654   #
19655   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19656   # It is also a way to make sure we got the proper file name for the real test later on.
19657   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19658   if test "x$test_shortpath" = x; then
19659     # Short path failed, file does not exist as specified.
19660     # Try adding .exe or .cmd
19661     if test -f "${new_path}.exe"; then
19662       input_to_shortpath="${new_path}.exe"
19663     elif test -f "${new_path}.cmd"; then
19664       input_to_shortpath="${new_path}.cmd"
19665     else
19666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19667 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19668       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19669 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19670       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19671     fi
19672   else
19673     input_to_shortpath="$new_path"
19674   fi
19675 
19676   # Call helper function which possibly converts this using DOS-style short mode.
19677   # If so, the updated path is stored in $new_path.
19678   new_path="$input_to_shortpath"
19679 
19680   input_path="$input_to_shortpath"
19681   # Check if we need to convert this using DOS-style short mode. If the path
19682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19683   # take no chances and rewrite it.
19684   # Note: m4 eats our [], so we need to use [ and ] instead.
19685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19686   if test "x$has_forbidden_chars" != x; then
19687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19691       # Going to short mode and back again did indeed matter. Since short mode is
19692       # case insensitive, let's make it lowercase to improve readability.
19693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19694       # Now convert it back to Unix-style (cygpath)
19695       input_path=`$CYGPATH -u "$shortmode_path"`
19696       new_path="$input_path"
19697     fi
19698   fi
19699 
19700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19701   if test "x$test_cygdrive_prefix" = x; then
19702     # As a simple fix, exclude /usr/bin since it's not a real path.
19703     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19705       # a path prefixed by /cygdrive for fixpath to work.
19706       new_path="$CYGWIN_ROOT_PATH$input_path"
19707     fi
19708   fi
19709 
19710   # remove trailing .exe if any
19711   new_path="${new_path/%.exe/}"
19712 
19713     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19714 
19715   # First separate the path from the arguments. This will split at the first
19716   # space.
19717   complete="$FOUND_MAKE"
19718   path="${complete%% *}"
19719   tmp="$complete EOL"
19720   arguments="${tmp#* }"
19721 
19722   # Input might be given as Windows format, start by converting to
19723   # unix format.
19724   new_path="$path"
19725 
19726   windows_path="$new_path"
19727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19728     unix_path=`$CYGPATH -u "$windows_path"`
19729     new_path="$unix_path"
19730   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19731     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19732     new_path="$unix_path"
19733   fi
19734 
19735 
19736   # Now try to locate executable using which
19737   new_path=`$WHICH "$new_path" 2> /dev/null`
19738 
19739   if test "x$new_path" = x; then
19740     # Oops. Which didn't find the executable.
19741     # The splitting of arguments from the executable at a space might have been incorrect,
19742     # since paths with space are more likely in Windows. Give it another try with the whole
19743     # argument.
19744     path="$complete"
19745     arguments="EOL"
19746     new_path="$path"
19747 
19748   windows_path="$new_path"
19749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19750     unix_path=`$CYGPATH -u "$windows_path"`
19751     new_path="$unix_path"
19752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19753     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19754     new_path="$unix_path"
19755   fi
19756 
19757 
19758     new_path=`$WHICH "$new_path" 2> /dev/null`
19759     # bat and cmd files are not always considered executable in MSYS causing which
19760     # to not find them
19761     if test "x$new_path" = x \
19762         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19763         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19764       new_path="$path"
19765 
19766   windows_path="$new_path"
19767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19768     unix_path=`$CYGPATH -u "$windows_path"`
19769     new_path="$unix_path"
19770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19772     new_path="$unix_path"
19773   fi
19774 
19775     fi
19776 
19777     if test "x$new_path" = x; then
19778       # It's still not found. Now this is an unrecoverable error.
19779       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19780 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19781       has_space=`$ECHO "$complete" | $GREP " "`
19782       if test "x$has_space" != x; then
19783         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19784 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19785       fi
19786       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19787     fi
19788   fi
19789 
19790   # Now new_path has a complete unix path to the binary
19791   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19792     # Keep paths in /bin as-is, but remove trailing .exe if any
19793     new_path="${new_path/%.exe/}"
19794     # Do not save /bin paths to all_fixpath_prefixes!
19795   else
19796     # Not in mixed or Windows style, start by that.
19797     new_path=`cmd //c echo $new_path`
19798 
19799   input_path="$new_path"
19800   # Check if we need to convert this using DOS-style short mode. If the path
19801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19802   # take no chances and rewrite it.
19803   # Note: m4 eats our [], so we need to use [ and ] instead.
19804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19805   if test "x$has_forbidden_chars" != x; then
19806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19807     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19808   fi
19809 
19810     # Output is in $new_path
19811 
19812   windows_path="$new_path"
19813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19814     unix_path=`$CYGPATH -u "$windows_path"`
19815     new_path="$unix_path"
19816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19818     new_path="$unix_path"
19819   fi
19820 
19821     # remove trailing .exe if any
19822     new_path="${new_path/%.exe/}"
19823 
19824     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19825     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19826   fi
19827 
19828     else
19829       # We're on a unix platform. Hooray! :)
19830       # First separate the path from the arguments. This will split at the first
19831       # space.
19832       complete="$FOUND_MAKE"
19833       path="${complete%% *}"
19834       tmp="$complete EOL"
19835       arguments="${tmp#* }"
19836 
19837       # Cannot rely on the command "which" here since it doesn't always work.
19838       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19839       if test -z "$is_absolute_path"; then
19840         # Path to executable is not absolute. Find it.
19841         IFS_save="$IFS"
19842         IFS=:
19843         for p in $PATH; do
19844           if test -f "$p/$path" && test -x "$p/$path"; then
19845             new_path="$p/$path"
19846             break
19847           fi
19848         done
19849         IFS="$IFS_save"
19850       else
19851         # This is an absolute path, we can use it without further modifications.
19852         new_path="$path"
19853       fi
19854 
19855       if test "x$new_path" = x; then
19856         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19857 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19858         has_space=`$ECHO "$complete" | $GREP " "`
19859         if test "x$has_space" != x; then
19860           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19861 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19862         fi
19863         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19864       fi
19865     fi
19866 
19867     # Now join together the path and the arguments once again
19868     if test "x$arguments" != xEOL; then
19869       new_complete="$new_path ${arguments% *}"
19870     else
19871       new_complete="$new_path"
19872     fi
19873 
19874     if test "x$complete" != "x$new_complete"; then
19875       FOUND_MAKE="$new_complete"
19876       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19877 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19878     fi
19879   fi
19880 
19881         fi
19882       fi
19883     fi
19884   fi
19885 
19886         fi
19887         PATH=$OLD_PATH
19888       fi
19889     fi
19890 
19891     if test "x$FOUND_MAKE" = x; then
19892       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
19893     fi
19894 
19895     else
19896       # If it succeeded, then it was overridden by the user. We will use it
19897       # for the tool.
19898 
19899       # First remove it from the list of overridden variables, so we can test
19900       # for unknown variables in the end.
19901       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19902 
19903       # Check if we try to supply an empty value
19904       if test "x$MAKE" = x; then
19905         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19906 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19907         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19908 $as_echo_n "checking for MAKE... " >&6; }
19909         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19910 $as_echo "disabled" >&6; }
19911       else
19912         # Check if the provided tool contains a complete path.
19913         tool_specified="$MAKE"
19914         tool_basename="${tool_specified##*/}"
19915         if test "x$tool_basename" = "x$tool_specified"; then
19916           # A command without a complete path is provided, search $PATH.
19917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19918 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19919           # Extract the first word of "$tool_basename", so it can be a program name with args.
19920 set dummy $tool_basename; ac_word=$2
19921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19922 $as_echo_n "checking for $ac_word... " >&6; }
19923 if ${ac_cv_path_MAKE+:} false; then :
19924   $as_echo_n "(cached) " >&6
19925 else
19926   case $MAKE in
19927   [\\/]* | ?:[\\/]*)
19928   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19929   ;;
19930   *)
19931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19932 for as_dir in $PATH
19933 do
19934   IFS=$as_save_IFS
19935   test -z "$as_dir" && as_dir=.
19936     for ac_exec_ext in '' $ac_executable_extensions; do
19937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19938     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19940     break 2
19941   fi
19942 done
19943   done
19944 IFS=$as_save_IFS
19945 
19946   ;;
19947 esac
19948 fi
19949 MAKE=$ac_cv_path_MAKE
19950 if test -n "$MAKE"; then
19951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19952 $as_echo "$MAKE" >&6; }
19953 else
19954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19955 $as_echo "no" >&6; }
19956 fi
19957 
19958 
19959           if test "x$MAKE" = x; then
19960             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19961           fi
19962         else
19963           # Otherwise we believe it is a complete path. Use it as it is.
19964           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19965 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19966           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19967 $as_echo_n "checking for MAKE... " >&6; }
19968           if test ! -x "$tool_specified"; then
19969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19970 $as_echo "not found" >&6; }
19971             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19972           fi
19973           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19974 $as_echo "$tool_specified" >&6; }
19975         fi
19976       fi
19977     fi
19978 
19979     # If MAKE was set by user, verify the version
19980 
19981   MAKE_CANDIDATE=""$MAKE""
19982   DESCRIPTION="user supplied MAKE=$MAKE"
19983 
19984   # On Cygwin, we require a newer version of make than on other platforms
19985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19986     MAKE_VERSION_EXPR="-e 4\."
19987     MAKE_REQUIRED_VERSION="4.0"
19988    else
19989     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19990     MAKE_REQUIRED_VERSION="3.81"
19991   fi
19992 
19993   if test "x$MAKE_CANDIDATE" != x; then
19994     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19995 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19996     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19997     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19998     if test "x$IS_GNU_MAKE" = x; then
19999       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20000 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20001     else
20002       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20003       if test "x$IS_MODERN_MAKE" = x; then
20004         { $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
20005 $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;}
20006       else
20007         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20008           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20009             MAKE_EXPECTED_ENV='cygwin'
20010           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20011             MAKE_EXPECTED_ENV='msys'
20012           else
20013             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20014           fi
20015           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20016           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20017         else
20018           # Not relevant for non-Windows
20019           IS_MAKE_CORRECT_ENV=true
20020         fi
20021         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20022           { $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
20023 $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;}
20024         else
20025           FOUND_MAKE=$MAKE_CANDIDATE
20026 
20027   # Only process if variable expands to non-empty
20028 
20029   if test "x$FOUND_MAKE" != x; then
20030     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031 
20032   # First separate the path from the arguments. This will split at the first
20033   # space.
20034   complete="$FOUND_MAKE"
20035   path="${complete%% *}"
20036   tmp="$complete EOL"
20037   arguments="${tmp#* }"
20038 
20039   # Input might be given as Windows format, start by converting to
20040   # unix format.
20041   new_path=`$CYGPATH -u "$path"`
20042 
20043   # Now try to locate executable using which
20044   new_path=`$WHICH "$new_path" 2> /dev/null`
20045   # bat and cmd files are not always considered executable in cygwin causing which
20046   # to not find them
20047   if test "x$new_path" = x \
20048       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20049       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20050     new_path=`$CYGPATH -u "$path"`
20051   fi
20052   if test "x$new_path" = x; then
20053     # Oops. Which didn't find the executable.
20054     # The splitting of arguments from the executable at a space might have been incorrect,
20055     # since paths with space are more likely in Windows. Give it another try with the whole
20056     # argument.
20057     path="$complete"
20058     arguments="EOL"
20059     new_path=`$CYGPATH -u "$path"`
20060     new_path=`$WHICH "$new_path" 2> /dev/null`
20061     # bat and cmd files are not always considered executable in cygwin causing which
20062     # to not find them
20063     if test "x$new_path" = x \
20064         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20065         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20066       new_path=`$CYGPATH -u "$path"`
20067     fi
20068     if test "x$new_path" = x; then
20069       # It's still not found. Now this is an unrecoverable error.
20070       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20071 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20072       has_space=`$ECHO "$complete" | $GREP " "`
20073       if test "x$has_space" != x; then
20074         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20075 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20076       fi
20077       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20078     fi
20079   fi
20080 
20081   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20082   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20083   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20084   # "foo.exe" is OK but "foo" is an error.
20085   #
20086   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20087   # It is also a way to make sure we got the proper file name for the real test later on.
20088   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20089   if test "x$test_shortpath" = x; then
20090     # Short path failed, file does not exist as specified.
20091     # Try adding .exe or .cmd
20092     if test -f "${new_path}.exe"; then
20093       input_to_shortpath="${new_path}.exe"
20094     elif test -f "${new_path}.cmd"; then
20095       input_to_shortpath="${new_path}.cmd"
20096     else
20097       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20098 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20099       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20100 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20101       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20102     fi
20103   else
20104     input_to_shortpath="$new_path"
20105   fi
20106 
20107   # Call helper function which possibly converts this using DOS-style short mode.
20108   # If so, the updated path is stored in $new_path.
20109   new_path="$input_to_shortpath"
20110 
20111   input_path="$input_to_shortpath"
20112   # Check if we need to convert this using DOS-style short mode. If the path
20113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20114   # take no chances and rewrite it.
20115   # Note: m4 eats our [], so we need to use [ and ] instead.
20116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20117   if test "x$has_forbidden_chars" != x; then
20118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20119     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20120     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20121     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20122       # Going to short mode and back again did indeed matter. Since short mode is
20123       # case insensitive, let's make it lowercase to improve readability.
20124       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20125       # Now convert it back to Unix-style (cygpath)
20126       input_path=`$CYGPATH -u "$shortmode_path"`
20127       new_path="$input_path"
20128     fi
20129   fi
20130 
20131   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20132   if test "x$test_cygdrive_prefix" = x; then
20133     # As a simple fix, exclude /usr/bin since it's not a real path.
20134     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20135       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20136       # a path prefixed by /cygdrive for fixpath to work.
20137       new_path="$CYGWIN_ROOT_PATH$input_path"
20138     fi
20139   fi
20140 
20141   # remove trailing .exe if any
20142   new_path="${new_path/%.exe/}"
20143 
20144     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20145 
20146   # First separate the path from the arguments. This will split at the first
20147   # space.
20148   complete="$FOUND_MAKE"
20149   path="${complete%% *}"
20150   tmp="$complete EOL"
20151   arguments="${tmp#* }"
20152 
20153   # Input might be given as Windows format, start by converting to
20154   # unix format.
20155   new_path="$path"
20156 
20157   windows_path="$new_path"
20158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20159     unix_path=`$CYGPATH -u "$windows_path"`
20160     new_path="$unix_path"
20161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20163     new_path="$unix_path"
20164   fi
20165 
20166 
20167   # Now try to locate executable using which
20168   new_path=`$WHICH "$new_path" 2> /dev/null`
20169 
20170   if test "x$new_path" = x; then
20171     # Oops. Which didn't find the executable.
20172     # The splitting of arguments from the executable at a space might have been incorrect,
20173     # since paths with space are more likely in Windows. Give it another try with the whole
20174     # argument.
20175     path="$complete"
20176     arguments="EOL"
20177     new_path="$path"
20178 
20179   windows_path="$new_path"
20180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20181     unix_path=`$CYGPATH -u "$windows_path"`
20182     new_path="$unix_path"
20183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20185     new_path="$unix_path"
20186   fi
20187 
20188 
20189     new_path=`$WHICH "$new_path" 2> /dev/null`
20190     # bat and cmd files are not always considered executable in MSYS causing which
20191     # to not find them
20192     if test "x$new_path" = x \
20193         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20194         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20195       new_path="$path"
20196 
20197   windows_path="$new_path"
20198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20199     unix_path=`$CYGPATH -u "$windows_path"`
20200     new_path="$unix_path"
20201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20203     new_path="$unix_path"
20204   fi
20205 
20206     fi
20207 
20208     if test "x$new_path" = x; then
20209       # It's still not found. Now this is an unrecoverable error.
20210       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20211 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20212       has_space=`$ECHO "$complete" | $GREP " "`
20213       if test "x$has_space" != x; then
20214         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20215 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20216       fi
20217       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20218     fi
20219   fi
20220 
20221   # Now new_path has a complete unix path to the binary
20222   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20223     # Keep paths in /bin as-is, but remove trailing .exe if any
20224     new_path="${new_path/%.exe/}"
20225     # Do not save /bin paths to all_fixpath_prefixes!
20226   else
20227     # Not in mixed or Windows style, start by that.
20228     new_path=`cmd //c echo $new_path`
20229 
20230   input_path="$new_path"
20231   # Check if we need to convert this using DOS-style short mode. If the path
20232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20233   # take no chances and rewrite it.
20234   # Note: m4 eats our [], so we need to use [ and ] instead.
20235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20236   if test "x$has_forbidden_chars" != x; then
20237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20238     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20239   fi
20240 
20241     # Output is in $new_path
20242 
20243   windows_path="$new_path"
20244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20245     unix_path=`$CYGPATH -u "$windows_path"`
20246     new_path="$unix_path"
20247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20249     new_path="$unix_path"
20250   fi
20251 
20252     # remove trailing .exe if any
20253     new_path="${new_path/%.exe/}"
20254 
20255     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20256     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20257   fi
20258 
20259     else
20260       # We're on a unix platform. Hooray! :)
20261       # First separate the path from the arguments. This will split at the first
20262       # space.
20263       complete="$FOUND_MAKE"
20264       path="${complete%% *}"
20265       tmp="$complete EOL"
20266       arguments="${tmp#* }"
20267 
20268       # Cannot rely on the command "which" here since it doesn't always work.
20269       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20270       if test -z "$is_absolute_path"; then
20271         # Path to executable is not absolute. Find it.
20272         IFS_save="$IFS"
20273         IFS=:
20274         for p in $PATH; do
20275           if test -f "$p/$path" && test -x "$p/$path"; then
20276             new_path="$p/$path"
20277             break
20278           fi
20279         done
20280         IFS="$IFS_save"
20281       else
20282         # This is an absolute path, we can use it without further modifications.
20283         new_path="$path"
20284       fi
20285 
20286       if test "x$new_path" = x; then
20287         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20288 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20289         has_space=`$ECHO "$complete" | $GREP " "`
20290         if test "x$has_space" != x; then
20291           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20292 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20293         fi
20294         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20295       fi
20296     fi
20297 
20298     # Now join together the path and the arguments once again
20299     if test "x$arguments" != xEOL; then
20300       new_complete="$new_path ${arguments% *}"
20301     else
20302       new_complete="$new_path"
20303     fi
20304 
20305     if test "x$complete" != "x$new_complete"; then
20306       FOUND_MAKE="$new_complete"
20307       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20308 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20309     fi
20310   fi
20311 
20312         fi
20313       fi
20314     fi
20315   fi
20316 
20317     if test "x$FOUND_MAKE" = x; then
20318       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20319     fi
20320 
20321   fi
20322 
20323 
20324   MAKE=$FOUND_MAKE
20325 
20326   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20327 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20328 
20329 
20330   # Check if make supports the output sync option and if so, setup using it.
20331   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20332 $as_echo_n "checking if make --output-sync is supported... " >&6; }
20333   if $MAKE --version -O > /dev/null 2>&1; then
20334     OUTPUT_SYNC_SUPPORTED=true
20335     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20336 $as_echo "yes" >&6; }
20337     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20338 $as_echo_n "checking for output-sync value... " >&6; }
20339 
20340 # Check whether --with-output-sync was given.
20341 if test "${with_output_sync+set}" = set; then :
20342   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20343 fi
20344 
20345     if test "x$OUTPUT_SYNC" = "x"; then
20346       OUTPUT_SYNC=none
20347     fi
20348     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20349 $as_echo "$OUTPUT_SYNC" >&6; }
20350     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20351       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20352     fi
20353   else
20354     OUTPUT_SYNC_SUPPORTED=false
20355     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20356 $as_echo "no" >&6; }
20357   fi
20358 
20359 
20360 
20361 
20362 
20363 
20364   # Test if find supports -delete
20365   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20366 $as_echo_n "checking if find supports -delete... " >&6; }
20367   FIND_DELETE="-delete"
20368 
20369   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20370 
20371   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20372 
20373   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20374   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20375     # No, it does not.
20376     rm $DELETEDIR/TestIfFindSupportsDelete
20377     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20378       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20379       FIND_DELETE="-print | xargs rm"
20380     else
20381       FIND_DELETE="-exec rm \{\} \+"
20382     fi
20383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20384 $as_echo "no" >&6; }
20385   else
20386     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20387 $as_echo "yes" >&6; }
20388   fi
20389   rmdir $DELETEDIR
20390 
20391 
20392 
20393   # These tools might not be installed by default,
20394   # need hint on how to install them.
20395 
20396 
20397 
20398   # Publish this variable in the help.
20399 
20400 
20401   if [ -z "${UNZIP+x}" ]; then
20402     # The variable is not set by user, try to locate tool using the code snippet
20403     for ac_prog in unzip
20404 do
20405   # Extract the first word of "$ac_prog", so it can be a program name with args.
20406 set dummy $ac_prog; ac_word=$2
20407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20408 $as_echo_n "checking for $ac_word... " >&6; }
20409 if ${ac_cv_path_UNZIP+:} false; then :
20410   $as_echo_n "(cached) " >&6
20411 else
20412   case $UNZIP in
20413   [\\/]* | ?:[\\/]*)
20414   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20415   ;;
20416   *)
20417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20418 for as_dir in $PATH
20419 do
20420   IFS=$as_save_IFS
20421   test -z "$as_dir" && as_dir=.
20422     for ac_exec_ext in '' $ac_executable_extensions; do
20423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20424     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20426     break 2
20427   fi
20428 done
20429   done
20430 IFS=$as_save_IFS
20431 
20432   ;;
20433 esac
20434 fi
20435 UNZIP=$ac_cv_path_UNZIP
20436 if test -n "$UNZIP"; then
20437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20438 $as_echo "$UNZIP" >&6; }
20439 else
20440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20441 $as_echo "no" >&6; }
20442 fi
20443 
20444 
20445   test -n "$UNZIP" && break
20446 done
20447 
20448   else
20449     # The variable is set, but is it from the command line or the environment?
20450 
20451     # Try to remove the string !UNZIP! from our list.
20452     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20453     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20454       # If it failed, the variable was not from the command line. Ignore it,
20455       # but warn the user (except for BASH, which is always set by the calling BASH).
20456       if test "xUNZIP" != xBASH; then
20457         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20458 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20459       fi
20460       # Try to locate tool using the code snippet
20461       for ac_prog in unzip
20462 do
20463   # Extract the first word of "$ac_prog", so it can be a program name with args.
20464 set dummy $ac_prog; ac_word=$2
20465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20466 $as_echo_n "checking for $ac_word... " >&6; }
20467 if ${ac_cv_path_UNZIP+:} false; then :
20468   $as_echo_n "(cached) " >&6
20469 else
20470   case $UNZIP in
20471   [\\/]* | ?:[\\/]*)
20472   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20473   ;;
20474   *)
20475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20476 for as_dir in $PATH
20477 do
20478   IFS=$as_save_IFS
20479   test -z "$as_dir" && as_dir=.
20480     for ac_exec_ext in '' $ac_executable_extensions; do
20481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20482     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20484     break 2
20485   fi
20486 done
20487   done
20488 IFS=$as_save_IFS
20489 
20490   ;;
20491 esac
20492 fi
20493 UNZIP=$ac_cv_path_UNZIP
20494 if test -n "$UNZIP"; then
20495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20496 $as_echo "$UNZIP" >&6; }
20497 else
20498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20499 $as_echo "no" >&6; }
20500 fi
20501 
20502 
20503   test -n "$UNZIP" && break
20504 done
20505 
20506     else
20507       # If it succeeded, then it was overridden by the user. We will use it
20508       # for the tool.
20509 
20510       # First remove it from the list of overridden variables, so we can test
20511       # for unknown variables in the end.
20512       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20513 
20514       # Check if we try to supply an empty value
20515       if test "x$UNZIP" = x; then
20516         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20517 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20518         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20519 $as_echo_n "checking for UNZIP... " >&6; }
20520         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20521 $as_echo "disabled" >&6; }
20522       else
20523         # Check if the provided tool contains a complete path.
20524         tool_specified="$UNZIP"
20525         tool_basename="${tool_specified##*/}"
20526         if test "x$tool_basename" = "x$tool_specified"; then
20527           # A command without a complete path is provided, search $PATH.
20528           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20529 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20530           # Extract the first word of "$tool_basename", so it can be a program name with args.
20531 set dummy $tool_basename; ac_word=$2
20532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20533 $as_echo_n "checking for $ac_word... " >&6; }
20534 if ${ac_cv_path_UNZIP+:} false; then :
20535   $as_echo_n "(cached) " >&6
20536 else
20537   case $UNZIP in
20538   [\\/]* | ?:[\\/]*)
20539   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20540   ;;
20541   *)
20542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20543 for as_dir in $PATH
20544 do
20545   IFS=$as_save_IFS
20546   test -z "$as_dir" && as_dir=.
20547     for ac_exec_ext in '' $ac_executable_extensions; do
20548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20549     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20551     break 2
20552   fi
20553 done
20554   done
20555 IFS=$as_save_IFS
20556 
20557   ;;
20558 esac
20559 fi
20560 UNZIP=$ac_cv_path_UNZIP
20561 if test -n "$UNZIP"; then
20562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20563 $as_echo "$UNZIP" >&6; }
20564 else
20565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20566 $as_echo "no" >&6; }
20567 fi
20568 
20569 
20570           if test "x$UNZIP" = x; then
20571             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20572           fi
20573         else
20574           # Otherwise we believe it is a complete path. Use it as it is.
20575           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20576 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20577           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20578 $as_echo_n "checking for UNZIP... " >&6; }
20579           if test ! -x "$tool_specified"; then
20580             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20581 $as_echo "not found" >&6; }
20582             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20583           fi
20584           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20585 $as_echo "$tool_specified" >&6; }
20586         fi
20587       fi
20588     fi
20589 
20590   fi
20591 
20592 
20593 
20594   if test "x$UNZIP" = x; then
20595     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20596   fi
20597 
20598 
20599 
20600 
20601 
20602   # Publish this variable in the help.
20603 
20604 
20605   if [ -z "${ZIP+x}" ]; then
20606     # The variable is not set by user, try to locate tool using the code snippet
20607     for ac_prog in zip
20608 do
20609   # Extract the first word of "$ac_prog", so it can be a program name with args.
20610 set dummy $ac_prog; ac_word=$2
20611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20612 $as_echo_n "checking for $ac_word... " >&6; }
20613 if ${ac_cv_path_ZIP+:} false; then :
20614   $as_echo_n "(cached) " >&6
20615 else
20616   case $ZIP in
20617   [\\/]* | ?:[\\/]*)
20618   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20619   ;;
20620   *)
20621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20622 for as_dir in $PATH
20623 do
20624   IFS=$as_save_IFS
20625   test -z "$as_dir" && as_dir=.
20626     for ac_exec_ext in '' $ac_executable_extensions; do
20627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20628     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20630     break 2
20631   fi
20632 done
20633   done
20634 IFS=$as_save_IFS
20635 
20636   ;;
20637 esac
20638 fi
20639 ZIP=$ac_cv_path_ZIP
20640 if test -n "$ZIP"; then
20641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20642 $as_echo "$ZIP" >&6; }
20643 else
20644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20645 $as_echo "no" >&6; }
20646 fi
20647 
20648 
20649   test -n "$ZIP" && break
20650 done
20651 
20652   else
20653     # The variable is set, but is it from the command line or the environment?
20654 
20655     # Try to remove the string !ZIP! from our list.
20656     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20657     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20658       # If it failed, the variable was not from the command line. Ignore it,
20659       # but warn the user (except for BASH, which is always set by the calling BASH).
20660       if test "xZIP" != xBASH; then
20661         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20662 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20663       fi
20664       # Try to locate tool using the code snippet
20665       for ac_prog in zip
20666 do
20667   # Extract the first word of "$ac_prog", so it can be a program name with args.
20668 set dummy $ac_prog; ac_word=$2
20669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20670 $as_echo_n "checking for $ac_word... " >&6; }
20671 if ${ac_cv_path_ZIP+:} false; then :
20672   $as_echo_n "(cached) " >&6
20673 else
20674   case $ZIP in
20675   [\\/]* | ?:[\\/]*)
20676   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20677   ;;
20678   *)
20679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20680 for as_dir in $PATH
20681 do
20682   IFS=$as_save_IFS
20683   test -z "$as_dir" && as_dir=.
20684     for ac_exec_ext in '' $ac_executable_extensions; do
20685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20686     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20688     break 2
20689   fi
20690 done
20691   done
20692 IFS=$as_save_IFS
20693 
20694   ;;
20695 esac
20696 fi
20697 ZIP=$ac_cv_path_ZIP
20698 if test -n "$ZIP"; then
20699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20700 $as_echo "$ZIP" >&6; }
20701 else
20702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20703 $as_echo "no" >&6; }
20704 fi
20705 
20706 
20707   test -n "$ZIP" && break
20708 done
20709 
20710     else
20711       # If it succeeded, then it was overridden by the user. We will use it
20712       # for the tool.
20713 
20714       # First remove it from the list of overridden variables, so we can test
20715       # for unknown variables in the end.
20716       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20717 
20718       # Check if we try to supply an empty value
20719       if test "x$ZIP" = x; then
20720         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20721 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20722         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20723 $as_echo_n "checking for ZIP... " >&6; }
20724         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20725 $as_echo "disabled" >&6; }
20726       else
20727         # Check if the provided tool contains a complete path.
20728         tool_specified="$ZIP"
20729         tool_basename="${tool_specified##*/}"
20730         if test "x$tool_basename" = "x$tool_specified"; then
20731           # A command without a complete path is provided, search $PATH.
20732           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20733 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20734           # Extract the first word of "$tool_basename", so it can be a program name with args.
20735 set dummy $tool_basename; ac_word=$2
20736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20737 $as_echo_n "checking for $ac_word... " >&6; }
20738 if ${ac_cv_path_ZIP+:} false; then :
20739   $as_echo_n "(cached) " >&6
20740 else
20741   case $ZIP in
20742   [\\/]* | ?:[\\/]*)
20743   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20744   ;;
20745   *)
20746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20747 for as_dir in $PATH
20748 do
20749   IFS=$as_save_IFS
20750   test -z "$as_dir" && as_dir=.
20751     for ac_exec_ext in '' $ac_executable_extensions; do
20752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20753     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20755     break 2
20756   fi
20757 done
20758   done
20759 IFS=$as_save_IFS
20760 
20761   ;;
20762 esac
20763 fi
20764 ZIP=$ac_cv_path_ZIP
20765 if test -n "$ZIP"; then
20766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20767 $as_echo "$ZIP" >&6; }
20768 else
20769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20770 $as_echo "no" >&6; }
20771 fi
20772 
20773 
20774           if test "x$ZIP" = x; then
20775             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20776           fi
20777         else
20778           # Otherwise we believe it is a complete path. Use it as it is.
20779           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20780 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20781           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20782 $as_echo_n "checking for ZIP... " >&6; }
20783           if test ! -x "$tool_specified"; then
20784             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20785 $as_echo "not found" >&6; }
20786             as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20787           fi
20788           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20789 $as_echo "$tool_specified" >&6; }
20790         fi
20791       fi
20792     fi
20793 
20794   fi
20795 
20796 
20797 
20798   if test "x$ZIP" = x; then
20799     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20800   fi
20801 
20802 
20803 
20804   # Non-required basic tools
20805 
20806 
20807 
20808   # Publish this variable in the help.
20809 
20810 
20811   if [ -z "${LDD+x}" ]; then
20812     # The variable is not set by user, try to locate tool using the code snippet
20813     for ac_prog in ldd
20814 do
20815   # Extract the first word of "$ac_prog", so it can be a program name with args.
20816 set dummy $ac_prog; ac_word=$2
20817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20818 $as_echo_n "checking for $ac_word... " >&6; }
20819 if ${ac_cv_path_LDD+:} false; then :
20820   $as_echo_n "(cached) " >&6
20821 else
20822   case $LDD in
20823   [\\/]* | ?:[\\/]*)
20824   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20825   ;;
20826   *)
20827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20828 for as_dir in $PATH
20829 do
20830   IFS=$as_save_IFS
20831   test -z "$as_dir" && as_dir=.
20832     for ac_exec_ext in '' $ac_executable_extensions; do
20833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20834     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20836     break 2
20837   fi
20838 done
20839   done
20840 IFS=$as_save_IFS
20841 
20842   ;;
20843 esac
20844 fi
20845 LDD=$ac_cv_path_LDD
20846 if test -n "$LDD"; then
20847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20848 $as_echo "$LDD" >&6; }
20849 else
20850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20851 $as_echo "no" >&6; }
20852 fi
20853 
20854 
20855   test -n "$LDD" && break
20856 done
20857 
20858   else
20859     # The variable is set, but is it from the command line or the environment?
20860 
20861     # Try to remove the string !LDD! from our list.
20862     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20863     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20864       # If it failed, the variable was not from the command line. Ignore it,
20865       # but warn the user (except for BASH, which is always set by the calling BASH).
20866       if test "xLDD" != xBASH; then
20867         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20868 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20869       fi
20870       # Try to locate tool using the code snippet
20871       for ac_prog in ldd
20872 do
20873   # Extract the first word of "$ac_prog", so it can be a program name with args.
20874 set dummy $ac_prog; ac_word=$2
20875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20876 $as_echo_n "checking for $ac_word... " >&6; }
20877 if ${ac_cv_path_LDD+:} false; then :
20878   $as_echo_n "(cached) " >&6
20879 else
20880   case $LDD in
20881   [\\/]* | ?:[\\/]*)
20882   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20883   ;;
20884   *)
20885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20886 for as_dir in $PATH
20887 do
20888   IFS=$as_save_IFS
20889   test -z "$as_dir" && as_dir=.
20890     for ac_exec_ext in '' $ac_executable_extensions; do
20891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20892     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20894     break 2
20895   fi
20896 done
20897   done
20898 IFS=$as_save_IFS
20899 
20900   ;;
20901 esac
20902 fi
20903 LDD=$ac_cv_path_LDD
20904 if test -n "$LDD"; then
20905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20906 $as_echo "$LDD" >&6; }
20907 else
20908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20909 $as_echo "no" >&6; }
20910 fi
20911 
20912 
20913   test -n "$LDD" && break
20914 done
20915 
20916     else
20917       # If it succeeded, then it was overridden by the user. We will use it
20918       # for the tool.
20919 
20920       # First remove it from the list of overridden variables, so we can test
20921       # for unknown variables in the end.
20922       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20923 
20924       # Check if we try to supply an empty value
20925       if test "x$LDD" = x; then
20926         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20927 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20928         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20929 $as_echo_n "checking for LDD... " >&6; }
20930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20931 $as_echo "disabled" >&6; }
20932       else
20933         # Check if the provided tool contains a complete path.
20934         tool_specified="$LDD"
20935         tool_basename="${tool_specified##*/}"
20936         if test "x$tool_basename" = "x$tool_specified"; then
20937           # A command without a complete path is provided, search $PATH.
20938           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20939 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20940           # Extract the first word of "$tool_basename", so it can be a program name with args.
20941 set dummy $tool_basename; ac_word=$2
20942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20943 $as_echo_n "checking for $ac_word... " >&6; }
20944 if ${ac_cv_path_LDD+:} false; then :
20945   $as_echo_n "(cached) " >&6
20946 else
20947   case $LDD in
20948   [\\/]* | ?:[\\/]*)
20949   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20950   ;;
20951   *)
20952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20953 for as_dir in $PATH
20954 do
20955   IFS=$as_save_IFS
20956   test -z "$as_dir" && as_dir=.
20957     for ac_exec_ext in '' $ac_executable_extensions; do
20958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20959     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20961     break 2
20962   fi
20963 done
20964   done
20965 IFS=$as_save_IFS
20966 
20967   ;;
20968 esac
20969 fi
20970 LDD=$ac_cv_path_LDD
20971 if test -n "$LDD"; then
20972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20973 $as_echo "$LDD" >&6; }
20974 else
20975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20976 $as_echo "no" >&6; }
20977 fi
20978 
20979 
20980           if test "x$LDD" = x; then
20981             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20982           fi
20983         else
20984           # Otherwise we believe it is a complete path. Use it as it is.
20985           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20986 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20987           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20988 $as_echo_n "checking for LDD... " >&6; }
20989           if test ! -x "$tool_specified"; then
20990             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20991 $as_echo "not found" >&6; }
20992             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20993           fi
20994           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20995 $as_echo "$tool_specified" >&6; }
20996         fi
20997       fi
20998     fi
20999 
21000   fi
21001 
21002 
21003   if test "x$LDD" = "x"; then
21004     # List shared lib dependencies is used for
21005     # debug output and checking for forbidden dependencies.
21006     # We can build without it.
21007     LDD="true"
21008   fi
21009 
21010 
21011   # Publish this variable in the help.
21012 
21013 
21014   if [ -z "${OTOOL+x}" ]; then
21015     # The variable is not set by user, try to locate tool using the code snippet
21016     for ac_prog in otool
21017 do
21018   # Extract the first word of "$ac_prog", so it can be a program name with args.
21019 set dummy $ac_prog; ac_word=$2
21020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21021 $as_echo_n "checking for $ac_word... " >&6; }
21022 if ${ac_cv_path_OTOOL+:} false; then :
21023   $as_echo_n "(cached) " >&6
21024 else
21025   case $OTOOL in
21026   [\\/]* | ?:[\\/]*)
21027   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21028   ;;
21029   *)
21030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21031 for as_dir in $PATH
21032 do
21033   IFS=$as_save_IFS
21034   test -z "$as_dir" && as_dir=.
21035     for ac_exec_ext in '' $ac_executable_extensions; do
21036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21037     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21039     break 2
21040   fi
21041 done
21042   done
21043 IFS=$as_save_IFS
21044 
21045   ;;
21046 esac
21047 fi
21048 OTOOL=$ac_cv_path_OTOOL
21049 if test -n "$OTOOL"; then
21050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21051 $as_echo "$OTOOL" >&6; }
21052 else
21053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21054 $as_echo "no" >&6; }
21055 fi
21056 
21057 
21058   test -n "$OTOOL" && break
21059 done
21060 
21061   else
21062     # The variable is set, but is it from the command line or the environment?
21063 
21064     # Try to remove the string !OTOOL! from our list.
21065     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21066     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21067       # If it failed, the variable was not from the command line. Ignore it,
21068       # but warn the user (except for BASH, which is always set by the calling BASH).
21069       if test "xOTOOL" != xBASH; then
21070         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21071 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21072       fi
21073       # Try to locate tool using the code snippet
21074       for ac_prog in otool
21075 do
21076   # Extract the first word of "$ac_prog", so it can be a program name with args.
21077 set dummy $ac_prog; ac_word=$2
21078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21079 $as_echo_n "checking for $ac_word... " >&6; }
21080 if ${ac_cv_path_OTOOL+:} false; then :
21081   $as_echo_n "(cached) " >&6
21082 else
21083   case $OTOOL in
21084   [\\/]* | ?:[\\/]*)
21085   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21086   ;;
21087   *)
21088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21089 for as_dir in $PATH
21090 do
21091   IFS=$as_save_IFS
21092   test -z "$as_dir" && as_dir=.
21093     for ac_exec_ext in '' $ac_executable_extensions; do
21094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21095     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21097     break 2
21098   fi
21099 done
21100   done
21101 IFS=$as_save_IFS
21102 
21103   ;;
21104 esac
21105 fi
21106 OTOOL=$ac_cv_path_OTOOL
21107 if test -n "$OTOOL"; then
21108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21109 $as_echo "$OTOOL" >&6; }
21110 else
21111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21112 $as_echo "no" >&6; }
21113 fi
21114 
21115 
21116   test -n "$OTOOL" && break
21117 done
21118 
21119     else
21120       # If it succeeded, then it was overridden by the user. We will use it
21121       # for the tool.
21122 
21123       # First remove it from the list of overridden variables, so we can test
21124       # for unknown variables in the end.
21125       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21126 
21127       # Check if we try to supply an empty value
21128       if test "x$OTOOL" = x; then
21129         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21130 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21131         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21132 $as_echo_n "checking for OTOOL... " >&6; }
21133         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21134 $as_echo "disabled" >&6; }
21135       else
21136         # Check if the provided tool contains a complete path.
21137         tool_specified="$OTOOL"
21138         tool_basename="${tool_specified##*/}"
21139         if test "x$tool_basename" = "x$tool_specified"; then
21140           # A command without a complete path is provided, search $PATH.
21141           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21142 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21143           # Extract the first word of "$tool_basename", so it can be a program name with args.
21144 set dummy $tool_basename; ac_word=$2
21145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21146 $as_echo_n "checking for $ac_word... " >&6; }
21147 if ${ac_cv_path_OTOOL+:} false; then :
21148   $as_echo_n "(cached) " >&6
21149 else
21150   case $OTOOL in
21151   [\\/]* | ?:[\\/]*)
21152   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21153   ;;
21154   *)
21155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21156 for as_dir in $PATH
21157 do
21158   IFS=$as_save_IFS
21159   test -z "$as_dir" && as_dir=.
21160     for ac_exec_ext in '' $ac_executable_extensions; do
21161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21162     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21164     break 2
21165   fi
21166 done
21167   done
21168 IFS=$as_save_IFS
21169 
21170   ;;
21171 esac
21172 fi
21173 OTOOL=$ac_cv_path_OTOOL
21174 if test -n "$OTOOL"; then
21175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21176 $as_echo "$OTOOL" >&6; }
21177 else
21178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21179 $as_echo "no" >&6; }
21180 fi
21181 
21182 
21183           if test "x$OTOOL" = x; then
21184             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21185           fi
21186         else
21187           # Otherwise we believe it is a complete path. Use it as it is.
21188           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21189 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21190           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21191 $as_echo_n "checking for OTOOL... " >&6; }
21192           if test ! -x "$tool_specified"; then
21193             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21194 $as_echo "not found" >&6; }
21195             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21196           fi
21197           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21198 $as_echo "$tool_specified" >&6; }
21199         fi
21200       fi
21201     fi
21202 
21203   fi
21204 
21205 
21206   if test "x$OTOOL" = "x"; then
21207     OTOOL="true"
21208   fi
21209 
21210 
21211   # Publish this variable in the help.
21212 
21213 
21214   if [ -z "${READELF+x}" ]; then
21215     # The variable is not set by user, try to locate tool using the code snippet
21216     for ac_prog in greadelf readelf
21217 do
21218   # Extract the first word of "$ac_prog", so it can be a program name with args.
21219 set dummy $ac_prog; ac_word=$2
21220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21221 $as_echo_n "checking for $ac_word... " >&6; }
21222 if ${ac_cv_path_READELF+:} false; then :
21223   $as_echo_n "(cached) " >&6
21224 else
21225   case $READELF in
21226   [\\/]* | ?:[\\/]*)
21227   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21228   ;;
21229   *)
21230   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21231 for as_dir in $PATH
21232 do
21233   IFS=$as_save_IFS
21234   test -z "$as_dir" && as_dir=.
21235     for ac_exec_ext in '' $ac_executable_extensions; do
21236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21237     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21239     break 2
21240   fi
21241 done
21242   done
21243 IFS=$as_save_IFS
21244 
21245   ;;
21246 esac
21247 fi
21248 READELF=$ac_cv_path_READELF
21249 if test -n "$READELF"; then
21250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21251 $as_echo "$READELF" >&6; }
21252 else
21253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21254 $as_echo "no" >&6; }
21255 fi
21256 
21257 
21258   test -n "$READELF" && break
21259 done
21260 
21261   else
21262     # The variable is set, but is it from the command line or the environment?
21263 
21264     # Try to remove the string !READELF! from our list.
21265     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21266     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21267       # If it failed, the variable was not from the command line. Ignore it,
21268       # but warn the user (except for BASH, which is always set by the calling BASH).
21269       if test "xREADELF" != xBASH; then
21270         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21271 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21272       fi
21273       # Try to locate tool using the code snippet
21274       for ac_prog in greadelf readelf
21275 do
21276   # Extract the first word of "$ac_prog", so it can be a program name with args.
21277 set dummy $ac_prog; ac_word=$2
21278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21279 $as_echo_n "checking for $ac_word... " >&6; }
21280 if ${ac_cv_path_READELF+:} false; then :
21281   $as_echo_n "(cached) " >&6
21282 else
21283   case $READELF in
21284   [\\/]* | ?:[\\/]*)
21285   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21286   ;;
21287   *)
21288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21289 for as_dir in $PATH
21290 do
21291   IFS=$as_save_IFS
21292   test -z "$as_dir" && as_dir=.
21293     for ac_exec_ext in '' $ac_executable_extensions; do
21294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21295     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21297     break 2
21298   fi
21299 done
21300   done
21301 IFS=$as_save_IFS
21302 
21303   ;;
21304 esac
21305 fi
21306 READELF=$ac_cv_path_READELF
21307 if test -n "$READELF"; then
21308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21309 $as_echo "$READELF" >&6; }
21310 else
21311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21312 $as_echo "no" >&6; }
21313 fi
21314 
21315 
21316   test -n "$READELF" && break
21317 done
21318 
21319     else
21320       # If it succeeded, then it was overridden by the user. We will use it
21321       # for the tool.
21322 
21323       # First remove it from the list of overridden variables, so we can test
21324       # for unknown variables in the end.
21325       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21326 
21327       # Check if we try to supply an empty value
21328       if test "x$READELF" = x; then
21329         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21330 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21332 $as_echo_n "checking for READELF... " >&6; }
21333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21334 $as_echo "disabled" >&6; }
21335       else
21336         # Check if the provided tool contains a complete path.
21337         tool_specified="$READELF"
21338         tool_basename="${tool_specified##*/}"
21339         if test "x$tool_basename" = "x$tool_specified"; then
21340           # A command without a complete path is provided, search $PATH.
21341           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21342 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21343           # Extract the first word of "$tool_basename", so it can be a program name with args.
21344 set dummy $tool_basename; ac_word=$2
21345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21346 $as_echo_n "checking for $ac_word... " >&6; }
21347 if ${ac_cv_path_READELF+:} false; then :
21348   $as_echo_n "(cached) " >&6
21349 else
21350   case $READELF in
21351   [\\/]* | ?:[\\/]*)
21352   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21353   ;;
21354   *)
21355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21356 for as_dir in $PATH
21357 do
21358   IFS=$as_save_IFS
21359   test -z "$as_dir" && as_dir=.
21360     for ac_exec_ext in '' $ac_executable_extensions; do
21361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21362     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21364     break 2
21365   fi
21366 done
21367   done
21368 IFS=$as_save_IFS
21369 
21370   ;;
21371 esac
21372 fi
21373 READELF=$ac_cv_path_READELF
21374 if test -n "$READELF"; then
21375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21376 $as_echo "$READELF" >&6; }
21377 else
21378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21379 $as_echo "no" >&6; }
21380 fi
21381 
21382 
21383           if test "x$READELF" = x; then
21384             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21385           fi
21386         else
21387           # Otherwise we believe it is a complete path. Use it as it is.
21388           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21389 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21390           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21391 $as_echo_n "checking for READELF... " >&6; }
21392           if test ! -x "$tool_specified"; then
21393             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21394 $as_echo "not found" >&6; }
21395             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21396           fi
21397           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21398 $as_echo "$tool_specified" >&6; }
21399         fi
21400       fi
21401     fi
21402 
21403   fi
21404 
21405 
21406 
21407 
21408   # Publish this variable in the help.
21409 
21410 
21411   if [ -z "${HG+x}" ]; then
21412     # The variable is not set by user, try to locate tool using the code snippet
21413     for ac_prog in hg
21414 do
21415   # Extract the first word of "$ac_prog", so it can be a program name with args.
21416 set dummy $ac_prog; ac_word=$2
21417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21418 $as_echo_n "checking for $ac_word... " >&6; }
21419 if ${ac_cv_path_HG+:} false; then :
21420   $as_echo_n "(cached) " >&6
21421 else
21422   case $HG in
21423   [\\/]* | ?:[\\/]*)
21424   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21425   ;;
21426   *)
21427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21428 for as_dir in $PATH
21429 do
21430   IFS=$as_save_IFS
21431   test -z "$as_dir" && as_dir=.
21432     for ac_exec_ext in '' $ac_executable_extensions; do
21433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21434     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21436     break 2
21437   fi
21438 done
21439   done
21440 IFS=$as_save_IFS
21441 
21442   ;;
21443 esac
21444 fi
21445 HG=$ac_cv_path_HG
21446 if test -n "$HG"; then
21447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21448 $as_echo "$HG" >&6; }
21449 else
21450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21451 $as_echo "no" >&6; }
21452 fi
21453 
21454 
21455   test -n "$HG" && break
21456 done
21457 
21458   else
21459     # The variable is set, but is it from the command line or the environment?
21460 
21461     # Try to remove the string !HG! from our list.
21462     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21463     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21464       # If it failed, the variable was not from the command line. Ignore it,
21465       # but warn the user (except for BASH, which is always set by the calling BASH).
21466       if test "xHG" != xBASH; then
21467         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21468 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21469       fi
21470       # Try to locate tool using the code snippet
21471       for ac_prog in hg
21472 do
21473   # Extract the first word of "$ac_prog", so it can be a program name with args.
21474 set dummy $ac_prog; ac_word=$2
21475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21476 $as_echo_n "checking for $ac_word... " >&6; }
21477 if ${ac_cv_path_HG+:} false; then :
21478   $as_echo_n "(cached) " >&6
21479 else
21480   case $HG in
21481   [\\/]* | ?:[\\/]*)
21482   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21483   ;;
21484   *)
21485   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21486 for as_dir in $PATH
21487 do
21488   IFS=$as_save_IFS
21489   test -z "$as_dir" && as_dir=.
21490     for ac_exec_ext in '' $ac_executable_extensions; do
21491   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21492     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21494     break 2
21495   fi
21496 done
21497   done
21498 IFS=$as_save_IFS
21499 
21500   ;;
21501 esac
21502 fi
21503 HG=$ac_cv_path_HG
21504 if test -n "$HG"; then
21505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21506 $as_echo "$HG" >&6; }
21507 else
21508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21509 $as_echo "no" >&6; }
21510 fi
21511 
21512 
21513   test -n "$HG" && break
21514 done
21515 
21516     else
21517       # If it succeeded, then it was overridden by the user. We will use it
21518       # for the tool.
21519 
21520       # First remove it from the list of overridden variables, so we can test
21521       # for unknown variables in the end.
21522       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21523 
21524       # Check if we try to supply an empty value
21525       if test "x$HG" = x; then
21526         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21527 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21528         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21529 $as_echo_n "checking for HG... " >&6; }
21530         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21531 $as_echo "disabled" >&6; }
21532       else
21533         # Check if the provided tool contains a complete path.
21534         tool_specified="$HG"
21535         tool_basename="${tool_specified##*/}"
21536         if test "x$tool_basename" = "x$tool_specified"; then
21537           # A command without a complete path is provided, search $PATH.
21538           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21539 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21540           # Extract the first word of "$tool_basename", so it can be a program name with args.
21541 set dummy $tool_basename; ac_word=$2
21542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21543 $as_echo_n "checking for $ac_word... " >&6; }
21544 if ${ac_cv_path_HG+:} false; then :
21545   $as_echo_n "(cached) " >&6
21546 else
21547   case $HG in
21548   [\\/]* | ?:[\\/]*)
21549   ac_cv_path_HG="$HG" # Let the user override the test with a path.
21550   ;;
21551   *)
21552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21553 for as_dir in $PATH
21554 do
21555   IFS=$as_save_IFS
21556   test -z "$as_dir" && as_dir=.
21557     for ac_exec_ext in '' $ac_executable_extensions; do
21558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21559     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21561     break 2
21562   fi
21563 done
21564   done
21565 IFS=$as_save_IFS
21566 
21567   ;;
21568 esac
21569 fi
21570 HG=$ac_cv_path_HG
21571 if test -n "$HG"; then
21572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21573 $as_echo "$HG" >&6; }
21574 else
21575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21576 $as_echo "no" >&6; }
21577 fi
21578 
21579 
21580           if test "x$HG" = x; then
21581             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21582           fi
21583         else
21584           # Otherwise we believe it is a complete path. Use it as it is.
21585           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21586 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21587           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21588 $as_echo_n "checking for HG... " >&6; }
21589           if test ! -x "$tool_specified"; then
21590             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21591 $as_echo "not found" >&6; }
21592             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21593           fi
21594           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21595 $as_echo "$tool_specified" >&6; }
21596         fi
21597       fi
21598     fi
21599 
21600   fi
21601 
21602 
21603 
21604 
21605   # Publish this variable in the help.
21606 
21607 
21608   if [ -z "${STAT+x}" ]; then
21609     # The variable is not set by user, try to locate tool using the code snippet
21610     for ac_prog in stat
21611 do
21612   # Extract the first word of "$ac_prog", so it can be a program name with args.
21613 set dummy $ac_prog; ac_word=$2
21614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21615 $as_echo_n "checking for $ac_word... " >&6; }
21616 if ${ac_cv_path_STAT+:} false; then :
21617   $as_echo_n "(cached) " >&6
21618 else
21619   case $STAT in
21620   [\\/]* | ?:[\\/]*)
21621   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21622   ;;
21623   *)
21624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21625 for as_dir in $PATH
21626 do
21627   IFS=$as_save_IFS
21628   test -z "$as_dir" && as_dir=.
21629     for ac_exec_ext in '' $ac_executable_extensions; do
21630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21631     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21633     break 2
21634   fi
21635 done
21636   done
21637 IFS=$as_save_IFS
21638 
21639   ;;
21640 esac
21641 fi
21642 STAT=$ac_cv_path_STAT
21643 if test -n "$STAT"; then
21644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21645 $as_echo "$STAT" >&6; }
21646 else
21647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21648 $as_echo "no" >&6; }
21649 fi
21650 
21651 
21652   test -n "$STAT" && break
21653 done
21654 
21655   else
21656     # The variable is set, but is it from the command line or the environment?
21657 
21658     # Try to remove the string !STAT! from our list.
21659     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21660     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21661       # If it failed, the variable was not from the command line. Ignore it,
21662       # but warn the user (except for BASH, which is always set by the calling BASH).
21663       if test "xSTAT" != xBASH; then
21664         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21665 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21666       fi
21667       # Try to locate tool using the code snippet
21668       for ac_prog in stat
21669 do
21670   # Extract the first word of "$ac_prog", so it can be a program name with args.
21671 set dummy $ac_prog; ac_word=$2
21672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21673 $as_echo_n "checking for $ac_word... " >&6; }
21674 if ${ac_cv_path_STAT+:} false; then :
21675   $as_echo_n "(cached) " >&6
21676 else
21677   case $STAT in
21678   [\\/]* | ?:[\\/]*)
21679   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21680   ;;
21681   *)
21682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21683 for as_dir in $PATH
21684 do
21685   IFS=$as_save_IFS
21686   test -z "$as_dir" && as_dir=.
21687     for ac_exec_ext in '' $ac_executable_extensions; do
21688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21689     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21691     break 2
21692   fi
21693 done
21694   done
21695 IFS=$as_save_IFS
21696 
21697   ;;
21698 esac
21699 fi
21700 STAT=$ac_cv_path_STAT
21701 if test -n "$STAT"; then
21702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21703 $as_echo "$STAT" >&6; }
21704 else
21705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21706 $as_echo "no" >&6; }
21707 fi
21708 
21709 
21710   test -n "$STAT" && break
21711 done
21712 
21713     else
21714       # If it succeeded, then it was overridden by the user. We will use it
21715       # for the tool.
21716 
21717       # First remove it from the list of overridden variables, so we can test
21718       # for unknown variables in the end.
21719       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21720 
21721       # Check if we try to supply an empty value
21722       if test "x$STAT" = x; then
21723         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21724 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21726 $as_echo_n "checking for STAT... " >&6; }
21727         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21728 $as_echo "disabled" >&6; }
21729       else
21730         # Check if the provided tool contains a complete path.
21731         tool_specified="$STAT"
21732         tool_basename="${tool_specified##*/}"
21733         if test "x$tool_basename" = "x$tool_specified"; then
21734           # A command without a complete path is provided, search $PATH.
21735           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21736 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21737           # Extract the first word of "$tool_basename", so it can be a program name with args.
21738 set dummy $tool_basename; ac_word=$2
21739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21740 $as_echo_n "checking for $ac_word... " >&6; }
21741 if ${ac_cv_path_STAT+:} false; then :
21742   $as_echo_n "(cached) " >&6
21743 else
21744   case $STAT in
21745   [\\/]* | ?:[\\/]*)
21746   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21747   ;;
21748   *)
21749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21750 for as_dir in $PATH
21751 do
21752   IFS=$as_save_IFS
21753   test -z "$as_dir" && as_dir=.
21754     for ac_exec_ext in '' $ac_executable_extensions; do
21755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21756     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21758     break 2
21759   fi
21760 done
21761   done
21762 IFS=$as_save_IFS
21763 
21764   ;;
21765 esac
21766 fi
21767 STAT=$ac_cv_path_STAT
21768 if test -n "$STAT"; then
21769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21770 $as_echo "$STAT" >&6; }
21771 else
21772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21773 $as_echo "no" >&6; }
21774 fi
21775 
21776 
21777           if test "x$STAT" = x; then
21778             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21779           fi
21780         else
21781           # Otherwise we believe it is a complete path. Use it as it is.
21782           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21783 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21784           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21785 $as_echo_n "checking for STAT... " >&6; }
21786           if test ! -x "$tool_specified"; then
21787             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21788 $as_echo "not found" >&6; }
21789             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21790           fi
21791           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21792 $as_echo "$tool_specified" >&6; }
21793         fi
21794       fi
21795     fi
21796 
21797   fi
21798 
21799 
21800 
21801 
21802   # Publish this variable in the help.
21803 
21804 
21805   if [ -z "${TIME+x}" ]; then
21806     # The variable is not set by user, try to locate tool using the code snippet
21807     for ac_prog in time
21808 do
21809   # Extract the first word of "$ac_prog", so it can be a program name with args.
21810 set dummy $ac_prog; ac_word=$2
21811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21812 $as_echo_n "checking for $ac_word... " >&6; }
21813 if ${ac_cv_path_TIME+:} false; then :
21814   $as_echo_n "(cached) " >&6
21815 else
21816   case $TIME in
21817   [\\/]* | ?:[\\/]*)
21818   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21819   ;;
21820   *)
21821   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21822 for as_dir in $PATH
21823 do
21824   IFS=$as_save_IFS
21825   test -z "$as_dir" && as_dir=.
21826     for ac_exec_ext in '' $ac_executable_extensions; do
21827   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21828     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21829     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21830     break 2
21831   fi
21832 done
21833   done
21834 IFS=$as_save_IFS
21835 
21836   ;;
21837 esac
21838 fi
21839 TIME=$ac_cv_path_TIME
21840 if test -n "$TIME"; then
21841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21842 $as_echo "$TIME" >&6; }
21843 else
21844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21845 $as_echo "no" >&6; }
21846 fi
21847 
21848 
21849   test -n "$TIME" && break
21850 done
21851 
21852   else
21853     # The variable is set, but is it from the command line or the environment?
21854 
21855     # Try to remove the string !TIME! from our list.
21856     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21857     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21858       # If it failed, the variable was not from the command line. Ignore it,
21859       # but warn the user (except for BASH, which is always set by the calling BASH).
21860       if test "xTIME" != xBASH; then
21861         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21862 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21863       fi
21864       # Try to locate tool using the code snippet
21865       for ac_prog in time
21866 do
21867   # Extract the first word of "$ac_prog", so it can be a program name with args.
21868 set dummy $ac_prog; ac_word=$2
21869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21870 $as_echo_n "checking for $ac_word... " >&6; }
21871 if ${ac_cv_path_TIME+:} false; then :
21872   $as_echo_n "(cached) " >&6
21873 else
21874   case $TIME in
21875   [\\/]* | ?:[\\/]*)
21876   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21877   ;;
21878   *)
21879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21880 for as_dir in $PATH
21881 do
21882   IFS=$as_save_IFS
21883   test -z "$as_dir" && as_dir=.
21884     for ac_exec_ext in '' $ac_executable_extensions; do
21885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21886     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21888     break 2
21889   fi
21890 done
21891   done
21892 IFS=$as_save_IFS
21893 
21894   ;;
21895 esac
21896 fi
21897 TIME=$ac_cv_path_TIME
21898 if test -n "$TIME"; then
21899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21900 $as_echo "$TIME" >&6; }
21901 else
21902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21903 $as_echo "no" >&6; }
21904 fi
21905 
21906 
21907   test -n "$TIME" && break
21908 done
21909 
21910     else
21911       # If it succeeded, then it was overridden by the user. We will use it
21912       # for the tool.
21913 
21914       # First remove it from the list of overridden variables, so we can test
21915       # for unknown variables in the end.
21916       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21917 
21918       # Check if we try to supply an empty value
21919       if test "x$TIME" = x; then
21920         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21921 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21922         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21923 $as_echo_n "checking for TIME... " >&6; }
21924         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21925 $as_echo "disabled" >&6; }
21926       else
21927         # Check if the provided tool contains a complete path.
21928         tool_specified="$TIME"
21929         tool_basename="${tool_specified##*/}"
21930         if test "x$tool_basename" = "x$tool_specified"; then
21931           # A command without a complete path is provided, search $PATH.
21932           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21933 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21934           # Extract the first word of "$tool_basename", so it can be a program name with args.
21935 set dummy $tool_basename; ac_word=$2
21936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21937 $as_echo_n "checking for $ac_word... " >&6; }
21938 if ${ac_cv_path_TIME+:} false; then :
21939   $as_echo_n "(cached) " >&6
21940 else
21941   case $TIME in
21942   [\\/]* | ?:[\\/]*)
21943   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21944   ;;
21945   *)
21946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21947 for as_dir in $PATH
21948 do
21949   IFS=$as_save_IFS
21950   test -z "$as_dir" && as_dir=.
21951     for ac_exec_ext in '' $ac_executable_extensions; do
21952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21953     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21955     break 2
21956   fi
21957 done
21958   done
21959 IFS=$as_save_IFS
21960 
21961   ;;
21962 esac
21963 fi
21964 TIME=$ac_cv_path_TIME
21965 if test -n "$TIME"; then
21966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21967 $as_echo "$TIME" >&6; }
21968 else
21969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21970 $as_echo "no" >&6; }
21971 fi
21972 
21973 
21974           if test "x$TIME" = x; then
21975             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21976           fi
21977         else
21978           # Otherwise we believe it is a complete path. Use it as it is.
21979           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21980 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21981           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21982 $as_echo_n "checking for TIME... " >&6; }
21983           if test ! -x "$tool_specified"; then
21984             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21985 $as_echo "not found" >&6; }
21986             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21987           fi
21988           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21989 $as_echo "$tool_specified" >&6; }
21990         fi
21991       fi
21992     fi
21993 
21994   fi
21995 
21996 
21997 
21998 
21999   # Publish this variable in the help.
22000 
22001 
22002   if [ -z "${PATCH+x}" ]; then
22003     # The variable is not set by user, try to locate tool using the code snippet
22004     for ac_prog in gpatch patch
22005 do
22006   # Extract the first word of "$ac_prog", so it can be a program name with args.
22007 set dummy $ac_prog; ac_word=$2
22008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22009 $as_echo_n "checking for $ac_word... " >&6; }
22010 if ${ac_cv_path_PATCH+:} false; then :
22011   $as_echo_n "(cached) " >&6
22012 else
22013   case $PATCH in
22014   [\\/]* | ?:[\\/]*)
22015   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22016   ;;
22017   *)
22018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22019 for as_dir in $PATH
22020 do
22021   IFS=$as_save_IFS
22022   test -z "$as_dir" && as_dir=.
22023     for ac_exec_ext in '' $ac_executable_extensions; do
22024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22025     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22027     break 2
22028   fi
22029 done
22030   done
22031 IFS=$as_save_IFS
22032 
22033   ;;
22034 esac
22035 fi
22036 PATCH=$ac_cv_path_PATCH
22037 if test -n "$PATCH"; then
22038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22039 $as_echo "$PATCH" >&6; }
22040 else
22041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22042 $as_echo "no" >&6; }
22043 fi
22044 
22045 
22046   test -n "$PATCH" && break
22047 done
22048 
22049   else
22050     # The variable is set, but is it from the command line or the environment?
22051 
22052     # Try to remove the string !PATCH! from our list.
22053     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22054     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22055       # If it failed, the variable was not from the command line. Ignore it,
22056       # but warn the user (except for BASH, which is always set by the calling BASH).
22057       if test "xPATCH" != xBASH; then
22058         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22059 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22060       fi
22061       # Try to locate tool using the code snippet
22062       for ac_prog in gpatch patch
22063 do
22064   # Extract the first word of "$ac_prog", so it can be a program name with args.
22065 set dummy $ac_prog; ac_word=$2
22066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22067 $as_echo_n "checking for $ac_word... " >&6; }
22068 if ${ac_cv_path_PATCH+:} false; then :
22069   $as_echo_n "(cached) " >&6
22070 else
22071   case $PATCH in
22072   [\\/]* | ?:[\\/]*)
22073   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22074   ;;
22075   *)
22076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22077 for as_dir in $PATH
22078 do
22079   IFS=$as_save_IFS
22080   test -z "$as_dir" && as_dir=.
22081     for ac_exec_ext in '' $ac_executable_extensions; do
22082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22083     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22085     break 2
22086   fi
22087 done
22088   done
22089 IFS=$as_save_IFS
22090 
22091   ;;
22092 esac
22093 fi
22094 PATCH=$ac_cv_path_PATCH
22095 if test -n "$PATCH"; then
22096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22097 $as_echo "$PATCH" >&6; }
22098 else
22099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22100 $as_echo "no" >&6; }
22101 fi
22102 
22103 
22104   test -n "$PATCH" && break
22105 done
22106 
22107     else
22108       # If it succeeded, then it was overridden by the user. We will use it
22109       # for the tool.
22110 
22111       # First remove it from the list of overridden variables, so we can test
22112       # for unknown variables in the end.
22113       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22114 
22115       # Check if we try to supply an empty value
22116       if test "x$PATCH" = x; then
22117         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22118 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22119         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22120 $as_echo_n "checking for PATCH... " >&6; }
22121         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22122 $as_echo "disabled" >&6; }
22123       else
22124         # Check if the provided tool contains a complete path.
22125         tool_specified="$PATCH"
22126         tool_basename="${tool_specified##*/}"
22127         if test "x$tool_basename" = "x$tool_specified"; then
22128           # A command without a complete path is provided, search $PATH.
22129           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22130 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22131           # Extract the first word of "$tool_basename", so it can be a program name with args.
22132 set dummy $tool_basename; ac_word=$2
22133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22134 $as_echo_n "checking for $ac_word... " >&6; }
22135 if ${ac_cv_path_PATCH+:} false; then :
22136   $as_echo_n "(cached) " >&6
22137 else
22138   case $PATCH in
22139   [\\/]* | ?:[\\/]*)
22140   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22141   ;;
22142   *)
22143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22144 for as_dir in $PATH
22145 do
22146   IFS=$as_save_IFS
22147   test -z "$as_dir" && as_dir=.
22148     for ac_exec_ext in '' $ac_executable_extensions; do
22149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22150     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22152     break 2
22153   fi
22154 done
22155   done
22156 IFS=$as_save_IFS
22157 
22158   ;;
22159 esac
22160 fi
22161 PATCH=$ac_cv_path_PATCH
22162 if test -n "$PATCH"; then
22163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22164 $as_echo "$PATCH" >&6; }
22165 else
22166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22167 $as_echo "no" >&6; }
22168 fi
22169 
22170 
22171           if test "x$PATCH" = x; then
22172             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22173           fi
22174         else
22175           # Otherwise we believe it is a complete path. Use it as it is.
22176           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22177 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22178           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22179 $as_echo_n "checking for PATCH... " >&6; }
22180           if test ! -x "$tool_specified"; then
22181             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22182 $as_echo "not found" >&6; }
22183             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22184           fi
22185           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22186 $as_echo "$tool_specified" >&6; }
22187         fi
22188       fi
22189     fi
22190 
22191   fi
22192 
22193 
22194   # Check if it's GNU time
22195   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22196   if test "x$IS_GNU_TIME" != x; then
22197     IS_GNU_TIME=yes
22198   else
22199     IS_GNU_TIME=no
22200   fi
22201 
22202 
22203   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22204 
22205 
22206 
22207   # Publish this variable in the help.
22208 
22209 
22210   if [ -z "${DSYMUTIL+x}" ]; then
22211     # The variable is not set by user, try to locate tool using the code snippet
22212     for ac_prog in dsymutil
22213 do
22214   # Extract the first word of "$ac_prog", so it can be a program name with args.
22215 set dummy $ac_prog; ac_word=$2
22216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22217 $as_echo_n "checking for $ac_word... " >&6; }
22218 if ${ac_cv_path_DSYMUTIL+:} false; then :
22219   $as_echo_n "(cached) " >&6
22220 else
22221   case $DSYMUTIL in
22222   [\\/]* | ?:[\\/]*)
22223   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22224   ;;
22225   *)
22226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22227 for as_dir in $PATH
22228 do
22229   IFS=$as_save_IFS
22230   test -z "$as_dir" && as_dir=.
22231     for ac_exec_ext in '' $ac_executable_extensions; do
22232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22233     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22235     break 2
22236   fi
22237 done
22238   done
22239 IFS=$as_save_IFS
22240 
22241   ;;
22242 esac
22243 fi
22244 DSYMUTIL=$ac_cv_path_DSYMUTIL
22245 if test -n "$DSYMUTIL"; then
22246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22247 $as_echo "$DSYMUTIL" >&6; }
22248 else
22249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22250 $as_echo "no" >&6; }
22251 fi
22252 
22253 
22254   test -n "$DSYMUTIL" && break
22255 done
22256 
22257   else
22258     # The variable is set, but is it from the command line or the environment?
22259 
22260     # Try to remove the string !DSYMUTIL! from our list.
22261     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22262     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22263       # If it failed, the variable was not from the command line. Ignore it,
22264       # but warn the user (except for BASH, which is always set by the calling BASH).
22265       if test "xDSYMUTIL" != xBASH; then
22266         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22267 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22268       fi
22269       # Try to locate tool using the code snippet
22270       for ac_prog in dsymutil
22271 do
22272   # Extract the first word of "$ac_prog", so it can be a program name with args.
22273 set dummy $ac_prog; ac_word=$2
22274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22275 $as_echo_n "checking for $ac_word... " >&6; }
22276 if ${ac_cv_path_DSYMUTIL+:} false; then :
22277   $as_echo_n "(cached) " >&6
22278 else
22279   case $DSYMUTIL in
22280   [\\/]* | ?:[\\/]*)
22281   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22282   ;;
22283   *)
22284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22285 for as_dir in $PATH
22286 do
22287   IFS=$as_save_IFS
22288   test -z "$as_dir" && as_dir=.
22289     for ac_exec_ext in '' $ac_executable_extensions; do
22290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22291     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22293     break 2
22294   fi
22295 done
22296   done
22297 IFS=$as_save_IFS
22298 
22299   ;;
22300 esac
22301 fi
22302 DSYMUTIL=$ac_cv_path_DSYMUTIL
22303 if test -n "$DSYMUTIL"; then
22304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22305 $as_echo "$DSYMUTIL" >&6; }
22306 else
22307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22308 $as_echo "no" >&6; }
22309 fi
22310 
22311 
22312   test -n "$DSYMUTIL" && break
22313 done
22314 
22315     else
22316       # If it succeeded, then it was overridden by the user. We will use it
22317       # for the tool.
22318 
22319       # First remove it from the list of overridden variables, so we can test
22320       # for unknown variables in the end.
22321       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22322 
22323       # Check if we try to supply an empty value
22324       if test "x$DSYMUTIL" = x; then
22325         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22326 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22327         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22328 $as_echo_n "checking for DSYMUTIL... " >&6; }
22329         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22330 $as_echo "disabled" >&6; }
22331       else
22332         # Check if the provided tool contains a complete path.
22333         tool_specified="$DSYMUTIL"
22334         tool_basename="${tool_specified##*/}"
22335         if test "x$tool_basename" = "x$tool_specified"; then
22336           # A command without a complete path is provided, search $PATH.
22337           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22338 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22339           # Extract the first word of "$tool_basename", so it can be a program name with args.
22340 set dummy $tool_basename; ac_word=$2
22341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22342 $as_echo_n "checking for $ac_word... " >&6; }
22343 if ${ac_cv_path_DSYMUTIL+:} false; then :
22344   $as_echo_n "(cached) " >&6
22345 else
22346   case $DSYMUTIL in
22347   [\\/]* | ?:[\\/]*)
22348   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22349   ;;
22350   *)
22351   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22352 for as_dir in $PATH
22353 do
22354   IFS=$as_save_IFS
22355   test -z "$as_dir" && as_dir=.
22356     for ac_exec_ext in '' $ac_executable_extensions; do
22357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22358     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22360     break 2
22361   fi
22362 done
22363   done
22364 IFS=$as_save_IFS
22365 
22366   ;;
22367 esac
22368 fi
22369 DSYMUTIL=$ac_cv_path_DSYMUTIL
22370 if test -n "$DSYMUTIL"; then
22371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22372 $as_echo "$DSYMUTIL" >&6; }
22373 else
22374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22375 $as_echo "no" >&6; }
22376 fi
22377 
22378 
22379           if test "x$DSYMUTIL" = x; then
22380             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22381           fi
22382         else
22383           # Otherwise we believe it is a complete path. Use it as it is.
22384           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22385 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22386           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22387 $as_echo_n "checking for DSYMUTIL... " >&6; }
22388           if test ! -x "$tool_specified"; then
22389             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22390 $as_echo "not found" >&6; }
22391             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22392           fi
22393           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22394 $as_echo "$tool_specified" >&6; }
22395         fi
22396       fi
22397     fi
22398 
22399   fi
22400 
22401 
22402 
22403   if test "x$DSYMUTIL" = x; then
22404     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22405   fi
22406 
22407 
22408 
22409 
22410 
22411   # Publish this variable in the help.
22412 
22413 
22414   if [ -z "${XATTR+x}" ]; then
22415     # The variable is not set by user, try to locate tool using the code snippet
22416     for ac_prog in xattr
22417 do
22418   # Extract the first word of "$ac_prog", so it can be a program name with args.
22419 set dummy $ac_prog; ac_word=$2
22420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22421 $as_echo_n "checking for $ac_word... " >&6; }
22422 if ${ac_cv_path_XATTR+:} false; then :
22423   $as_echo_n "(cached) " >&6
22424 else
22425   case $XATTR in
22426   [\\/]* | ?:[\\/]*)
22427   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22428   ;;
22429   *)
22430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22431 for as_dir in $PATH
22432 do
22433   IFS=$as_save_IFS
22434   test -z "$as_dir" && as_dir=.
22435     for ac_exec_ext in '' $ac_executable_extensions; do
22436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22437     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22439     break 2
22440   fi
22441 done
22442   done
22443 IFS=$as_save_IFS
22444 
22445   ;;
22446 esac
22447 fi
22448 XATTR=$ac_cv_path_XATTR
22449 if test -n "$XATTR"; then
22450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22451 $as_echo "$XATTR" >&6; }
22452 else
22453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22454 $as_echo "no" >&6; }
22455 fi
22456 
22457 
22458   test -n "$XATTR" && break
22459 done
22460 
22461   else
22462     # The variable is set, but is it from the command line or the environment?
22463 
22464     # Try to remove the string !XATTR! from our list.
22465     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22466     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22467       # If it failed, the variable was not from the command line. Ignore it,
22468       # but warn the user (except for BASH, which is always set by the calling BASH).
22469       if test "xXATTR" != xBASH; then
22470         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22471 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22472       fi
22473       # Try to locate tool using the code snippet
22474       for ac_prog in xattr
22475 do
22476   # Extract the first word of "$ac_prog", so it can be a program name with args.
22477 set dummy $ac_prog; ac_word=$2
22478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22479 $as_echo_n "checking for $ac_word... " >&6; }
22480 if ${ac_cv_path_XATTR+:} false; then :
22481   $as_echo_n "(cached) " >&6
22482 else
22483   case $XATTR in
22484   [\\/]* | ?:[\\/]*)
22485   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22486   ;;
22487   *)
22488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22489 for as_dir in $PATH
22490 do
22491   IFS=$as_save_IFS
22492   test -z "$as_dir" && as_dir=.
22493     for ac_exec_ext in '' $ac_executable_extensions; do
22494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22495     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22497     break 2
22498   fi
22499 done
22500   done
22501 IFS=$as_save_IFS
22502 
22503   ;;
22504 esac
22505 fi
22506 XATTR=$ac_cv_path_XATTR
22507 if test -n "$XATTR"; then
22508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22509 $as_echo "$XATTR" >&6; }
22510 else
22511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22512 $as_echo "no" >&6; }
22513 fi
22514 
22515 
22516   test -n "$XATTR" && break
22517 done
22518 
22519     else
22520       # If it succeeded, then it was overridden by the user. We will use it
22521       # for the tool.
22522 
22523       # First remove it from the list of overridden variables, so we can test
22524       # for unknown variables in the end.
22525       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22526 
22527       # Check if we try to supply an empty value
22528       if test "x$XATTR" = x; then
22529         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22530 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22531         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22532 $as_echo_n "checking for XATTR... " >&6; }
22533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22534 $as_echo "disabled" >&6; }
22535       else
22536         # Check if the provided tool contains a complete path.
22537         tool_specified="$XATTR"
22538         tool_basename="${tool_specified##*/}"
22539         if test "x$tool_basename" = "x$tool_specified"; then
22540           # A command without a complete path is provided, search $PATH.
22541           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22542 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22543           # Extract the first word of "$tool_basename", so it can be a program name with args.
22544 set dummy $tool_basename; ac_word=$2
22545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22546 $as_echo_n "checking for $ac_word... " >&6; }
22547 if ${ac_cv_path_XATTR+:} false; then :
22548   $as_echo_n "(cached) " >&6
22549 else
22550   case $XATTR in
22551   [\\/]* | ?:[\\/]*)
22552   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22553   ;;
22554   *)
22555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22556 for as_dir in $PATH
22557 do
22558   IFS=$as_save_IFS
22559   test -z "$as_dir" && as_dir=.
22560     for ac_exec_ext in '' $ac_executable_extensions; do
22561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22562     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22564     break 2
22565   fi
22566 done
22567   done
22568 IFS=$as_save_IFS
22569 
22570   ;;
22571 esac
22572 fi
22573 XATTR=$ac_cv_path_XATTR
22574 if test -n "$XATTR"; then
22575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22576 $as_echo "$XATTR" >&6; }
22577 else
22578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22579 $as_echo "no" >&6; }
22580 fi
22581 
22582 
22583           if test "x$XATTR" = x; then
22584             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22585           fi
22586         else
22587           # Otherwise we believe it is a complete path. Use it as it is.
22588           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22589 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22590           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22591 $as_echo_n "checking for XATTR... " >&6; }
22592           if test ! -x "$tool_specified"; then
22593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22594 $as_echo "not found" >&6; }
22595             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22596           fi
22597           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22598 $as_echo "$tool_specified" >&6; }
22599         fi
22600       fi
22601     fi
22602 
22603   fi
22604 
22605 
22606 
22607   if test "x$XATTR" = x; then
22608     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22609   fi
22610 
22611 
22612 
22613 
22614   # Publish this variable in the help.
22615 
22616 
22617   if [ -z "${CODESIGN+x}" ]; then
22618     # The variable is not set by user, try to locate tool using the code snippet
22619     for ac_prog in codesign
22620 do
22621   # Extract the first word of "$ac_prog", so it can be a program name with args.
22622 set dummy $ac_prog; ac_word=$2
22623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22624 $as_echo_n "checking for $ac_word... " >&6; }
22625 if ${ac_cv_path_CODESIGN+:} false; then :
22626   $as_echo_n "(cached) " >&6
22627 else
22628   case $CODESIGN in
22629   [\\/]* | ?:[\\/]*)
22630   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22631   ;;
22632   *)
22633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22634 for as_dir in $PATH
22635 do
22636   IFS=$as_save_IFS
22637   test -z "$as_dir" && as_dir=.
22638     for ac_exec_ext in '' $ac_executable_extensions; do
22639   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22640     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22642     break 2
22643   fi
22644 done
22645   done
22646 IFS=$as_save_IFS
22647 
22648   ;;
22649 esac
22650 fi
22651 CODESIGN=$ac_cv_path_CODESIGN
22652 if test -n "$CODESIGN"; then
22653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22654 $as_echo "$CODESIGN" >&6; }
22655 else
22656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22657 $as_echo "no" >&6; }
22658 fi
22659 
22660 
22661   test -n "$CODESIGN" && break
22662 done
22663 
22664   else
22665     # The variable is set, but is it from the command line or the environment?
22666 
22667     # Try to remove the string !CODESIGN! from our list.
22668     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22669     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22670       # If it failed, the variable was not from the command line. Ignore it,
22671       # but warn the user (except for BASH, which is always set by the calling BASH).
22672       if test "xCODESIGN" != xBASH; then
22673         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22674 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22675       fi
22676       # Try to locate tool using the code snippet
22677       for ac_prog in codesign
22678 do
22679   # Extract the first word of "$ac_prog", so it can be a program name with args.
22680 set dummy $ac_prog; ac_word=$2
22681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22682 $as_echo_n "checking for $ac_word... " >&6; }
22683 if ${ac_cv_path_CODESIGN+:} false; then :
22684   $as_echo_n "(cached) " >&6
22685 else
22686   case $CODESIGN in
22687   [\\/]* | ?:[\\/]*)
22688   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22689   ;;
22690   *)
22691   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22692 for as_dir in $PATH
22693 do
22694   IFS=$as_save_IFS
22695   test -z "$as_dir" && as_dir=.
22696     for ac_exec_ext in '' $ac_executable_extensions; do
22697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22698     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22700     break 2
22701   fi
22702 done
22703   done
22704 IFS=$as_save_IFS
22705 
22706   ;;
22707 esac
22708 fi
22709 CODESIGN=$ac_cv_path_CODESIGN
22710 if test -n "$CODESIGN"; then
22711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22712 $as_echo "$CODESIGN" >&6; }
22713 else
22714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22715 $as_echo "no" >&6; }
22716 fi
22717 
22718 
22719   test -n "$CODESIGN" && break
22720 done
22721 
22722     else
22723       # If it succeeded, then it was overridden by the user. We will use it
22724       # for the tool.
22725 
22726       # First remove it from the list of overridden variables, so we can test
22727       # for unknown variables in the end.
22728       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22729 
22730       # Check if we try to supply an empty value
22731       if test "x$CODESIGN" = x; then
22732         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22733 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22734         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22735 $as_echo_n "checking for CODESIGN... " >&6; }
22736         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22737 $as_echo "disabled" >&6; }
22738       else
22739         # Check if the provided tool contains a complete path.
22740         tool_specified="$CODESIGN"
22741         tool_basename="${tool_specified##*/}"
22742         if test "x$tool_basename" = "x$tool_specified"; then
22743           # A command without a complete path is provided, search $PATH.
22744           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22745 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22746           # Extract the first word of "$tool_basename", so it can be a program name with args.
22747 set dummy $tool_basename; ac_word=$2
22748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22749 $as_echo_n "checking for $ac_word... " >&6; }
22750 if ${ac_cv_path_CODESIGN+:} false; then :
22751   $as_echo_n "(cached) " >&6
22752 else
22753   case $CODESIGN in
22754   [\\/]* | ?:[\\/]*)
22755   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22756   ;;
22757   *)
22758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22759 for as_dir in $PATH
22760 do
22761   IFS=$as_save_IFS
22762   test -z "$as_dir" && as_dir=.
22763     for ac_exec_ext in '' $ac_executable_extensions; do
22764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22765     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22767     break 2
22768   fi
22769 done
22770   done
22771 IFS=$as_save_IFS
22772 
22773   ;;
22774 esac
22775 fi
22776 CODESIGN=$ac_cv_path_CODESIGN
22777 if test -n "$CODESIGN"; then
22778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22779 $as_echo "$CODESIGN" >&6; }
22780 else
22781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22782 $as_echo "no" >&6; }
22783 fi
22784 
22785 
22786           if test "x$CODESIGN" = x; then
22787             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22788           fi
22789         else
22790           # Otherwise we believe it is a complete path. Use it as it is.
22791           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22792 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22793           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22794 $as_echo_n "checking for CODESIGN... " >&6; }
22795           if test ! -x "$tool_specified"; then
22796             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22797 $as_echo "not found" >&6; }
22798             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22799           fi
22800           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22801 $as_echo "$tool_specified" >&6; }
22802         fi
22803       fi
22804     fi
22805 
22806   fi
22807 
22808 
22809     if test "x$CODESIGN" != "x"; then
22810       # Verify that the openjdk_codesign certificate is present
22811       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22812 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22813       rm -f codesign-testfile
22814       touch codesign-testfile
22815       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22816       rm -f codesign-testfile
22817       if test "x$CODESIGN" = x; then
22818         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22819 $as_echo "no" >&6; }
22820       else
22821         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22822 $as_echo "yes" >&6; }
22823       fi
22824     fi
22825 
22826 
22827 
22828   # Publish this variable in the help.
22829 
22830 
22831   if [ -z "${SETFILE+x}" ]; then
22832     # The variable is not set by user, try to locate tool using the code snippet
22833     for ac_prog in SetFile
22834 do
22835   # Extract the first word of "$ac_prog", so it can be a program name with args.
22836 set dummy $ac_prog; ac_word=$2
22837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22838 $as_echo_n "checking for $ac_word... " >&6; }
22839 if ${ac_cv_path_SETFILE+:} false; then :
22840   $as_echo_n "(cached) " >&6
22841 else
22842   case $SETFILE in
22843   [\\/]* | ?:[\\/]*)
22844   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22845   ;;
22846   *)
22847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22848 for as_dir in $PATH
22849 do
22850   IFS=$as_save_IFS
22851   test -z "$as_dir" && as_dir=.
22852     for ac_exec_ext in '' $ac_executable_extensions; do
22853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22854     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22856     break 2
22857   fi
22858 done
22859   done
22860 IFS=$as_save_IFS
22861 
22862   ;;
22863 esac
22864 fi
22865 SETFILE=$ac_cv_path_SETFILE
22866 if test -n "$SETFILE"; then
22867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22868 $as_echo "$SETFILE" >&6; }
22869 else
22870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22871 $as_echo "no" >&6; }
22872 fi
22873 
22874 
22875   test -n "$SETFILE" && break
22876 done
22877 
22878   else
22879     # The variable is set, but is it from the command line or the environment?
22880 
22881     # Try to remove the string !SETFILE! from our list.
22882     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22883     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22884       # If it failed, the variable was not from the command line. Ignore it,
22885       # but warn the user (except for BASH, which is always set by the calling BASH).
22886       if test "xSETFILE" != xBASH; then
22887         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22888 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22889       fi
22890       # Try to locate tool using the code snippet
22891       for ac_prog in SetFile
22892 do
22893   # Extract the first word of "$ac_prog", so it can be a program name with args.
22894 set dummy $ac_prog; ac_word=$2
22895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22896 $as_echo_n "checking for $ac_word... " >&6; }
22897 if ${ac_cv_path_SETFILE+:} false; then :
22898   $as_echo_n "(cached) " >&6
22899 else
22900   case $SETFILE in
22901   [\\/]* | ?:[\\/]*)
22902   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22903   ;;
22904   *)
22905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22906 for as_dir in $PATH
22907 do
22908   IFS=$as_save_IFS
22909   test -z "$as_dir" && as_dir=.
22910     for ac_exec_ext in '' $ac_executable_extensions; do
22911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22912     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22914     break 2
22915   fi
22916 done
22917   done
22918 IFS=$as_save_IFS
22919 
22920   ;;
22921 esac
22922 fi
22923 SETFILE=$ac_cv_path_SETFILE
22924 if test -n "$SETFILE"; then
22925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22926 $as_echo "$SETFILE" >&6; }
22927 else
22928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22929 $as_echo "no" >&6; }
22930 fi
22931 
22932 
22933   test -n "$SETFILE" && break
22934 done
22935 
22936     else
22937       # If it succeeded, then it was overridden by the user. We will use it
22938       # for the tool.
22939 
22940       # First remove it from the list of overridden variables, so we can test
22941       # for unknown variables in the end.
22942       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22943 
22944       # Check if we try to supply an empty value
22945       if test "x$SETFILE" = x; then
22946         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22947 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22948         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22949 $as_echo_n "checking for SETFILE... " >&6; }
22950         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22951 $as_echo "disabled" >&6; }
22952       else
22953         # Check if the provided tool contains a complete path.
22954         tool_specified="$SETFILE"
22955         tool_basename="${tool_specified##*/}"
22956         if test "x$tool_basename" = "x$tool_specified"; then
22957           # A command without a complete path is provided, search $PATH.
22958           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22959 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22960           # Extract the first word of "$tool_basename", so it can be a program name with args.
22961 set dummy $tool_basename; ac_word=$2
22962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22963 $as_echo_n "checking for $ac_word... " >&6; }
22964 if ${ac_cv_path_SETFILE+:} false; then :
22965   $as_echo_n "(cached) " >&6
22966 else
22967   case $SETFILE in
22968   [\\/]* | ?:[\\/]*)
22969   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22970   ;;
22971   *)
22972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22973 for as_dir in $PATH
22974 do
22975   IFS=$as_save_IFS
22976   test -z "$as_dir" && as_dir=.
22977     for ac_exec_ext in '' $ac_executable_extensions; do
22978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22979     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22981     break 2
22982   fi
22983 done
22984   done
22985 IFS=$as_save_IFS
22986 
22987   ;;
22988 esac
22989 fi
22990 SETFILE=$ac_cv_path_SETFILE
22991 if test -n "$SETFILE"; then
22992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22993 $as_echo "$SETFILE" >&6; }
22994 else
22995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22996 $as_echo "no" >&6; }
22997 fi
22998 
22999 
23000           if test "x$SETFILE" = x; then
23001             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23002           fi
23003         else
23004           # Otherwise we believe it is a complete path. Use it as it is.
23005           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23006 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23007           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23008 $as_echo_n "checking for SETFILE... " >&6; }
23009           if test ! -x "$tool_specified"; then
23010             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23011 $as_echo "not found" >&6; }
23012             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23013           fi
23014           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23015 $as_echo "$tool_specified" >&6; }
23016         fi
23017       fi
23018     fi
23019 
23020   fi
23021 
23022 
23023 
23024   if test "x$SETFILE" = x; then
23025     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23026   fi
23027 
23028 
23029   fi
23030 
23031 
23032   # Test if bash supports pipefail.
23033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23034 $as_echo_n "checking if bash supports pipefail... " >&6; }
23035   if ${BASH} -c 'set -o pipefail'; then
23036     BASH_ARGS="$BASH_ARGS -o pipefail"
23037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23038 $as_echo "yes" >&6; }
23039   else
23040     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23041 $as_echo "no" >&6; }
23042   fi
23043 
23044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23045 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23046   if ${BASH} -e -c 'true'; then
23047     BASH_ARGS="$BASH_ARGS -e"
23048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23049 $as_echo "yes" >&6; }
23050   else
23051     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23052 $as_echo "no" >&6; }
23053   fi
23054 
23055 
23056 
23057 
23058 # Check if pkg-config is available.
23059 
23060 
23061 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23062         if test -n "$ac_tool_prefix"; then
23063   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23064 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23066 $as_echo_n "checking for $ac_word... " >&6; }
23067 if ${ac_cv_path_PKG_CONFIG+:} false; then :
23068   $as_echo_n "(cached) " >&6
23069 else
23070   case $PKG_CONFIG in
23071   [\\/]* | ?:[\\/]*)
23072   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23073   ;;
23074   *)
23075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23076 for as_dir in $PATH
23077 do
23078   IFS=$as_save_IFS
23079   test -z "$as_dir" && as_dir=.
23080     for ac_exec_ext in '' $ac_executable_extensions; do
23081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23082     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23084     break 2
23085   fi
23086 done
23087   done
23088 IFS=$as_save_IFS
23089 
23090   ;;
23091 esac
23092 fi
23093 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23094 if test -n "$PKG_CONFIG"; then
23095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23096 $as_echo "$PKG_CONFIG" >&6; }
23097 else
23098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23099 $as_echo "no" >&6; }
23100 fi
23101 
23102 
23103 fi
23104 if test -z "$ac_cv_path_PKG_CONFIG"; then
23105   ac_pt_PKG_CONFIG=$PKG_CONFIG
23106   # Extract the first word of "pkg-config", so it can be a program name with args.
23107 set dummy pkg-config; ac_word=$2
23108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23109 $as_echo_n "checking for $ac_word... " >&6; }
23110 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23111   $as_echo_n "(cached) " >&6
23112 else
23113   case $ac_pt_PKG_CONFIG in
23114   [\\/]* | ?:[\\/]*)
23115   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23116   ;;
23117   *)
23118   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23119 for as_dir in $PATH
23120 do
23121   IFS=$as_save_IFS
23122   test -z "$as_dir" && as_dir=.
23123     for ac_exec_ext in '' $ac_executable_extensions; do
23124   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23125     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23127     break 2
23128   fi
23129 done
23130   done
23131 IFS=$as_save_IFS
23132 
23133   ;;
23134 esac
23135 fi
23136 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23137 if test -n "$ac_pt_PKG_CONFIG"; then
23138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23139 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
23140 else
23141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23142 $as_echo "no" >&6; }
23143 fi
23144 
23145   if test "x$ac_pt_PKG_CONFIG" = x; then
23146     PKG_CONFIG=""
23147   else
23148     case $cross_compiling:$ac_tool_warned in
23149 yes:)
23150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23151 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23152 ac_tool_warned=yes ;;
23153 esac
23154     PKG_CONFIG=$ac_pt_PKG_CONFIG
23155   fi
23156 else
23157   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23158 fi
23159 
23160 fi
23161 if test -n "$PKG_CONFIG"; then
23162         _pkg_min_version=0.9.0
23163         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23164 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23165         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23166                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23167 $as_echo "yes" >&6; }
23168         else
23169                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23170 $as_echo "no" >&6; }
23171                 PKG_CONFIG=""
23172         fi
23173 
23174 fi
23175 
23176 # After basic tools have been setup, we can check build os specific details.
23177 
23178   ###############################################################################
23179 
23180   # Note that this is the build platform OS version!
23181 
23182   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23183   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23184   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23185   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23186 
23187 
23188 
23189 
23190 
23191 # Misc basic settings
23192 
23193 
23194 # Check whether --with-default-make-target was given.
23195 if test "${with_default_make_target+set}" = set; then :
23196   withval=$with_default_make_target;
23197 fi
23198 
23199   if test "x$with_default_make_target" = "x" \
23200       || test "x$with_default_make_target" = "xyes"; then
23201     DEFAULT_MAKE_TARGET="exploded-image"
23202   elif test "x$with_default_make_target" = "xno"; then
23203     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23204   else
23205     DEFAULT_MAKE_TARGET="$with_default_make_target"
23206   fi
23207 
23208 
23209 
23210 
23211 ###############################################################################
23212 #
23213 # Determine OpenJDK variants, options and version numbers.
23214 #
23215 ###############################################################################
23216 
23217 # We need build & target for this.
23218 
23219   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23220   # We always build headless support.
23221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23222 $as_echo_n "checking headful support... " >&6; }
23223   # Check whether --enable-headful was given.
23224 if test "${enable_headful+set}" = set; then :
23225   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23226 else
23227   SUPPORT_HEADFUL=yes
23228 fi
23229 
23230 
23231   SUPPORT_HEADLESS=yes
23232   BUILD_HEADLESS="BUILD_HEADLESS:=true"
23233 
23234   if test "x$SUPPORT_HEADFUL" = xyes; then
23235     # We are building both headful and headless.
23236     headful_msg="include support for both headful and headless"
23237   fi
23238 
23239   if test "x$SUPPORT_HEADFUL" = xno; then
23240     # Thus we are building headless only.
23241     BUILD_HEADLESS="BUILD_HEADLESS:=true"
23242     headful_msg="headless only"
23243   fi
23244 
23245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23246 $as_echo "$headful_msg" >&6; }
23247 
23248 
23249 
23250 
23251 
23252   # Choose cacerts source file
23253 
23254 # Check whether --with-cacerts-file was given.
23255 if test "${with_cacerts_file+set}" = set; then :
23256   withval=$with_cacerts_file;
23257 fi
23258 
23259   if test "x$with_cacerts_file" != x; then
23260     CACERTS_FILE=$with_cacerts_file
23261   fi
23262 
23263 
23264   # Enable or disable unlimited crypto
23265   # Check whether --enable-unlimited-crypto was given.
23266 if test "${enable_unlimited_crypto+set}" = set; then :
23267   enableval=$enable_unlimited_crypto;
23268 else
23269   enable_unlimited_crypto=no
23270 fi
23271 
23272   if test "x$enable_unlimited_crypto" = "xyes"; then
23273     UNLIMITED_CRYPTO=true
23274   else
23275     UNLIMITED_CRYPTO=false
23276   fi
23277 
23278 
23279   # Should we build the serviceability agent (SA)?
23280   INCLUDE_SA=true
23281   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
23282     INCLUDE_SA=false
23283   fi
23284   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
23285     INCLUDE_SA=false
23286   fi
23287   if test "x$OPENJDK_TARGET_OS" = xaix ; then
23288     INCLUDE_SA=false
23289   fi
23290   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23291     INCLUDE_SA=false
23292   fi
23293 
23294 
23295   # Compress jars
23296   COMPRESS_JARS=false
23297 
23298 
23299 
23300   # Setup default copyright year. Mostly overridden when building close to a new year.
23301 
23302 # Check whether --with-copyright-year was given.
23303 if test "${with_copyright_year+set}" = set; then :
23304   withval=$with_copyright_year;
23305 fi
23306 
23307   if test "x$with_copyright_year" = xyes; then
23308     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23309   elif test "x$with_copyright_year" != x; then
23310     COPYRIGHT_YEAR="$with_copyright_year"
23311   else
23312     COPYRIGHT_YEAR=`date +'%Y'`
23313   fi
23314 
23315 
23316 
23317   # Control wether Hotspot runs Queens test after build.
23318   # Check whether --enable-hotspot-test-in-build was given.
23319 if test "${enable_hotspot_test_in_build+set}" = set; then :
23320   enableval=$enable_hotspot_test_in_build;
23321 else
23322   enable_hotspot_test_in_build=no
23323 fi
23324 
23325   if test "x$enable_hotspot_test_in_build" = "xyes"; then
23326     TEST_IN_BUILD=true
23327   else
23328     TEST_IN_BUILD=false
23329   fi
23330 
23331 
23332 
23333   # Warn user that old version arguments are deprecated.
23334 
23335 
23336 # Check whether --with-milestone was given.
23337 if test "${with_milestone+set}" = set; then :
23338   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23339 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23340 fi
23341 
23342 
23343 
23344 
23345 # Check whether --with-update-version was given.
23346 if test "${with_update_version+set}" = set; then :
23347   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23348 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23349 fi
23350 
23351 
23352 
23353 
23354 # Check whether --with-user-release-suffix was given.
23355 if test "${with_user_release_suffix+set}" = set; then :
23356   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
23357 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23358 fi
23359 
23360 
23361 
23362 
23363 # Check whether --with-build-number was given.
23364 if test "${with_build_number+set}" = set; then :
23365   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23366 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23367 fi
23368 
23369 
23370 
23371   # Source the version numbers file
23372   . $AUTOCONF_DIR/version-numbers
23373 
23374   # Some non-version number information is set in that file
23375 
23376 
23377 
23378 
23379 
23380 
23381 
23382 
23383   # Override version from arguments
23384 
23385   # If --with-version-string is set, process it first. It is possible to
23386   # override parts with more specific flags, since these are processed later.
23387 
23388 # Check whether --with-version-string was given.
23389 if test "${with_version_string+set}" = set; then :
23390   withval=$with_version_string;
23391 fi
23392 
23393   if test "x$with_version_string" = xyes; then
23394     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23395   elif test "x$with_version_string" != x; then
23396     # Additional [] needed to keep m4 from mangling shell constructs.
23397     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23398       VERSION_MAJOR=${BASH_REMATCH[1]}
23399       VERSION_MINOR=${BASH_REMATCH[3]}
23400       VERSION_SECURITY=${BASH_REMATCH[5]}
23401       VERSION_PATCH=${BASH_REMATCH[7]}
23402       VERSION_PRE=${BASH_REMATCH[9]}
23403       version_plus_separator=${BASH_REMATCH[11]}
23404       VERSION_BUILD=${BASH_REMATCH[12]}
23405       VERSION_OPT=${BASH_REMATCH[14]}
23406       # Unspecified numerical fields are interpreted as 0.
23407       if test "x$VERSION_MINOR" = x; then
23408         VERSION_MINOR=0
23409       fi
23410       if test "x$VERSION_SECURITY" = x; then
23411         VERSION_SECURITY=0
23412       fi
23413       if test "x$VERSION_PATCH" = x; then
23414         VERSION_PATCH=0
23415       fi
23416       if test "x$version_plus_separator" != x \
23417           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23418         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23419       fi
23420       # Stop the version part process from setting default values.
23421       # We still allow them to explicitely override though.
23422       NO_DEFAULT_VERSION_PARTS=true
23423     else
23424       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23425     fi
23426   fi
23427 
23428 
23429 # Check whether --with-version-pre was given.
23430 if test "${with_version_pre+set}" = set; then :
23431   withval=$with_version_pre; with_version_pre_present=true
23432 else
23433   with_version_pre_present=false
23434 fi
23435 
23436 
23437   if test "x$with_version_pre_present" = xtrue; then
23438     if test "x$with_version_pre" = xyes; then
23439       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23440     elif test "x$with_version_pre" = xno; then
23441       # Interpret --without-* as empty string instead of the literal "no"
23442       VERSION_PRE=
23443     else
23444       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23445        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23446       if test "x$VERSION_PRE" != "x$with_version_pre"; then
23447         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23448 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23449       fi
23450     fi
23451   else
23452     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23453       # Default is to use "internal" as pre
23454       VERSION_PRE="internal"
23455     fi
23456   fi
23457 
23458 
23459 # Check whether --with-version-opt was given.
23460 if test "${with_version_opt+set}" = set; then :
23461   withval=$with_version_opt; with_version_opt_present=true
23462 else
23463   with_version_opt_present=false
23464 fi
23465 
23466 
23467   if test "x$with_version_opt_present" = xtrue; then
23468     if test "x$with_version_opt" = xyes; then
23469       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23470     elif test "x$with_version_opt" = xno; then
23471       # Interpret --without-* as empty string instead of the literal "no"
23472       VERSION_OPT=
23473     else
23474       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23475        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23476       if test "x$VERSION_OPT" != "x$with_version_opt"; then
23477         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23478 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23479       fi
23480     fi
23481   else
23482     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23483       # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23484       timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23485       # Outer [ ] to quote m4.
23486        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23487       VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23488     fi
23489   fi
23490 
23491 
23492 # Check whether --with-version-build was given.
23493 if test "${with_version_build+set}" = set; then :
23494   withval=$with_version_build; with_version_build_present=true
23495 else
23496   with_version_build_present=false
23497 fi
23498 
23499 
23500   if test "x$with_version_build_present" = xtrue; then
23501     if test "x$with_version_build" = xyes; then
23502       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23503     elif test "x$with_version_build" = xno; then
23504       # Interpret --without-* as empty string instead of the literal "no"
23505       VERSION_BUILD=
23506     elif test "x$with_version_build" = x; then
23507       VERSION_BUILD=
23508     else
23509 
23510   # Additional [] needed to keep m4 from mangling shell constructs.
23511   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23512     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23513   fi
23514   # Extract the version number without leading zeros.
23515   cleaned_value=${BASH_REMATCH[1]}
23516   if test "x$cleaned_value" = x; then
23517     # Special case for zero
23518     cleaned_value=${BASH_REMATCH[2]}
23519   fi
23520 
23521   if test $cleaned_value -gt 255; then
23522     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23523   fi
23524   if test "x$cleaned_value" != "x$with_version_build"; then
23525     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23526 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23527   fi
23528   VERSION_BUILD=$cleaned_value
23529 
23530     fi
23531   else
23532     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23533       # Default is to not have a build number.
23534       VERSION_BUILD=""
23535       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23536       VERSION_BUILD=0
23537     fi
23538   fi
23539 
23540 
23541 # Check whether --with-version-major was given.
23542 if test "${with_version_major+set}" = set; then :
23543   withval=$with_version_major; with_version_major_present=true
23544 else
23545   with_version_major_present=false
23546 fi
23547 
23548 
23549   if test "x$with_version_major_present" = xtrue; then
23550     if test "x$with_version_major" = xyes; then
23551       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23552     else
23553 
23554   # Additional [] needed to keep m4 from mangling shell constructs.
23555   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23556     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23557   fi
23558   # Extract the version number without leading zeros.
23559   cleaned_value=${BASH_REMATCH[1]}
23560   if test "x$cleaned_value" = x; then
23561     # Special case for zero
23562     cleaned_value=${BASH_REMATCH[2]}
23563   fi
23564 
23565   if test $cleaned_value -gt 255; then
23566     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23567   fi
23568   if test "x$cleaned_value" != "x$with_version_major"; then
23569     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23570 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23571   fi
23572   VERSION_MAJOR=$cleaned_value
23573 
23574     fi
23575   else
23576     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23577       # Default is to get value from version-numbers
23578       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23579     fi
23580   fi
23581 
23582 
23583 # Check whether --with-version-minor was given.
23584 if test "${with_version_minor+set}" = set; then :
23585   withval=$with_version_minor; with_version_minor_present=true
23586 else
23587   with_version_minor_present=false
23588 fi
23589 
23590 
23591   if test "x$with_version_minor_present" = xtrue; then
23592     if test "x$with_version_minor" = xyes; then
23593       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23594     elif test "x$with_version_minor" = xno; then
23595       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23596       VERSION_MINOR=0
23597     elif test "x$with_version_minor" = x; then
23598       VERSION_MINOR=0
23599     else
23600 
23601   # Additional [] needed to keep m4 from mangling shell constructs.
23602   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23603     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23604   fi
23605   # Extract the version number without leading zeros.
23606   cleaned_value=${BASH_REMATCH[1]}
23607   if test "x$cleaned_value" = x; then
23608     # Special case for zero
23609     cleaned_value=${BASH_REMATCH[2]}
23610   fi
23611 
23612   if test $cleaned_value -gt 255; then
23613     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23614   fi
23615   if test "x$cleaned_value" != "x$with_version_minor"; then
23616     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23617 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23618   fi
23619   VERSION_MINOR=$cleaned_value
23620 
23621     fi
23622   else
23623     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23624       # Default is 0, if unspecified
23625       VERSION_MINOR=0
23626     fi
23627   fi
23628 
23629 
23630 # Check whether --with-version-security was given.
23631 if test "${with_version_security+set}" = set; then :
23632   withval=$with_version_security; with_version_security_present=true
23633 else
23634   with_version_security_present=false
23635 fi
23636 
23637 
23638   if test "x$with_version_security_present" = xtrue; then
23639     if test "x$with_version_security" = xyes; then
23640       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23641     elif test "x$with_version_security" = xno; then
23642       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23643       VERSION_SECURITY=0
23644     elif test "x$with_version_security" = x; then
23645       VERSION_SECURITY=0
23646     else
23647 
23648   # Additional [] needed to keep m4 from mangling shell constructs.
23649   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23650     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23651   fi
23652   # Extract the version number without leading zeros.
23653   cleaned_value=${BASH_REMATCH[1]}
23654   if test "x$cleaned_value" = x; then
23655     # Special case for zero
23656     cleaned_value=${BASH_REMATCH[2]}
23657   fi
23658 
23659   if test $cleaned_value -gt 255; then
23660     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23661   fi
23662   if test "x$cleaned_value" != "x$with_version_security"; then
23663     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23664 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23665   fi
23666   VERSION_SECURITY=$cleaned_value
23667 
23668     fi
23669   else
23670     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23671       # Default is 0, if unspecified
23672       VERSION_SECURITY=0
23673     fi
23674   fi
23675 
23676 
23677 # Check whether --with-version-patch was given.
23678 if test "${with_version_patch+set}" = set; then :
23679   withval=$with_version_patch; with_version_patch_present=true
23680 else
23681   with_version_patch_present=false
23682 fi
23683 
23684 
23685   if test "x$with_version_patch_present" = xtrue; then
23686     if test "x$with_version_patch" = xyes; then
23687       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23688     elif test "x$with_version_patch" = xno; then
23689       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23690       VERSION_PATCH=0
23691     elif test "x$with_version_patch" = x; then
23692       VERSION_PATCH=0
23693     else
23694 
23695   # Additional [] needed to keep m4 from mangling shell constructs.
23696   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23697     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23698   fi
23699   # Extract the version number without leading zeros.
23700   cleaned_value=${BASH_REMATCH[1]}
23701   if test "x$cleaned_value" = x; then
23702     # Special case for zero
23703     cleaned_value=${BASH_REMATCH[2]}
23704   fi
23705 
23706   if test $cleaned_value -gt 255; then
23707     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23708   fi
23709   if test "x$cleaned_value" != "x$with_version_patch"; then
23710     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23711 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23712   fi
23713   VERSION_PATCH=$cleaned_value
23714 
23715     fi
23716   else
23717     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23718       # Default is 0, if unspecified
23719       VERSION_PATCH=0
23720     fi
23721   fi
23722 
23723   # Calculate derived version properties
23724 
23725   # Set VERSION_IS_GA based on if VERSION_PRE has a value
23726   if test "x$VERSION_PRE" = x; then
23727     VERSION_IS_GA=true
23728   else
23729     VERSION_IS_GA=false
23730   fi
23731 
23732   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23733   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23734 
23735   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23736   # Strip trailing zeroes from stripped_version_number
23737   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23738   VERSION_NUMBER=$stripped_version_number
23739 
23740   # The complete version string, with additional build information
23741   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23742     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23743   else
23744     # If either build or opt is set, we need a + separator
23745     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23746   fi
23747 
23748   # The short version string, just VERSION_NUMBER and PRE, if present.
23749   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23750 
23751   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23752 $as_echo_n "checking for version string... " >&6; }
23753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23754 $as_echo "$VERSION_STRING" >&6; }
23755 
23756 
23757 
23758 
23759 
23760 
23761 
23762 
23763 
23764 
23765 
23766 
23767 
23768 
23769 
23770 ###############################################################################
23771 #
23772 # Setup BootJDK, used to bootstrap the build.
23773 #
23774 ###############################################################################
23775 
23776 
23777   BOOT_JDK_FOUND=no
23778 
23779 # Check whether --with-boot-jdk was given.
23780 if test "${with_boot_jdk+set}" = set; then :
23781   withval=$with_boot_jdk;
23782 fi
23783 
23784 
23785   # We look for the Boot JDK through various means, going from more certain to
23786   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23787   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23788   # must check if this is indeed valid; otherwise we'll continue looking.
23789 
23790   # Test: Is bootjdk explicitely set by command line arguments?
23791 
23792   if test "x$BOOT_JDK_FOUND" = xno; then
23793     # Now execute the test
23794 
23795   if test "x$with_boot_jdk" != x; then
23796     BOOT_JDK=$with_boot_jdk
23797     BOOT_JDK_FOUND=maybe
23798     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23799 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23800   fi
23801 
23802 
23803     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23804     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23805       # Do we have a bin/java?
23806       if test ! -x "$BOOT_JDK/bin/java"; then
23807         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23808 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23809         BOOT_JDK_FOUND=no
23810       else
23811         # Do we have a bin/javac?
23812         if test ! -x "$BOOT_JDK/bin/javac"; then
23813           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23814 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23815           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23816 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23817           BOOT_JDK_FOUND=no
23818         else
23819           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23820           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23821 
23822           # Extra M4 quote needed to protect [] in grep expression.
23823           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23824           if test "x$FOUND_CORRECT_VERSION" = x; then
23825             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23827             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23828 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23829             BOOT_JDK_FOUND=no
23830           else
23831             # We're done! :-)
23832             BOOT_JDK_FOUND=yes
23833 
23834   # Only process if variable expands to non-empty
23835 
23836   if test "x$BOOT_JDK" != x; then
23837     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23838 
23839   # Input might be given as Windows format, start by converting to
23840   # unix format.
23841   path="$BOOT_JDK"
23842   new_path=`$CYGPATH -u "$path"`
23843 
23844   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23845   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23846   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23847   # "foo.exe" is OK but "foo" is an error.
23848   #
23849   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23850   # It is also a way to make sure we got the proper file name for the real test later on.
23851   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23852   if test "x$test_shortpath" = x; then
23853     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23854 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23855     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23856   fi
23857 
23858   # Call helper function which possibly converts this using DOS-style short mode.
23859   # If so, the updated path is stored in $new_path.
23860 
23861   input_path="$new_path"
23862   # Check if we need to convert this using DOS-style short mode. If the path
23863   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23864   # take no chances and rewrite it.
23865   # Note: m4 eats our [], so we need to use [ and ] instead.
23866   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23867   if test "x$has_forbidden_chars" != x; then
23868     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23869     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23870     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23871     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23872       # Going to short mode and back again did indeed matter. Since short mode is
23873       # case insensitive, let's make it lowercase to improve readability.
23874       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23875       # Now convert it back to Unix-style (cygpath)
23876       input_path=`$CYGPATH -u "$shortmode_path"`
23877       new_path="$input_path"
23878     fi
23879   fi
23880 
23881   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23882   if test "x$test_cygdrive_prefix" = x; then
23883     # As a simple fix, exclude /usr/bin since it's not a real path.
23884     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23885       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23886       # a path prefixed by /cygdrive for fixpath to work.
23887       new_path="$CYGWIN_ROOT_PATH$input_path"
23888     fi
23889   fi
23890 
23891 
23892   if test "x$path" != "x$new_path"; then
23893     BOOT_JDK="$new_path"
23894     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23895 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23896   fi
23897 
23898     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23899 
23900   path="$BOOT_JDK"
23901   has_colon=`$ECHO $path | $GREP ^.:`
23902   new_path="$path"
23903   if test "x$has_colon" = x; then
23904     # Not in mixed or Windows style, start by that.
23905     new_path=`cmd //c echo $path`
23906   fi
23907 
23908 
23909   input_path="$new_path"
23910   # Check if we need to convert this using DOS-style short mode. If the path
23911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23912   # take no chances and rewrite it.
23913   # Note: m4 eats our [], so we need to use [ and ] instead.
23914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23915   if test "x$has_forbidden_chars" != x; then
23916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23917     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23918   fi
23919 
23920 
23921   windows_path="$new_path"
23922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23923     unix_path=`$CYGPATH -u "$windows_path"`
23924     new_path="$unix_path"
23925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23926     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23927     new_path="$unix_path"
23928   fi
23929 
23930   if test "x$path" != "x$new_path"; then
23931     BOOT_JDK="$new_path"
23932     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23933 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23934   fi
23935 
23936   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23937   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23938 
23939     else
23940       # We're on a unix platform. Hooray! :)
23941       path="$BOOT_JDK"
23942       has_space=`$ECHO "$path" | $GREP " "`
23943       if test "x$has_space" != x; then
23944         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23945 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23946         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23947       fi
23948 
23949       # Use eval to expand a potential ~
23950       eval path="$path"
23951       if test ! -f "$path" && test ! -d "$path"; then
23952         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23953       fi
23954 
23955       if test -d "$path"; then
23956         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23957       else
23958         dir="`$DIRNAME "$path"`"
23959         base="`$BASENAME "$path"`"
23960         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23961       fi
23962     fi
23963   fi
23964 
23965             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23966 $as_echo_n "checking for Boot JDK... " >&6; }
23967             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23968 $as_echo "$BOOT_JDK" >&6; }
23969             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23970 $as_echo_n "checking Boot JDK version... " >&6; }
23971             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23972             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23973 $as_echo "$BOOT_JDK_VERSION" >&6; }
23974           fi # end check jdk version
23975         fi # end check javac
23976       fi # end check java
23977     fi # end check boot jdk found
23978   fi
23979 
23980   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23981     # Having specified an argument which is incorrect will produce an instant failure;
23982     # we should not go on looking
23983     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23984   fi
23985 
23986   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23987 
23988   if test "x$BOOT_JDK_FOUND" = xno; then
23989     # Now execute the test
23990 
23991   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23992     # First check at user selected default
23993 
23994   if test "x$BOOT_JDK_FOUND" = xno; then
23995     # Now execute the test
23996 
23997   if test -x /usr/libexec/java_home; then
23998     BOOT_JDK=`/usr/libexec/java_home `
23999     BOOT_JDK_FOUND=maybe
24000     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24001 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24002   fi
24003 
24004 
24005     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24006     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24007       # Do we have a bin/java?
24008       if test ! -x "$BOOT_JDK/bin/java"; then
24009         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24010 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24011         BOOT_JDK_FOUND=no
24012       else
24013         # Do we have a bin/javac?
24014         if test ! -x "$BOOT_JDK/bin/javac"; then
24015           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24016 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24017           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24018 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24019           BOOT_JDK_FOUND=no
24020         else
24021           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24022           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24023 
24024           # Extra M4 quote needed to protect [] in grep expression.
24025           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24026           if test "x$FOUND_CORRECT_VERSION" = x; then
24027             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24028 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24029             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24030 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24031             BOOT_JDK_FOUND=no
24032           else
24033             # We're done! :-)
24034             BOOT_JDK_FOUND=yes
24035 
24036   # Only process if variable expands to non-empty
24037 
24038   if test "x$BOOT_JDK" != x; then
24039     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24040 
24041   # Input might be given as Windows format, start by converting to
24042   # unix format.
24043   path="$BOOT_JDK"
24044   new_path=`$CYGPATH -u "$path"`
24045 
24046   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24047   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24048   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24049   # "foo.exe" is OK but "foo" is an error.
24050   #
24051   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24052   # It is also a way to make sure we got the proper file name for the real test later on.
24053   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24054   if test "x$test_shortpath" = x; then
24055     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24056 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24057     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24058   fi
24059 
24060   # Call helper function which possibly converts this using DOS-style short mode.
24061   # If so, the updated path is stored in $new_path.
24062 
24063   input_path="$new_path"
24064   # Check if we need to convert this using DOS-style short mode. If the path
24065   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24066   # take no chances and rewrite it.
24067   # Note: m4 eats our [], so we need to use [ and ] instead.
24068   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24069   if test "x$has_forbidden_chars" != x; then
24070     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24071     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24072     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24073     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24074       # Going to short mode and back again did indeed matter. Since short mode is
24075       # case insensitive, let's make it lowercase to improve readability.
24076       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24077       # Now convert it back to Unix-style (cygpath)
24078       input_path=`$CYGPATH -u "$shortmode_path"`
24079       new_path="$input_path"
24080     fi
24081   fi
24082 
24083   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24084   if test "x$test_cygdrive_prefix" = x; then
24085     # As a simple fix, exclude /usr/bin since it's not a real path.
24086     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24087       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24088       # a path prefixed by /cygdrive for fixpath to work.
24089       new_path="$CYGWIN_ROOT_PATH$input_path"
24090     fi
24091   fi
24092 
24093 
24094   if test "x$path" != "x$new_path"; then
24095     BOOT_JDK="$new_path"
24096     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24097 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24098   fi
24099 
24100     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24101 
24102   path="$BOOT_JDK"
24103   has_colon=`$ECHO $path | $GREP ^.:`
24104   new_path="$path"
24105   if test "x$has_colon" = x; then
24106     # Not in mixed or Windows style, start by that.
24107     new_path=`cmd //c echo $path`
24108   fi
24109 
24110 
24111   input_path="$new_path"
24112   # Check if we need to convert this using DOS-style short mode. If the path
24113   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24114   # take no chances and rewrite it.
24115   # Note: m4 eats our [], so we need to use [ and ] instead.
24116   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24117   if test "x$has_forbidden_chars" != x; then
24118     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24119     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24120   fi
24121 
24122 
24123   windows_path="$new_path"
24124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24125     unix_path=`$CYGPATH -u "$windows_path"`
24126     new_path="$unix_path"
24127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24129     new_path="$unix_path"
24130   fi
24131 
24132   if test "x$path" != "x$new_path"; then
24133     BOOT_JDK="$new_path"
24134     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24135 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24136   fi
24137 
24138   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24139   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24140 
24141     else
24142       # We're on a unix platform. Hooray! :)
24143       path="$BOOT_JDK"
24144       has_space=`$ECHO "$path" | $GREP " "`
24145       if test "x$has_space" != x; then
24146         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24147 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24148         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24149       fi
24150 
24151       # Use eval to expand a potential ~
24152       eval path="$path"
24153       if test ! -f "$path" && test ! -d "$path"; then
24154         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24155       fi
24156 
24157       if test -d "$path"; then
24158         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24159       else
24160         dir="`$DIRNAME "$path"`"
24161         base="`$BASENAME "$path"`"
24162         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24163       fi
24164     fi
24165   fi
24166 
24167             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24168 $as_echo_n "checking for Boot JDK... " >&6; }
24169             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24170 $as_echo "$BOOT_JDK" >&6; }
24171             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24172 $as_echo_n "checking Boot JDK version... " >&6; }
24173             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24174             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24175 $as_echo "$BOOT_JDK_VERSION" >&6; }
24176           fi # end check jdk version
24177         fi # end check javac
24178       fi # end check java
24179     fi # end check boot jdk found
24180   fi
24181 
24182     # If that did not work out (e.g. too old), try explicit versions instead
24183 
24184   if test "x$BOOT_JDK_FOUND" = xno; then
24185     # Now execute the test
24186 
24187   if test -x /usr/libexec/java_home; then
24188     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24189     BOOT_JDK_FOUND=maybe
24190     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24191 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24192   fi
24193 
24194 
24195     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24196     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24197       # Do we have a bin/java?
24198       if test ! -x "$BOOT_JDK/bin/java"; then
24199         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24200 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24201         BOOT_JDK_FOUND=no
24202       else
24203         # Do we have a bin/javac?
24204         if test ! -x "$BOOT_JDK/bin/javac"; then
24205           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24206 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24207           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24208 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24209           BOOT_JDK_FOUND=no
24210         else
24211           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24212           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24213 
24214           # Extra M4 quote needed to protect [] in grep expression.
24215           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24216           if test "x$FOUND_CORRECT_VERSION" = x; then
24217             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24218 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24219             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24220 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24221             BOOT_JDK_FOUND=no
24222           else
24223             # We're done! :-)
24224             BOOT_JDK_FOUND=yes
24225 
24226   # Only process if variable expands to non-empty
24227 
24228   if test "x$BOOT_JDK" != x; then
24229     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24230 
24231   # Input might be given as Windows format, start by converting to
24232   # unix format.
24233   path="$BOOT_JDK"
24234   new_path=`$CYGPATH -u "$path"`
24235 
24236   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24237   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24238   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24239   # "foo.exe" is OK but "foo" is an error.
24240   #
24241   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24242   # It is also a way to make sure we got the proper file name for the real test later on.
24243   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24244   if test "x$test_shortpath" = x; then
24245     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24246 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24247     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24248   fi
24249 
24250   # Call helper function which possibly converts this using DOS-style short mode.
24251   # If so, the updated path is stored in $new_path.
24252 
24253   input_path="$new_path"
24254   # Check if we need to convert this using DOS-style short mode. If the path
24255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24256   # take no chances and rewrite it.
24257   # Note: m4 eats our [], so we need to use [ and ] instead.
24258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24259   if test "x$has_forbidden_chars" != x; then
24260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24261     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24262     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24263     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24264       # Going to short mode and back again did indeed matter. Since short mode is
24265       # case insensitive, let's make it lowercase to improve readability.
24266       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24267       # Now convert it back to Unix-style (cygpath)
24268       input_path=`$CYGPATH -u "$shortmode_path"`
24269       new_path="$input_path"
24270     fi
24271   fi
24272 
24273   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24274   if test "x$test_cygdrive_prefix" = x; then
24275     # As a simple fix, exclude /usr/bin since it's not a real path.
24276     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24277       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24278       # a path prefixed by /cygdrive for fixpath to work.
24279       new_path="$CYGWIN_ROOT_PATH$input_path"
24280     fi
24281   fi
24282 
24283 
24284   if test "x$path" != "x$new_path"; then
24285     BOOT_JDK="$new_path"
24286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24287 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24288   fi
24289 
24290     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24291 
24292   path="$BOOT_JDK"
24293   has_colon=`$ECHO $path | $GREP ^.:`
24294   new_path="$path"
24295   if test "x$has_colon" = x; then
24296     # Not in mixed or Windows style, start by that.
24297     new_path=`cmd //c echo $path`
24298   fi
24299 
24300 
24301   input_path="$new_path"
24302   # Check if we need to convert this using DOS-style short mode. If the path
24303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24304   # take no chances and rewrite it.
24305   # Note: m4 eats our [], so we need to use [ and ] instead.
24306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24307   if test "x$has_forbidden_chars" != x; then
24308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24310   fi
24311 
24312 
24313   windows_path="$new_path"
24314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24315     unix_path=`$CYGPATH -u "$windows_path"`
24316     new_path="$unix_path"
24317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24319     new_path="$unix_path"
24320   fi
24321 
24322   if test "x$path" != "x$new_path"; then
24323     BOOT_JDK="$new_path"
24324     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24325 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24326   fi
24327 
24328   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24329   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24330 
24331     else
24332       # We're on a unix platform. Hooray! :)
24333       path="$BOOT_JDK"
24334       has_space=`$ECHO "$path" | $GREP " "`
24335       if test "x$has_space" != x; then
24336         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24337 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24338         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24339       fi
24340 
24341       # Use eval to expand a potential ~
24342       eval path="$path"
24343       if test ! -f "$path" && test ! -d "$path"; then
24344         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24345       fi
24346 
24347       if test -d "$path"; then
24348         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24349       else
24350         dir="`$DIRNAME "$path"`"
24351         base="`$BASENAME "$path"`"
24352         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24353       fi
24354     fi
24355   fi
24356 
24357             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24358 $as_echo_n "checking for Boot JDK... " >&6; }
24359             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24360 $as_echo "$BOOT_JDK" >&6; }
24361             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24362 $as_echo_n "checking Boot JDK version... " >&6; }
24363             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24364             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24365 $as_echo "$BOOT_JDK_VERSION" >&6; }
24366           fi # end check jdk version
24367         fi # end check javac
24368       fi # end check java
24369     fi # end check boot jdk found
24370   fi
24371 
24372 
24373   if test "x$BOOT_JDK_FOUND" = xno; then
24374     # Now execute the test
24375 
24376   if test -x /usr/libexec/java_home; then
24377     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24378     BOOT_JDK_FOUND=maybe
24379     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24380 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24381   fi
24382 
24383 
24384     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24385     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24386       # Do we have a bin/java?
24387       if test ! -x "$BOOT_JDK/bin/java"; then
24388         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24389 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24390         BOOT_JDK_FOUND=no
24391       else
24392         # Do we have a bin/javac?
24393         if test ! -x "$BOOT_JDK/bin/javac"; then
24394           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24395 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24396           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24397 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24398           BOOT_JDK_FOUND=no
24399         else
24400           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24401           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24402 
24403           # Extra M4 quote needed to protect [] in grep expression.
24404           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24405           if test "x$FOUND_CORRECT_VERSION" = x; then
24406             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24407 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24408             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24409 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24410             BOOT_JDK_FOUND=no
24411           else
24412             # We're done! :-)
24413             BOOT_JDK_FOUND=yes
24414 
24415   # Only process if variable expands to non-empty
24416 
24417   if test "x$BOOT_JDK" != x; then
24418     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24419 
24420   # Input might be given as Windows format, start by converting to
24421   # unix format.
24422   path="$BOOT_JDK"
24423   new_path=`$CYGPATH -u "$path"`
24424 
24425   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24426   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24427   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24428   # "foo.exe" is OK but "foo" is an error.
24429   #
24430   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24431   # It is also a way to make sure we got the proper file name for the real test later on.
24432   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24433   if test "x$test_shortpath" = x; then
24434     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24435 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24436     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24437   fi
24438 
24439   # Call helper function which possibly converts this using DOS-style short mode.
24440   # If so, the updated path is stored in $new_path.
24441 
24442   input_path="$new_path"
24443   # Check if we need to convert this using DOS-style short mode. If the path
24444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24445   # take no chances and rewrite it.
24446   # Note: m4 eats our [], so we need to use [ and ] instead.
24447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24448   if test "x$has_forbidden_chars" != x; then
24449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24450     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24451     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24452     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24453       # Going to short mode and back again did indeed matter. Since short mode is
24454       # case insensitive, let's make it lowercase to improve readability.
24455       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24456       # Now convert it back to Unix-style (cygpath)
24457       input_path=`$CYGPATH -u "$shortmode_path"`
24458       new_path="$input_path"
24459     fi
24460   fi
24461 
24462   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24463   if test "x$test_cygdrive_prefix" = x; then
24464     # As a simple fix, exclude /usr/bin since it's not a real path.
24465     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24466       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24467       # a path prefixed by /cygdrive for fixpath to work.
24468       new_path="$CYGWIN_ROOT_PATH$input_path"
24469     fi
24470   fi
24471 
24472 
24473   if test "x$path" != "x$new_path"; then
24474     BOOT_JDK="$new_path"
24475     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24476 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24477   fi
24478 
24479     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24480 
24481   path="$BOOT_JDK"
24482   has_colon=`$ECHO $path | $GREP ^.:`
24483   new_path="$path"
24484   if test "x$has_colon" = x; then
24485     # Not in mixed or Windows style, start by that.
24486     new_path=`cmd //c echo $path`
24487   fi
24488 
24489 
24490   input_path="$new_path"
24491   # Check if we need to convert this using DOS-style short mode. If the path
24492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24493   # take no chances and rewrite it.
24494   # Note: m4 eats our [], so we need to use [ and ] instead.
24495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24496   if test "x$has_forbidden_chars" != x; then
24497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24498     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24499   fi
24500 
24501 
24502   windows_path="$new_path"
24503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24504     unix_path=`$CYGPATH -u "$windows_path"`
24505     new_path="$unix_path"
24506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24508     new_path="$unix_path"
24509   fi
24510 
24511   if test "x$path" != "x$new_path"; then
24512     BOOT_JDK="$new_path"
24513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24514 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24515   fi
24516 
24517   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24518   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24519 
24520     else
24521       # We're on a unix platform. Hooray! :)
24522       path="$BOOT_JDK"
24523       has_space=`$ECHO "$path" | $GREP " "`
24524       if test "x$has_space" != x; then
24525         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24526 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24527         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24528       fi
24529 
24530       # Use eval to expand a potential ~
24531       eval path="$path"
24532       if test ! -f "$path" && test ! -d "$path"; then
24533         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24534       fi
24535 
24536       if test -d "$path"; then
24537         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24538       else
24539         dir="`$DIRNAME "$path"`"
24540         base="`$BASENAME "$path"`"
24541         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24542       fi
24543     fi
24544   fi
24545 
24546             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24547 $as_echo_n "checking for Boot JDK... " >&6; }
24548             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24549 $as_echo "$BOOT_JDK" >&6; }
24550             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24551 $as_echo_n "checking Boot JDK version... " >&6; }
24552             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24553             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24554 $as_echo "$BOOT_JDK_VERSION" >&6; }
24555           fi # end check jdk version
24556         fi # end check javac
24557       fi # end check java
24558     fi # end check boot jdk found
24559   fi
24560 
24561 
24562   if test "x$BOOT_JDK_FOUND" = xno; then
24563     # Now execute the test
24564 
24565   if test -x /usr/libexec/java_home; then
24566     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24567     BOOT_JDK_FOUND=maybe
24568     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24569 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24570   fi
24571 
24572 
24573     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24574     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24575       # Do we have a bin/java?
24576       if test ! -x "$BOOT_JDK/bin/java"; then
24577         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24578 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24579         BOOT_JDK_FOUND=no
24580       else
24581         # Do we have a bin/javac?
24582         if test ! -x "$BOOT_JDK/bin/javac"; then
24583           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24584 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24585           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24586 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24587           BOOT_JDK_FOUND=no
24588         else
24589           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24590           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24591 
24592           # Extra M4 quote needed to protect [] in grep expression.
24593           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24594           if test "x$FOUND_CORRECT_VERSION" = x; then
24595             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24596 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24597             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24598 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24599             BOOT_JDK_FOUND=no
24600           else
24601             # We're done! :-)
24602             BOOT_JDK_FOUND=yes
24603 
24604   # Only process if variable expands to non-empty
24605 
24606   if test "x$BOOT_JDK" != x; then
24607     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24608 
24609   # Input might be given as Windows format, start by converting to
24610   # unix format.
24611   path="$BOOT_JDK"
24612   new_path=`$CYGPATH -u "$path"`
24613 
24614   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24615   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24616   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24617   # "foo.exe" is OK but "foo" is an error.
24618   #
24619   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24620   # It is also a way to make sure we got the proper file name for the real test later on.
24621   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24622   if test "x$test_shortpath" = x; then
24623     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24624 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24625     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24626   fi
24627 
24628   # Call helper function which possibly converts this using DOS-style short mode.
24629   # If so, the updated path is stored in $new_path.
24630 
24631   input_path="$new_path"
24632   # Check if we need to convert this using DOS-style short mode. If the path
24633   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24634   # take no chances and rewrite it.
24635   # Note: m4 eats our [], so we need to use [ and ] instead.
24636   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24637   if test "x$has_forbidden_chars" != x; then
24638     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24639     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24640     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24641     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24642       # Going to short mode and back again did indeed matter. Since short mode is
24643       # case insensitive, let's make it lowercase to improve readability.
24644       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24645       # Now convert it back to Unix-style (cygpath)
24646       input_path=`$CYGPATH -u "$shortmode_path"`
24647       new_path="$input_path"
24648     fi
24649   fi
24650 
24651   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24652   if test "x$test_cygdrive_prefix" = x; then
24653     # As a simple fix, exclude /usr/bin since it's not a real path.
24654     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24655       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24656       # a path prefixed by /cygdrive for fixpath to work.
24657       new_path="$CYGWIN_ROOT_PATH$input_path"
24658     fi
24659   fi
24660 
24661 
24662   if test "x$path" != "x$new_path"; then
24663     BOOT_JDK="$new_path"
24664     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24665 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24666   fi
24667 
24668     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24669 
24670   path="$BOOT_JDK"
24671   has_colon=`$ECHO $path | $GREP ^.:`
24672   new_path="$path"
24673   if test "x$has_colon" = x; then
24674     # Not in mixed or Windows style, start by that.
24675     new_path=`cmd //c echo $path`
24676   fi
24677 
24678 
24679   input_path="$new_path"
24680   # Check if we need to convert this using DOS-style short mode. If the path
24681   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24682   # take no chances and rewrite it.
24683   # Note: m4 eats our [], so we need to use [ and ] instead.
24684   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24685   if test "x$has_forbidden_chars" != x; then
24686     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24687     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24688   fi
24689 
24690 
24691   windows_path="$new_path"
24692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24693     unix_path=`$CYGPATH -u "$windows_path"`
24694     new_path="$unix_path"
24695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24696     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24697     new_path="$unix_path"
24698   fi
24699 
24700   if test "x$path" != "x$new_path"; then
24701     BOOT_JDK="$new_path"
24702     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24703 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24704   fi
24705 
24706   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24707   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24708 
24709     else
24710       # We're on a unix platform. Hooray! :)
24711       path="$BOOT_JDK"
24712       has_space=`$ECHO "$path" | $GREP " "`
24713       if test "x$has_space" != x; then
24714         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24715 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24716         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24717       fi
24718 
24719       # Use eval to expand a potential ~
24720       eval path="$path"
24721       if test ! -f "$path" && test ! -d "$path"; then
24722         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24723       fi
24724 
24725       if test -d "$path"; then
24726         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24727       else
24728         dir="`$DIRNAME "$path"`"
24729         base="`$BASENAME "$path"`"
24730         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24731       fi
24732     fi
24733   fi
24734 
24735             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24736 $as_echo_n "checking for Boot JDK... " >&6; }
24737             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24738 $as_echo "$BOOT_JDK" >&6; }
24739             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24740 $as_echo_n "checking Boot JDK version... " >&6; }
24741             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24742             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24743 $as_echo "$BOOT_JDK_VERSION" >&6; }
24744           fi # end check jdk version
24745         fi # end check javac
24746       fi # end check java
24747     fi # end check boot jdk found
24748   fi
24749 
24750   fi
24751 
24752 
24753     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24754     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24755       # Do we have a bin/java?
24756       if test ! -x "$BOOT_JDK/bin/java"; then
24757         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24758 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24759         BOOT_JDK_FOUND=no
24760       else
24761         # Do we have a bin/javac?
24762         if test ! -x "$BOOT_JDK/bin/javac"; then
24763           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24764 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24765           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24766 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24767           BOOT_JDK_FOUND=no
24768         else
24769           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24770           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24771 
24772           # Extra M4 quote needed to protect [] in grep expression.
24773           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24774           if test "x$FOUND_CORRECT_VERSION" = x; then
24775             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24776 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24777             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24778 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24779             BOOT_JDK_FOUND=no
24780           else
24781             # We're done! :-)
24782             BOOT_JDK_FOUND=yes
24783 
24784   # Only process if variable expands to non-empty
24785 
24786   if test "x$BOOT_JDK" != x; then
24787     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24788 
24789   # Input might be given as Windows format, start by converting to
24790   # unix format.
24791   path="$BOOT_JDK"
24792   new_path=`$CYGPATH -u "$path"`
24793 
24794   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24795   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24796   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24797   # "foo.exe" is OK but "foo" is an error.
24798   #
24799   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24800   # It is also a way to make sure we got the proper file name for the real test later on.
24801   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24802   if test "x$test_shortpath" = x; then
24803     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24804 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24805     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24806   fi
24807 
24808   # Call helper function which possibly converts this using DOS-style short mode.
24809   # If so, the updated path is stored in $new_path.
24810 
24811   input_path="$new_path"
24812   # Check if we need to convert this using DOS-style short mode. If the path
24813   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24814   # take no chances and rewrite it.
24815   # Note: m4 eats our [], so we need to use [ and ] instead.
24816   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24817   if test "x$has_forbidden_chars" != x; then
24818     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24819     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24820     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24821     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24822       # Going to short mode and back again did indeed matter. Since short mode is
24823       # case insensitive, let's make it lowercase to improve readability.
24824       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24825       # Now convert it back to Unix-style (cygpath)
24826       input_path=`$CYGPATH -u "$shortmode_path"`
24827       new_path="$input_path"
24828     fi
24829   fi
24830 
24831   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24832   if test "x$test_cygdrive_prefix" = x; then
24833     # As a simple fix, exclude /usr/bin since it's not a real path.
24834     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24835       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24836       # a path prefixed by /cygdrive for fixpath to work.
24837       new_path="$CYGWIN_ROOT_PATH$input_path"
24838     fi
24839   fi
24840 
24841 
24842   if test "x$path" != "x$new_path"; then
24843     BOOT_JDK="$new_path"
24844     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24845 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24846   fi
24847 
24848     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24849 
24850   path="$BOOT_JDK"
24851   has_colon=`$ECHO $path | $GREP ^.:`
24852   new_path="$path"
24853   if test "x$has_colon" = x; then
24854     # Not in mixed or Windows style, start by that.
24855     new_path=`cmd //c echo $path`
24856   fi
24857 
24858 
24859   input_path="$new_path"
24860   # Check if we need to convert this using DOS-style short mode. If the path
24861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24862   # take no chances and rewrite it.
24863   # Note: m4 eats our [], so we need to use [ and ] instead.
24864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24865   if test "x$has_forbidden_chars" != x; then
24866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24867     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24868   fi
24869 
24870 
24871   windows_path="$new_path"
24872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24873     unix_path=`$CYGPATH -u "$windows_path"`
24874     new_path="$unix_path"
24875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24877     new_path="$unix_path"
24878   fi
24879 
24880   if test "x$path" != "x$new_path"; then
24881     BOOT_JDK="$new_path"
24882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24883 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24884   fi
24885 
24886   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24887   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24888 
24889     else
24890       # We're on a unix platform. Hooray! :)
24891       path="$BOOT_JDK"
24892       has_space=`$ECHO "$path" | $GREP " "`
24893       if test "x$has_space" != x; then
24894         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24895 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24896         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24897       fi
24898 
24899       # Use eval to expand a potential ~
24900       eval path="$path"
24901       if test ! -f "$path" && test ! -d "$path"; then
24902         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24903       fi
24904 
24905       if test -d "$path"; then
24906         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24907       else
24908         dir="`$DIRNAME "$path"`"
24909         base="`$BASENAME "$path"`"
24910         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24911       fi
24912     fi
24913   fi
24914 
24915             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24916 $as_echo_n "checking for Boot JDK... " >&6; }
24917             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24918 $as_echo "$BOOT_JDK" >&6; }
24919             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24920 $as_echo_n "checking Boot JDK version... " >&6; }
24921             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24922             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24923 $as_echo "$BOOT_JDK_VERSION" >&6; }
24924           fi # end check jdk version
24925         fi # end check javac
24926       fi # end check java
24927     fi # end check boot jdk found
24928   fi
24929 
24930 
24931   # Test: Is $JAVA_HOME set?
24932 
24933   if test "x$BOOT_JDK_FOUND" = xno; then
24934     # Now execute the test
24935 
24936   if test "x$JAVA_HOME" != x; then
24937     JAVA_HOME_PROCESSED="$JAVA_HOME"
24938 
24939   # Only process if variable expands to non-empty
24940 
24941   if test "x$JAVA_HOME_PROCESSED" != x; then
24942     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24943 
24944   # Input might be given as Windows format, start by converting to
24945   # unix format.
24946   path="$JAVA_HOME_PROCESSED"
24947   new_path=`$CYGPATH -u "$path"`
24948 
24949   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24950   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24951   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24952   # "foo.exe" is OK but "foo" is an error.
24953   #
24954   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24955   # It is also a way to make sure we got the proper file name for the real test later on.
24956   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24957   if test "x$test_shortpath" = x; then
24958     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24959 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24960     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24961   fi
24962 
24963   # Call helper function which possibly converts this using DOS-style short mode.
24964   # If so, the updated path is stored in $new_path.
24965 
24966   input_path="$new_path"
24967   # Check if we need to convert this using DOS-style short mode. If the path
24968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24969   # take no chances and rewrite it.
24970   # Note: m4 eats our [], so we need to use [ and ] instead.
24971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24972   if test "x$has_forbidden_chars" != x; then
24973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24974     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24975     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24976     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24977       # Going to short mode and back again did indeed matter. Since short mode is
24978       # case insensitive, let's make it lowercase to improve readability.
24979       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24980       # Now convert it back to Unix-style (cygpath)
24981       input_path=`$CYGPATH -u "$shortmode_path"`
24982       new_path="$input_path"
24983     fi
24984   fi
24985 
24986   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24987   if test "x$test_cygdrive_prefix" = x; then
24988     # As a simple fix, exclude /usr/bin since it's not a real path.
24989     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24990       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24991       # a path prefixed by /cygdrive for fixpath to work.
24992       new_path="$CYGWIN_ROOT_PATH$input_path"
24993     fi
24994   fi
24995 
24996 
24997   if test "x$path" != "x$new_path"; then
24998     JAVA_HOME_PROCESSED="$new_path"
24999     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25000 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25001   fi
25002 
25003     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25004 
25005   path="$JAVA_HOME_PROCESSED"
25006   has_colon=`$ECHO $path | $GREP ^.:`
25007   new_path="$path"
25008   if test "x$has_colon" = x; then
25009     # Not in mixed or Windows style, start by that.
25010     new_path=`cmd //c echo $path`
25011   fi
25012 
25013 
25014   input_path="$new_path"
25015   # Check if we need to convert this using DOS-style short mode. If the path
25016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25017   # take no chances and rewrite it.
25018   # Note: m4 eats our [], so we need to use [ and ] instead.
25019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25020   if test "x$has_forbidden_chars" != x; then
25021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25022     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25023   fi
25024 
25025 
25026   windows_path="$new_path"
25027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25028     unix_path=`$CYGPATH -u "$windows_path"`
25029     new_path="$unix_path"
25030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25032     new_path="$unix_path"
25033   fi
25034 
25035   if test "x$path" != "x$new_path"; then
25036     JAVA_HOME_PROCESSED="$new_path"
25037     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25038 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25039   fi
25040 
25041   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25042   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25043 
25044     else
25045       # We're on a unix platform. Hooray! :)
25046       path="$JAVA_HOME_PROCESSED"
25047       has_space=`$ECHO "$path" | $GREP " "`
25048       if test "x$has_space" != x; then
25049         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25050 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25051         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25052       fi
25053 
25054       # Use eval to expand a potential ~
25055       eval path="$path"
25056       if test ! -f "$path" && test ! -d "$path"; then
25057         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25058       fi
25059 
25060       if test -d "$path"; then
25061         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25062       else
25063         dir="`$DIRNAME "$path"`"
25064         base="`$BASENAME "$path"`"
25065         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25066       fi
25067     fi
25068   fi
25069 
25070     if test ! -d "$JAVA_HOME_PROCESSED"; then
25071       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25072 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25073     else
25074       # Aha, the user has set a JAVA_HOME
25075       # let us use that as the Boot JDK.
25076       BOOT_JDK="$JAVA_HOME_PROCESSED"
25077       BOOT_JDK_FOUND=maybe
25078       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25079 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25080     fi
25081   fi
25082 
25083 
25084     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25085     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25086       # Do we have a bin/java?
25087       if test ! -x "$BOOT_JDK/bin/java"; then
25088         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25089 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25090         BOOT_JDK_FOUND=no
25091       else
25092         # Do we have a bin/javac?
25093         if test ! -x "$BOOT_JDK/bin/javac"; then
25094           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25095 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25096           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25097 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25098           BOOT_JDK_FOUND=no
25099         else
25100           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25101           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25102 
25103           # Extra M4 quote needed to protect [] in grep expression.
25104           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25105           if test "x$FOUND_CORRECT_VERSION" = x; then
25106             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25107 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25108             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25109 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25110             BOOT_JDK_FOUND=no
25111           else
25112             # We're done! :-)
25113             BOOT_JDK_FOUND=yes
25114 
25115   # Only process if variable expands to non-empty
25116 
25117   if test "x$BOOT_JDK" != x; then
25118     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25119 
25120   # Input might be given as Windows format, start by converting to
25121   # unix format.
25122   path="$BOOT_JDK"
25123   new_path=`$CYGPATH -u "$path"`
25124 
25125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25128   # "foo.exe" is OK but "foo" is an error.
25129   #
25130   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25131   # It is also a way to make sure we got the proper file name for the real test later on.
25132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25133   if test "x$test_shortpath" = x; then
25134     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25135 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25136     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25137   fi
25138 
25139   # Call helper function which possibly converts this using DOS-style short mode.
25140   # If so, the updated path is stored in $new_path.
25141 
25142   input_path="$new_path"
25143   # Check if we need to convert this using DOS-style short mode. If the path
25144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25145   # take no chances and rewrite it.
25146   # Note: m4 eats our [], so we need to use [ and ] instead.
25147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25148   if test "x$has_forbidden_chars" != x; then
25149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25150     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25151     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25152     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25153       # Going to short mode and back again did indeed matter. Since short mode is
25154       # case insensitive, let's make it lowercase to improve readability.
25155       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25156       # Now convert it back to Unix-style (cygpath)
25157       input_path=`$CYGPATH -u "$shortmode_path"`
25158       new_path="$input_path"
25159     fi
25160   fi
25161 
25162   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25163   if test "x$test_cygdrive_prefix" = x; then
25164     # As a simple fix, exclude /usr/bin since it's not a real path.
25165     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25166       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25167       # a path prefixed by /cygdrive for fixpath to work.
25168       new_path="$CYGWIN_ROOT_PATH$input_path"
25169     fi
25170   fi
25171 
25172 
25173   if test "x$path" != "x$new_path"; then
25174     BOOT_JDK="$new_path"
25175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25176 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25177   fi
25178 
25179     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25180 
25181   path="$BOOT_JDK"
25182   has_colon=`$ECHO $path | $GREP ^.:`
25183   new_path="$path"
25184   if test "x$has_colon" = x; then
25185     # Not in mixed or Windows style, start by that.
25186     new_path=`cmd //c echo $path`
25187   fi
25188 
25189 
25190   input_path="$new_path"
25191   # Check if we need to convert this using DOS-style short mode. If the path
25192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25193   # take no chances and rewrite it.
25194   # Note: m4 eats our [], so we need to use [ and ] instead.
25195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25196   if test "x$has_forbidden_chars" != x; then
25197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25199   fi
25200 
25201 
25202   windows_path="$new_path"
25203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25204     unix_path=`$CYGPATH -u "$windows_path"`
25205     new_path="$unix_path"
25206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25208     new_path="$unix_path"
25209   fi
25210 
25211   if test "x$path" != "x$new_path"; then
25212     BOOT_JDK="$new_path"
25213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25214 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25215   fi
25216 
25217   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25218   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25219 
25220     else
25221       # We're on a unix platform. Hooray! :)
25222       path="$BOOT_JDK"
25223       has_space=`$ECHO "$path" | $GREP " "`
25224       if test "x$has_space" != x; then
25225         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25226 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25227         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25228       fi
25229 
25230       # Use eval to expand a potential ~
25231       eval path="$path"
25232       if test ! -f "$path" && test ! -d "$path"; then
25233         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25234       fi
25235 
25236       if test -d "$path"; then
25237         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25238       else
25239         dir="`$DIRNAME "$path"`"
25240         base="`$BASENAME "$path"`"
25241         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25242       fi
25243     fi
25244   fi
25245 
25246             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25247 $as_echo_n "checking for Boot JDK... " >&6; }
25248             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25249 $as_echo "$BOOT_JDK" >&6; }
25250             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25251 $as_echo_n "checking Boot JDK version... " >&6; }
25252             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25253             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25254 $as_echo "$BOOT_JDK_VERSION" >&6; }
25255           fi # end check jdk version
25256         fi # end check javac
25257       fi # end check java
25258     fi # end check boot jdk found
25259   fi
25260 
25261 
25262   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25263 
25264   if test "x$BOOT_JDK_FOUND" = xno; then
25265     # Now execute the test
25266 
25267   # Extract the first word of "javac", so it can be a program name with args.
25268 set dummy javac; ac_word=$2
25269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25270 $as_echo_n "checking for $ac_word... " >&6; }
25271 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25272   $as_echo_n "(cached) " >&6
25273 else
25274   case $JAVAC_CHECK in
25275   [\\/]* | ?:[\\/]*)
25276   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25277   ;;
25278   *)
25279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25280 for as_dir in $PATH
25281 do
25282   IFS=$as_save_IFS
25283   test -z "$as_dir" && as_dir=.
25284     for ac_exec_ext in '' $ac_executable_extensions; do
25285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25286     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25288     break 2
25289   fi
25290 done
25291   done
25292 IFS=$as_save_IFS
25293 
25294   ;;
25295 esac
25296 fi
25297 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25298 if test -n "$JAVAC_CHECK"; then
25299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25300 $as_echo "$JAVAC_CHECK" >&6; }
25301 else
25302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25303 $as_echo "no" >&6; }
25304 fi
25305 
25306 
25307   # Extract the first word of "java", so it can be a program name with args.
25308 set dummy java; ac_word=$2
25309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25310 $as_echo_n "checking for $ac_word... " >&6; }
25311 if ${ac_cv_path_JAVA_CHECK+:} false; then :
25312   $as_echo_n "(cached) " >&6
25313 else
25314   case $JAVA_CHECK in
25315   [\\/]* | ?:[\\/]*)
25316   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25317   ;;
25318   *)
25319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25320 for as_dir in $PATH
25321 do
25322   IFS=$as_save_IFS
25323   test -z "$as_dir" && as_dir=.
25324     for ac_exec_ext in '' $ac_executable_extensions; do
25325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25326     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25328     break 2
25329   fi
25330 done
25331   done
25332 IFS=$as_save_IFS
25333 
25334   ;;
25335 esac
25336 fi
25337 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25338 if test -n "$JAVA_CHECK"; then
25339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25340 $as_echo "$JAVA_CHECK" >&6; }
25341 else
25342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25343 $as_echo "no" >&6; }
25344 fi
25345 
25346 
25347   BINARY="$JAVAC_CHECK"
25348   if test "x$JAVAC_CHECK" = x; then
25349     BINARY="$JAVA_CHECK"
25350   fi
25351   if test "x$BINARY" != x; then
25352     # So there is a java(c) binary, it might be part of a JDK.
25353     # Lets find the JDK/JRE directory by following symbolic links.
25354     # Linux/GNU systems often have links from /usr/bin/java to
25355     # /etc/alternatives/java to the real JDK binary.
25356 
25357   if test "x$OPENJDK_BUILD_OS" != xwindows; then
25358     # Follow a chain of symbolic links. Use readlink
25359     # where it exists, else fall back to horribly
25360     # complicated shell code.
25361     if test "x$READLINK_TESTED" != yes; then
25362       # On MacOSX there is a readlink tool with a different
25363       # purpose than the GNU readlink tool. Check the found readlink.
25364       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25365       if test "x$ISGNU" = x; then
25366         # A readlink that we do not know how to use.
25367         # Are there other non-GNU readlinks out there?
25368         READLINK_TESTED=yes
25369         READLINK=
25370       fi
25371     fi
25372 
25373     if test "x$READLINK" != x; then
25374       BINARY=`$READLINK -f $BINARY`
25375     else
25376       # Save the current directory for restoring afterwards
25377       STARTDIR=$PWD
25378       COUNTER=0
25379       sym_link_dir=`$DIRNAME $BINARY`
25380       sym_link_file=`$BASENAME $BINARY`
25381       cd $sym_link_dir
25382       # Use -P flag to resolve symlinks in directories.
25383       cd `$THEPWDCMD -P`
25384       sym_link_dir=`$THEPWDCMD -P`
25385       # Resolve file symlinks
25386       while test $COUNTER -lt 20; do
25387         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25388         if test "x$ISLINK" == x; then
25389           # This is not a symbolic link! We are done!
25390           break
25391         fi
25392         # Again resolve directory symlinks since the target of the just found
25393         # link could be in a different directory
25394         cd `$DIRNAME $ISLINK`
25395         sym_link_dir=`$THEPWDCMD -P`
25396         sym_link_file=`$BASENAME $ISLINK`
25397         let COUNTER=COUNTER+1
25398       done
25399       cd $STARTDIR
25400       BINARY=$sym_link_dir/$sym_link_file
25401     fi
25402   fi
25403 
25404     BOOT_JDK=`dirname "$BINARY"`
25405     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25406     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25407       # Looks like we found ourselves an JDK
25408       BOOT_JDK_FOUND=maybe
25409       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25410 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25411     fi
25412   fi
25413 
25414 
25415     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25416     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25417       # Do we have a bin/java?
25418       if test ! -x "$BOOT_JDK/bin/java"; then
25419         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25420 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25421         BOOT_JDK_FOUND=no
25422       else
25423         # Do we have a bin/javac?
25424         if test ! -x "$BOOT_JDK/bin/javac"; then
25425           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25427           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25428 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25429           BOOT_JDK_FOUND=no
25430         else
25431           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25432           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25433 
25434           # Extra M4 quote needed to protect [] in grep expression.
25435           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25436           if test "x$FOUND_CORRECT_VERSION" = x; then
25437             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25438 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25439             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25440 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25441             BOOT_JDK_FOUND=no
25442           else
25443             # We're done! :-)
25444             BOOT_JDK_FOUND=yes
25445 
25446   # Only process if variable expands to non-empty
25447 
25448   if test "x$BOOT_JDK" != x; then
25449     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25450 
25451   # Input might be given as Windows format, start by converting to
25452   # unix format.
25453   path="$BOOT_JDK"
25454   new_path=`$CYGPATH -u "$path"`
25455 
25456   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25457   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25458   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25459   # "foo.exe" is OK but "foo" is an error.
25460   #
25461   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25462   # It is also a way to make sure we got the proper file name for the real test later on.
25463   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25464   if test "x$test_shortpath" = x; then
25465     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25466 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25467     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25468   fi
25469 
25470   # Call helper function which possibly converts this using DOS-style short mode.
25471   # If so, the updated path is stored in $new_path.
25472 
25473   input_path="$new_path"
25474   # Check if we need to convert this using DOS-style short mode. If the path
25475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25476   # take no chances and rewrite it.
25477   # Note: m4 eats our [], so we need to use [ and ] instead.
25478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25479   if test "x$has_forbidden_chars" != x; then
25480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25481     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25482     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25483     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25484       # Going to short mode and back again did indeed matter. Since short mode is
25485       # case insensitive, let's make it lowercase to improve readability.
25486       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25487       # Now convert it back to Unix-style (cygpath)
25488       input_path=`$CYGPATH -u "$shortmode_path"`
25489       new_path="$input_path"
25490     fi
25491   fi
25492 
25493   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25494   if test "x$test_cygdrive_prefix" = x; then
25495     # As a simple fix, exclude /usr/bin since it's not a real path.
25496     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25497       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25498       # a path prefixed by /cygdrive for fixpath to work.
25499       new_path="$CYGWIN_ROOT_PATH$input_path"
25500     fi
25501   fi
25502 
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     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25511 
25512   path="$BOOT_JDK"
25513   has_colon=`$ECHO $path | $GREP ^.:`
25514   new_path="$path"
25515   if test "x$has_colon" = x; then
25516     # Not in mixed or Windows style, start by that.
25517     new_path=`cmd //c echo $path`
25518   fi
25519 
25520 
25521   input_path="$new_path"
25522   # Check if we need to convert this using DOS-style short mode. If the path
25523   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25524   # take no chances and rewrite it.
25525   # Note: m4 eats our [], so we need to use [ and ] instead.
25526   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25527   if test "x$has_forbidden_chars" != x; then
25528     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25529     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25530   fi
25531 
25532 
25533   windows_path="$new_path"
25534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25535     unix_path=`$CYGPATH -u "$windows_path"`
25536     new_path="$unix_path"
25537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25539     new_path="$unix_path"
25540   fi
25541 
25542   if test "x$path" != "x$new_path"; then
25543     BOOT_JDK="$new_path"
25544     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25545 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25546   fi
25547 
25548   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25549   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25550 
25551     else
25552       # We're on a unix platform. Hooray! :)
25553       path="$BOOT_JDK"
25554       has_space=`$ECHO "$path" | $GREP " "`
25555       if test "x$has_space" != x; then
25556         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25557 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25558         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25559       fi
25560 
25561       # Use eval to expand a potential ~
25562       eval path="$path"
25563       if test ! -f "$path" && test ! -d "$path"; then
25564         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25565       fi
25566 
25567       if test -d "$path"; then
25568         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25569       else
25570         dir="`$DIRNAME "$path"`"
25571         base="`$BASENAME "$path"`"
25572         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25573       fi
25574     fi
25575   fi
25576 
25577             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25578 $as_echo_n "checking for Boot JDK... " >&6; }
25579             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25580 $as_echo "$BOOT_JDK" >&6; }
25581             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25582 $as_echo_n "checking Boot JDK version... " >&6; }
25583             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25584             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25585 $as_echo "$BOOT_JDK_VERSION" >&6; }
25586           fi # end check jdk version
25587         fi # end check javac
25588       fi # end check java
25589     fi # end check boot jdk found
25590   fi
25591 
25592 
25593   # Test: Is there a JDK installed in default, well-known locations?
25594 
25595   if test "x$BOOT_JDK_FOUND" = xno; then
25596     # Now execute the test
25597 
25598   if test "x$OPENJDK_TARGET_OS" = xwindows; then
25599 
25600   if test "x$BOOT_JDK_FOUND" = xno; then
25601     # Now execute the test
25602 
25603   if test "x$ProgramW6432" != x; then
25604     VIRTUAL_DIR="$ProgramW6432/Java"
25605 
25606   windows_path="$VIRTUAL_DIR"
25607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25608     unix_path=`$CYGPATH -u "$windows_path"`
25609     VIRTUAL_DIR="$unix_path"
25610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25611     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25612     VIRTUAL_DIR="$unix_path"
25613   fi
25614 
25615 
25616   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25617   BOOT_JDK_SUFFIX=""
25618   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25619   if test "x$ALL_JDKS_FOUND" != x; then
25620     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25621 
25622   if test "x$BOOT_JDK_FOUND" = xno; then
25623     # Now execute the test
25624 
25625         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25626         if test -d "$BOOT_JDK"; then
25627           BOOT_JDK_FOUND=maybe
25628           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25629 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25630         fi
25631 
25632 
25633     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25634     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25635       # Do we have a bin/java?
25636       if test ! -x "$BOOT_JDK/bin/java"; then
25637         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25638 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25639         BOOT_JDK_FOUND=no
25640       else
25641         # Do we have a bin/javac?
25642         if test ! -x "$BOOT_JDK/bin/javac"; then
25643           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25644 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25645           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25646 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25647           BOOT_JDK_FOUND=no
25648         else
25649           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25650           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25651 
25652           # Extra M4 quote needed to protect [] in grep expression.
25653           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25654           if test "x$FOUND_CORRECT_VERSION" = x; then
25655             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25656 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25657             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25658 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25659             BOOT_JDK_FOUND=no
25660           else
25661             # We're done! :-)
25662             BOOT_JDK_FOUND=yes
25663 
25664   # Only process if variable expands to non-empty
25665 
25666   if test "x$BOOT_JDK" != x; then
25667     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25668 
25669   # Input might be given as Windows format, start by converting to
25670   # unix format.
25671   path="$BOOT_JDK"
25672   new_path=`$CYGPATH -u "$path"`
25673 
25674   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25675   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25676   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25677   # "foo.exe" is OK but "foo" is an error.
25678   #
25679   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25680   # It is also a way to make sure we got the proper file name for the real test later on.
25681   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25682   if test "x$test_shortpath" = x; then
25683     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25684 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25685     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25686   fi
25687 
25688   # Call helper function which possibly converts this using DOS-style short mode.
25689   # If so, the updated path is stored in $new_path.
25690 
25691   input_path="$new_path"
25692   # Check if we need to convert this using DOS-style short mode. If the path
25693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25694   # take no chances and rewrite it.
25695   # Note: m4 eats our [], so we need to use [ and ] instead.
25696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25697   if test "x$has_forbidden_chars" != x; then
25698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25699     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25700     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25701     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25702       # Going to short mode and back again did indeed matter. Since short mode is
25703       # case insensitive, let's make it lowercase to improve readability.
25704       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25705       # Now convert it back to Unix-style (cygpath)
25706       input_path=`$CYGPATH -u "$shortmode_path"`
25707       new_path="$input_path"
25708     fi
25709   fi
25710 
25711   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25712   if test "x$test_cygdrive_prefix" = x; then
25713     # As a simple fix, exclude /usr/bin since it's not a real path.
25714     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25715       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25716       # a path prefixed by /cygdrive for fixpath to work.
25717       new_path="$CYGWIN_ROOT_PATH$input_path"
25718     fi
25719   fi
25720 
25721 
25722   if test "x$path" != "x$new_path"; then
25723     BOOT_JDK="$new_path"
25724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25725 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25726   fi
25727 
25728     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25729 
25730   path="$BOOT_JDK"
25731   has_colon=`$ECHO $path | $GREP ^.:`
25732   new_path="$path"
25733   if test "x$has_colon" = x; then
25734     # Not in mixed or Windows style, start by that.
25735     new_path=`cmd //c echo $path`
25736   fi
25737 
25738 
25739   input_path="$new_path"
25740   # Check if we need to convert this using DOS-style short mode. If the path
25741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25742   # take no chances and rewrite it.
25743   # Note: m4 eats our [], so we need to use [ and ] instead.
25744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25745   if test "x$has_forbidden_chars" != x; then
25746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25747     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25748   fi
25749 
25750 
25751   windows_path="$new_path"
25752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25753     unix_path=`$CYGPATH -u "$windows_path"`
25754     new_path="$unix_path"
25755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25757     new_path="$unix_path"
25758   fi
25759 
25760   if test "x$path" != "x$new_path"; then
25761     BOOT_JDK="$new_path"
25762     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25763 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25764   fi
25765 
25766   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25767   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25768 
25769     else
25770       # We're on a unix platform. Hooray! :)
25771       path="$BOOT_JDK"
25772       has_space=`$ECHO "$path" | $GREP " "`
25773       if test "x$has_space" != x; then
25774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25775 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25776         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25777       fi
25778 
25779       # Use eval to expand a potential ~
25780       eval path="$path"
25781       if test ! -f "$path" && test ! -d "$path"; then
25782         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25783       fi
25784 
25785       if test -d "$path"; then
25786         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25787       else
25788         dir="`$DIRNAME "$path"`"
25789         base="`$BASENAME "$path"`"
25790         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25791       fi
25792     fi
25793   fi
25794 
25795             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25796 $as_echo_n "checking for Boot JDK... " >&6; }
25797             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25798 $as_echo "$BOOT_JDK" >&6; }
25799             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25800 $as_echo_n "checking Boot JDK version... " >&6; }
25801             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25802             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25803 $as_echo "$BOOT_JDK_VERSION" >&6; }
25804           fi # end check jdk version
25805         fi # end check javac
25806       fi # end check java
25807     fi # end check boot jdk found
25808   fi
25809 
25810     done
25811   fi
25812 
25813   fi
25814 
25815 
25816     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25817     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25818       # Do we have a bin/java?
25819       if test ! -x "$BOOT_JDK/bin/java"; then
25820         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25821 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25822         BOOT_JDK_FOUND=no
25823       else
25824         # Do we have a bin/javac?
25825         if test ! -x "$BOOT_JDK/bin/javac"; then
25826           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25828           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25829 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25830           BOOT_JDK_FOUND=no
25831         else
25832           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25833           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25834 
25835           # Extra M4 quote needed to protect [] in grep expression.
25836           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25837           if test "x$FOUND_CORRECT_VERSION" = x; then
25838             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25839 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25840             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25841 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25842             BOOT_JDK_FOUND=no
25843           else
25844             # We're done! :-)
25845             BOOT_JDK_FOUND=yes
25846 
25847   # Only process if variable expands to non-empty
25848 
25849   if test "x$BOOT_JDK" != x; then
25850     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25851 
25852   # Input might be given as Windows format, start by converting to
25853   # unix format.
25854   path="$BOOT_JDK"
25855   new_path=`$CYGPATH -u "$path"`
25856 
25857   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25858   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25859   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25860   # "foo.exe" is OK but "foo" is an error.
25861   #
25862   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25863   # It is also a way to make sure we got the proper file name for the real test later on.
25864   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25865   if test "x$test_shortpath" = x; then
25866     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25867 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25868     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25869   fi
25870 
25871   # Call helper function which possibly converts this using DOS-style short mode.
25872   # If so, the updated path is stored in $new_path.
25873 
25874   input_path="$new_path"
25875   # Check if we need to convert this using DOS-style short mode. If the path
25876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25877   # take no chances and rewrite it.
25878   # Note: m4 eats our [], so we need to use [ and ] instead.
25879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25880   if test "x$has_forbidden_chars" != x; then
25881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25882     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25883     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25884     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25885       # Going to short mode and back again did indeed matter. Since short mode is
25886       # case insensitive, let's make it lowercase to improve readability.
25887       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25888       # Now convert it back to Unix-style (cygpath)
25889       input_path=`$CYGPATH -u "$shortmode_path"`
25890       new_path="$input_path"
25891     fi
25892   fi
25893 
25894   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25895   if test "x$test_cygdrive_prefix" = x; then
25896     # As a simple fix, exclude /usr/bin since it's not a real path.
25897     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25898       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25899       # a path prefixed by /cygdrive for fixpath to work.
25900       new_path="$CYGWIN_ROOT_PATH$input_path"
25901     fi
25902   fi
25903 
25904 
25905   if test "x$path" != "x$new_path"; then
25906     BOOT_JDK="$new_path"
25907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25908 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25909   fi
25910 
25911     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25912 
25913   path="$BOOT_JDK"
25914   has_colon=`$ECHO $path | $GREP ^.:`
25915   new_path="$path"
25916   if test "x$has_colon" = x; then
25917     # Not in mixed or Windows style, start by that.
25918     new_path=`cmd //c echo $path`
25919   fi
25920 
25921 
25922   input_path="$new_path"
25923   # Check if we need to convert this using DOS-style short mode. If the path
25924   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25925   # take no chances and rewrite it.
25926   # Note: m4 eats our [], so we need to use [ and ] instead.
25927   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25928   if test "x$has_forbidden_chars" != x; then
25929     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25930     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25931   fi
25932 
25933 
25934   windows_path="$new_path"
25935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25936     unix_path=`$CYGPATH -u "$windows_path"`
25937     new_path="$unix_path"
25938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25940     new_path="$unix_path"
25941   fi
25942 
25943   if test "x$path" != "x$new_path"; then
25944     BOOT_JDK="$new_path"
25945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25946 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25947   fi
25948 
25949   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25950   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25951 
25952     else
25953       # We're on a unix platform. Hooray! :)
25954       path="$BOOT_JDK"
25955       has_space=`$ECHO "$path" | $GREP " "`
25956       if test "x$has_space" != x; then
25957         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25958 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25959         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25960       fi
25961 
25962       # Use eval to expand a potential ~
25963       eval path="$path"
25964       if test ! -f "$path" && test ! -d "$path"; then
25965         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25966       fi
25967 
25968       if test -d "$path"; then
25969         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25970       else
25971         dir="`$DIRNAME "$path"`"
25972         base="`$BASENAME "$path"`"
25973         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25974       fi
25975     fi
25976   fi
25977 
25978             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25979 $as_echo_n "checking for Boot JDK... " >&6; }
25980             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25981 $as_echo "$BOOT_JDK" >&6; }
25982             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25983 $as_echo_n "checking Boot JDK version... " >&6; }
25984             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25985             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25986 $as_echo "$BOOT_JDK_VERSION" >&6; }
25987           fi # end check jdk version
25988         fi # end check javac
25989       fi # end check java
25990     fi # end check boot jdk found
25991   fi
25992 
25993 
25994   if test "x$BOOT_JDK_FOUND" = xno; then
25995     # Now execute the test
25996 
25997   if test "x$PROGRAMW6432" != x; then
25998     VIRTUAL_DIR="$PROGRAMW6432/Java"
25999 
26000   windows_path="$VIRTUAL_DIR"
26001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26002     unix_path=`$CYGPATH -u "$windows_path"`
26003     VIRTUAL_DIR="$unix_path"
26004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26006     VIRTUAL_DIR="$unix_path"
26007   fi
26008 
26009 
26010   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26011   BOOT_JDK_SUFFIX=""
26012   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26013   if test "x$ALL_JDKS_FOUND" != x; then
26014     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26015 
26016   if test "x$BOOT_JDK_FOUND" = xno; then
26017     # Now execute the test
26018 
26019         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26020         if test -d "$BOOT_JDK"; then
26021           BOOT_JDK_FOUND=maybe
26022           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26023 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26024         fi
26025 
26026 
26027     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26028     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26029       # Do we have a bin/java?
26030       if test ! -x "$BOOT_JDK/bin/java"; then
26031         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26033         BOOT_JDK_FOUND=no
26034       else
26035         # Do we have a bin/javac?
26036         if test ! -x "$BOOT_JDK/bin/javac"; then
26037           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26038 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26039           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26040 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26041           BOOT_JDK_FOUND=no
26042         else
26043           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26044           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26045 
26046           # Extra M4 quote needed to protect [] in grep expression.
26047           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26048           if test "x$FOUND_CORRECT_VERSION" = x; then
26049             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26050 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26051             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26052 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26053             BOOT_JDK_FOUND=no
26054           else
26055             # We're done! :-)
26056             BOOT_JDK_FOUND=yes
26057 
26058   # Only process if variable expands to non-empty
26059 
26060   if test "x$BOOT_JDK" != x; then
26061     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26062 
26063   # Input might be given as Windows format, start by converting to
26064   # unix format.
26065   path="$BOOT_JDK"
26066   new_path=`$CYGPATH -u "$path"`
26067 
26068   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26069   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26070   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26071   # "foo.exe" is OK but "foo" is an error.
26072   #
26073   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26074   # It is also a way to make sure we got the proper file name for the real test later on.
26075   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26076   if test "x$test_shortpath" = x; then
26077     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26078 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26079     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26080   fi
26081 
26082   # Call helper function which possibly converts this using DOS-style short mode.
26083   # If so, the updated path is stored in $new_path.
26084 
26085   input_path="$new_path"
26086   # Check if we need to convert this using DOS-style short mode. If the path
26087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26088   # take no chances and rewrite it.
26089   # Note: m4 eats our [], so we need to use [ and ] instead.
26090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26091   if test "x$has_forbidden_chars" != x; then
26092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26096       # Going to short mode and back again did indeed matter. Since short mode is
26097       # case insensitive, let's make it lowercase to improve readability.
26098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26099       # Now convert it back to Unix-style (cygpath)
26100       input_path=`$CYGPATH -u "$shortmode_path"`
26101       new_path="$input_path"
26102     fi
26103   fi
26104 
26105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26106   if test "x$test_cygdrive_prefix" = x; then
26107     # As a simple fix, exclude /usr/bin since it's not a real path.
26108     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26110       # a path prefixed by /cygdrive for fixpath to work.
26111       new_path="$CYGWIN_ROOT_PATH$input_path"
26112     fi
26113   fi
26114 
26115 
26116   if test "x$path" != "x$new_path"; then
26117     BOOT_JDK="$new_path"
26118     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26119 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26120   fi
26121 
26122     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26123 
26124   path="$BOOT_JDK"
26125   has_colon=`$ECHO $path | $GREP ^.:`
26126   new_path="$path"
26127   if test "x$has_colon" = x; then
26128     # Not in mixed or Windows style, start by that.
26129     new_path=`cmd //c echo $path`
26130   fi
26131 
26132 
26133   input_path="$new_path"
26134   # Check if we need to convert this using DOS-style short mode. If the path
26135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26136   # take no chances and rewrite it.
26137   # Note: m4 eats our [], so we need to use [ and ] instead.
26138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26139   if test "x$has_forbidden_chars" != x; then
26140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26141     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26142   fi
26143 
26144 
26145   windows_path="$new_path"
26146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26147     unix_path=`$CYGPATH -u "$windows_path"`
26148     new_path="$unix_path"
26149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26151     new_path="$unix_path"
26152   fi
26153 
26154   if test "x$path" != "x$new_path"; then
26155     BOOT_JDK="$new_path"
26156     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26157 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26158   fi
26159 
26160   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26161   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26162 
26163     else
26164       # We're on a unix platform. Hooray! :)
26165       path="$BOOT_JDK"
26166       has_space=`$ECHO "$path" | $GREP " "`
26167       if test "x$has_space" != x; then
26168         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26169 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26170         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26171       fi
26172 
26173       # Use eval to expand a potential ~
26174       eval path="$path"
26175       if test ! -f "$path" && test ! -d "$path"; then
26176         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26177       fi
26178 
26179       if test -d "$path"; then
26180         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26181       else
26182         dir="`$DIRNAME "$path"`"
26183         base="`$BASENAME "$path"`"
26184         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26185       fi
26186     fi
26187   fi
26188 
26189             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26190 $as_echo_n "checking for Boot JDK... " >&6; }
26191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26192 $as_echo "$BOOT_JDK" >&6; }
26193             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26194 $as_echo_n "checking Boot JDK version... " >&6; }
26195             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26196             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26197 $as_echo "$BOOT_JDK_VERSION" >&6; }
26198           fi # end check jdk version
26199         fi # end check javac
26200       fi # end check java
26201     fi # end check boot jdk found
26202   fi
26203 
26204     done
26205   fi
26206 
26207   fi
26208 
26209 
26210     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26211     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26212       # Do we have a bin/java?
26213       if test ! -x "$BOOT_JDK/bin/java"; then
26214         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26215 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26216         BOOT_JDK_FOUND=no
26217       else
26218         # Do we have a bin/javac?
26219         if test ! -x "$BOOT_JDK/bin/javac"; then
26220           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26222           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26223 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26224           BOOT_JDK_FOUND=no
26225         else
26226           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26227           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26228 
26229           # Extra M4 quote needed to protect [] in grep expression.
26230           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26231           if test "x$FOUND_CORRECT_VERSION" = x; then
26232             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26233 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26234             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26235 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26236             BOOT_JDK_FOUND=no
26237           else
26238             # We're done! :-)
26239             BOOT_JDK_FOUND=yes
26240 
26241   # Only process if variable expands to non-empty
26242 
26243   if test "x$BOOT_JDK" != x; then
26244     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26245 
26246   # Input might be given as Windows format, start by converting to
26247   # unix format.
26248   path="$BOOT_JDK"
26249   new_path=`$CYGPATH -u "$path"`
26250 
26251   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26252   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26253   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26254   # "foo.exe" is OK but "foo" is an error.
26255   #
26256   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26257   # It is also a way to make sure we got the proper file name for the real test later on.
26258   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26259   if test "x$test_shortpath" = x; then
26260     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26261 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26262     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26263   fi
26264 
26265   # Call helper function which possibly converts this using DOS-style short mode.
26266   # If so, the updated path is stored in $new_path.
26267 
26268   input_path="$new_path"
26269   # Check if we need to convert this using DOS-style short mode. If the path
26270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271   # take no chances and rewrite it.
26272   # Note: m4 eats our [], so we need to use [ and ] instead.
26273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26274   if test "x$has_forbidden_chars" != x; then
26275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26279       # Going to short mode and back again did indeed matter. Since short mode is
26280       # case insensitive, let's make it lowercase to improve readability.
26281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26282       # Now convert it back to Unix-style (cygpath)
26283       input_path=`$CYGPATH -u "$shortmode_path"`
26284       new_path="$input_path"
26285     fi
26286   fi
26287 
26288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26289   if test "x$test_cygdrive_prefix" = x; then
26290     # As a simple fix, exclude /usr/bin since it's not a real path.
26291     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26293       # a path prefixed by /cygdrive for fixpath to work.
26294       new_path="$CYGWIN_ROOT_PATH$input_path"
26295     fi
26296   fi
26297 
26298 
26299   if test "x$path" != "x$new_path"; then
26300     BOOT_JDK="$new_path"
26301     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26302 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26303   fi
26304 
26305     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26306 
26307   path="$BOOT_JDK"
26308   has_colon=`$ECHO $path | $GREP ^.:`
26309   new_path="$path"
26310   if test "x$has_colon" = x; then
26311     # Not in mixed or Windows style, start by that.
26312     new_path=`cmd //c echo $path`
26313   fi
26314 
26315 
26316   input_path="$new_path"
26317   # Check if we need to convert this using DOS-style short mode. If the path
26318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26319   # take no chances and rewrite it.
26320   # Note: m4 eats our [], so we need to use [ and ] instead.
26321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26322   if test "x$has_forbidden_chars" != x; then
26323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26324     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26325   fi
26326 
26327 
26328   windows_path="$new_path"
26329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26330     unix_path=`$CYGPATH -u "$windows_path"`
26331     new_path="$unix_path"
26332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26334     new_path="$unix_path"
26335   fi
26336 
26337   if test "x$path" != "x$new_path"; then
26338     BOOT_JDK="$new_path"
26339     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26340 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26341   fi
26342 
26343   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26344   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26345 
26346     else
26347       # We're on a unix platform. Hooray! :)
26348       path="$BOOT_JDK"
26349       has_space=`$ECHO "$path" | $GREP " "`
26350       if test "x$has_space" != x; then
26351         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26352 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26353         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26354       fi
26355 
26356       # Use eval to expand a potential ~
26357       eval path="$path"
26358       if test ! -f "$path" && test ! -d "$path"; then
26359         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26360       fi
26361 
26362       if test -d "$path"; then
26363         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26364       else
26365         dir="`$DIRNAME "$path"`"
26366         base="`$BASENAME "$path"`"
26367         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26368       fi
26369     fi
26370   fi
26371 
26372             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26373 $as_echo_n "checking for Boot JDK... " >&6; }
26374             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26375 $as_echo "$BOOT_JDK" >&6; }
26376             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26377 $as_echo_n "checking Boot JDK version... " >&6; }
26378             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26379             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26380 $as_echo "$BOOT_JDK_VERSION" >&6; }
26381           fi # end check jdk version
26382         fi # end check javac
26383       fi # end check java
26384     fi # end check boot jdk found
26385   fi
26386 
26387 
26388   if test "x$BOOT_JDK_FOUND" = xno; then
26389     # Now execute the test
26390 
26391   if test "x$PROGRAMFILES" != x; then
26392     VIRTUAL_DIR="$PROGRAMFILES/Java"
26393 
26394   windows_path="$VIRTUAL_DIR"
26395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26396     unix_path=`$CYGPATH -u "$windows_path"`
26397     VIRTUAL_DIR="$unix_path"
26398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26400     VIRTUAL_DIR="$unix_path"
26401   fi
26402 
26403 
26404   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26405   BOOT_JDK_SUFFIX=""
26406   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26407   if test "x$ALL_JDKS_FOUND" != x; then
26408     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26409 
26410   if test "x$BOOT_JDK_FOUND" = xno; then
26411     # Now execute the test
26412 
26413         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26414         if test -d "$BOOT_JDK"; then
26415           BOOT_JDK_FOUND=maybe
26416           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26417 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26418         fi
26419 
26420 
26421     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26422     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26423       # Do we have a bin/java?
26424       if test ! -x "$BOOT_JDK/bin/java"; then
26425         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26426 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26427         BOOT_JDK_FOUND=no
26428       else
26429         # Do we have a bin/javac?
26430         if test ! -x "$BOOT_JDK/bin/javac"; then
26431           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26432 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26433           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26434 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26435           BOOT_JDK_FOUND=no
26436         else
26437           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26438           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26439 
26440           # Extra M4 quote needed to protect [] in grep expression.
26441           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26442           if test "x$FOUND_CORRECT_VERSION" = x; then
26443             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26445             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26446 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26447             BOOT_JDK_FOUND=no
26448           else
26449             # We're done! :-)
26450             BOOT_JDK_FOUND=yes
26451 
26452   # Only process if variable expands to non-empty
26453 
26454   if test "x$BOOT_JDK" != x; then
26455     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26456 
26457   # Input might be given as Windows format, start by converting to
26458   # unix format.
26459   path="$BOOT_JDK"
26460   new_path=`$CYGPATH -u "$path"`
26461 
26462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26465   # "foo.exe" is OK but "foo" is an error.
26466   #
26467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26468   # It is also a way to make sure we got the proper file name for the real test later on.
26469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26470   if test "x$test_shortpath" = x; then
26471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26472 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26473     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26474   fi
26475 
26476   # Call helper function which possibly converts this using DOS-style short mode.
26477   # If so, the updated path is stored in $new_path.
26478 
26479   input_path="$new_path"
26480   # Check if we need to convert this using DOS-style short mode. If the path
26481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26482   # take no chances and rewrite it.
26483   # Note: m4 eats our [], so we need to use [ and ] instead.
26484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26485   if test "x$has_forbidden_chars" != x; then
26486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26490       # Going to short mode and back again did indeed matter. Since short mode is
26491       # case insensitive, let's make it lowercase to improve readability.
26492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26493       # Now convert it back to Unix-style (cygpath)
26494       input_path=`$CYGPATH -u "$shortmode_path"`
26495       new_path="$input_path"
26496     fi
26497   fi
26498 
26499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26500   if test "x$test_cygdrive_prefix" = x; then
26501     # As a simple fix, exclude /usr/bin since it's not a real path.
26502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26504       # a path prefixed by /cygdrive for fixpath to work.
26505       new_path="$CYGWIN_ROOT_PATH$input_path"
26506     fi
26507   fi
26508 
26509 
26510   if test "x$path" != "x$new_path"; then
26511     BOOT_JDK="$new_path"
26512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26513 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26514   fi
26515 
26516     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26517 
26518   path="$BOOT_JDK"
26519   has_colon=`$ECHO $path | $GREP ^.:`
26520   new_path="$path"
26521   if test "x$has_colon" = x; then
26522     # Not in mixed or Windows style, start by that.
26523     new_path=`cmd //c echo $path`
26524   fi
26525 
26526 
26527   input_path="$new_path"
26528   # Check if we need to convert this using DOS-style short mode. If the path
26529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26530   # take no chances and rewrite it.
26531   # Note: m4 eats our [], so we need to use [ and ] instead.
26532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26533   if test "x$has_forbidden_chars" != x; then
26534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26536   fi
26537 
26538 
26539   windows_path="$new_path"
26540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26541     unix_path=`$CYGPATH -u "$windows_path"`
26542     new_path="$unix_path"
26543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26545     new_path="$unix_path"
26546   fi
26547 
26548   if test "x$path" != "x$new_path"; then
26549     BOOT_JDK="$new_path"
26550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26551 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26552   fi
26553 
26554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26556 
26557     else
26558       # We're on a unix platform. Hooray! :)
26559       path="$BOOT_JDK"
26560       has_space=`$ECHO "$path" | $GREP " "`
26561       if test "x$has_space" != x; then
26562         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26563 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26564         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26565       fi
26566 
26567       # Use eval to expand a potential ~
26568       eval path="$path"
26569       if test ! -f "$path" && test ! -d "$path"; then
26570         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26571       fi
26572 
26573       if test -d "$path"; then
26574         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26575       else
26576         dir="`$DIRNAME "$path"`"
26577         base="`$BASENAME "$path"`"
26578         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26579       fi
26580     fi
26581   fi
26582 
26583             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26584 $as_echo_n "checking for Boot JDK... " >&6; }
26585             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26586 $as_echo "$BOOT_JDK" >&6; }
26587             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26588 $as_echo_n "checking Boot JDK version... " >&6; }
26589             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26590             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26591 $as_echo "$BOOT_JDK_VERSION" >&6; }
26592           fi # end check jdk version
26593         fi # end check javac
26594       fi # end check java
26595     fi # end check boot jdk found
26596   fi
26597 
26598     done
26599   fi
26600 
26601   fi
26602 
26603 
26604     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26605     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26606       # Do we have a bin/java?
26607       if test ! -x "$BOOT_JDK/bin/java"; then
26608         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26609 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26610         BOOT_JDK_FOUND=no
26611       else
26612         # Do we have a bin/javac?
26613         if test ! -x "$BOOT_JDK/bin/javac"; then
26614           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26615 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26616           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26617 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26618           BOOT_JDK_FOUND=no
26619         else
26620           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26621           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26622 
26623           # Extra M4 quote needed to protect [] in grep expression.
26624           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26625           if test "x$FOUND_CORRECT_VERSION" = x; then
26626             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26627 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26628             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26629 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26630             BOOT_JDK_FOUND=no
26631           else
26632             # We're done! :-)
26633             BOOT_JDK_FOUND=yes
26634 
26635   # Only process if variable expands to non-empty
26636 
26637   if test "x$BOOT_JDK" != x; then
26638     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26639 
26640   # Input might be given as Windows format, start by converting to
26641   # unix format.
26642   path="$BOOT_JDK"
26643   new_path=`$CYGPATH -u "$path"`
26644 
26645   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26646   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26647   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26648   # "foo.exe" is OK but "foo" is an error.
26649   #
26650   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26651   # It is also a way to make sure we got the proper file name for the real test later on.
26652   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26653   if test "x$test_shortpath" = x; then
26654     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26655 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26656     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26657   fi
26658 
26659   # Call helper function which possibly converts this using DOS-style short mode.
26660   # If so, the updated path is stored in $new_path.
26661 
26662   input_path="$new_path"
26663   # Check if we need to convert this using DOS-style short mode. If the path
26664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26665   # take no chances and rewrite it.
26666   # Note: m4 eats our [], so we need to use [ and ] instead.
26667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26668   if test "x$has_forbidden_chars" != x; then
26669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26670     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26671     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26672     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26673       # Going to short mode and back again did indeed matter. Since short mode is
26674       # case insensitive, let's make it lowercase to improve readability.
26675       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26676       # Now convert it back to Unix-style (cygpath)
26677       input_path=`$CYGPATH -u "$shortmode_path"`
26678       new_path="$input_path"
26679     fi
26680   fi
26681 
26682   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26683   if test "x$test_cygdrive_prefix" = x; then
26684     # As a simple fix, exclude /usr/bin since it's not a real path.
26685     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26686       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26687       # a path prefixed by /cygdrive for fixpath to work.
26688       new_path="$CYGWIN_ROOT_PATH$input_path"
26689     fi
26690   fi
26691 
26692 
26693   if test "x$path" != "x$new_path"; then
26694     BOOT_JDK="$new_path"
26695     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26696 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26697   fi
26698 
26699     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26700 
26701   path="$BOOT_JDK"
26702   has_colon=`$ECHO $path | $GREP ^.:`
26703   new_path="$path"
26704   if test "x$has_colon" = x; then
26705     # Not in mixed or Windows style, start by that.
26706     new_path=`cmd //c echo $path`
26707   fi
26708 
26709 
26710   input_path="$new_path"
26711   # Check if we need to convert this using DOS-style short mode. If the path
26712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26713   # take no chances and rewrite it.
26714   # Note: m4 eats our [], so we need to use [ and ] instead.
26715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26716   if test "x$has_forbidden_chars" != x; then
26717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26718     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26719   fi
26720 
26721 
26722   windows_path="$new_path"
26723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26724     unix_path=`$CYGPATH -u "$windows_path"`
26725     new_path="$unix_path"
26726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26728     new_path="$unix_path"
26729   fi
26730 
26731   if test "x$path" != "x$new_path"; then
26732     BOOT_JDK="$new_path"
26733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26734 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26735   fi
26736 
26737   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26738   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26739 
26740     else
26741       # We're on a unix platform. Hooray! :)
26742       path="$BOOT_JDK"
26743       has_space=`$ECHO "$path" | $GREP " "`
26744       if test "x$has_space" != x; then
26745         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26746 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26747         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26748       fi
26749 
26750       # Use eval to expand a potential ~
26751       eval path="$path"
26752       if test ! -f "$path" && test ! -d "$path"; then
26753         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26754       fi
26755 
26756       if test -d "$path"; then
26757         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26758       else
26759         dir="`$DIRNAME "$path"`"
26760         base="`$BASENAME "$path"`"
26761         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26762       fi
26763     fi
26764   fi
26765 
26766             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26767 $as_echo_n "checking for Boot JDK... " >&6; }
26768             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26769 $as_echo "$BOOT_JDK" >&6; }
26770             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26771 $as_echo_n "checking Boot JDK version... " >&6; }
26772             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26773             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26774 $as_echo "$BOOT_JDK_VERSION" >&6; }
26775           fi # end check jdk version
26776         fi # end check javac
26777       fi # end check java
26778     fi # end check boot jdk found
26779   fi
26780 
26781 
26782   if test "x$BOOT_JDK_FOUND" = xno; then
26783     # Now execute the test
26784 
26785   if test "x$ProgramFiles" != x; then
26786     VIRTUAL_DIR="$ProgramFiles/Java"
26787 
26788   windows_path="$VIRTUAL_DIR"
26789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26790     unix_path=`$CYGPATH -u "$windows_path"`
26791     VIRTUAL_DIR="$unix_path"
26792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26794     VIRTUAL_DIR="$unix_path"
26795   fi
26796 
26797 
26798   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26799   BOOT_JDK_SUFFIX=""
26800   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26801   if test "x$ALL_JDKS_FOUND" != x; then
26802     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26803 
26804   if test "x$BOOT_JDK_FOUND" = xno; then
26805     # Now execute the test
26806 
26807         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26808         if test -d "$BOOT_JDK"; then
26809           BOOT_JDK_FOUND=maybe
26810           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26811 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26812         fi
26813 
26814 
26815     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26816     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26817       # Do we have a bin/java?
26818       if test ! -x "$BOOT_JDK/bin/java"; then
26819         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26820 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26821         BOOT_JDK_FOUND=no
26822       else
26823         # Do we have a bin/javac?
26824         if test ! -x "$BOOT_JDK/bin/javac"; then
26825           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26826 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26827           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26828 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26829           BOOT_JDK_FOUND=no
26830         else
26831           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26832           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26833 
26834           # Extra M4 quote needed to protect [] in grep expression.
26835           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26836           if test "x$FOUND_CORRECT_VERSION" = x; then
26837             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26838 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26839             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26840 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26841             BOOT_JDK_FOUND=no
26842           else
26843             # We're done! :-)
26844             BOOT_JDK_FOUND=yes
26845 
26846   # Only process if variable expands to non-empty
26847 
26848   if test "x$BOOT_JDK" != x; then
26849     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26850 
26851   # Input might be given as Windows format, start by converting to
26852   # unix format.
26853   path="$BOOT_JDK"
26854   new_path=`$CYGPATH -u "$path"`
26855 
26856   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26857   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26858   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26859   # "foo.exe" is OK but "foo" is an error.
26860   #
26861   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26862   # It is also a way to make sure we got the proper file name for the real test later on.
26863   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26864   if test "x$test_shortpath" = x; then
26865     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26866 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26867     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26868   fi
26869 
26870   # Call helper function which possibly converts this using DOS-style short mode.
26871   # If so, the updated path is stored in $new_path.
26872 
26873   input_path="$new_path"
26874   # Check if we need to convert this using DOS-style short mode. If the path
26875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26876   # take no chances and rewrite it.
26877   # Note: m4 eats our [], so we need to use [ and ] instead.
26878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26879   if test "x$has_forbidden_chars" != x; then
26880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26881     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26882     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26883     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26884       # Going to short mode and back again did indeed matter. Since short mode is
26885       # case insensitive, let's make it lowercase to improve readability.
26886       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26887       # Now convert it back to Unix-style (cygpath)
26888       input_path=`$CYGPATH -u "$shortmode_path"`
26889       new_path="$input_path"
26890     fi
26891   fi
26892 
26893   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26894   if test "x$test_cygdrive_prefix" = x; then
26895     # As a simple fix, exclude /usr/bin since it's not a real path.
26896     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26897       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26898       # a path prefixed by /cygdrive for fixpath to work.
26899       new_path="$CYGWIN_ROOT_PATH$input_path"
26900     fi
26901   fi
26902 
26903 
26904   if test "x$path" != "x$new_path"; then
26905     BOOT_JDK="$new_path"
26906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26907 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26908   fi
26909 
26910     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26911 
26912   path="$BOOT_JDK"
26913   has_colon=`$ECHO $path | $GREP ^.:`
26914   new_path="$path"
26915   if test "x$has_colon" = x; then
26916     # Not in mixed or Windows style, start by that.
26917     new_path=`cmd //c echo $path`
26918   fi
26919 
26920 
26921   input_path="$new_path"
26922   # Check if we need to convert this using DOS-style short mode. If the path
26923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26924   # take no chances and rewrite it.
26925   # Note: m4 eats our [], so we need to use [ and ] instead.
26926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26927   if test "x$has_forbidden_chars" != x; then
26928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26929     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26930   fi
26931 
26932 
26933   windows_path="$new_path"
26934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26935     unix_path=`$CYGPATH -u "$windows_path"`
26936     new_path="$unix_path"
26937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26939     new_path="$unix_path"
26940   fi
26941 
26942   if test "x$path" != "x$new_path"; then
26943     BOOT_JDK="$new_path"
26944     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26945 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26946   fi
26947 
26948   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26949   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26950 
26951     else
26952       # We're on a unix platform. Hooray! :)
26953       path="$BOOT_JDK"
26954       has_space=`$ECHO "$path" | $GREP " "`
26955       if test "x$has_space" != x; then
26956         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26957 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26958         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26959       fi
26960 
26961       # Use eval to expand a potential ~
26962       eval path="$path"
26963       if test ! -f "$path" && test ! -d "$path"; then
26964         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26965       fi
26966 
26967       if test -d "$path"; then
26968         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26969       else
26970         dir="`$DIRNAME "$path"`"
26971         base="`$BASENAME "$path"`"
26972         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26973       fi
26974     fi
26975   fi
26976 
26977             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26978 $as_echo_n "checking for Boot JDK... " >&6; }
26979             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26980 $as_echo "$BOOT_JDK" >&6; }
26981             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26982 $as_echo_n "checking Boot JDK version... " >&6; }
26983             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26984             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26985 $as_echo "$BOOT_JDK_VERSION" >&6; }
26986           fi # end check jdk version
26987         fi # end check javac
26988       fi # end check java
26989     fi # end check boot jdk found
26990   fi
26991 
26992     done
26993   fi
26994 
26995   fi
26996 
26997 
26998     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26999     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27000       # Do we have a bin/java?
27001       if test ! -x "$BOOT_JDK/bin/java"; then
27002         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27003 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27004         BOOT_JDK_FOUND=no
27005       else
27006         # Do we have a bin/javac?
27007         if test ! -x "$BOOT_JDK/bin/javac"; then
27008           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27009 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27010           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27011 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27012           BOOT_JDK_FOUND=no
27013         else
27014           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27015           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27016 
27017           # Extra M4 quote needed to protect [] in grep expression.
27018           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27019           if test "x$FOUND_CORRECT_VERSION" = x; then
27020             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27021 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27022             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27023 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27024             BOOT_JDK_FOUND=no
27025           else
27026             # We're done! :-)
27027             BOOT_JDK_FOUND=yes
27028 
27029   # Only process if variable expands to non-empty
27030 
27031   if test "x$BOOT_JDK" != x; then
27032     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27033 
27034   # Input might be given as Windows format, start by converting to
27035   # unix format.
27036   path="$BOOT_JDK"
27037   new_path=`$CYGPATH -u "$path"`
27038 
27039   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27040   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27041   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27042   # "foo.exe" is OK but "foo" is an error.
27043   #
27044   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27045   # It is also a way to make sure we got the proper file name for the real test later on.
27046   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27047   if test "x$test_shortpath" = x; then
27048     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27049 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27050     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27051   fi
27052 
27053   # Call helper function which possibly converts this using DOS-style short mode.
27054   # If so, the updated path is stored in $new_path.
27055 
27056   input_path="$new_path"
27057   # Check if we need to convert this using DOS-style short mode. If the path
27058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27059   # take no chances and rewrite it.
27060   # Note: m4 eats our [], so we need to use [ and ] instead.
27061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27062   if test "x$has_forbidden_chars" != x; then
27063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27064     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27065     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27066     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27067       # Going to short mode and back again did indeed matter. Since short mode is
27068       # case insensitive, let's make it lowercase to improve readability.
27069       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27070       # Now convert it back to Unix-style (cygpath)
27071       input_path=`$CYGPATH -u "$shortmode_path"`
27072       new_path="$input_path"
27073     fi
27074   fi
27075 
27076   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27077   if test "x$test_cygdrive_prefix" = x; then
27078     # As a simple fix, exclude /usr/bin since it's not a real path.
27079     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27080       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27081       # a path prefixed by /cygdrive for fixpath to work.
27082       new_path="$CYGWIN_ROOT_PATH$input_path"
27083     fi
27084   fi
27085 
27086 
27087   if test "x$path" != "x$new_path"; then
27088     BOOT_JDK="$new_path"
27089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27090 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27091   fi
27092 
27093     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27094 
27095   path="$BOOT_JDK"
27096   has_colon=`$ECHO $path | $GREP ^.:`
27097   new_path="$path"
27098   if test "x$has_colon" = x; then
27099     # Not in mixed or Windows style, start by that.
27100     new_path=`cmd //c echo $path`
27101   fi
27102 
27103 
27104   input_path="$new_path"
27105   # Check if we need to convert this using DOS-style short mode. If the path
27106   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27107   # take no chances and rewrite it.
27108   # Note: m4 eats our [], so we need to use [ and ] instead.
27109   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27110   if test "x$has_forbidden_chars" != x; then
27111     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27112     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27113   fi
27114 
27115 
27116   windows_path="$new_path"
27117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27118     unix_path=`$CYGPATH -u "$windows_path"`
27119     new_path="$unix_path"
27120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27122     new_path="$unix_path"
27123   fi
27124 
27125   if test "x$path" != "x$new_path"; then
27126     BOOT_JDK="$new_path"
27127     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27128 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27129   fi
27130 
27131   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27132   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27133 
27134     else
27135       # We're on a unix platform. Hooray! :)
27136       path="$BOOT_JDK"
27137       has_space=`$ECHO "$path" | $GREP " "`
27138       if test "x$has_space" != x; then
27139         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27140 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27141         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27142       fi
27143 
27144       # Use eval to expand a potential ~
27145       eval path="$path"
27146       if test ! -f "$path" && test ! -d "$path"; then
27147         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27148       fi
27149 
27150       if test -d "$path"; then
27151         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27152       else
27153         dir="`$DIRNAME "$path"`"
27154         base="`$BASENAME "$path"`"
27155         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27156       fi
27157     fi
27158   fi
27159 
27160             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27161 $as_echo_n "checking for Boot JDK... " >&6; }
27162             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27163 $as_echo "$BOOT_JDK" >&6; }
27164             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27165 $as_echo_n "checking Boot JDK version... " >&6; }
27166             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27167             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27168 $as_echo "$BOOT_JDK_VERSION" >&6; }
27169           fi # end check jdk version
27170         fi # end check javac
27171       fi # end check java
27172     fi # end check boot jdk found
27173   fi
27174 
27175 
27176   if test "x$BOOT_JDK_FOUND" = xno; then
27177     # Now execute the test
27178 
27179   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27180   BOOT_JDK_SUFFIX=""
27181   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27182   if test "x$ALL_JDKS_FOUND" != x; then
27183     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27184 
27185   if test "x$BOOT_JDK_FOUND" = xno; then
27186     # Now execute the test
27187 
27188         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27189         if test -d "$BOOT_JDK"; then
27190           BOOT_JDK_FOUND=maybe
27191           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27192 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27193         fi
27194 
27195 
27196     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27197     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27198       # Do we have a bin/java?
27199       if test ! -x "$BOOT_JDK/bin/java"; then
27200         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27201 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27202         BOOT_JDK_FOUND=no
27203       else
27204         # Do we have a bin/javac?
27205         if test ! -x "$BOOT_JDK/bin/javac"; then
27206           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27207 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27208           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27209 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27210           BOOT_JDK_FOUND=no
27211         else
27212           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27213           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27214 
27215           # Extra M4 quote needed to protect [] in grep expression.
27216           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27217           if test "x$FOUND_CORRECT_VERSION" = x; then
27218             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27219 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27220             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27221 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27222             BOOT_JDK_FOUND=no
27223           else
27224             # We're done! :-)
27225             BOOT_JDK_FOUND=yes
27226 
27227   # Only process if variable expands to non-empty
27228 
27229   if test "x$BOOT_JDK" != x; then
27230     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27231 
27232   # Input might be given as Windows format, start by converting to
27233   # unix format.
27234   path="$BOOT_JDK"
27235   new_path=`$CYGPATH -u "$path"`
27236 
27237   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27238   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27239   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27240   # "foo.exe" is OK but "foo" is an error.
27241   #
27242   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27243   # It is also a way to make sure we got the proper file name for the real test later on.
27244   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27245   if test "x$test_shortpath" = x; then
27246     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27247 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27248     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27249   fi
27250 
27251   # Call helper function which possibly converts this using DOS-style short mode.
27252   # If so, the updated path is stored in $new_path.
27253 
27254   input_path="$new_path"
27255   # Check if we need to convert this using DOS-style short mode. If the path
27256   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27257   # take no chances and rewrite it.
27258   # Note: m4 eats our [], so we need to use [ and ] instead.
27259   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27260   if test "x$has_forbidden_chars" != x; then
27261     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27262     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27263     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27264     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27265       # Going to short mode and back again did indeed matter. Since short mode is
27266       # case insensitive, let's make it lowercase to improve readability.
27267       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27268       # Now convert it back to Unix-style (cygpath)
27269       input_path=`$CYGPATH -u "$shortmode_path"`
27270       new_path="$input_path"
27271     fi
27272   fi
27273 
27274   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27275   if test "x$test_cygdrive_prefix" = x; then
27276     # As a simple fix, exclude /usr/bin since it's not a real path.
27277     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27278       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27279       # a path prefixed by /cygdrive for fixpath to work.
27280       new_path="$CYGWIN_ROOT_PATH$input_path"
27281     fi
27282   fi
27283 
27284 
27285   if test "x$path" != "x$new_path"; then
27286     BOOT_JDK="$new_path"
27287     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27288 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27289   fi
27290 
27291     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27292 
27293   path="$BOOT_JDK"
27294   has_colon=`$ECHO $path | $GREP ^.:`
27295   new_path="$path"
27296   if test "x$has_colon" = x; then
27297     # Not in mixed or Windows style, start by that.
27298     new_path=`cmd //c echo $path`
27299   fi
27300 
27301 
27302   input_path="$new_path"
27303   # Check if we need to convert this using DOS-style short mode. If the path
27304   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27305   # take no chances and rewrite it.
27306   # Note: m4 eats our [], so we need to use [ and ] instead.
27307   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27308   if test "x$has_forbidden_chars" != x; then
27309     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27310     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27311   fi
27312 
27313 
27314   windows_path="$new_path"
27315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27316     unix_path=`$CYGPATH -u "$windows_path"`
27317     new_path="$unix_path"
27318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27320     new_path="$unix_path"
27321   fi
27322 
27323   if test "x$path" != "x$new_path"; then
27324     BOOT_JDK="$new_path"
27325     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27326 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27327   fi
27328 
27329   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27330   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27331 
27332     else
27333       # We're on a unix platform. Hooray! :)
27334       path="$BOOT_JDK"
27335       has_space=`$ECHO "$path" | $GREP " "`
27336       if test "x$has_space" != x; then
27337         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27338 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27339         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27340       fi
27341 
27342       # Use eval to expand a potential ~
27343       eval path="$path"
27344       if test ! -f "$path" && test ! -d "$path"; then
27345         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27346       fi
27347 
27348       if test -d "$path"; then
27349         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27350       else
27351         dir="`$DIRNAME "$path"`"
27352         base="`$BASENAME "$path"`"
27353         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27354       fi
27355     fi
27356   fi
27357 
27358             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27359 $as_echo_n "checking for Boot JDK... " >&6; }
27360             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27361 $as_echo "$BOOT_JDK" >&6; }
27362             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27363 $as_echo_n "checking Boot JDK version... " >&6; }
27364             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27365             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27366 $as_echo "$BOOT_JDK_VERSION" >&6; }
27367           fi # end check jdk version
27368         fi # end check javac
27369       fi # end check java
27370     fi # end check boot jdk found
27371   fi
27372 
27373     done
27374   fi
27375 
27376 
27377     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27378     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27379       # Do we have a bin/java?
27380       if test ! -x "$BOOT_JDK/bin/java"; then
27381         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27382 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27383         BOOT_JDK_FOUND=no
27384       else
27385         # Do we have a bin/javac?
27386         if test ! -x "$BOOT_JDK/bin/javac"; then
27387           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27388 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27389           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27390 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27391           BOOT_JDK_FOUND=no
27392         else
27393           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27394           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27395 
27396           # Extra M4 quote needed to protect [] in grep expression.
27397           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27398           if test "x$FOUND_CORRECT_VERSION" = x; then
27399             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27401             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27402 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27403             BOOT_JDK_FOUND=no
27404           else
27405             # We're done! :-)
27406             BOOT_JDK_FOUND=yes
27407 
27408   # Only process if variable expands to non-empty
27409 
27410   if test "x$BOOT_JDK" != x; then
27411     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27412 
27413   # Input might be given as Windows format, start by converting to
27414   # unix format.
27415   path="$BOOT_JDK"
27416   new_path=`$CYGPATH -u "$path"`
27417 
27418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27421   # "foo.exe" is OK but "foo" is an error.
27422   #
27423   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27424   # It is also a way to make sure we got the proper file name for the real test later on.
27425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27426   if test "x$test_shortpath" = x; then
27427     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27428 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27429     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27430   fi
27431 
27432   # Call helper function which possibly converts this using DOS-style short mode.
27433   # If so, the updated path is stored in $new_path.
27434 
27435   input_path="$new_path"
27436   # Check if we need to convert this using DOS-style short mode. If the path
27437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27438   # take no chances and rewrite it.
27439   # Note: m4 eats our [], so we need to use [ and ] instead.
27440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27441   if test "x$has_forbidden_chars" != x; then
27442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27446       # Going to short mode and back again did indeed matter. Since short mode is
27447       # case insensitive, let's make it lowercase to improve readability.
27448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27449       # Now convert it back to Unix-style (cygpath)
27450       input_path=`$CYGPATH -u "$shortmode_path"`
27451       new_path="$input_path"
27452     fi
27453   fi
27454 
27455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27456   if test "x$test_cygdrive_prefix" = x; then
27457     # As a simple fix, exclude /usr/bin since it's not a real path.
27458     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27460       # a path prefixed by /cygdrive for fixpath to work.
27461       new_path="$CYGWIN_ROOT_PATH$input_path"
27462     fi
27463   fi
27464 
27465 
27466   if test "x$path" != "x$new_path"; then
27467     BOOT_JDK="$new_path"
27468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27469 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27470   fi
27471 
27472     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27473 
27474   path="$BOOT_JDK"
27475   has_colon=`$ECHO $path | $GREP ^.:`
27476   new_path="$path"
27477   if test "x$has_colon" = x; then
27478     # Not in mixed or Windows style, start by that.
27479     new_path=`cmd //c echo $path`
27480   fi
27481 
27482 
27483   input_path="$new_path"
27484   # Check if we need to convert this using DOS-style short mode. If the path
27485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27486   # take no chances and rewrite it.
27487   # Note: m4 eats our [], so we need to use [ and ] instead.
27488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27489   if test "x$has_forbidden_chars" != x; then
27490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27491     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27492   fi
27493 
27494 
27495   windows_path="$new_path"
27496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27497     unix_path=`$CYGPATH -u "$windows_path"`
27498     new_path="$unix_path"
27499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27501     new_path="$unix_path"
27502   fi
27503 
27504   if test "x$path" != "x$new_path"; then
27505     BOOT_JDK="$new_path"
27506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27507 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27508   fi
27509 
27510   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27511   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27512 
27513     else
27514       # We're on a unix platform. Hooray! :)
27515       path="$BOOT_JDK"
27516       has_space=`$ECHO "$path" | $GREP " "`
27517       if test "x$has_space" != x; then
27518         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27519 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27520         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27521       fi
27522 
27523       # Use eval to expand a potential ~
27524       eval path="$path"
27525       if test ! -f "$path" && test ! -d "$path"; then
27526         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27527       fi
27528 
27529       if test -d "$path"; then
27530         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27531       else
27532         dir="`$DIRNAME "$path"`"
27533         base="`$BASENAME "$path"`"
27534         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27535       fi
27536     fi
27537   fi
27538 
27539             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27540 $as_echo_n "checking for Boot JDK... " >&6; }
27541             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27542 $as_echo "$BOOT_JDK" >&6; }
27543             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27544 $as_echo_n "checking Boot JDK version... " >&6; }
27545             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27546             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27547 $as_echo "$BOOT_JDK_VERSION" >&6; }
27548           fi # end check jdk version
27549         fi # end check javac
27550       fi # end check java
27551     fi # end check boot jdk found
27552   fi
27553 
27554   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27555 
27556   if test "x$BOOT_JDK_FOUND" = xno; then
27557     # Now execute the test
27558 
27559   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27560   BOOT_JDK_SUFFIX="/Contents/Home"
27561   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27562   if test "x$ALL_JDKS_FOUND" != x; then
27563     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27564 
27565   if test "x$BOOT_JDK_FOUND" = xno; then
27566     # Now execute the test
27567 
27568         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27569         if test -d "$BOOT_JDK"; then
27570           BOOT_JDK_FOUND=maybe
27571           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27572 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27573         fi
27574 
27575 
27576     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27577     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27578       # Do we have a bin/java?
27579       if test ! -x "$BOOT_JDK/bin/java"; then
27580         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27581 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27582         BOOT_JDK_FOUND=no
27583       else
27584         # Do we have a bin/javac?
27585         if test ! -x "$BOOT_JDK/bin/javac"; then
27586           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27587 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27588           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27589 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27590           BOOT_JDK_FOUND=no
27591         else
27592           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27593           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27594 
27595           # Extra M4 quote needed to protect [] in grep expression.
27596           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27597           if test "x$FOUND_CORRECT_VERSION" = x; then
27598             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27599 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27600             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27601 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27602             BOOT_JDK_FOUND=no
27603           else
27604             # We're done! :-)
27605             BOOT_JDK_FOUND=yes
27606 
27607   # Only process if variable expands to non-empty
27608 
27609   if test "x$BOOT_JDK" != x; then
27610     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27611 
27612   # Input might be given as Windows format, start by converting to
27613   # unix format.
27614   path="$BOOT_JDK"
27615   new_path=`$CYGPATH -u "$path"`
27616 
27617   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27618   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27619   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27620   # "foo.exe" is OK but "foo" is an error.
27621   #
27622   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27623   # It is also a way to make sure we got the proper file name for the real test later on.
27624   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27625   if test "x$test_shortpath" = x; then
27626     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27627 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27628     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27629   fi
27630 
27631   # Call helper function which possibly converts this using DOS-style short mode.
27632   # If so, the updated path is stored in $new_path.
27633 
27634   input_path="$new_path"
27635   # Check if we need to convert this using DOS-style short mode. If the path
27636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27637   # take no chances and rewrite it.
27638   # Note: m4 eats our [], so we need to use [ and ] instead.
27639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27640   if test "x$has_forbidden_chars" != x; then
27641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27642     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27643     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27644     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27645       # Going to short mode and back again did indeed matter. Since short mode is
27646       # case insensitive, let's make it lowercase to improve readability.
27647       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27648       # Now convert it back to Unix-style (cygpath)
27649       input_path=`$CYGPATH -u "$shortmode_path"`
27650       new_path="$input_path"
27651     fi
27652   fi
27653 
27654   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27655   if test "x$test_cygdrive_prefix" = x; then
27656     # As a simple fix, exclude /usr/bin since it's not a real path.
27657     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27658       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27659       # a path prefixed by /cygdrive for fixpath to work.
27660       new_path="$CYGWIN_ROOT_PATH$input_path"
27661     fi
27662   fi
27663 
27664 
27665   if test "x$path" != "x$new_path"; then
27666     BOOT_JDK="$new_path"
27667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27668 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27669   fi
27670 
27671     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27672 
27673   path="$BOOT_JDK"
27674   has_colon=`$ECHO $path | $GREP ^.:`
27675   new_path="$path"
27676   if test "x$has_colon" = x; then
27677     # Not in mixed or Windows style, start by that.
27678     new_path=`cmd //c echo $path`
27679   fi
27680 
27681 
27682   input_path="$new_path"
27683   # Check if we need to convert this using DOS-style short mode. If the path
27684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27685   # take no chances and rewrite it.
27686   # Note: m4 eats our [], so we need to use [ and ] instead.
27687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27688   if test "x$has_forbidden_chars" != x; then
27689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27691   fi
27692 
27693 
27694   windows_path="$new_path"
27695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27696     unix_path=`$CYGPATH -u "$windows_path"`
27697     new_path="$unix_path"
27698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27700     new_path="$unix_path"
27701   fi
27702 
27703   if test "x$path" != "x$new_path"; then
27704     BOOT_JDK="$new_path"
27705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27706 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27707   fi
27708 
27709   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27710   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27711 
27712     else
27713       # We're on a unix platform. Hooray! :)
27714       path="$BOOT_JDK"
27715       has_space=`$ECHO "$path" | $GREP " "`
27716       if test "x$has_space" != x; then
27717         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27718 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27719         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27720       fi
27721 
27722       # Use eval to expand a potential ~
27723       eval path="$path"
27724       if test ! -f "$path" && test ! -d "$path"; then
27725         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27726       fi
27727 
27728       if test -d "$path"; then
27729         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27730       else
27731         dir="`$DIRNAME "$path"`"
27732         base="`$BASENAME "$path"`"
27733         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27734       fi
27735     fi
27736   fi
27737 
27738             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27739 $as_echo_n "checking for Boot JDK... " >&6; }
27740             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27741 $as_echo "$BOOT_JDK" >&6; }
27742             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27743 $as_echo_n "checking Boot JDK version... " >&6; }
27744             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27746 $as_echo "$BOOT_JDK_VERSION" >&6; }
27747           fi # end check jdk version
27748         fi # end check javac
27749       fi # end check java
27750     fi # end check boot jdk found
27751   fi
27752 
27753     done
27754   fi
27755 
27756 
27757     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27758     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27759       # Do we have a bin/java?
27760       if test ! -x "$BOOT_JDK/bin/java"; then
27761         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27762 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27763         BOOT_JDK_FOUND=no
27764       else
27765         # Do we have a bin/javac?
27766         if test ! -x "$BOOT_JDK/bin/javac"; then
27767           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27768 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27769           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27770 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27771           BOOT_JDK_FOUND=no
27772         else
27773           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27774           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27775 
27776           # Extra M4 quote needed to protect [] in grep expression.
27777           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27778           if test "x$FOUND_CORRECT_VERSION" = x; then
27779             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27780 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27781             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27782 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27783             BOOT_JDK_FOUND=no
27784           else
27785             # We're done! :-)
27786             BOOT_JDK_FOUND=yes
27787 
27788   # Only process if variable expands to non-empty
27789 
27790   if test "x$BOOT_JDK" != x; then
27791     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27792 
27793   # Input might be given as Windows format, start by converting to
27794   # unix format.
27795   path="$BOOT_JDK"
27796   new_path=`$CYGPATH -u "$path"`
27797 
27798   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27799   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27800   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27801   # "foo.exe" is OK but "foo" is an error.
27802   #
27803   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27804   # It is also a way to make sure we got the proper file name for the real test later on.
27805   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27806   if test "x$test_shortpath" = x; then
27807     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27808 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27809     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27810   fi
27811 
27812   # Call helper function which possibly converts this using DOS-style short mode.
27813   # If so, the updated path is stored in $new_path.
27814 
27815   input_path="$new_path"
27816   # Check if we need to convert this using DOS-style short mode. If the path
27817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27818   # take no chances and rewrite it.
27819   # Note: m4 eats our [], so we need to use [ and ] instead.
27820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27821   if test "x$has_forbidden_chars" != x; then
27822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27826       # Going to short mode and back again did indeed matter. Since short mode is
27827       # case insensitive, let's make it lowercase to improve readability.
27828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27829       # Now convert it back to Unix-style (cygpath)
27830       input_path=`$CYGPATH -u "$shortmode_path"`
27831       new_path="$input_path"
27832     fi
27833   fi
27834 
27835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27836   if test "x$test_cygdrive_prefix" = x; then
27837     # As a simple fix, exclude /usr/bin since it's not a real path.
27838     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27840       # a path prefixed by /cygdrive for fixpath to work.
27841       new_path="$CYGWIN_ROOT_PATH$input_path"
27842     fi
27843   fi
27844 
27845 
27846   if test "x$path" != "x$new_path"; then
27847     BOOT_JDK="$new_path"
27848     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27849 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27850   fi
27851 
27852     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27853 
27854   path="$BOOT_JDK"
27855   has_colon=`$ECHO $path | $GREP ^.:`
27856   new_path="$path"
27857   if test "x$has_colon" = x; then
27858     # Not in mixed or Windows style, start by that.
27859     new_path=`cmd //c echo $path`
27860   fi
27861 
27862 
27863   input_path="$new_path"
27864   # Check if we need to convert this using DOS-style short mode. If the path
27865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27866   # take no chances and rewrite it.
27867   # Note: m4 eats our [], so we need to use [ and ] instead.
27868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27869   if test "x$has_forbidden_chars" != x; then
27870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27871     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27872   fi
27873 
27874 
27875   windows_path="$new_path"
27876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27877     unix_path=`$CYGPATH -u "$windows_path"`
27878     new_path="$unix_path"
27879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27881     new_path="$unix_path"
27882   fi
27883 
27884   if test "x$path" != "x$new_path"; then
27885     BOOT_JDK="$new_path"
27886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27887 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27888   fi
27889 
27890   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27891   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27892 
27893     else
27894       # We're on a unix platform. Hooray! :)
27895       path="$BOOT_JDK"
27896       has_space=`$ECHO "$path" | $GREP " "`
27897       if test "x$has_space" != x; then
27898         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27899 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27900         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27901       fi
27902 
27903       # Use eval to expand a potential ~
27904       eval path="$path"
27905       if test ! -f "$path" && test ! -d "$path"; then
27906         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27907       fi
27908 
27909       if test -d "$path"; then
27910         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27911       else
27912         dir="`$DIRNAME "$path"`"
27913         base="`$BASENAME "$path"`"
27914         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27915       fi
27916     fi
27917   fi
27918 
27919             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27920 $as_echo_n "checking for Boot JDK... " >&6; }
27921             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27922 $as_echo "$BOOT_JDK" >&6; }
27923             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27924 $as_echo_n "checking Boot JDK version... " >&6; }
27925             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27926             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27927 $as_echo "$BOOT_JDK_VERSION" >&6; }
27928           fi # end check jdk version
27929         fi # end check javac
27930       fi # end check java
27931     fi # end check boot jdk found
27932   fi
27933 
27934 
27935   if test "x$BOOT_JDK_FOUND" = xno; then
27936     # Now execute the test
27937 
27938   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27939   BOOT_JDK_SUFFIX="/Contents/Home"
27940   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27941   if test "x$ALL_JDKS_FOUND" != x; then
27942     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27943 
27944   if test "x$BOOT_JDK_FOUND" = xno; then
27945     # Now execute the test
27946 
27947         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27948         if test -d "$BOOT_JDK"; then
27949           BOOT_JDK_FOUND=maybe
27950           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27951 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27952         fi
27953 
27954 
27955     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27956     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27957       # Do we have a bin/java?
27958       if test ! -x "$BOOT_JDK/bin/java"; then
27959         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27960 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27961         BOOT_JDK_FOUND=no
27962       else
27963         # Do we have a bin/javac?
27964         if test ! -x "$BOOT_JDK/bin/javac"; then
27965           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27966 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27967           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27968 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27969           BOOT_JDK_FOUND=no
27970         else
27971           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27972           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27973 
27974           # Extra M4 quote needed to protect [] in grep expression.
27975           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27976           if test "x$FOUND_CORRECT_VERSION" = x; then
27977             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27978 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27979             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27980 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27981             BOOT_JDK_FOUND=no
27982           else
27983             # We're done! :-)
27984             BOOT_JDK_FOUND=yes
27985 
27986   # Only process if variable expands to non-empty
27987 
27988   if test "x$BOOT_JDK" != x; then
27989     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27990 
27991   # Input might be given as Windows format, start by converting to
27992   # unix format.
27993   path="$BOOT_JDK"
27994   new_path=`$CYGPATH -u "$path"`
27995 
27996   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27997   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27998   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27999   # "foo.exe" is OK but "foo" is an error.
28000   #
28001   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28002   # It is also a way to make sure we got the proper file name for the real test later on.
28003   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28004   if test "x$test_shortpath" = x; then
28005     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28006 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28007     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28008   fi
28009 
28010   # Call helper function which possibly converts this using DOS-style short mode.
28011   # If so, the updated path is stored in $new_path.
28012 
28013   input_path="$new_path"
28014   # Check if we need to convert this using DOS-style short mode. If the path
28015   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28016   # take no chances and rewrite it.
28017   # Note: m4 eats our [], so we need to use [ and ] instead.
28018   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28019   if test "x$has_forbidden_chars" != x; then
28020     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28021     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28022     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28023     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28024       # Going to short mode and back again did indeed matter. Since short mode is
28025       # case insensitive, let's make it lowercase to improve readability.
28026       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28027       # Now convert it back to Unix-style (cygpath)
28028       input_path=`$CYGPATH -u "$shortmode_path"`
28029       new_path="$input_path"
28030     fi
28031   fi
28032 
28033   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28034   if test "x$test_cygdrive_prefix" = x; then
28035     # As a simple fix, exclude /usr/bin since it's not a real path.
28036     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28037       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28038       # a path prefixed by /cygdrive for fixpath to work.
28039       new_path="$CYGWIN_ROOT_PATH$input_path"
28040     fi
28041   fi
28042 
28043 
28044   if test "x$path" != "x$new_path"; then
28045     BOOT_JDK="$new_path"
28046     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28047 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28048   fi
28049 
28050     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28051 
28052   path="$BOOT_JDK"
28053   has_colon=`$ECHO $path | $GREP ^.:`
28054   new_path="$path"
28055   if test "x$has_colon" = x; then
28056     # Not in mixed or Windows style, start by that.
28057     new_path=`cmd //c echo $path`
28058   fi
28059 
28060 
28061   input_path="$new_path"
28062   # Check if we need to convert this using DOS-style short mode. If the path
28063   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28064   # take no chances and rewrite it.
28065   # Note: m4 eats our [], so we need to use [ and ] instead.
28066   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28067   if test "x$has_forbidden_chars" != x; then
28068     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28069     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28070   fi
28071 
28072 
28073   windows_path="$new_path"
28074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28075     unix_path=`$CYGPATH -u "$windows_path"`
28076     new_path="$unix_path"
28077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28079     new_path="$unix_path"
28080   fi
28081 
28082   if test "x$path" != "x$new_path"; then
28083     BOOT_JDK="$new_path"
28084     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28085 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28086   fi
28087 
28088   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28089   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28090 
28091     else
28092       # We're on a unix platform. Hooray! :)
28093       path="$BOOT_JDK"
28094       has_space=`$ECHO "$path" | $GREP " "`
28095       if test "x$has_space" != x; then
28096         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28097 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28098         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28099       fi
28100 
28101       # Use eval to expand a potential ~
28102       eval path="$path"
28103       if test ! -f "$path" && test ! -d "$path"; then
28104         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28105       fi
28106 
28107       if test -d "$path"; then
28108         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28109       else
28110         dir="`$DIRNAME "$path"`"
28111         base="`$BASENAME "$path"`"
28112         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28113       fi
28114     fi
28115   fi
28116 
28117             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28118 $as_echo_n "checking for Boot JDK... " >&6; }
28119             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28120 $as_echo "$BOOT_JDK" >&6; }
28121             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28122 $as_echo_n "checking Boot JDK version... " >&6; }
28123             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28124             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28125 $as_echo "$BOOT_JDK_VERSION" >&6; }
28126           fi # end check jdk version
28127         fi # end check javac
28128       fi # end check java
28129     fi # end check boot jdk found
28130   fi
28131 
28132     done
28133   fi
28134 
28135 
28136     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28137     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28138       # Do we have a bin/java?
28139       if test ! -x "$BOOT_JDK/bin/java"; then
28140         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28141 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28142         BOOT_JDK_FOUND=no
28143       else
28144         # Do we have a bin/javac?
28145         if test ! -x "$BOOT_JDK/bin/javac"; then
28146           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28147 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28148           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28149 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28150           BOOT_JDK_FOUND=no
28151         else
28152           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28153           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28154 
28155           # Extra M4 quote needed to protect [] in grep expression.
28156           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28157           if test "x$FOUND_CORRECT_VERSION" = x; then
28158             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28160             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28161 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28162             BOOT_JDK_FOUND=no
28163           else
28164             # We're done! :-)
28165             BOOT_JDK_FOUND=yes
28166 
28167   # Only process if variable expands to non-empty
28168 
28169   if test "x$BOOT_JDK" != x; then
28170     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28171 
28172   # Input might be given as Windows format, start by converting to
28173   # unix format.
28174   path="$BOOT_JDK"
28175   new_path=`$CYGPATH -u "$path"`
28176 
28177   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28178   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28179   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28180   # "foo.exe" is OK but "foo" is an error.
28181   #
28182   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28183   # It is also a way to make sure we got the proper file name for the real test later on.
28184   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28185   if test "x$test_shortpath" = x; then
28186     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28187 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28188     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28189   fi
28190 
28191   # Call helper function which possibly converts this using DOS-style short mode.
28192   # If so, the updated path is stored in $new_path.
28193 
28194   input_path="$new_path"
28195   # Check if we need to convert this using DOS-style short mode. If the path
28196   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28197   # take no chances and rewrite it.
28198   # Note: m4 eats our [], so we need to use [ and ] instead.
28199   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28200   if test "x$has_forbidden_chars" != x; then
28201     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28202     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28203     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28204     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28205       # Going to short mode and back again did indeed matter. Since short mode is
28206       # case insensitive, let's make it lowercase to improve readability.
28207       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28208       # Now convert it back to Unix-style (cygpath)
28209       input_path=`$CYGPATH -u "$shortmode_path"`
28210       new_path="$input_path"
28211     fi
28212   fi
28213 
28214   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28215   if test "x$test_cygdrive_prefix" = x; then
28216     # As a simple fix, exclude /usr/bin since it's not a real path.
28217     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28218       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28219       # a path prefixed by /cygdrive for fixpath to work.
28220       new_path="$CYGWIN_ROOT_PATH$input_path"
28221     fi
28222   fi
28223 
28224 
28225   if test "x$path" != "x$new_path"; then
28226     BOOT_JDK="$new_path"
28227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28228 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28229   fi
28230 
28231     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28232 
28233   path="$BOOT_JDK"
28234   has_colon=`$ECHO $path | $GREP ^.:`
28235   new_path="$path"
28236   if test "x$has_colon" = x; then
28237     # Not in mixed or Windows style, start by that.
28238     new_path=`cmd //c echo $path`
28239   fi
28240 
28241 
28242   input_path="$new_path"
28243   # Check if we need to convert this using DOS-style short mode. If the path
28244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28245   # take no chances and rewrite it.
28246   # Note: m4 eats our [], so we need to use [ and ] instead.
28247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28248   if test "x$has_forbidden_chars" != x; then
28249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28250     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28251   fi
28252 
28253 
28254   windows_path="$new_path"
28255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28256     unix_path=`$CYGPATH -u "$windows_path"`
28257     new_path="$unix_path"
28258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28260     new_path="$unix_path"
28261   fi
28262 
28263   if test "x$path" != "x$new_path"; then
28264     BOOT_JDK="$new_path"
28265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28267   fi
28268 
28269   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28270   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28271 
28272     else
28273       # We're on a unix platform. Hooray! :)
28274       path="$BOOT_JDK"
28275       has_space=`$ECHO "$path" | $GREP " "`
28276       if test "x$has_space" != x; then
28277         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28278 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28279         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28280       fi
28281 
28282       # Use eval to expand a potential ~
28283       eval path="$path"
28284       if test ! -f "$path" && test ! -d "$path"; then
28285         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28286       fi
28287 
28288       if test -d "$path"; then
28289         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28290       else
28291         dir="`$DIRNAME "$path"`"
28292         base="`$BASENAME "$path"`"
28293         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28294       fi
28295     fi
28296   fi
28297 
28298             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28299 $as_echo_n "checking for Boot JDK... " >&6; }
28300             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28301 $as_echo "$BOOT_JDK" >&6; }
28302             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28303 $as_echo_n "checking Boot JDK version... " >&6; }
28304             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28305             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28306 $as_echo "$BOOT_JDK_VERSION" >&6; }
28307           fi # end check jdk version
28308         fi # end check javac
28309       fi # end check java
28310     fi # end check boot jdk found
28311   fi
28312 
28313   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28314 
28315   if test "x$BOOT_JDK_FOUND" = xno; then
28316     # Now execute the test
28317 
28318   BOOT_JDK_PREFIX="/usr/lib/jvm"
28319   BOOT_JDK_SUFFIX=""
28320   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28321   if test "x$ALL_JDKS_FOUND" != x; then
28322     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28323 
28324   if test "x$BOOT_JDK_FOUND" = xno; then
28325     # Now execute the test
28326 
28327         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28328         if test -d "$BOOT_JDK"; then
28329           BOOT_JDK_FOUND=maybe
28330           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28331 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28332         fi
28333 
28334 
28335     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28336     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28337       # Do we have a bin/java?
28338       if test ! -x "$BOOT_JDK/bin/java"; then
28339         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28340 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28341         BOOT_JDK_FOUND=no
28342       else
28343         # Do we have a bin/javac?
28344         if test ! -x "$BOOT_JDK/bin/javac"; then
28345           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28346 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28347           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28348 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28349           BOOT_JDK_FOUND=no
28350         else
28351           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28352           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28353 
28354           # Extra M4 quote needed to protect [] in grep expression.
28355           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28356           if test "x$FOUND_CORRECT_VERSION" = x; then
28357             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28358 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28359             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28360 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28361             BOOT_JDK_FOUND=no
28362           else
28363             # We're done! :-)
28364             BOOT_JDK_FOUND=yes
28365 
28366   # Only process if variable expands to non-empty
28367 
28368   if test "x$BOOT_JDK" != x; then
28369     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28370 
28371   # Input might be given as Windows format, start by converting to
28372   # unix format.
28373   path="$BOOT_JDK"
28374   new_path=`$CYGPATH -u "$path"`
28375 
28376   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28377   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28378   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28379   # "foo.exe" is OK but "foo" is an error.
28380   #
28381   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28382   # It is also a way to make sure we got the proper file name for the real test later on.
28383   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28384   if test "x$test_shortpath" = x; then
28385     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28386 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28387     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28388   fi
28389 
28390   # Call helper function which possibly converts this using DOS-style short mode.
28391   # If so, the updated path is stored in $new_path.
28392 
28393   input_path="$new_path"
28394   # Check if we need to convert this using DOS-style short mode. If the path
28395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28396   # take no chances and rewrite it.
28397   # Note: m4 eats our [], so we need to use [ and ] instead.
28398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28399   if test "x$has_forbidden_chars" != x; then
28400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28401     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28402     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28403     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28404       # Going to short mode and back again did indeed matter. Since short mode is
28405       # case insensitive, let's make it lowercase to improve readability.
28406       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28407       # Now convert it back to Unix-style (cygpath)
28408       input_path=`$CYGPATH -u "$shortmode_path"`
28409       new_path="$input_path"
28410     fi
28411   fi
28412 
28413   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28414   if test "x$test_cygdrive_prefix" = x; then
28415     # As a simple fix, exclude /usr/bin since it's not a real path.
28416     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28417       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28418       # a path prefixed by /cygdrive for fixpath to work.
28419       new_path="$CYGWIN_ROOT_PATH$input_path"
28420     fi
28421   fi
28422 
28423 
28424   if test "x$path" != "x$new_path"; then
28425     BOOT_JDK="$new_path"
28426     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28427 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28428   fi
28429 
28430     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28431 
28432   path="$BOOT_JDK"
28433   has_colon=`$ECHO $path | $GREP ^.:`
28434   new_path="$path"
28435   if test "x$has_colon" = x; then
28436     # Not in mixed or Windows style, start by that.
28437     new_path=`cmd //c echo $path`
28438   fi
28439 
28440 
28441   input_path="$new_path"
28442   # Check if we need to convert this using DOS-style short mode. If the path
28443   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28444   # take no chances and rewrite it.
28445   # Note: m4 eats our [], so we need to use [ and ] instead.
28446   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28447   if test "x$has_forbidden_chars" != x; then
28448     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28449     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28450   fi
28451 
28452 
28453   windows_path="$new_path"
28454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28455     unix_path=`$CYGPATH -u "$windows_path"`
28456     new_path="$unix_path"
28457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28458     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28459     new_path="$unix_path"
28460   fi
28461 
28462   if test "x$path" != "x$new_path"; then
28463     BOOT_JDK="$new_path"
28464     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28465 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28466   fi
28467 
28468   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28469   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28470 
28471     else
28472       # We're on a unix platform. Hooray! :)
28473       path="$BOOT_JDK"
28474       has_space=`$ECHO "$path" | $GREP " "`
28475       if test "x$has_space" != x; then
28476         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28477 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28478         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28479       fi
28480 
28481       # Use eval to expand a potential ~
28482       eval path="$path"
28483       if test ! -f "$path" && test ! -d "$path"; then
28484         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28485       fi
28486 
28487       if test -d "$path"; then
28488         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28489       else
28490         dir="`$DIRNAME "$path"`"
28491         base="`$BASENAME "$path"`"
28492         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28493       fi
28494     fi
28495   fi
28496 
28497             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28498 $as_echo_n "checking for Boot JDK... " >&6; }
28499             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28500 $as_echo "$BOOT_JDK" >&6; }
28501             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28502 $as_echo_n "checking Boot JDK version... " >&6; }
28503             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28504             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28505 $as_echo "$BOOT_JDK_VERSION" >&6; }
28506           fi # end check jdk version
28507         fi # end check javac
28508       fi # end check java
28509     fi # end check boot jdk found
28510   fi
28511 
28512     done
28513   fi
28514 
28515 
28516     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28517     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28518       # Do we have a bin/java?
28519       if test ! -x "$BOOT_JDK/bin/java"; then
28520         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28521 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28522         BOOT_JDK_FOUND=no
28523       else
28524         # Do we have a bin/javac?
28525         if test ! -x "$BOOT_JDK/bin/javac"; then
28526           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28527 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28528           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28529 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28530           BOOT_JDK_FOUND=no
28531         else
28532           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28533           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28534 
28535           # Extra M4 quote needed to protect [] in grep expression.
28536           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28537           if test "x$FOUND_CORRECT_VERSION" = x; then
28538             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28539 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28540             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28541 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28542             BOOT_JDK_FOUND=no
28543           else
28544             # We're done! :-)
28545             BOOT_JDK_FOUND=yes
28546 
28547   # Only process if variable expands to non-empty
28548 
28549   if test "x$BOOT_JDK" != x; then
28550     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28551 
28552   # Input might be given as Windows format, start by converting to
28553   # unix format.
28554   path="$BOOT_JDK"
28555   new_path=`$CYGPATH -u "$path"`
28556 
28557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28560   # "foo.exe" is OK but "foo" is an error.
28561   #
28562   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28563   # It is also a way to make sure we got the proper file name for the real test later on.
28564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28565   if test "x$test_shortpath" = x; then
28566     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28567 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28568     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28569   fi
28570 
28571   # Call helper function which possibly converts this using DOS-style short mode.
28572   # If so, the updated path is stored in $new_path.
28573 
28574   input_path="$new_path"
28575   # Check if we need to convert this using DOS-style short mode. If the path
28576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28577   # take no chances and rewrite it.
28578   # Note: m4 eats our [], so we need to use [ and ] instead.
28579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28580   if test "x$has_forbidden_chars" != x; then
28581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28582     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28583     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28584     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28585       # Going to short mode and back again did indeed matter. Since short mode is
28586       # case insensitive, let's make it lowercase to improve readability.
28587       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28588       # Now convert it back to Unix-style (cygpath)
28589       input_path=`$CYGPATH -u "$shortmode_path"`
28590       new_path="$input_path"
28591     fi
28592   fi
28593 
28594   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28595   if test "x$test_cygdrive_prefix" = x; then
28596     # As a simple fix, exclude /usr/bin since it's not a real path.
28597     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28598       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28599       # a path prefixed by /cygdrive for fixpath to work.
28600       new_path="$CYGWIN_ROOT_PATH$input_path"
28601     fi
28602   fi
28603 
28604 
28605   if test "x$path" != "x$new_path"; then
28606     BOOT_JDK="$new_path"
28607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28608 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28609   fi
28610 
28611     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28612 
28613   path="$BOOT_JDK"
28614   has_colon=`$ECHO $path | $GREP ^.:`
28615   new_path="$path"
28616   if test "x$has_colon" = x; then
28617     # Not in mixed or Windows style, start by that.
28618     new_path=`cmd //c echo $path`
28619   fi
28620 
28621 
28622   input_path="$new_path"
28623   # Check if we need to convert this using DOS-style short mode. If the path
28624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28625   # take no chances and rewrite it.
28626   # Note: m4 eats our [], so we need to use [ and ] instead.
28627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28628   if test "x$has_forbidden_chars" != x; then
28629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28630     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28631   fi
28632 
28633 
28634   windows_path="$new_path"
28635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28636     unix_path=`$CYGPATH -u "$windows_path"`
28637     new_path="$unix_path"
28638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28640     new_path="$unix_path"
28641   fi
28642 
28643   if test "x$path" != "x$new_path"; then
28644     BOOT_JDK="$new_path"
28645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28646 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28647   fi
28648 
28649   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28650   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28651 
28652     else
28653       # We're on a unix platform. Hooray! :)
28654       path="$BOOT_JDK"
28655       has_space=`$ECHO "$path" | $GREP " "`
28656       if test "x$has_space" != x; then
28657         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28658 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28659         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28660       fi
28661 
28662       # Use eval to expand a potential ~
28663       eval path="$path"
28664       if test ! -f "$path" && test ! -d "$path"; then
28665         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28666       fi
28667 
28668       if test -d "$path"; then
28669         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28670       else
28671         dir="`$DIRNAME "$path"`"
28672         base="`$BASENAME "$path"`"
28673         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28674       fi
28675     fi
28676   fi
28677 
28678             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28679 $as_echo_n "checking for Boot JDK... " >&6; }
28680             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28681 $as_echo "$BOOT_JDK" >&6; }
28682             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28683 $as_echo_n "checking Boot JDK version... " >&6; }
28684             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28685             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28686 $as_echo "$BOOT_JDK_VERSION" >&6; }
28687           fi # end check jdk version
28688         fi # end check javac
28689       fi # end check java
28690     fi # end check boot jdk found
28691   fi
28692 
28693   fi
28694 
28695 
28696     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28697     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28698       # Do we have a bin/java?
28699       if test ! -x "$BOOT_JDK/bin/java"; then
28700         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28701 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28702         BOOT_JDK_FOUND=no
28703       else
28704         # Do we have a bin/javac?
28705         if test ! -x "$BOOT_JDK/bin/javac"; then
28706           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28707 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28708           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28709 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28710           BOOT_JDK_FOUND=no
28711         else
28712           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28713           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28714 
28715           # Extra M4 quote needed to protect [] in grep expression.
28716           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28717           if test "x$FOUND_CORRECT_VERSION" = x; then
28718             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28720             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28721 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28722             BOOT_JDK_FOUND=no
28723           else
28724             # We're done! :-)
28725             BOOT_JDK_FOUND=yes
28726 
28727   # Only process if variable expands to non-empty
28728 
28729   if test "x$BOOT_JDK" != x; then
28730     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28731 
28732   # Input might be given as Windows format, start by converting to
28733   # unix format.
28734   path="$BOOT_JDK"
28735   new_path=`$CYGPATH -u "$path"`
28736 
28737   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28738   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28739   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28740   # "foo.exe" is OK but "foo" is an error.
28741   #
28742   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28743   # It is also a way to make sure we got the proper file name for the real test later on.
28744   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28745   if test "x$test_shortpath" = x; then
28746     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28747 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28748     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28749   fi
28750 
28751   # Call helper function which possibly converts this using DOS-style short mode.
28752   # If so, the updated path is stored in $new_path.
28753 
28754   input_path="$new_path"
28755   # Check if we need to convert this using DOS-style short mode. If the path
28756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28757   # take no chances and rewrite it.
28758   # Note: m4 eats our [], so we need to use [ and ] instead.
28759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28760   if test "x$has_forbidden_chars" != x; then
28761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28762     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28763     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28764     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28765       # Going to short mode and back again did indeed matter. Since short mode is
28766       # case insensitive, let's make it lowercase to improve readability.
28767       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28768       # Now convert it back to Unix-style (cygpath)
28769       input_path=`$CYGPATH -u "$shortmode_path"`
28770       new_path="$input_path"
28771     fi
28772   fi
28773 
28774   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28775   if test "x$test_cygdrive_prefix" = x; then
28776     # As a simple fix, exclude /usr/bin since it's not a real path.
28777     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28778       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28779       # a path prefixed by /cygdrive for fixpath to work.
28780       new_path="$CYGWIN_ROOT_PATH$input_path"
28781     fi
28782   fi
28783 
28784 
28785   if test "x$path" != "x$new_path"; then
28786     BOOT_JDK="$new_path"
28787     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28788 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28789   fi
28790 
28791     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28792 
28793   path="$BOOT_JDK"
28794   has_colon=`$ECHO $path | $GREP ^.:`
28795   new_path="$path"
28796   if test "x$has_colon" = x; then
28797     # Not in mixed or Windows style, start by that.
28798     new_path=`cmd //c echo $path`
28799   fi
28800 
28801 
28802   input_path="$new_path"
28803   # Check if we need to convert this using DOS-style short mode. If the path
28804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28805   # take no chances and rewrite it.
28806   # Note: m4 eats our [], so we need to use [ and ] instead.
28807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28808   if test "x$has_forbidden_chars" != x; then
28809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28810     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28811   fi
28812 
28813 
28814   windows_path="$new_path"
28815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28816     unix_path=`$CYGPATH -u "$windows_path"`
28817     new_path="$unix_path"
28818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28820     new_path="$unix_path"
28821   fi
28822 
28823   if test "x$path" != "x$new_path"; then
28824     BOOT_JDK="$new_path"
28825     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28826 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28827   fi
28828 
28829   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28830   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28831 
28832     else
28833       # We're on a unix platform. Hooray! :)
28834       path="$BOOT_JDK"
28835       has_space=`$ECHO "$path" | $GREP " "`
28836       if test "x$has_space" != x; then
28837         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28838 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28839         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28840       fi
28841 
28842       # Use eval to expand a potential ~
28843       eval path="$path"
28844       if test ! -f "$path" && test ! -d "$path"; then
28845         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28846       fi
28847 
28848       if test -d "$path"; then
28849         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28850       else
28851         dir="`$DIRNAME "$path"`"
28852         base="`$BASENAME "$path"`"
28853         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28854       fi
28855     fi
28856   fi
28857 
28858             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28859 $as_echo_n "checking for Boot JDK... " >&6; }
28860             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28861 $as_echo "$BOOT_JDK" >&6; }
28862             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28863 $as_echo_n "checking Boot JDK version... " >&6; }
28864             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28865             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28866 $as_echo "$BOOT_JDK_VERSION" >&6; }
28867           fi # end check jdk version
28868         fi # end check javac
28869       fi # end check java
28870     fi # end check boot jdk found
28871   fi
28872 
28873 
28874   # If we haven't found anything yet, we've truly lost. Give up.
28875   if test "x$BOOT_JDK_FOUND" = xno; then
28876 
28877   # Print a helpful message on how to acquire the necessary build dependency.
28878   # openjdk is the help tag: freetype, cups, alsa etc
28879   MISSING_DEPENDENCY=openjdk
28880 
28881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28882     cygwin_help $MISSING_DEPENDENCY
28883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28884     msys_help $MISSING_DEPENDENCY
28885   else
28886     PKGHANDLER_COMMAND=
28887 
28888     case $PKGHANDLER in
28889       apt-get)
28890         apt_help     $MISSING_DEPENDENCY ;;
28891       yum)
28892         yum_help     $MISSING_DEPENDENCY ;;
28893       port)
28894         port_help    $MISSING_DEPENDENCY ;;
28895       pkgutil)
28896         pkgutil_help $MISSING_DEPENDENCY ;;
28897       pkgadd)
28898         pkgadd_help  $MISSING_DEPENDENCY ;;
28899     esac
28900 
28901     if test "x$PKGHANDLER_COMMAND" != x; then
28902       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28903     fi
28904   fi
28905 
28906     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28907 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28908     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28909 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28910     as_fn_error $? "Cannot continue" "$LINENO" 5
28911   fi
28912 
28913 
28914 
28915   # Setup tools from the Boot JDK.
28916 
28917   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28918 
28919   # Publish this variable in the help.
28920 
28921 
28922   if [ -z "${JAVA+x}" ]; then
28923     # The variable is not set by user, try to locate tool using the code snippet
28924 
28925       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28926 $as_echo_n "checking for java in Boot JDK... " >&6; }
28927       JAVA=$BOOT_JDK/bin/java
28928       if test ! -x $JAVA; then
28929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28930 $as_echo "not found" >&6; }
28931         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28932 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28933         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28934       fi
28935       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28936 $as_echo "ok" >&6; }
28937 
28938 
28939   else
28940     # The variable is set, but is it from the command line or the environment?
28941 
28942     # Try to remove the string !JAVA! from our list.
28943     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28944     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28945       # If it failed, the variable was not from the command line. Ignore it,
28946       # but warn the user (except for BASH, which is always set by the calling BASH).
28947       if test "xJAVA" != xBASH; then
28948         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28949 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28950       fi
28951       # Try to locate tool using the code snippet
28952 
28953       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28954 $as_echo_n "checking for java in Boot JDK... " >&6; }
28955       JAVA=$BOOT_JDK/bin/java
28956       if test ! -x $JAVA; then
28957         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28958 $as_echo "not found" >&6; }
28959         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28960 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28961         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28962       fi
28963       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28964 $as_echo "ok" >&6; }
28965 
28966 
28967     else
28968       # If it succeeded, then it was overridden by the user. We will use it
28969       # for the tool.
28970 
28971       # First remove it from the list of overridden variables, so we can test
28972       # for unknown variables in the end.
28973       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28974 
28975       # Check if we try to supply an empty value
28976       if test "x$JAVA" = x; then
28977         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28978 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28979         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28980 $as_echo_n "checking for JAVA... " >&6; }
28981         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28982 $as_echo "disabled" >&6; }
28983       else
28984         # Check if the provided tool contains a complete path.
28985         tool_specified="$JAVA"
28986         tool_basename="${tool_specified##*/}"
28987         if test "x$tool_basename" = "x$tool_specified"; then
28988           # A command without a complete path is provided, search $PATH.
28989           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28990 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28991           # Extract the first word of "$tool_basename", so it can be a program name with args.
28992 set dummy $tool_basename; ac_word=$2
28993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28994 $as_echo_n "checking for $ac_word... " >&6; }
28995 if ${ac_cv_path_JAVA+:} false; then :
28996   $as_echo_n "(cached) " >&6
28997 else
28998   case $JAVA in
28999   [\\/]* | ?:[\\/]*)
29000   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29001   ;;
29002   *)
29003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29004 for as_dir in $PATH
29005 do
29006   IFS=$as_save_IFS
29007   test -z "$as_dir" && as_dir=.
29008     for ac_exec_ext in '' $ac_executable_extensions; do
29009   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29010     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29012     break 2
29013   fi
29014 done
29015   done
29016 IFS=$as_save_IFS
29017 
29018   ;;
29019 esac
29020 fi
29021 JAVA=$ac_cv_path_JAVA
29022 if test -n "$JAVA"; then
29023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29024 $as_echo "$JAVA" >&6; }
29025 else
29026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29027 $as_echo "no" >&6; }
29028 fi
29029 
29030 
29031           if test "x$JAVA" = x; then
29032             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29033           fi
29034         else
29035           # Otherwise we believe it is a complete path. Use it as it is.
29036           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29037 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29038           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29039 $as_echo_n "checking for JAVA... " >&6; }
29040           if test ! -x "$tool_specified"; then
29041             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29042 $as_echo "not found" >&6; }
29043             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29044           fi
29045           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29046 $as_echo "$tool_specified" >&6; }
29047         fi
29048       fi
29049     fi
29050 
29051   fi
29052 
29053 
29054 
29055   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29056 
29057   # Publish this variable in the help.
29058 
29059 
29060   if [ -z "${JAVAC+x}" ]; then
29061     # The variable is not set by user, try to locate tool using the code snippet
29062 
29063       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29064 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29065       JAVAC=$BOOT_JDK/bin/javac
29066       if test ! -x $JAVAC; then
29067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29068 $as_echo "not found" >&6; }
29069         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29070 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29071         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29072       fi
29073       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29074 $as_echo "ok" >&6; }
29075 
29076 
29077   else
29078     # The variable is set, but is it from the command line or the environment?
29079 
29080     # Try to remove the string !JAVAC! from our list.
29081     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29082     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29083       # If it failed, the variable was not from the command line. Ignore it,
29084       # but warn the user (except for BASH, which is always set by the calling BASH).
29085       if test "xJAVAC" != xBASH; then
29086         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29087 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29088       fi
29089       # Try to locate tool using the code snippet
29090 
29091       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29092 $as_echo_n "checking for javac in Boot JDK... " >&6; }
29093       JAVAC=$BOOT_JDK/bin/javac
29094       if test ! -x $JAVAC; then
29095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29096 $as_echo "not found" >&6; }
29097         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29098 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29099         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29100       fi
29101       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29102 $as_echo "ok" >&6; }
29103 
29104 
29105     else
29106       # If it succeeded, then it was overridden by the user. We will use it
29107       # for the tool.
29108 
29109       # First remove it from the list of overridden variables, so we can test
29110       # for unknown variables in the end.
29111       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29112 
29113       # Check if we try to supply an empty value
29114       if test "x$JAVAC" = x; then
29115         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29116 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29117         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29118 $as_echo_n "checking for JAVAC... " >&6; }
29119         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29120 $as_echo "disabled" >&6; }
29121       else
29122         # Check if the provided tool contains a complete path.
29123         tool_specified="$JAVAC"
29124         tool_basename="${tool_specified##*/}"
29125         if test "x$tool_basename" = "x$tool_specified"; then
29126           # A command without a complete path is provided, search $PATH.
29127           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29128 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29129           # Extract the first word of "$tool_basename", so it can be a program name with args.
29130 set dummy $tool_basename; ac_word=$2
29131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29132 $as_echo_n "checking for $ac_word... " >&6; }
29133 if ${ac_cv_path_JAVAC+:} false; then :
29134   $as_echo_n "(cached) " >&6
29135 else
29136   case $JAVAC in
29137   [\\/]* | ?:[\\/]*)
29138   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29139   ;;
29140   *)
29141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29142 for as_dir in $PATH
29143 do
29144   IFS=$as_save_IFS
29145   test -z "$as_dir" && as_dir=.
29146     for ac_exec_ext in '' $ac_executable_extensions; do
29147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29148     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29150     break 2
29151   fi
29152 done
29153   done
29154 IFS=$as_save_IFS
29155 
29156   ;;
29157 esac
29158 fi
29159 JAVAC=$ac_cv_path_JAVAC
29160 if test -n "$JAVAC"; then
29161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29162 $as_echo "$JAVAC" >&6; }
29163 else
29164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29165 $as_echo "no" >&6; }
29166 fi
29167 
29168 
29169           if test "x$JAVAC" = x; then
29170             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29171           fi
29172         else
29173           # Otherwise we believe it is a complete path. Use it as it is.
29174           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29175 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29176           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29177 $as_echo_n "checking for JAVAC... " >&6; }
29178           if test ! -x "$tool_specified"; then
29179             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29180 $as_echo "not found" >&6; }
29181             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29182           fi
29183           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29184 $as_echo "$tool_specified" >&6; }
29185         fi
29186       fi
29187     fi
29188 
29189   fi
29190 
29191 
29192 
29193   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29194 
29195   # Publish this variable in the help.
29196 
29197 
29198   if [ -z "${JAVAH+x}" ]; then
29199     # The variable is not set by user, try to locate tool using the code snippet
29200 
29201       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29202 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29203       JAVAH=$BOOT_JDK/bin/javah
29204       if test ! -x $JAVAH; then
29205         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29206 $as_echo "not found" >&6; }
29207         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29208 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29209         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29210       fi
29211       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29212 $as_echo "ok" >&6; }
29213 
29214 
29215   else
29216     # The variable is set, but is it from the command line or the environment?
29217 
29218     # Try to remove the string !JAVAH! from our list.
29219     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29220     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29221       # If it failed, the variable was not from the command line. Ignore it,
29222       # but warn the user (except for BASH, which is always set by the calling BASH).
29223       if test "xJAVAH" != xBASH; then
29224         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29225 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29226       fi
29227       # Try to locate tool using the code snippet
29228 
29229       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29230 $as_echo_n "checking for javah in Boot JDK... " >&6; }
29231       JAVAH=$BOOT_JDK/bin/javah
29232       if test ! -x $JAVAH; then
29233         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29234 $as_echo "not found" >&6; }
29235         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29236 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29237         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29238       fi
29239       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29240 $as_echo "ok" >&6; }
29241 
29242 
29243     else
29244       # If it succeeded, then it was overridden by the user. We will use it
29245       # for the tool.
29246 
29247       # First remove it from the list of overridden variables, so we can test
29248       # for unknown variables in the end.
29249       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29250 
29251       # Check if we try to supply an empty value
29252       if test "x$JAVAH" = x; then
29253         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29254 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29256 $as_echo_n "checking for JAVAH... " >&6; }
29257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29258 $as_echo "disabled" >&6; }
29259       else
29260         # Check if the provided tool contains a complete path.
29261         tool_specified="$JAVAH"
29262         tool_basename="${tool_specified##*/}"
29263         if test "x$tool_basename" = "x$tool_specified"; then
29264           # A command without a complete path is provided, search $PATH.
29265           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29266 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29267           # Extract the first word of "$tool_basename", so it can be a program name with args.
29268 set dummy $tool_basename; ac_word=$2
29269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29270 $as_echo_n "checking for $ac_word... " >&6; }
29271 if ${ac_cv_path_JAVAH+:} false; then :
29272   $as_echo_n "(cached) " >&6
29273 else
29274   case $JAVAH in
29275   [\\/]* | ?:[\\/]*)
29276   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29277   ;;
29278   *)
29279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29280 for as_dir in $PATH
29281 do
29282   IFS=$as_save_IFS
29283   test -z "$as_dir" && as_dir=.
29284     for ac_exec_ext in '' $ac_executable_extensions; do
29285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29286     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29288     break 2
29289   fi
29290 done
29291   done
29292 IFS=$as_save_IFS
29293 
29294   ;;
29295 esac
29296 fi
29297 JAVAH=$ac_cv_path_JAVAH
29298 if test -n "$JAVAH"; then
29299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29300 $as_echo "$JAVAH" >&6; }
29301 else
29302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29303 $as_echo "no" >&6; }
29304 fi
29305 
29306 
29307           if test "x$JAVAH" = x; then
29308             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29309           fi
29310         else
29311           # Otherwise we believe it is a complete path. Use it as it is.
29312           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29313 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29314           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29315 $as_echo_n "checking for JAVAH... " >&6; }
29316           if test ! -x "$tool_specified"; then
29317             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29318 $as_echo "not found" >&6; }
29319             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29320           fi
29321           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29322 $as_echo "$tool_specified" >&6; }
29323         fi
29324       fi
29325     fi
29326 
29327   fi
29328 
29329 
29330 
29331   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29332 
29333   # Publish this variable in the help.
29334 
29335 
29336   if [ -z "${JAR+x}" ]; then
29337     # The variable is not set by user, try to locate tool using the code snippet
29338 
29339       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29340 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29341       JAR=$BOOT_JDK/bin/jar
29342       if test ! -x $JAR; then
29343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29344 $as_echo "not found" >&6; }
29345         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29346 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29347         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29348       fi
29349       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29350 $as_echo "ok" >&6; }
29351 
29352 
29353   else
29354     # The variable is set, but is it from the command line or the environment?
29355 
29356     # Try to remove the string !JAR! from our list.
29357     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29358     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29359       # If it failed, the variable was not from the command line. Ignore it,
29360       # but warn the user (except for BASH, which is always set by the calling BASH).
29361       if test "xJAR" != xBASH; then
29362         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29363 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29364       fi
29365       # Try to locate tool using the code snippet
29366 
29367       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29368 $as_echo_n "checking for jar in Boot JDK... " >&6; }
29369       JAR=$BOOT_JDK/bin/jar
29370       if test ! -x $JAR; then
29371         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29372 $as_echo "not found" >&6; }
29373         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29374 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29375         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29376       fi
29377       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29378 $as_echo "ok" >&6; }
29379 
29380 
29381     else
29382       # If it succeeded, then it was overridden by the user. We will use it
29383       # for the tool.
29384 
29385       # First remove it from the list of overridden variables, so we can test
29386       # for unknown variables in the end.
29387       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29388 
29389       # Check if we try to supply an empty value
29390       if test "x$JAR" = x; then
29391         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29392 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29393         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29394 $as_echo_n "checking for JAR... " >&6; }
29395         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29396 $as_echo "disabled" >&6; }
29397       else
29398         # Check if the provided tool contains a complete path.
29399         tool_specified="$JAR"
29400         tool_basename="${tool_specified##*/}"
29401         if test "x$tool_basename" = "x$tool_specified"; then
29402           # A command without a complete path is provided, search $PATH.
29403           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29404 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29405           # Extract the first word of "$tool_basename", so it can be a program name with args.
29406 set dummy $tool_basename; ac_word=$2
29407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29408 $as_echo_n "checking for $ac_word... " >&6; }
29409 if ${ac_cv_path_JAR+:} false; then :
29410   $as_echo_n "(cached) " >&6
29411 else
29412   case $JAR in
29413   [\\/]* | ?:[\\/]*)
29414   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29415   ;;
29416   *)
29417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29418 for as_dir in $PATH
29419 do
29420   IFS=$as_save_IFS
29421   test -z "$as_dir" && as_dir=.
29422     for ac_exec_ext in '' $ac_executable_extensions; do
29423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29424     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29426     break 2
29427   fi
29428 done
29429   done
29430 IFS=$as_save_IFS
29431 
29432   ;;
29433 esac
29434 fi
29435 JAR=$ac_cv_path_JAR
29436 if test -n "$JAR"; then
29437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29438 $as_echo "$JAR" >&6; }
29439 else
29440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29441 $as_echo "no" >&6; }
29442 fi
29443 
29444 
29445           if test "x$JAR" = x; then
29446             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29447           fi
29448         else
29449           # Otherwise we believe it is a complete path. Use it as it is.
29450           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29451 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29452           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29453 $as_echo_n "checking for JAR... " >&6; }
29454           if test ! -x "$tool_specified"; then
29455             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29456 $as_echo "not found" >&6; }
29457             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29458           fi
29459           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29460 $as_echo "$tool_specified" >&6; }
29461         fi
29462       fi
29463     fi
29464 
29465   fi
29466 
29467 
29468 
29469   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29470 
29471   # Publish this variable in the help.
29472 
29473 
29474   if [ -z "${JARSIGNER+x}" ]; then
29475     # The variable is not set by user, try to locate tool using the code snippet
29476 
29477       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29478 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29479       JARSIGNER=$BOOT_JDK/bin/jarsigner
29480       if test ! -x $JARSIGNER; then
29481         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29482 $as_echo "not found" >&6; }
29483         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29484 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29485         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29486       fi
29487       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29488 $as_echo "ok" >&6; }
29489 
29490 
29491   else
29492     # The variable is set, but is it from the command line or the environment?
29493 
29494     # Try to remove the string !JARSIGNER! from our list.
29495     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29496     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29497       # If it failed, the variable was not from the command line. Ignore it,
29498       # but warn the user (except for BASH, which is always set by the calling BASH).
29499       if test "xJARSIGNER" != xBASH; then
29500         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29501 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29502       fi
29503       # Try to locate tool using the code snippet
29504 
29505       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29506 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29507       JARSIGNER=$BOOT_JDK/bin/jarsigner
29508       if test ! -x $JARSIGNER; then
29509         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29510 $as_echo "not found" >&6; }
29511         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29512 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29513         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29514       fi
29515       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29516 $as_echo "ok" >&6; }
29517 
29518 
29519     else
29520       # If it succeeded, then it was overridden by the user. We will use it
29521       # for the tool.
29522 
29523       # First remove it from the list of overridden variables, so we can test
29524       # for unknown variables in the end.
29525       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29526 
29527       # Check if we try to supply an empty value
29528       if test "x$JARSIGNER" = x; then
29529         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29530 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29531         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29532 $as_echo_n "checking for JARSIGNER... " >&6; }
29533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29534 $as_echo "disabled" >&6; }
29535       else
29536         # Check if the provided tool contains a complete path.
29537         tool_specified="$JARSIGNER"
29538         tool_basename="${tool_specified##*/}"
29539         if test "x$tool_basename" = "x$tool_specified"; then
29540           # A command without a complete path is provided, search $PATH.
29541           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29542 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29543           # Extract the first word of "$tool_basename", so it can be a program name with args.
29544 set dummy $tool_basename; ac_word=$2
29545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29546 $as_echo_n "checking for $ac_word... " >&6; }
29547 if ${ac_cv_path_JARSIGNER+:} false; then :
29548   $as_echo_n "(cached) " >&6
29549 else
29550   case $JARSIGNER in
29551   [\\/]* | ?:[\\/]*)
29552   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29553   ;;
29554   *)
29555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29556 for as_dir in $PATH
29557 do
29558   IFS=$as_save_IFS
29559   test -z "$as_dir" && as_dir=.
29560     for ac_exec_ext in '' $ac_executable_extensions; do
29561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29562     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29564     break 2
29565   fi
29566 done
29567   done
29568 IFS=$as_save_IFS
29569 
29570   ;;
29571 esac
29572 fi
29573 JARSIGNER=$ac_cv_path_JARSIGNER
29574 if test -n "$JARSIGNER"; then
29575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29576 $as_echo "$JARSIGNER" >&6; }
29577 else
29578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29579 $as_echo "no" >&6; }
29580 fi
29581 
29582 
29583           if test "x$JARSIGNER" = x; then
29584             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29585           fi
29586         else
29587           # Otherwise we believe it is a complete path. Use it as it is.
29588           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29589 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29590           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29591 $as_echo_n "checking for JARSIGNER... " >&6; }
29592           if test ! -x "$tool_specified"; then
29593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29594 $as_echo "not found" >&6; }
29595             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29596           fi
29597           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29598 $as_echo "$tool_specified" >&6; }
29599         fi
29600       fi
29601     fi
29602 
29603   fi
29604 
29605 
29606 
29607   # Finally, set some other options...
29608 
29609   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29610   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29611 
29612 
29613 
29614   # Check if the boot jdk is 32 or 64 bit
29615   if "$JAVA" -d64 -version > /dev/null 2>&1; then
29616     BOOT_JDK_BITS="64"
29617   else
29618     BOOT_JDK_BITS="32"
29619   fi
29620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29621 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29623 $as_echo "$BOOT_JDK_BITS" >&6; }
29624 
29625 
29626 
29627 ###############################################################################
29628 #
29629 # Configure the sources to use. We can add or override individual directories.
29630 #
29631 ###############################################################################
29632 
29633 
29634   # Where are the sources.
29635   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29636   CORBA_TOPDIR="$SRC_ROOT/corba"
29637   JAXP_TOPDIR="$SRC_ROOT/jaxp"
29638   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29639   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29640   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29641   JDK_TOPDIR="$SRC_ROOT/jdk"
29642 
29643 
29644 
29645 
29646 
29647 
29648 
29649 
29650 
29651   # This feature is no longer supported.
29652 
29653 
29654 
29655 # Check whether --with-add-source-root was given.
29656 if test "${with_add_source_root+set}" = set; then :
29657   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
29658 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29659 fi
29660 
29661 
29662 
29663 
29664 # Check whether --with-override-source-root was given.
29665 if test "${with_override_source_root+set}" = set; then :
29666   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
29667 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29668 fi
29669 
29670 
29671 
29672 
29673 # Check whether --with-adds-and-overrides was given.
29674 if test "${with_adds_and_overrides+set}" = set; then :
29675   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
29676 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29677 fi
29678 
29679 
29680 
29681 
29682 # Check whether --with-override-langtools was given.
29683 if test "${with_override_langtools+set}" = set; then :
29684   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29685 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29686 fi
29687 
29688 
29689 
29690 
29691 # Check whether --with-override-corba was given.
29692 if test "${with_override_corba+set}" = set; then :
29693   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29694 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29695 fi
29696 
29697 
29698 
29699 
29700 # Check whether --with-override-jaxp was given.
29701 if test "${with_override_jaxp+set}" = set; then :
29702   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29703 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29704 fi
29705 
29706 
29707 
29708 
29709 # Check whether --with-override-jaxws was given.
29710 if test "${with_override_jaxws+set}" = set; then :
29711   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29712 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29713 fi
29714 
29715 
29716 
29717 
29718 # Check whether --with-override-hotspot was given.
29719 if test "${with_override_hotspot+set}" = set; then :
29720   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29721 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29722 fi
29723 
29724 
29725 
29726 
29727 # Check whether --with-override-nashorn was given.
29728 if test "${with_override_nashorn+set}" = set; then :
29729   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29730 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29731 fi
29732 
29733 
29734 
29735 
29736 # Check whether --with-override-jdk was given.
29737 if test "${with_override_jdk+set}" = set; then :
29738   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29739 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29740 fi
29741 
29742 
29743 
29744 
29745   BUILD_OUTPUT="$OUTPUT_ROOT"
29746 
29747 
29748   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29749   BUILD_HOTSPOT=true
29750 
29751 
29752 
29753 # Check whether --with-import-hotspot was given.
29754 if test "${with_import_hotspot+set}" = set; then :
29755   withval=$with_import_hotspot;
29756 fi
29757 
29758   if test "x$with_import_hotspot" != x; then
29759     CURDIR="$PWD"
29760     cd "$with_import_hotspot"
29761     HOTSPOT_DIST="`pwd`"
29762     cd "$CURDIR"
29763     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29764       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29765     fi
29766     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29767 $as_echo_n "checking if hotspot should be imported... " >&6; }
29768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29769 $as_echo "yes from $HOTSPOT_DIST" >&6; }
29770     BUILD_HOTSPOT=false
29771   fi
29772 
29773   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29774 
29775 
29776 ###############################################################################
29777 #
29778 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
29779 # native code.
29780 #
29781 ###############################################################################
29782 
29783 # See if we are doing a complete static build or not
29784 
29785   # Check whether --enable-static-build was given.
29786 if test "${enable_static_build+set}" = set; then :
29787   enableval=$enable_static_build;
29788 fi
29789 
29790   STATIC_BUILD=false
29791   if test "x$enable_static_build" = "xyes"; then
29792     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29793 $as_echo_n "checking if static build is enabled... " >&6; }
29794     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29795 $as_echo "yes" >&6; }
29796     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29797       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29798     fi
29799     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29800     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29801     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29802     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29803     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29804     STATIC_BUILD=true
29805   elif test "x$enable_static_build" = "xno"; then
29806     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29807 $as_echo_n "checking if static build is enabled... " >&6; }
29808     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29809 $as_echo "no" >&6; }
29810   elif test "x$enable_static_build" != "x"; then
29811     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29812   fi
29813 
29814 
29815 
29816 
29817 # First determine the toolchain type (compiler family)
29818 
29819 
29820 # Check whether --with-toolchain-type was given.
29821 if test "${with_toolchain_type+set}" = set; then :
29822   withval=$with_toolchain_type;
29823 fi
29824 
29825 
29826   # Use indirect variable referencing
29827   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29828   VALID_TOOLCHAINS=${!toolchain_var_name}
29829 
29830   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29831     if test -n "$XCODEBUILD"; then
29832       # On Mac OS X, default toolchain to clang after Xcode 5
29833       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29834       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29835       if test $? -ne 0; then
29836         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29837       fi
29838       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29839           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29840           $CUT -f 1 -d .`
29841       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29842 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29843       if test $XCODE_MAJOR_VERSION -ge 5; then
29844           DEFAULT_TOOLCHAIN="clang"
29845       else
29846           DEFAULT_TOOLCHAIN="gcc"
29847       fi
29848     else
29849       # If Xcode is not installed, but the command line tools are
29850       # then we can't run xcodebuild. On these systems we should
29851       # default to clang
29852       DEFAULT_TOOLCHAIN="clang"
29853     fi
29854   else
29855     # First toolchain type in the list is the default
29856     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29857   fi
29858 
29859   if test "x$with_toolchain_type" = xlist; then
29860     # List all toolchains
29861     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29862 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29863     for toolchain in $VALID_TOOLCHAINS; do
29864       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29865       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29866       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29867     done
29868 
29869     exit 0
29870   elif test "x$with_toolchain_type" != x; then
29871     # User override; check that it is valid
29872     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29873       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29874 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29875       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29876 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29877       as_fn_error $? "Cannot continue." "$LINENO" 5
29878     fi
29879     TOOLCHAIN_TYPE=$with_toolchain_type
29880   else
29881     # No flag given, use default
29882     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29883   fi
29884 
29885 
29886   TOOLCHAIN_CC_BINARY_clang="clang"
29887   TOOLCHAIN_CC_BINARY_gcc="gcc"
29888   TOOLCHAIN_CC_BINARY_microsoft="cl"
29889   TOOLCHAIN_CC_BINARY_solstudio="cc"
29890   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29891 
29892   TOOLCHAIN_CXX_BINARY_clang="clang++"
29893   TOOLCHAIN_CXX_BINARY_gcc="g++"
29894   TOOLCHAIN_CXX_BINARY_microsoft="cl"
29895   TOOLCHAIN_CXX_BINARY_solstudio="CC"
29896   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29897 
29898   # Use indirect variable referencing
29899   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29900   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29901   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
29902   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
29903   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29904   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29905   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29906   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29907 
29908 
29909   # Define filename patterns
29910   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29911     LIBRARY_PREFIX=
29912     SHARED_LIBRARY_SUFFIX='.dll'
29913     STATIC_LIBRARY_SUFFIX='.lib'
29914     SHARED_LIBRARY='$1.dll'
29915     STATIC_LIBRARY='$1.lib'
29916     OBJ_SUFFIX='.obj'
29917     EXE_SUFFIX='.exe'
29918   else
29919     LIBRARY_PREFIX=lib
29920     SHARED_LIBRARY_SUFFIX='.so'
29921     STATIC_LIBRARY_SUFFIX='.a'
29922     SHARED_LIBRARY='lib$1.so'
29923     STATIC_LIBRARY='lib$1.a'
29924     OBJ_SUFFIX='.o'
29925     EXE_SUFFIX=''
29926     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29927       # For full static builds, we're overloading the SHARED_LIBRARY
29928       # variables in order to limit the amount of changes required.
29929       # It would be better to remove SHARED and just use LIBRARY and
29930       # LIBRARY_SUFFIX for libraries that can be built either
29931       # shared or static and use STATIC_* for libraries that are
29932       # always built statically.
29933       if test "x$STATIC_BUILD" = xtrue; then
29934         SHARED_LIBRARY='lib$1.a'
29935         SHARED_LIBRARY_SUFFIX='.a'
29936       else
29937         SHARED_LIBRARY='lib$1.dylib'
29938         SHARED_LIBRARY_SUFFIX='.dylib'
29939       fi
29940     fi
29941   fi
29942 
29943 
29944 
29945 
29946 
29947 
29948 
29949 
29950 
29951 
29952   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29953     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29954 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29955   else
29956     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29957 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29958   fi
29959 
29960 
29961 # User supplied flags should be used when configure detects compilers
29962 
29963   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29964     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29965 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29966   fi
29967 
29968   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29969     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29970 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29971   fi
29972 
29973   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29974     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29975 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29976   fi
29977 
29978 
29979 # Check whether --with-extra-cflags was given.
29980 if test "${with_extra_cflags+set}" = set; then :
29981   withval=$with_extra_cflags;
29982 fi
29983 
29984 
29985 
29986 # Check whether --with-extra-cxxflags was given.
29987 if test "${with_extra_cxxflags+set}" = set; then :
29988   withval=$with_extra_cxxflags;
29989 fi
29990 
29991 
29992 
29993 # Check whether --with-extra-ldflags was given.
29994 if test "${with_extra_ldflags+set}" = set; then :
29995   withval=$with_extra_ldflags;
29996 fi
29997 
29998 
29999   EXTRA_CFLAGS="$with_extra_cflags"
30000   EXTRA_CXXFLAGS="$with_extra_cxxflags"
30001   EXTRA_LDFLAGS="$with_extra_ldflags"
30002 
30003   # Hotspot needs these set in their legacy form
30004   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30005   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30006   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30007 
30008 
30009 
30010 
30011 
30012   # The global CFLAGS and LDLAGS variables are used by configure tests and
30013   # should include the extra parameters
30014   CFLAGS="$EXTRA_CFLAGS"
30015   CXXFLAGS="$EXTRA_CXXFLAGS"
30016   LDFLAGS="$EXTRA_LDFLAGS"
30017   CPPFLAGS=""
30018 
30019 # The sysroot cflags are needed for configure to be able to run the compilers
30020 
30021   if test "x$SYSROOT" != "x"; then
30022     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30023       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30024         # Solaris Studio does not have a concept of sysroot. Instead we must
30025         # make sure the default include and lib dirs are appended to each
30026         # compile and link command line. Must also add -I-xbuiltin to enable
30027         # inlining of system functions and intrinsics.
30028         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30029         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30030             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30031             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30032       fi
30033     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30034       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30035       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30036     elif test "x$TOOLCHAIN_TYPE" = xclang; then
30037       SYSROOT_CFLAGS="-isysroot $SYSROOT"
30038       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30039     fi
30040     # Propagate the sysroot args to hotspot
30041     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30042     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30043     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30044     # The global CFLAGS and LDFLAGS variables need these for configure to function
30045     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30046     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30047     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30048     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30049   fi
30050 
30051   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30052     # We also need -iframework<path>/System/Library/Frameworks
30053     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30054     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30055     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30056     # set this here so it doesn't have to be peppered throughout the forest
30057     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30058     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30059   fi
30060 
30061 
30062 
30063 
30064 
30065 # Then detect the actual binaries needed
30066 
30067   # FIXME: Is this needed?
30068   ac_ext=cpp
30069 ac_cpp='$CXXCPP $CPPFLAGS'
30070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30073 
30074 
30075   # Store the CFLAGS etc passed to the configure script.
30076   ORG_CFLAGS="$CFLAGS"
30077   ORG_CXXFLAGS="$CXXFLAGS"
30078 
30079   # autoconf magic only relies on PATH, so update it if tools dir is specified
30080   OLD_PATH="$PATH"
30081 
30082   # On Windows, we need to detect the visual studio installation first.
30083   # This will change the PATH, but we need to keep that new PATH even
30084   # after toolchain detection is done, since the compiler (on x86) uses
30085   # it for DLL resolution in runtime.
30086   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30087       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30088 
30089   # Store path to cygwin link.exe to help excluding it when searching for
30090   # VS linker. This must be done before changing the PATH when looking for VS.
30091   # Extract the first word of "link", so it can be a program name with args.
30092 set dummy link; ac_word=$2
30093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30094 $as_echo_n "checking for $ac_word... " >&6; }
30095 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30096   $as_echo_n "(cached) " >&6
30097 else
30098   case $CYGWIN_LINK in
30099   [\\/]* | ?:[\\/]*)
30100   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30101   ;;
30102   *)
30103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30104 for as_dir in $PATH
30105 do
30106   IFS=$as_save_IFS
30107   test -z "$as_dir" && as_dir=.
30108     for ac_exec_ext in '' $ac_executable_extensions; do
30109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30110     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30112     break 2
30113   fi
30114 done
30115   done
30116 IFS=$as_save_IFS
30117 
30118   ;;
30119 esac
30120 fi
30121 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30122 if test -n "$CYGWIN_LINK"; then
30123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30124 $as_echo "$CYGWIN_LINK" >&6; }
30125 else
30126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30127 $as_echo "no" >&6; }
30128 fi
30129 
30130 
30131   if test "x$CYGWIN_LINK" != x; then
30132     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30133 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30134     "$CYGWIN_LINK" --version > /dev/null
30135     if test $? -eq 0 ; then
30136       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30137 $as_echo "yes" >&6; }
30138     else
30139       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30140 $as_echo "no" >&6; }
30141       # This might be the VS linker. Don't exclude it later on.
30142       CYGWIN_LINK=""
30143     fi
30144   fi
30145 
30146   # First-hand choice is to locate and run the vsvars bat file.
30147 
30148 
30149 # Check whether --with-toolchain-version was given.
30150 if test "${with_toolchain_version+set}" = set; then :
30151   withval=$with_toolchain_version;
30152 fi
30153 
30154 
30155   if test "x$with_toolchain_version" = xlist; then
30156     # List all toolchains
30157     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30158 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30159     for version in $VALID_VS_VERSIONS; do
30160       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30161       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30162     done
30163 
30164     exit 0
30165   elif test "x$DEVKIT_VS_VERSION" != x; then
30166     VS_VERSION=$DEVKIT_VS_VERSION
30167     TOOLCHAIN_VERSION=$VS_VERSION
30168     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30169     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30170     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30171     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30172     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30173     VS_PATH="$TOOLCHAIN_PATH:$PATH"
30174 
30175     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30176     # can still be exported as INCLUDE for compiler invocations without
30177     # SYSROOT_CFLAGS
30178     OLDIFS="$IFS"
30179     IFS=";"
30180     for i in $DEVKIT_VS_INCLUDE; do
30181       ipath=$i
30182 
30183   unix_path="$ipath"
30184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30185     windows_path=`$CYGPATH -m "$unix_path"`
30186     ipath="$windows_path"
30187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30188     windows_path=`cmd //c echo $unix_path`
30189     ipath="$windows_path"
30190   fi
30191 
30192       VS_INCLUDE="$VS_INCLUDE;$ipath"
30193     done
30194     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30195     # as LIB for compiler invocations without SYSROOT_LDFLAGS
30196     for i in $DEVKIT_VS_LIB; do
30197       libpath=$i
30198 
30199   unix_path="$libpath"
30200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30201     windows_path=`$CYGPATH -m "$unix_path"`
30202     libpath="$windows_path"
30203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30204     windows_path=`cmd //c echo $unix_path`
30205     libpath="$windows_path"
30206   fi
30207 
30208       VS_LIB="$VS_LIB;$libpath"
30209     done
30210     IFS="$OLDIFS"
30211 
30212     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30213 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30214 
30215   elif test "x$with_toolchain_version" != x; then
30216     # User override; check that it is valid
30217     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30218       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30219 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30220       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30221 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30222       as_fn_error $? "Cannot continue." "$LINENO" 5
30223     fi
30224     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30225   else
30226     # No flag given, use default
30227     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30228   fi
30229 
30230   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30231 
30232   VS_VERSION="$VS_VERSION"
30233   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30234   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30235   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30236   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30237 
30238   # When using --with-tools-dir, assume it points to the correct and default
30239   # version of Visual Studio or that --with-toolchain-version was also set.
30240   if test "x$with_tools_dir" != x; then
30241 
30242   if test "x$VS_ENV_CMD" = x; then
30243     VS_VERSION="${VS_VERSION}"
30244     VS_BASE="$with_tools_dir/../.."
30245     METHOD="--with-tools-dir"
30246 
30247     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30248       VCVARSFILE="vc/bin/vcvars32.bat"
30249     else
30250       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30251     fi
30252 
30253 
30254   windows_path="$VS_BASE"
30255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30256     unix_path=`$CYGPATH -u "$windows_path"`
30257     VS_BASE="$unix_path"
30258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30260     VS_BASE="$unix_path"
30261   fi
30262 
30263     if test -d "$VS_BASE"; then
30264       if test -f "$VS_BASE/$VCVARSFILE"; then
30265         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30266 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30267         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30268         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30269         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30270         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30271       else
30272         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30273 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30274         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30275 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30276       fi
30277     fi
30278   fi
30279 
30280 
30281   if test "x$VS_ENV_CMD" = x; then
30282     VS_VERSION="${VS_VERSION}"
30283     VS_BASE="$with_tools_dir/../../.."
30284     METHOD="--with-tools-dir"
30285 
30286     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30287       VCVARSFILE="vc/bin/vcvars32.bat"
30288     else
30289       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30290     fi
30291 
30292 
30293   windows_path="$VS_BASE"
30294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30295     unix_path=`$CYGPATH -u "$windows_path"`
30296     VS_BASE="$unix_path"
30297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30299     VS_BASE="$unix_path"
30300   fi
30301 
30302     if test -d "$VS_BASE"; then
30303       if test -f "$VS_BASE/$VCVARSFILE"; then
30304         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30305 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30306         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30307         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30308         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30309         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30310       else
30311         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30312 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30313         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30314 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30315       fi
30316     fi
30317   fi
30318 
30319     if test "x$VS_ENV_CMD" = x; then
30320       # Having specified an argument which is incorrect will produce an instant failure;
30321       # we should not go on looking
30322       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30323 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30324       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30325 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30326       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30327 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30328       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30329     fi
30330   fi
30331 
30332   VS_ENV_CMD=""
30333   VS_ENV_ARGS=""
30334 
30335   if test "x$VS_COMNTOOLS" != x; then
30336 
30337   if test "x$VS_ENV_CMD" = x; then
30338     VS_VERSION="${VS_VERSION}"
30339     VS_BASE="$VS_COMNTOOLS/../.."
30340     METHOD="$VS_COMNTOOLS_VAR variable"
30341 
30342     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30343       VCVARSFILE="vc/bin/vcvars32.bat"
30344     else
30345       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30346     fi
30347 
30348 
30349   windows_path="$VS_BASE"
30350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30351     unix_path=`$CYGPATH -u "$windows_path"`
30352     VS_BASE="$unix_path"
30353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30355     VS_BASE="$unix_path"
30356   fi
30357 
30358     if test -d "$VS_BASE"; then
30359       if test -f "$VS_BASE/$VCVARSFILE"; then
30360         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30361 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30362         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30363         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30364         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30365         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30366       else
30367         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30368 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30369         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30370 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30371       fi
30372     fi
30373   fi
30374 
30375   fi
30376   if test "x$PROGRAMFILES" != x; then
30377 
30378   if test "x$VS_ENV_CMD" = x; then
30379     VS_VERSION="${VS_VERSION}"
30380     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30381     METHOD="well-known name"
30382 
30383     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30384       VCVARSFILE="vc/bin/vcvars32.bat"
30385     else
30386       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30387     fi
30388 
30389 
30390   windows_path="$VS_BASE"
30391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30392     unix_path=`$CYGPATH -u "$windows_path"`
30393     VS_BASE="$unix_path"
30394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30396     VS_BASE="$unix_path"
30397   fi
30398 
30399     if test -d "$VS_BASE"; then
30400       if test -f "$VS_BASE/$VCVARSFILE"; then
30401         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30402 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30403         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30404         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30405         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30406         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30407       else
30408         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30409 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30410         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30411 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30412       fi
30413     fi
30414   fi
30415 
30416   fi
30417   # Work around the insanely named ProgramFiles(x86) env variable
30418   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30419   if test "x$PROGRAMFILES_X86" != x; then
30420 
30421   if test "x$VS_ENV_CMD" = x; then
30422     VS_VERSION="${VS_VERSION}"
30423     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30424     METHOD="well-known name"
30425 
30426     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30427       VCVARSFILE="vc/bin/vcvars32.bat"
30428     else
30429       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30430     fi
30431 
30432 
30433   windows_path="$VS_BASE"
30434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30435     unix_path=`$CYGPATH -u "$windows_path"`
30436     VS_BASE="$unix_path"
30437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30439     VS_BASE="$unix_path"
30440   fi
30441 
30442     if test -d "$VS_BASE"; then
30443       if test -f "$VS_BASE/$VCVARSFILE"; then
30444         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30445 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30446         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30447         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30448         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30449         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30450       else
30451         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30452 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30453         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30454 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30455       fi
30456     fi
30457   fi
30458 
30459   fi
30460 
30461   if test "x$VS_ENV_CMD" = x; then
30462     VS_VERSION="${VS_VERSION}"
30463     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30464     METHOD="well-known name"
30465 
30466     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30467       VCVARSFILE="vc/bin/vcvars32.bat"
30468     else
30469       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30470     fi
30471 
30472 
30473   windows_path="$VS_BASE"
30474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30475     unix_path=`$CYGPATH -u "$windows_path"`
30476     VS_BASE="$unix_path"
30477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30479     VS_BASE="$unix_path"
30480   fi
30481 
30482     if test -d "$VS_BASE"; then
30483       if test -f "$VS_BASE/$VCVARSFILE"; then
30484         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30485 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30486         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30487         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30488         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30489         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30490       else
30491         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30492 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30493         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30494 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30495       fi
30496     fi
30497   fi
30498 
30499 
30500   if test "x$VS_ENV_CMD" = x; then
30501     VS_VERSION="${VS_VERSION}"
30502     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30503     METHOD="well-known name"
30504 
30505     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30506       VCVARSFILE="vc/bin/vcvars32.bat"
30507     else
30508       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30509     fi
30510 
30511 
30512   windows_path="$VS_BASE"
30513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30514     unix_path=`$CYGPATH -u "$windows_path"`
30515     VS_BASE="$unix_path"
30516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30518     VS_BASE="$unix_path"
30519   fi
30520 
30521     if test -d "$VS_BASE"; then
30522       if test -f "$VS_BASE/$VCVARSFILE"; then
30523         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30524 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30525         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30526         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30527         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30528         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30529       else
30530         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30531 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30532         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30533 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30534       fi
30535     fi
30536   fi
30537 
30538 
30539   if test "x$SDK_INSTALL_DIR" != x; then
30540     if test "x$ProgramW6432" != x; then
30541 
30542   if test "x$VS_ENV_CMD" = x; then
30543     VS_VERSION="${VS_VERSION}"
30544     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30545     METHOD="well-known name"
30546 
30547   windows_path="$WIN_SDK_BASE"
30548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30549     unix_path=`$CYGPATH -u "$windows_path"`
30550     WIN_SDK_BASE="$unix_path"
30551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30553     WIN_SDK_BASE="$unix_path"
30554   fi
30555 
30556     if test -d "$WIN_SDK_BASE"; then
30557       # There have been cases of partial or broken SDK installations. A missing
30558       # lib dir is not going to work.
30559       if test ! -d "$WIN_SDK_BASE/lib"; then
30560         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30561 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30562         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30563 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30564       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30565         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30566 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30567         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30568         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30569           VS_ENV_ARGS="/x86"
30570         else
30571           VS_ENV_ARGS="/x64"
30572         fi
30573         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30574         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30575         # TODO: improve detection for other versions of SDK
30576         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30577       else
30578         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30579 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30580         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30581 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30582       fi
30583     fi
30584   fi
30585 
30586     fi
30587     if test "x$PROGRAMW6432" != x; then
30588 
30589   if test "x$VS_ENV_CMD" = x; then
30590     VS_VERSION="${VS_VERSION}"
30591     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30592     METHOD="well-known name"
30593 
30594   windows_path="$WIN_SDK_BASE"
30595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30596     unix_path=`$CYGPATH -u "$windows_path"`
30597     WIN_SDK_BASE="$unix_path"
30598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30600     WIN_SDK_BASE="$unix_path"
30601   fi
30602 
30603     if test -d "$WIN_SDK_BASE"; then
30604       # There have been cases of partial or broken SDK installations. A missing
30605       # lib dir is not going to work.
30606       if test ! -d "$WIN_SDK_BASE/lib"; then
30607         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30608 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30609         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30610 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30611       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30612         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30613 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30614         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30615         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30616           VS_ENV_ARGS="/x86"
30617         else
30618           VS_ENV_ARGS="/x64"
30619         fi
30620         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30621         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30622         # TODO: improve detection for other versions of SDK
30623         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30624       else
30625         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30626 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30627         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30628 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30629       fi
30630     fi
30631   fi
30632 
30633     fi
30634     if test "x$PROGRAMFILES" != x; then
30635 
30636   if test "x$VS_ENV_CMD" = x; then
30637     VS_VERSION="${VS_VERSION}"
30638     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30639     METHOD="well-known name"
30640 
30641   windows_path="$WIN_SDK_BASE"
30642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30643     unix_path=`$CYGPATH -u "$windows_path"`
30644     WIN_SDK_BASE="$unix_path"
30645   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30646     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30647     WIN_SDK_BASE="$unix_path"
30648   fi
30649 
30650     if test -d "$WIN_SDK_BASE"; then
30651       # There have been cases of partial or broken SDK installations. A missing
30652       # lib dir is not going to work.
30653       if test ! -d "$WIN_SDK_BASE/lib"; then
30654         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30655 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30656         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30657 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30658       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30659         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30660 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30661         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30662         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30663           VS_ENV_ARGS="/x86"
30664         else
30665           VS_ENV_ARGS="/x64"
30666         fi
30667         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30668         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30669         # TODO: improve detection for other versions of SDK
30670         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30671       else
30672         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30673 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30674         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30675 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30676       fi
30677     fi
30678   fi
30679 
30680     fi
30681 
30682   if test "x$VS_ENV_CMD" = x; then
30683     VS_VERSION="${VS_VERSION}"
30684     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30685     METHOD="well-known name"
30686 
30687   windows_path="$WIN_SDK_BASE"
30688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30689     unix_path=`$CYGPATH -u "$windows_path"`
30690     WIN_SDK_BASE="$unix_path"
30691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30693     WIN_SDK_BASE="$unix_path"
30694   fi
30695 
30696     if test -d "$WIN_SDK_BASE"; then
30697       # There have been cases of partial or broken SDK installations. A missing
30698       # lib dir is not going to work.
30699       if test ! -d "$WIN_SDK_BASE/lib"; then
30700         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30701 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30702         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30703 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30704       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30705         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30706 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30707         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30708         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30709           VS_ENV_ARGS="/x86"
30710         else
30711           VS_ENV_ARGS="/x64"
30712         fi
30713         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30714         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30715         # TODO: improve detection for other versions of SDK
30716         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30717       else
30718         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30719 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30720         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30721 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30722       fi
30723     fi
30724   fi
30725 
30726 
30727   if test "x$VS_ENV_CMD" = x; then
30728     VS_VERSION="${VS_VERSION}"
30729     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30730     METHOD="well-known name"
30731 
30732   windows_path="$WIN_SDK_BASE"
30733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30734     unix_path=`$CYGPATH -u "$windows_path"`
30735     WIN_SDK_BASE="$unix_path"
30736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30738     WIN_SDK_BASE="$unix_path"
30739   fi
30740 
30741     if test -d "$WIN_SDK_BASE"; then
30742       # There have been cases of partial or broken SDK installations. A missing
30743       # lib dir is not going to work.
30744       if test ! -d "$WIN_SDK_BASE/lib"; then
30745         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30746 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30747         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30748 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30749       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30750         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30751 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30752         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30753         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30754           VS_ENV_ARGS="/x86"
30755         else
30756           VS_ENV_ARGS="/x64"
30757         fi
30758         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30759         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30760         # TODO: improve detection for other versions of SDK
30761         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30762       else
30763         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30764 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30765         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30766 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30767       fi
30768     fi
30769   fi
30770 
30771   fi
30772 
30773     if test "x$VS_ENV_CMD" != x; then
30774       TOOLCHAIN_VERSION=$VS_VERSION
30775       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30776       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30777       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30778       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30779       # The rest of the variables are already evaled while probing
30780       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30781 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30782       break
30783     fi
30784   done
30785 
30786 
30787   # If we have a devkit, skip all of the below.
30788   if test "x$DEVKIT_VS_VERSION" = x; then
30789     if test "x$VS_ENV_CMD" != x; then
30790       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30791 
30792   # Only process if variable expands to non-empty
30793 
30794   if test "x$VS_ENV_CMD" != x; then
30795     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30796 
30797   # First separate the path from the arguments. This will split at the first
30798   # space.
30799   complete="$VS_ENV_CMD"
30800   path="${complete%% *}"
30801   tmp="$complete EOL"
30802   arguments="${tmp#* }"
30803 
30804   # Input might be given as Windows format, start by converting to
30805   # unix format.
30806   new_path=`$CYGPATH -u "$path"`
30807 
30808   # Now try to locate executable using which
30809   new_path=`$WHICH "$new_path" 2> /dev/null`
30810   # bat and cmd files are not always considered executable in cygwin causing which
30811   # to not find them
30812   if test "x$new_path" = x \
30813       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30814       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30815     new_path=`$CYGPATH -u "$path"`
30816   fi
30817   if test "x$new_path" = x; then
30818     # Oops. Which didn't find the executable.
30819     # The splitting of arguments from the executable at a space might have been incorrect,
30820     # since paths with space are more likely in Windows. Give it another try with the whole
30821     # argument.
30822     path="$complete"
30823     arguments="EOL"
30824     new_path=`$CYGPATH -u "$path"`
30825     new_path=`$WHICH "$new_path" 2> /dev/null`
30826     # bat and cmd files are not always considered executable in cygwin causing which
30827     # to not find them
30828     if test "x$new_path" = x \
30829         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30830         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30831       new_path=`$CYGPATH -u "$path"`
30832     fi
30833     if test "x$new_path" = x; then
30834       # It's still not found. Now this is an unrecoverable error.
30835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30836 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30837       has_space=`$ECHO "$complete" | $GREP " "`
30838       if test "x$has_space" != x; then
30839         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30840 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30841       fi
30842       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30843     fi
30844   fi
30845 
30846   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30847   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30848   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30849   # "foo.exe" is OK but "foo" is an error.
30850   #
30851   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30852   # It is also a way to make sure we got the proper file name for the real test later on.
30853   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30854   if test "x$test_shortpath" = x; then
30855     # Short path failed, file does not exist as specified.
30856     # Try adding .exe or .cmd
30857     if test -f "${new_path}.exe"; then
30858       input_to_shortpath="${new_path}.exe"
30859     elif test -f "${new_path}.cmd"; then
30860       input_to_shortpath="${new_path}.cmd"
30861     else
30862       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30863 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30864       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30865 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30866       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30867     fi
30868   else
30869     input_to_shortpath="$new_path"
30870   fi
30871 
30872   # Call helper function which possibly converts this using DOS-style short mode.
30873   # If so, the updated path is stored in $new_path.
30874   new_path="$input_to_shortpath"
30875 
30876   input_path="$input_to_shortpath"
30877   # Check if we need to convert this using DOS-style short mode. If the path
30878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30879   # take no chances and rewrite it.
30880   # Note: m4 eats our [], so we need to use [ and ] instead.
30881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30882   if test "x$has_forbidden_chars" != x; then
30883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30884     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30885     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30886     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30887       # Going to short mode and back again did indeed matter. Since short mode is
30888       # case insensitive, let's make it lowercase to improve readability.
30889       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30890       # Now convert it back to Unix-style (cygpath)
30891       input_path=`$CYGPATH -u "$shortmode_path"`
30892       new_path="$input_path"
30893     fi
30894   fi
30895 
30896   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30897   if test "x$test_cygdrive_prefix" = x; then
30898     # As a simple fix, exclude /usr/bin since it's not a real path.
30899     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30900       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30901       # a path prefixed by /cygdrive for fixpath to work.
30902       new_path="$CYGWIN_ROOT_PATH$input_path"
30903     fi
30904   fi
30905 
30906   # remove trailing .exe if any
30907   new_path="${new_path/%.exe/}"
30908 
30909     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30910 
30911   # First separate the path from the arguments. This will split at the first
30912   # space.
30913   complete="$VS_ENV_CMD"
30914   path="${complete%% *}"
30915   tmp="$complete EOL"
30916   arguments="${tmp#* }"
30917 
30918   # Input might be given as Windows format, start by converting to
30919   # unix format.
30920   new_path="$path"
30921 
30922   windows_path="$new_path"
30923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30924     unix_path=`$CYGPATH -u "$windows_path"`
30925     new_path="$unix_path"
30926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30928     new_path="$unix_path"
30929   fi
30930 
30931 
30932   # Now try to locate executable using which
30933   new_path=`$WHICH "$new_path" 2> /dev/null`
30934 
30935   if test "x$new_path" = x; then
30936     # Oops. Which didn't find the executable.
30937     # The splitting of arguments from the executable at a space might have been incorrect,
30938     # since paths with space are more likely in Windows. Give it another try with the whole
30939     # argument.
30940     path="$complete"
30941     arguments="EOL"
30942     new_path="$path"
30943 
30944   windows_path="$new_path"
30945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30946     unix_path=`$CYGPATH -u "$windows_path"`
30947     new_path="$unix_path"
30948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30950     new_path="$unix_path"
30951   fi
30952 
30953 
30954     new_path=`$WHICH "$new_path" 2> /dev/null`
30955     # bat and cmd files are not always considered executable in MSYS causing which
30956     # to not find them
30957     if test "x$new_path" = x \
30958         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30959         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30960       new_path="$path"
30961 
30962   windows_path="$new_path"
30963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30964     unix_path=`$CYGPATH -u "$windows_path"`
30965     new_path="$unix_path"
30966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30968     new_path="$unix_path"
30969   fi
30970 
30971     fi
30972 
30973     if test "x$new_path" = x; then
30974       # It's still not found. Now this is an unrecoverable error.
30975       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30976 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30977       has_space=`$ECHO "$complete" | $GREP " "`
30978       if test "x$has_space" != x; then
30979         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30980 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30981       fi
30982       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30983     fi
30984   fi
30985 
30986   # Now new_path has a complete unix path to the binary
30987   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30988     # Keep paths in /bin as-is, but remove trailing .exe if any
30989     new_path="${new_path/%.exe/}"
30990     # Do not save /bin paths to all_fixpath_prefixes!
30991   else
30992     # Not in mixed or Windows style, start by that.
30993     new_path=`cmd //c echo $new_path`
30994 
30995   input_path="$new_path"
30996   # Check if we need to convert this using DOS-style short mode. If the path
30997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30998   # take no chances and rewrite it.
30999   # Note: m4 eats our [], so we need to use [ and ] instead.
31000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31001   if test "x$has_forbidden_chars" != x; then
31002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31003     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31004   fi
31005 
31006     # Output is in $new_path
31007 
31008   windows_path="$new_path"
31009   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31010     unix_path=`$CYGPATH -u "$windows_path"`
31011     new_path="$unix_path"
31012   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31013     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31014     new_path="$unix_path"
31015   fi
31016 
31017     # remove trailing .exe if any
31018     new_path="${new_path/%.exe/}"
31019 
31020     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31021     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31022   fi
31023 
31024     else
31025       # We're on a unix platform. Hooray! :)
31026       # First separate the path from the arguments. This will split at the first
31027       # space.
31028       complete="$VS_ENV_CMD"
31029       path="${complete%% *}"
31030       tmp="$complete EOL"
31031       arguments="${tmp#* }"
31032 
31033       # Cannot rely on the command "which" here since it doesn't always work.
31034       is_absolute_path=`$ECHO "$path" | $GREP ^/`
31035       if test -z "$is_absolute_path"; then
31036         # Path to executable is not absolute. Find it.
31037         IFS_save="$IFS"
31038         IFS=:
31039         for p in $PATH; do
31040           if test -f "$p/$path" && test -x "$p/$path"; then
31041             new_path="$p/$path"
31042             break
31043           fi
31044         done
31045         IFS="$IFS_save"
31046       else
31047         # This is an absolute path, we can use it without further modifications.
31048         new_path="$path"
31049       fi
31050 
31051       if test "x$new_path" = x; then
31052         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31053 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31054         has_space=`$ECHO "$complete" | $GREP " "`
31055         if test "x$has_space" != x; then
31056           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31057 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31058         fi
31059         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31060       fi
31061     fi
31062 
31063     # Now join together the path and the arguments once again
31064     if test "x$arguments" != xEOL; then
31065       new_complete="$new_path ${arguments% *}"
31066     else
31067       new_complete="$new_path"
31068     fi
31069 
31070     if test "x$complete" != "x$new_complete"; then
31071       VS_ENV_CMD="$new_complete"
31072       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31073 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31074     fi
31075   fi
31076 
31077 
31078       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31079       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31080 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31081 
31082       # We need to create a couple of temporary files.
31083       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31084       $MKDIR -p $VS_ENV_TMP_DIR
31085 
31086       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31087       # Instead create a shell script which will set the relevant variables when run.
31088       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31089 
31090   unix_path="$WINPATH_VS_ENV_CMD"
31091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31092     windows_path=`$CYGPATH -m "$unix_path"`
31093     WINPATH_VS_ENV_CMD="$windows_path"
31094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31095     windows_path=`cmd //c echo $unix_path`
31096     WINPATH_VS_ENV_CMD="$windows_path"
31097   fi
31098 
31099       WINPATH_BASH="$BASH"
31100 
31101   unix_path="$WINPATH_BASH"
31102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31103     windows_path=`$CYGPATH -m "$unix_path"`
31104     WINPATH_BASH="$windows_path"
31105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31106     windows_path=`cmd //c echo $unix_path`
31107     WINPATH_BASH="$windows_path"
31108   fi
31109 
31110 
31111       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31112       # script (executable by bash) that will setup the important variables.
31113       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31114       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31115       # This will end up something like:
31116       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31117       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31118       # These will end up something like:
31119       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31120       # The trailing space for everyone except PATH is no typo, but is needed due
31121       # to trailing \ in the Windows paths. These will be stripped later.
31122       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31123           >> $EXTRACT_VC_ENV_BAT_FILE
31124       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31125           >> $EXTRACT_VC_ENV_BAT_FILE
31126       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31127           >> $EXTRACT_VC_ENV_BAT_FILE
31128       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31129           >> $EXTRACT_VC_ENV_BAT_FILE
31130       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31131           >> $EXTRACT_VC_ENV_BAT_FILE
31132       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31133           >> $EXTRACT_VC_ENV_BAT_FILE
31134 
31135       # Now execute the newly created bat file.
31136       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31137       # Change directory so we don't need to mess with Windows paths in redirects.
31138       cd $VS_ENV_TMP_DIR
31139       cmd /c extract-vs-env.bat | $CAT
31140       cd $CURDIR
31141 
31142       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31143         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31144 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31145         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31146 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31147         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31148 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31149         as_fn_error $? "Cannot continue" "$LINENO" 5
31150       fi
31151 
31152       # Now set all paths and other env variables. This will allow the rest of
31153       # the configure script to find and run the compiler in the proper way.
31154       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31155 $as_echo "$as_me: Setting extracted environment variables" >&6;}
31156       . $VS_ENV_TMP_DIR/set-vs-env.sh
31157       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31158       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31159     else
31160       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31161       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31162 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31163     fi
31164   fi
31165 
31166   # At this point, we should have correct variables in the environment, or we can't continue.
31167   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31168 $as_echo_n "checking for Visual Studio variables... " >&6; }
31169 
31170   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31171       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31172     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31173       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31174 $as_echo "present but broken" >&6; }
31175       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31176     else
31177       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31178 $as_echo "ok" >&6; }
31179       # Remove any trailing "\" ";" and " " from the variables.
31180       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31181       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31182       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31183       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31184       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31185       # Remove any paths containing # (typically F#) as that messes up make. This
31186       # is needed if visual studio was installed with F# support.
31187       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31188 
31189 
31190 
31191 
31192 
31193       # Convert VS_INCLUDE into SYSROOT_CFLAGS
31194       OLDIFS="$IFS"
31195       IFS=";"
31196       for i in $VS_INCLUDE; do
31197         ipath=$i
31198         # Only process non-empty elements
31199         if test "x$ipath" != x; then
31200           IFS="$OLDIFS"
31201           # Check that directory exists before calling fixup_path
31202           testpath=$ipath
31203 
31204   windows_path="$testpath"
31205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31206     unix_path=`$CYGPATH -u "$windows_path"`
31207     testpath="$unix_path"
31208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31209     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31210     testpath="$unix_path"
31211   fi
31212 
31213           if test -d "$testpath"; then
31214 
31215   # Only process if variable expands to non-empty
31216 
31217   if test "x$ipath" != x; then
31218     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31219 
31220   # Input might be given as Windows format, start by converting to
31221   # unix format.
31222   path="$ipath"
31223   new_path=`$CYGPATH -u "$path"`
31224 
31225   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31226   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31227   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31228   # "foo.exe" is OK but "foo" is an error.
31229   #
31230   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31231   # It is also a way to make sure we got the proper file name for the real test later on.
31232   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31233   if test "x$test_shortpath" = x; then
31234     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31235 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31236     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31237   fi
31238 
31239   # Call helper function which possibly converts this using DOS-style short mode.
31240   # If so, the updated path is stored in $new_path.
31241 
31242   input_path="$new_path"
31243   # Check if we need to convert this using DOS-style short mode. If the path
31244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31245   # take no chances and rewrite it.
31246   # Note: m4 eats our [], so we need to use [ and ] instead.
31247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31248   if test "x$has_forbidden_chars" != x; then
31249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31250     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31251     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31252     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31253       # Going to short mode and back again did indeed matter. Since short mode is
31254       # case insensitive, let's make it lowercase to improve readability.
31255       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31256       # Now convert it back to Unix-style (cygpath)
31257       input_path=`$CYGPATH -u "$shortmode_path"`
31258       new_path="$input_path"
31259     fi
31260   fi
31261 
31262   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31263   if test "x$test_cygdrive_prefix" = x; then
31264     # As a simple fix, exclude /usr/bin since it's not a real path.
31265     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31266       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31267       # a path prefixed by /cygdrive for fixpath to work.
31268       new_path="$CYGWIN_ROOT_PATH$input_path"
31269     fi
31270   fi
31271 
31272 
31273   if test "x$path" != "x$new_path"; then
31274     ipath="$new_path"
31275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31276 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31277   fi
31278 
31279     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31280 
31281   path="$ipath"
31282   has_colon=`$ECHO $path | $GREP ^.:`
31283   new_path="$path"
31284   if test "x$has_colon" = x; then
31285     # Not in mixed or Windows style, start by that.
31286     new_path=`cmd //c echo $path`
31287   fi
31288 
31289 
31290   input_path="$new_path"
31291   # Check if we need to convert this using DOS-style short mode. If the path
31292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31293   # take no chances and rewrite it.
31294   # Note: m4 eats our [], so we need to use [ and ] instead.
31295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31296   if test "x$has_forbidden_chars" != x; then
31297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31298     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31299   fi
31300 
31301 
31302   windows_path="$new_path"
31303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31304     unix_path=`$CYGPATH -u "$windows_path"`
31305     new_path="$unix_path"
31306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31308     new_path="$unix_path"
31309   fi
31310 
31311   if test "x$path" != "x$new_path"; then
31312     ipath="$new_path"
31313     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31314 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31315   fi
31316 
31317   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31318   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31319 
31320     else
31321       # We're on a unix platform. Hooray! :)
31322       path="$ipath"
31323       has_space=`$ECHO "$path" | $GREP " "`
31324       if test "x$has_space" != x; then
31325         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31326 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31327         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31328       fi
31329 
31330       # Use eval to expand a potential ~
31331       eval path="$path"
31332       if test ! -f "$path" && test ! -d "$path"; then
31333         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31334       fi
31335 
31336       if test -d "$path"; then
31337         ipath="`cd "$path"; $THEPWDCMD -L`"
31338       else
31339         dir="`$DIRNAME "$path"`"
31340         base="`$BASENAME "$path"`"
31341         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31342       fi
31343     fi
31344   fi
31345 
31346             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31347           fi
31348           IFS=";"
31349         fi
31350       done
31351       # Convert VS_LIB into SYSROOT_LDFLAGS
31352       for i in $VS_LIB; do
31353         libpath=$i
31354         # Only process non-empty elements
31355         if test "x$libpath" != x; then
31356           IFS="$OLDIFS"
31357           # Check that directory exists before calling fixup_path
31358           testpath=$libpath
31359 
31360   windows_path="$testpath"
31361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31362     unix_path=`$CYGPATH -u "$windows_path"`
31363     testpath="$unix_path"
31364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31366     testpath="$unix_path"
31367   fi
31368 
31369           if test -d "$testpath"; then
31370 
31371   # Only process if variable expands to non-empty
31372 
31373   if test "x$libpath" != x; then
31374     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31375 
31376   # Input might be given as Windows format, start by converting to
31377   # unix format.
31378   path="$libpath"
31379   new_path=`$CYGPATH -u "$path"`
31380 
31381   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31382   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31383   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31384   # "foo.exe" is OK but "foo" is an error.
31385   #
31386   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31387   # It is also a way to make sure we got the proper file name for the real test later on.
31388   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31389   if test "x$test_shortpath" = x; then
31390     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31391 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31392     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31393   fi
31394 
31395   # Call helper function which possibly converts this using DOS-style short mode.
31396   # If so, the updated path is stored in $new_path.
31397 
31398   input_path="$new_path"
31399   # Check if we need to convert this using DOS-style short mode. If the path
31400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31401   # take no chances and rewrite it.
31402   # Note: m4 eats our [], so we need to use [ and ] instead.
31403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31404   if test "x$has_forbidden_chars" != x; then
31405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31406     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31407     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31408     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31409       # Going to short mode and back again did indeed matter. Since short mode is
31410       # case insensitive, let's make it lowercase to improve readability.
31411       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31412       # Now convert it back to Unix-style (cygpath)
31413       input_path=`$CYGPATH -u "$shortmode_path"`
31414       new_path="$input_path"
31415     fi
31416   fi
31417 
31418   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31419   if test "x$test_cygdrive_prefix" = x; then
31420     # As a simple fix, exclude /usr/bin since it's not a real path.
31421     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31422       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31423       # a path prefixed by /cygdrive for fixpath to work.
31424       new_path="$CYGWIN_ROOT_PATH$input_path"
31425     fi
31426   fi
31427 
31428 
31429   if test "x$path" != "x$new_path"; then
31430     libpath="$new_path"
31431     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31432 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31433   fi
31434 
31435     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31436 
31437   path="$libpath"
31438   has_colon=`$ECHO $path | $GREP ^.:`
31439   new_path="$path"
31440   if test "x$has_colon" = x; then
31441     # Not in mixed or Windows style, start by that.
31442     new_path=`cmd //c echo $path`
31443   fi
31444 
31445 
31446   input_path="$new_path"
31447   # Check if we need to convert this using DOS-style short mode. If the path
31448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31449   # take no chances and rewrite it.
31450   # Note: m4 eats our [], so we need to use [ and ] instead.
31451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31452   if test "x$has_forbidden_chars" != x; then
31453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31454     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31455   fi
31456 
31457 
31458   windows_path="$new_path"
31459   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31460     unix_path=`$CYGPATH -u "$windows_path"`
31461     new_path="$unix_path"
31462   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31463     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31464     new_path="$unix_path"
31465   fi
31466 
31467   if test "x$path" != "x$new_path"; then
31468     libpath="$new_path"
31469     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31470 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31471   fi
31472 
31473   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31474   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31475 
31476     else
31477       # We're on a unix platform. Hooray! :)
31478       path="$libpath"
31479       has_space=`$ECHO "$path" | $GREP " "`
31480       if test "x$has_space" != x; then
31481         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31482 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31483         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31484       fi
31485 
31486       # Use eval to expand a potential ~
31487       eval path="$path"
31488       if test ! -f "$path" && test ! -d "$path"; then
31489         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31490       fi
31491 
31492       if test -d "$path"; then
31493         libpath="`cd "$path"; $THEPWDCMD -L`"
31494       else
31495         dir="`$DIRNAME "$path"`"
31496         base="`$BASENAME "$path"`"
31497         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31498       fi
31499     fi
31500   fi
31501 
31502             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31503           fi
31504           IFS=";"
31505         fi
31506       done
31507       IFS="$OLDIFS"
31508     fi
31509   else
31510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31511 $as_echo "not found" >&6; }
31512 
31513     if test "x$VS_ENV_CMD" = x; then
31514       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31515 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31516       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31517 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31518     else
31519       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31520 $as_echo "$as_me: Running the extraction script failed." >&6;}
31521     fi
31522     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31523 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31524     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31525 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31526     as_fn_error $? "Cannot continue" "$LINENO" 5
31527   fi
31528 
31529     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31530     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31531     PATH="$VS_PATH"
31532     # The microsoft toolchain also requires INCLUDE and LIB to be set.
31533     export INCLUDE="$VS_INCLUDE"
31534     export LIB="$VS_LIB"
31535   else
31536     if test "x$XCODE_VERSION_OUTPUT" != x; then
31537       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
31538       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
31539       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
31540     else
31541       # Currently we do not define this for other toolchains. This might change as the need arise.
31542       TOOLCHAIN_VERSION=
31543     fi
31544   fi
31545 
31546 
31547   # For solaris we really need solaris tools, and not the GNU equivalent.
31548   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31549   # so add that to path before starting to probe.
31550   # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31551   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31552     PATH="/usr/ccs/bin:$PATH"
31553   fi
31554 
31555   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31556   # override all other locations.
31557   if test "x$TOOLCHAIN_PATH" != x; then
31558     PATH=$TOOLCHAIN_PATH:$PATH
31559   fi
31560 
31561 
31562   #
31563   # Setup the compilers (CC and CXX)
31564   #
31565 
31566   COMPILER_NAME=C
31567   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31568 
31569   if test "x$CC" != x; then
31570     # User has supplied compiler name already, always let that override.
31571     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31572 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31573     if test "x`basename $CC`" = "x$CC"; then
31574       # A command without a complete path is provided, search $PATH.
31575 
31576       for ac_prog in $CC
31577 do
31578   # Extract the first word of "$ac_prog", so it can be a program name with args.
31579 set dummy $ac_prog; ac_word=$2
31580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31581 $as_echo_n "checking for $ac_word... " >&6; }
31582 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31583   $as_echo_n "(cached) " >&6
31584 else
31585   case $POTENTIAL_CC in
31586   [\\/]* | ?:[\\/]*)
31587   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31588   ;;
31589   *)
31590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31591 for as_dir in $PATH
31592 do
31593   IFS=$as_save_IFS
31594   test -z "$as_dir" && as_dir=.
31595     for ac_exec_ext in '' $ac_executable_extensions; do
31596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31597     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31599     break 2
31600   fi
31601 done
31602   done
31603 IFS=$as_save_IFS
31604 
31605   ;;
31606 esac
31607 fi
31608 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31609 if test -n "$POTENTIAL_CC"; then
31610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31611 $as_echo "$POTENTIAL_CC" >&6; }
31612 else
31613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31614 $as_echo "no" >&6; }
31615 fi
31616 
31617 
31618   test -n "$POTENTIAL_CC" && break
31619 done
31620 
31621       if test "x$POTENTIAL_CC" != x; then
31622         CC=$POTENTIAL_CC
31623       else
31624         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31625       fi
31626     else
31627       # Otherwise it might already be a complete path
31628       if test ! -x "$CC"; then
31629         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31630       fi
31631     fi
31632   else
31633     # No user supplied value. Locate compiler ourselves.
31634 
31635     # If we are cross compiling, assume cross compilation tools follows the
31636     # cross compilation standard where they are prefixed with the autoconf
31637     # standard name for the target. For example the binary
31638     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31639     # If we are not cross compiling, then the default compiler name will be
31640     # used.
31641 
31642     CC=
31643     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31644     # before checking the rest of the PATH.
31645     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31646     # step, this should not be necessary.
31647     if test -n "$TOOLCHAIN_PATH"; then
31648       PATH_save="$PATH"
31649       PATH="$TOOLCHAIN_PATH"
31650       for ac_prog in $SEARCH_LIST
31651 do
31652   # Extract the first word of "$ac_prog", so it can be a program name with args.
31653 set dummy $ac_prog; ac_word=$2
31654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31655 $as_echo_n "checking for $ac_word... " >&6; }
31656 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31657   $as_echo_n "(cached) " >&6
31658 else
31659   case $TOOLCHAIN_PATH_CC in
31660   [\\/]* | ?:[\\/]*)
31661   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31662   ;;
31663   *)
31664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31665 for as_dir in $PATH
31666 do
31667   IFS=$as_save_IFS
31668   test -z "$as_dir" && as_dir=.
31669     for ac_exec_ext in '' $ac_executable_extensions; do
31670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31671     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31673     break 2
31674   fi
31675 done
31676   done
31677 IFS=$as_save_IFS
31678 
31679   ;;
31680 esac
31681 fi
31682 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31683 if test -n "$TOOLCHAIN_PATH_CC"; then
31684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31685 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31686 else
31687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31688 $as_echo "no" >&6; }
31689 fi
31690 
31691 
31692   test -n "$TOOLCHAIN_PATH_CC" && break
31693 done
31694 
31695       CC=$TOOLCHAIN_PATH_CC
31696       PATH="$PATH_save"
31697     fi
31698 
31699     # AC_PATH_PROGS can't be run multiple times with the same variable,
31700     # so create a new name for this run.
31701     if test "x$CC" = x; then
31702       for ac_prog in $SEARCH_LIST
31703 do
31704   # Extract the first word of "$ac_prog", so it can be a program name with args.
31705 set dummy $ac_prog; ac_word=$2
31706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31707 $as_echo_n "checking for $ac_word... " >&6; }
31708 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31709   $as_echo_n "(cached) " >&6
31710 else
31711   case $POTENTIAL_CC in
31712   [\\/]* | ?:[\\/]*)
31713   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31714   ;;
31715   *)
31716   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31717 for as_dir in $PATH
31718 do
31719   IFS=$as_save_IFS
31720   test -z "$as_dir" && as_dir=.
31721     for ac_exec_ext in '' $ac_executable_extensions; do
31722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31723     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31725     break 2
31726   fi
31727 done
31728   done
31729 IFS=$as_save_IFS
31730 
31731   ;;
31732 esac
31733 fi
31734 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31735 if test -n "$POTENTIAL_CC"; then
31736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31737 $as_echo "$POTENTIAL_CC" >&6; }
31738 else
31739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31740 $as_echo "no" >&6; }
31741 fi
31742 
31743 
31744   test -n "$POTENTIAL_CC" && break
31745 done
31746 
31747       CC=$POTENTIAL_CC
31748     fi
31749 
31750     if test "x$CC" = x; then
31751 
31752   # Print a helpful message on how to acquire the necessary build dependency.
31753   # devkit is the help tag: freetype, cups, alsa etc
31754   MISSING_DEPENDENCY=devkit
31755 
31756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31757     cygwin_help $MISSING_DEPENDENCY
31758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31759     msys_help $MISSING_DEPENDENCY
31760   else
31761     PKGHANDLER_COMMAND=
31762 
31763     case $PKGHANDLER in
31764       apt-get)
31765         apt_help     $MISSING_DEPENDENCY ;;
31766       yum)
31767         yum_help     $MISSING_DEPENDENCY ;;
31768       port)
31769         port_help    $MISSING_DEPENDENCY ;;
31770       pkgutil)
31771         pkgutil_help $MISSING_DEPENDENCY ;;
31772       pkgadd)
31773         pkgadd_help  $MISSING_DEPENDENCY ;;
31774     esac
31775 
31776     if test "x$PKGHANDLER_COMMAND" != x; then
31777       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31778     fi
31779   fi
31780 
31781       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31782     fi
31783   fi
31784 
31785   # Now we have a compiler binary in CC. Make sure it's okay.
31786 
31787   # Only process if variable expands to non-empty
31788 
31789   if test "x$CC" != x; then
31790     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31791 
31792   # First separate the path from the arguments. This will split at the first
31793   # space.
31794   complete="$CC"
31795   path="${complete%% *}"
31796   tmp="$complete EOL"
31797   arguments="${tmp#* }"
31798 
31799   # Input might be given as Windows format, start by converting to
31800   # unix format.
31801   new_path=`$CYGPATH -u "$path"`
31802 
31803   # Now try to locate executable using which
31804   new_path=`$WHICH "$new_path" 2> /dev/null`
31805   # bat and cmd files are not always considered executable in cygwin causing which
31806   # to not find them
31807   if test "x$new_path" = x \
31808       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31809       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31810     new_path=`$CYGPATH -u "$path"`
31811   fi
31812   if test "x$new_path" = x; then
31813     # Oops. Which didn't find the executable.
31814     # The splitting of arguments from the executable at a space might have been incorrect,
31815     # since paths with space are more likely in Windows. Give it another try with the whole
31816     # argument.
31817     path="$complete"
31818     arguments="EOL"
31819     new_path=`$CYGPATH -u "$path"`
31820     new_path=`$WHICH "$new_path" 2> /dev/null`
31821     # bat and cmd files are not always considered executable in cygwin causing which
31822     # to not find them
31823     if test "x$new_path" = x \
31824         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31825         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31826       new_path=`$CYGPATH -u "$path"`
31827     fi
31828     if test "x$new_path" = x; then
31829       # It's still not found. Now this is an unrecoverable error.
31830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31831 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31832       has_space=`$ECHO "$complete" | $GREP " "`
31833       if test "x$has_space" != x; then
31834         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31835 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31836       fi
31837       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31838     fi
31839   fi
31840 
31841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31844   # "foo.exe" is OK but "foo" is an error.
31845   #
31846   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31847   # It is also a way to make sure we got the proper file name for the real test later on.
31848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31849   if test "x$test_shortpath" = x; then
31850     # Short path failed, file does not exist as specified.
31851     # Try adding .exe or .cmd
31852     if test -f "${new_path}.exe"; then
31853       input_to_shortpath="${new_path}.exe"
31854     elif test -f "${new_path}.cmd"; then
31855       input_to_shortpath="${new_path}.cmd"
31856     else
31857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31858 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31859       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31860 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31861       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31862     fi
31863   else
31864     input_to_shortpath="$new_path"
31865   fi
31866 
31867   # Call helper function which possibly converts this using DOS-style short mode.
31868   # If so, the updated path is stored in $new_path.
31869   new_path="$input_to_shortpath"
31870 
31871   input_path="$input_to_shortpath"
31872   # Check if we need to convert this using DOS-style short mode. If the path
31873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31874   # take no chances and rewrite it.
31875   # Note: m4 eats our [], so we need to use [ and ] instead.
31876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31877   if test "x$has_forbidden_chars" != x; then
31878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31882       # Going to short mode and back again did indeed matter. Since short mode is
31883       # case insensitive, let's make it lowercase to improve readability.
31884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31885       # Now convert it back to Unix-style (cygpath)
31886       input_path=`$CYGPATH -u "$shortmode_path"`
31887       new_path="$input_path"
31888     fi
31889   fi
31890 
31891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31892   if test "x$test_cygdrive_prefix" = x; then
31893     # As a simple fix, exclude /usr/bin since it's not a real path.
31894     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31896       # a path prefixed by /cygdrive for fixpath to work.
31897       new_path="$CYGWIN_ROOT_PATH$input_path"
31898     fi
31899   fi
31900 
31901   # remove trailing .exe if any
31902   new_path="${new_path/%.exe/}"
31903 
31904     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31905 
31906   # First separate the path from the arguments. This will split at the first
31907   # space.
31908   complete="$CC"
31909   path="${complete%% *}"
31910   tmp="$complete EOL"
31911   arguments="${tmp#* }"
31912 
31913   # Input might be given as Windows format, start by converting to
31914   # unix format.
31915   new_path="$path"
31916 
31917   windows_path="$new_path"
31918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31919     unix_path=`$CYGPATH -u "$windows_path"`
31920     new_path="$unix_path"
31921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31923     new_path="$unix_path"
31924   fi
31925 
31926 
31927   # Now try to locate executable using which
31928   new_path=`$WHICH "$new_path" 2> /dev/null`
31929 
31930   if test "x$new_path" = x; then
31931     # Oops. Which didn't find the executable.
31932     # The splitting of arguments from the executable at a space might have been incorrect,
31933     # since paths with space are more likely in Windows. Give it another try with the whole
31934     # argument.
31935     path="$complete"
31936     arguments="EOL"
31937     new_path="$path"
31938 
31939   windows_path="$new_path"
31940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31941     unix_path=`$CYGPATH -u "$windows_path"`
31942     new_path="$unix_path"
31943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31945     new_path="$unix_path"
31946   fi
31947 
31948 
31949     new_path=`$WHICH "$new_path" 2> /dev/null`
31950     # bat and cmd files are not always considered executable in MSYS causing which
31951     # to not find them
31952     if test "x$new_path" = x \
31953         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31954         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31955       new_path="$path"
31956 
31957   windows_path="$new_path"
31958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31959     unix_path=`$CYGPATH -u "$windows_path"`
31960     new_path="$unix_path"
31961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31963     new_path="$unix_path"
31964   fi
31965 
31966     fi
31967 
31968     if test "x$new_path" = x; then
31969       # It's still not found. Now this is an unrecoverable error.
31970       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31971 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31972       has_space=`$ECHO "$complete" | $GREP " "`
31973       if test "x$has_space" != x; then
31974         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31975 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31976       fi
31977       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31978     fi
31979   fi
31980 
31981   # Now new_path has a complete unix path to the binary
31982   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31983     # Keep paths in /bin as-is, but remove trailing .exe if any
31984     new_path="${new_path/%.exe/}"
31985     # Do not save /bin paths to all_fixpath_prefixes!
31986   else
31987     # Not in mixed or Windows style, start by that.
31988     new_path=`cmd //c echo $new_path`
31989 
31990   input_path="$new_path"
31991   # Check if we need to convert this using DOS-style short mode. If the path
31992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31993   # take no chances and rewrite it.
31994   # Note: m4 eats our [], so we need to use [ and ] instead.
31995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31996   if test "x$has_forbidden_chars" != x; then
31997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31998     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31999   fi
32000 
32001     # Output is in $new_path
32002 
32003   windows_path="$new_path"
32004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32005     unix_path=`$CYGPATH -u "$windows_path"`
32006     new_path="$unix_path"
32007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32009     new_path="$unix_path"
32010   fi
32011 
32012     # remove trailing .exe if any
32013     new_path="${new_path/%.exe/}"
32014 
32015     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32016     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32017   fi
32018 
32019     else
32020       # We're on a unix platform. Hooray! :)
32021       # First separate the path from the arguments. This will split at the first
32022       # space.
32023       complete="$CC"
32024       path="${complete%% *}"
32025       tmp="$complete EOL"
32026       arguments="${tmp#* }"
32027 
32028       # Cannot rely on the command "which" here since it doesn't always work.
32029       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32030       if test -z "$is_absolute_path"; then
32031         # Path to executable is not absolute. Find it.
32032         IFS_save="$IFS"
32033         IFS=:
32034         for p in $PATH; do
32035           if test -f "$p/$path" && test -x "$p/$path"; then
32036             new_path="$p/$path"
32037             break
32038           fi
32039         done
32040         IFS="$IFS_save"
32041       else
32042         # This is an absolute path, we can use it without further modifications.
32043         new_path="$path"
32044       fi
32045 
32046       if test "x$new_path" = x; then
32047         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32048 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32049         has_space=`$ECHO "$complete" | $GREP " "`
32050         if test "x$has_space" != x; then
32051           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32052 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32053         fi
32054         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32055       fi
32056     fi
32057 
32058     # Now join together the path and the arguments once again
32059     if test "x$arguments" != xEOL; then
32060       new_complete="$new_path ${arguments% *}"
32061     else
32062       new_complete="$new_path"
32063     fi
32064 
32065     if test "x$complete" != "x$new_complete"; then
32066       CC="$new_complete"
32067       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32068 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32069     fi
32070   fi
32071 
32072   TEST_COMPILER="$CC"
32073 
32074   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32075 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
32076   SYMLINK_ORIGINAL="$TEST_COMPILER"
32077 
32078   if test "x$OPENJDK_BUILD_OS" != xwindows; then
32079     # Follow a chain of symbolic links. Use readlink
32080     # where it exists, else fall back to horribly
32081     # complicated shell code.
32082     if test "x$READLINK_TESTED" != yes; then
32083       # On MacOSX there is a readlink tool with a different
32084       # purpose than the GNU readlink tool. Check the found readlink.
32085       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32086       if test "x$ISGNU" = x; then
32087         # A readlink that we do not know how to use.
32088         # Are there other non-GNU readlinks out there?
32089         READLINK_TESTED=yes
32090         READLINK=
32091       fi
32092     fi
32093 
32094     if test "x$READLINK" != x; then
32095       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
32096     else
32097       # Save the current directory for restoring afterwards
32098       STARTDIR=$PWD
32099       COUNTER=0
32100       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
32101       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
32102       cd $sym_link_dir
32103       # Use -P flag to resolve symlinks in directories.
32104       cd `$THEPWDCMD -P`
32105       sym_link_dir=`$THEPWDCMD -P`
32106       # Resolve file symlinks
32107       while test $COUNTER -lt 20; do
32108         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32109         if test "x$ISLINK" == x; then
32110           # This is not a symbolic link! We are done!
32111           break
32112         fi
32113         # Again resolve directory symlinks since the target of the just found
32114         # link could be in a different directory
32115         cd `$DIRNAME $ISLINK`
32116         sym_link_dir=`$THEPWDCMD -P`
32117         sym_link_file=`$BASENAME $ISLINK`
32118         let COUNTER=COUNTER+1
32119       done
32120       cd $STARTDIR
32121       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
32122     fi
32123   fi
32124 
32125   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
32126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
32127 $as_echo "no symlink" >&6; }
32128   else
32129     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
32130 $as_echo "$SYMLINK_ORIGINAL" >&6; }
32131 
32132     # We can't handle ccache by gcc wrappers, since we need to know if we're
32133     # using ccache. Instead ccache usage must be controlled by a configure option.
32134     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
32135     if test "x$COMPILER_BASENAME" = "xccache"; then
32136       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
32137 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
32138       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
32139     fi
32140   fi
32141 
32142 
32143   COMPILER=$CC
32144   COMPILER_NAME=$COMPILER_NAME
32145 
32146   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32147     # cc -V output typically looks like
32148     #     cc: Sun C 5.12 Linux_i386 2011/11/16
32149     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32150     # Check that this is likely to be the Solaris Studio cc.
32151     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32152     if test $? -ne 0; then
32153       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32154       { $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
32155 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32156       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32157 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32158       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32159 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32160       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32161     fi
32162     # Remove usage instructions (if present), and
32163     # collapse compiler output into a single line
32164     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32165         $SED -e 's/ *[Uu]sage:.*//'`
32166     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32167         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32168   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32169     # xlc -qversion output typically looks like
32170     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32171     #     Version: 11.01.0000.0015
32172     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32173     # Check that this is likely to be the IBM XL C compiler.
32174     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32175     if test $? -ne 0; then
32176       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32177       { $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
32178 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32179       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32180 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32181       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32182 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32183       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32184     fi
32185     # Collapse compiler output into a single line
32186     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32187     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32188         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32189   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32190     # There is no specific version flag, but all output starts with a version string.
32191     # First line typically looks something like:
32192     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32193     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32194     # Check that this is likely to be Microsoft CL.EXE.
32195     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32196     if test $? -ne 0; then
32197       { $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
32198 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32199       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32200 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32201       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32202     fi
32203     # Collapse compiler output into a single line
32204     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32205     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32206         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32207   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32208     # gcc --version output typically looks like
32209     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32210     #     Copyright (C) 2013 Free Software Foundation, Inc.
32211     #     This is free software; see the source for copying conditions.  There is NO
32212     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32213     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32214     # Check that this is likely to be GCC.
32215     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32216     if test $? -ne 0; then
32217       { $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
32218 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32219       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32220 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32221       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32222     fi
32223     # Remove Copyright and legalese from version string, and
32224     # collapse into a single line
32225     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32226         $SED -e 's/ *Copyright .*//'`
32227     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32228         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32229   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32230     # clang --version output typically looks like
32231     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32232     #    clang version 3.3 (tags/RELEASE_33/final)
32233     # or
32234     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32235     #    Target: x86_64-pc-linux-gnu
32236     #    Thread model: posix
32237     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32238     # Check that this is likely to be clang
32239     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32240     if test $? -ne 0; then
32241       { $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
32242 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32243       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32244 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32245       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32246     fi
32247     # Collapse compiler output into a single line
32248     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32249     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32250         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
32251   else
32252       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32253   fi
32254   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32255   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32256   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32257   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32258 
32259   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32260 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32261 
32262 
32263   # Now that we have resolved CC ourself, let autoconf have its go at it
32264   ac_ext=c
32265 ac_cpp='$CPP $CPPFLAGS'
32266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
32269 if test -n "$ac_tool_prefix"; then
32270   for ac_prog in $CC
32271   do
32272     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32273 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32275 $as_echo_n "checking for $ac_word... " >&6; }
32276 if ${ac_cv_prog_CC+:} false; then :
32277   $as_echo_n "(cached) " >&6
32278 else
32279   if test -n "$CC"; then
32280   ac_cv_prog_CC="$CC" # Let the user override the test.
32281 else
32282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32283 for as_dir in $PATH
32284 do
32285   IFS=$as_save_IFS
32286   test -z "$as_dir" && as_dir=.
32287     for ac_exec_ext in '' $ac_executable_extensions; do
32288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32289     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32291     break 2
32292   fi
32293 done
32294   done
32295 IFS=$as_save_IFS
32296 
32297 fi
32298 fi
32299 CC=$ac_cv_prog_CC
32300 if test -n "$CC"; then
32301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32302 $as_echo "$CC" >&6; }
32303 else
32304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32305 $as_echo "no" >&6; }
32306 fi
32307 
32308 
32309     test -n "$CC" && break
32310   done
32311 fi
32312 if test -z "$CC"; then
32313   ac_ct_CC=$CC
32314   for ac_prog in $CC
32315 do
32316   # Extract the first word of "$ac_prog", so it can be a program name with args.
32317 set dummy $ac_prog; ac_word=$2
32318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32319 $as_echo_n "checking for $ac_word... " >&6; }
32320 if ${ac_cv_prog_ac_ct_CC+:} false; then :
32321   $as_echo_n "(cached) " >&6
32322 else
32323   if test -n "$ac_ct_CC"; then
32324   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32325 else
32326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32327 for as_dir in $PATH
32328 do
32329   IFS=$as_save_IFS
32330   test -z "$as_dir" && as_dir=.
32331     for ac_exec_ext in '' $ac_executable_extensions; do
32332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32333     ac_cv_prog_ac_ct_CC="$ac_prog"
32334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32335     break 2
32336   fi
32337 done
32338   done
32339 IFS=$as_save_IFS
32340 
32341 fi
32342 fi
32343 ac_ct_CC=$ac_cv_prog_ac_ct_CC
32344 if test -n "$ac_ct_CC"; then
32345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32346 $as_echo "$ac_ct_CC" >&6; }
32347 else
32348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32349 $as_echo "no" >&6; }
32350 fi
32351 
32352 
32353   test -n "$ac_ct_CC" && break
32354 done
32355 
32356   if test "x$ac_ct_CC" = x; then
32357     CC=""
32358   else
32359     case $cross_compiling:$ac_tool_warned in
32360 yes:)
32361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32362 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32363 ac_tool_warned=yes ;;
32364 esac
32365     CC=$ac_ct_CC
32366   fi
32367 fi
32368 
32369 
32370 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32371 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32372 as_fn_error $? "no acceptable C compiler found in \$PATH
32373 See \`config.log' for more details" "$LINENO" 5; }
32374 
32375 # Provide some information about the compiler.
32376 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32377 set X $ac_compile
32378 ac_compiler=$2
32379 for ac_option in --version -v -V -qversion; do
32380   { { ac_try="$ac_compiler $ac_option >&5"
32381 case "(($ac_try" in
32382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32383   *) ac_try_echo=$ac_try;;
32384 esac
32385 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32386 $as_echo "$ac_try_echo"; } >&5
32387   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32388   ac_status=$?
32389   if test -s conftest.err; then
32390     sed '10a\
32391 ... rest of stderr output deleted ...
32392          10q' conftest.err >conftest.er1
32393     cat conftest.er1 >&5
32394   fi
32395   rm -f conftest.er1 conftest.err
32396   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32397   test $ac_status = 0; }
32398 done
32399 
32400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32401 /* end confdefs.h.  */
32402 
32403 int
32404 main ()
32405 {
32406 
32407   ;
32408   return 0;
32409 }
32410 _ACEOF
32411 ac_clean_files_save=$ac_clean_files
32412 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32413 # Try to create an executable without -o first, disregard a.out.
32414 # It will help us diagnose broken compilers, and finding out an intuition
32415 # of exeext.
32416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32417 $as_echo_n "checking whether the C compiler works... " >&6; }
32418 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32419 
32420 # The possible output files:
32421 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32422 
32423 ac_rmfiles=
32424 for ac_file in $ac_files
32425 do
32426   case $ac_file in
32427     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32428     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32429   esac
32430 done
32431 rm -f $ac_rmfiles
32432 
32433 if { { ac_try="$ac_link_default"
32434 case "(($ac_try" in
32435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32436   *) ac_try_echo=$ac_try;;
32437 esac
32438 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32439 $as_echo "$ac_try_echo"; } >&5
32440   (eval "$ac_link_default") 2>&5
32441   ac_status=$?
32442   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32443   test $ac_status = 0; }; then :
32444   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32445 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32446 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
32447 # so that the user can short-circuit this test for compilers unknown to
32448 # Autoconf.
32449 for ac_file in $ac_files ''
32450 do
32451   test -f "$ac_file" || continue
32452   case $ac_file in
32453     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32454         ;;
32455     [ab].out )
32456         # We found the default executable, but exeext='' is most
32457         # certainly right.
32458         break;;
32459     *.* )
32460         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32461         then :; else
32462            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32463         fi
32464         # We set ac_cv_exeext here because the later test for it is not
32465         # safe: cross compilers may not add the suffix if given an `-o'
32466         # argument, so we may need to know it at that point already.
32467         # Even if this section looks crufty: it has the advantage of
32468         # actually working.
32469         break;;
32470     * )
32471         break;;
32472   esac
32473 done
32474 test "$ac_cv_exeext" = no && ac_cv_exeext=
32475 
32476 else
32477   ac_file=''
32478 fi
32479 if test -z "$ac_file"; then :
32480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32481 $as_echo "no" >&6; }
32482 $as_echo "$as_me: failed program was:" >&5
32483 sed 's/^/| /' conftest.$ac_ext >&5
32484 
32485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32486 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32487 as_fn_error 77 "C compiler cannot create executables
32488 See \`config.log' for more details" "$LINENO" 5; }
32489 else
32490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32491 $as_echo "yes" >&6; }
32492 fi
32493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32494 $as_echo_n "checking for C compiler default output file name... " >&6; }
32495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32496 $as_echo "$ac_file" >&6; }
32497 ac_exeext=$ac_cv_exeext
32498 
32499 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32500 ac_clean_files=$ac_clean_files_save
32501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32502 $as_echo_n "checking for suffix of executables... " >&6; }
32503 if { { ac_try="$ac_link"
32504 case "(($ac_try" in
32505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32506   *) ac_try_echo=$ac_try;;
32507 esac
32508 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32509 $as_echo "$ac_try_echo"; } >&5
32510   (eval "$ac_link") 2>&5
32511   ac_status=$?
32512   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32513   test $ac_status = 0; }; then :
32514   # If both `conftest.exe' and `conftest' are `present' (well, observable)
32515 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32516 # work properly (i.e., refer to `conftest.exe'), while it won't with
32517 # `rm'.
32518 for ac_file in conftest.exe conftest conftest.*; do
32519   test -f "$ac_file" || continue
32520   case $ac_file in
32521     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32522     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32523           break;;
32524     * ) break;;
32525   esac
32526 done
32527 else
32528   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32529 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32530 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32531 See \`config.log' for more details" "$LINENO" 5; }
32532 fi
32533 rm -f conftest conftest$ac_cv_exeext
32534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32535 $as_echo "$ac_cv_exeext" >&6; }
32536 
32537 rm -f conftest.$ac_ext
32538 EXEEXT=$ac_cv_exeext
32539 ac_exeext=$EXEEXT
32540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32541 /* end confdefs.h.  */
32542 #include <stdio.h>
32543 int
32544 main ()
32545 {
32546 FILE *f = fopen ("conftest.out", "w");
32547  return ferror (f) || fclose (f) != 0;
32548 
32549   ;
32550   return 0;
32551 }
32552 _ACEOF
32553 ac_clean_files="$ac_clean_files conftest.out"
32554 # Check that the compiler produces executables we can run.  If not, either
32555 # the compiler is broken, or we cross compile.
32556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32557 $as_echo_n "checking whether we are cross compiling... " >&6; }
32558 if test "$cross_compiling" != yes; then
32559   { { ac_try="$ac_link"
32560 case "(($ac_try" in
32561   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32562   *) ac_try_echo=$ac_try;;
32563 esac
32564 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32565 $as_echo "$ac_try_echo"; } >&5
32566   (eval "$ac_link") 2>&5
32567   ac_status=$?
32568   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32569   test $ac_status = 0; }
32570   if { ac_try='./conftest$ac_cv_exeext'
32571   { { case "(($ac_try" in
32572   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32573   *) ac_try_echo=$ac_try;;
32574 esac
32575 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32576 $as_echo "$ac_try_echo"; } >&5
32577   (eval "$ac_try") 2>&5
32578   ac_status=$?
32579   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32580   test $ac_status = 0; }; }; then
32581     cross_compiling=no
32582   else
32583     if test "$cross_compiling" = maybe; then
32584         cross_compiling=yes
32585     else
32586         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32587 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32588 as_fn_error $? "cannot run C compiled programs.
32589 If you meant to cross compile, use \`--host'.
32590 See \`config.log' for more details" "$LINENO" 5; }
32591     fi
32592   fi
32593 fi
32594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32595 $as_echo "$cross_compiling" >&6; }
32596 
32597 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32598 ac_clean_files=$ac_clean_files_save
32599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32600 $as_echo_n "checking for suffix of object files... " >&6; }
32601 if ${ac_cv_objext+:} false; then :
32602   $as_echo_n "(cached) " >&6
32603 else
32604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32605 /* end confdefs.h.  */
32606 
32607 int
32608 main ()
32609 {
32610 
32611   ;
32612   return 0;
32613 }
32614 _ACEOF
32615 rm -f conftest.o conftest.obj
32616 if { { ac_try="$ac_compile"
32617 case "(($ac_try" in
32618   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32619   *) ac_try_echo=$ac_try;;
32620 esac
32621 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32622 $as_echo "$ac_try_echo"; } >&5
32623   (eval "$ac_compile") 2>&5
32624   ac_status=$?
32625   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32626   test $ac_status = 0; }; then :
32627   for ac_file in conftest.o conftest.obj conftest.*; do
32628   test -f "$ac_file" || continue;
32629   case $ac_file in
32630     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32631     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32632        break;;
32633   esac
32634 done
32635 else
32636   $as_echo "$as_me: failed program was:" >&5
32637 sed 's/^/| /' conftest.$ac_ext >&5
32638 
32639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32640 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32641 as_fn_error $? "cannot compute suffix of object files: cannot compile
32642 See \`config.log' for more details" "$LINENO" 5; }
32643 fi
32644 rm -f conftest.$ac_cv_objext conftest.$ac_ext
32645 fi
32646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32647 $as_echo "$ac_cv_objext" >&6; }
32648 OBJEXT=$ac_cv_objext
32649 ac_objext=$OBJEXT
32650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32651 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32652 if ${ac_cv_c_compiler_gnu+:} false; then :
32653   $as_echo_n "(cached) " >&6
32654 else
32655   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32656 /* end confdefs.h.  */
32657 
32658 int
32659 main ()
32660 {
32661 #ifndef __GNUC__
32662        choke me
32663 #endif
32664 
32665   ;
32666   return 0;
32667 }
32668 _ACEOF
32669 if ac_fn_c_try_compile "$LINENO"; then :
32670   ac_compiler_gnu=yes
32671 else
32672   ac_compiler_gnu=no
32673 fi
32674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
32676 
32677 fi
32678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32679 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
32680 if test $ac_compiler_gnu = yes; then
32681   GCC=yes
32682 else
32683   GCC=
32684 fi
32685 ac_test_CFLAGS=${CFLAGS+set}
32686 ac_save_CFLAGS=$CFLAGS
32687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32688 $as_echo_n "checking whether $CC accepts -g... " >&6; }
32689 if ${ac_cv_prog_cc_g+:} false; then :
32690   $as_echo_n "(cached) " >&6
32691 else
32692   ac_save_c_werror_flag=$ac_c_werror_flag
32693    ac_c_werror_flag=yes
32694    ac_cv_prog_cc_g=no
32695    CFLAGS="-g"
32696    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32697 /* end confdefs.h.  */
32698 
32699 int
32700 main ()
32701 {
32702 
32703   ;
32704   return 0;
32705 }
32706 _ACEOF
32707 if ac_fn_c_try_compile "$LINENO"; then :
32708   ac_cv_prog_cc_g=yes
32709 else
32710   CFLAGS=""
32711       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32712 /* end confdefs.h.  */
32713 
32714 int
32715 main ()
32716 {
32717 
32718   ;
32719   return 0;
32720 }
32721 _ACEOF
32722 if ac_fn_c_try_compile "$LINENO"; then :
32723 
32724 else
32725   ac_c_werror_flag=$ac_save_c_werror_flag
32726          CFLAGS="-g"
32727          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32728 /* end confdefs.h.  */
32729 
32730 int
32731 main ()
32732 {
32733 
32734   ;
32735   return 0;
32736 }
32737 _ACEOF
32738 if ac_fn_c_try_compile "$LINENO"; then :
32739   ac_cv_prog_cc_g=yes
32740 fi
32741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32742 fi
32743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32744 fi
32745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32746    ac_c_werror_flag=$ac_save_c_werror_flag
32747 fi
32748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32749 $as_echo "$ac_cv_prog_cc_g" >&6; }
32750 if test "$ac_test_CFLAGS" = set; then
32751   CFLAGS=$ac_save_CFLAGS
32752 elif test $ac_cv_prog_cc_g = yes; then
32753   if test "$GCC" = yes; then
32754     CFLAGS="-g -O2"
32755   else
32756     CFLAGS="-g"
32757   fi
32758 else
32759   if test "$GCC" = yes; then
32760     CFLAGS="-O2"
32761   else
32762     CFLAGS=
32763   fi
32764 fi
32765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32766 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32767 if ${ac_cv_prog_cc_c89+:} false; then :
32768   $as_echo_n "(cached) " >&6
32769 else
32770   ac_cv_prog_cc_c89=no
32771 ac_save_CC=$CC
32772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32773 /* end confdefs.h.  */
32774 #include <stdarg.h>
32775 #include <stdio.h>
32776 struct stat;
32777 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32778 struct buf { int x; };
32779 FILE * (*rcsopen) (struct buf *, struct stat *, int);
32780 static char *e (p, i)
32781      char **p;
32782      int i;
32783 {
32784   return p[i];
32785 }
32786 static char *f (char * (*g) (char **, int), char **p, ...)
32787 {
32788   char *s;
32789   va_list v;
32790   va_start (v,p);
32791   s = g (p, va_arg (v,int));
32792   va_end (v);
32793   return s;
32794 }
32795 
32796 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32797    function prototypes and stuff, but not '\xHH' hex character constants.
32798    These don't provoke an error unfortunately, instead are silently treated
32799    as 'x'.  The following induces an error, until -std is added to get
32800    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32801    array size at least.  It's necessary to write '\x00'==0 to get something
32802    that's true only with -std.  */
32803 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32804 
32805 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32806    inside strings and character constants.  */
32807 #define FOO(x) 'x'
32808 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32809 
32810 int test (int i, double x);
32811 struct s1 {int (*f) (int a);};
32812 struct s2 {int (*f) (double a);};
32813 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32814 int argc;
32815 char **argv;
32816 int
32817 main ()
32818 {
32819 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32820   ;
32821   return 0;
32822 }
32823 _ACEOF
32824 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32825         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32826 do
32827   CC="$ac_save_CC $ac_arg"
32828   if ac_fn_c_try_compile "$LINENO"; then :
32829   ac_cv_prog_cc_c89=$ac_arg
32830 fi
32831 rm -f core conftest.err conftest.$ac_objext
32832   test "x$ac_cv_prog_cc_c89" != "xno" && break
32833 done
32834 rm -f conftest.$ac_ext
32835 CC=$ac_save_CC
32836 
32837 fi
32838 # AC_CACHE_VAL
32839 case "x$ac_cv_prog_cc_c89" in
32840   x)
32841     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32842 $as_echo "none needed" >&6; } ;;
32843   xno)
32844     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32845 $as_echo "unsupported" >&6; } ;;
32846   *)
32847     CC="$CC $ac_cv_prog_cc_c89"
32848     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32849 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32850 esac
32851 if test "x$ac_cv_prog_cc_c89" != xno; then :
32852 
32853 fi
32854 
32855 ac_ext=cpp
32856 ac_cpp='$CXXCPP $CPPFLAGS'
32857 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32858 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32859 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32860 
32861 
32862 
32863   COMPILER_NAME=C++
32864   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32865 
32866   if test "x$CXX" != x; then
32867     # User has supplied compiler name already, always let that override.
32868     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32869 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32870     if test "x`basename $CXX`" = "x$CXX"; then
32871       # A command without a complete path is provided, search $PATH.
32872 
32873       for ac_prog in $CXX
32874 do
32875   # Extract the first word of "$ac_prog", so it can be a program name with args.
32876 set dummy $ac_prog; ac_word=$2
32877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32878 $as_echo_n "checking for $ac_word... " >&6; }
32879 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32880   $as_echo_n "(cached) " >&6
32881 else
32882   case $POTENTIAL_CXX in
32883   [\\/]* | ?:[\\/]*)
32884   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32885   ;;
32886   *)
32887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32888 for as_dir in $PATH
32889 do
32890   IFS=$as_save_IFS
32891   test -z "$as_dir" && as_dir=.
32892     for ac_exec_ext in '' $ac_executable_extensions; do
32893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32894     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32896     break 2
32897   fi
32898 done
32899   done
32900 IFS=$as_save_IFS
32901 
32902   ;;
32903 esac
32904 fi
32905 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32906 if test -n "$POTENTIAL_CXX"; then
32907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32908 $as_echo "$POTENTIAL_CXX" >&6; }
32909 else
32910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32911 $as_echo "no" >&6; }
32912 fi
32913 
32914 
32915   test -n "$POTENTIAL_CXX" && break
32916 done
32917 
32918       if test "x$POTENTIAL_CXX" != x; then
32919         CXX=$POTENTIAL_CXX
32920       else
32921         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32922       fi
32923     else
32924       # Otherwise it might already be a complete path
32925       if test ! -x "$CXX"; then
32926         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32927       fi
32928     fi
32929   else
32930     # No user supplied value. Locate compiler ourselves.
32931 
32932     # If we are cross compiling, assume cross compilation tools follows the
32933     # cross compilation standard where they are prefixed with the autoconf
32934     # standard name for the target. For example the binary
32935     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32936     # If we are not cross compiling, then the default compiler name will be
32937     # used.
32938 
32939     CXX=
32940     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32941     # before checking the rest of the PATH.
32942     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32943     # step, this should not be necessary.
32944     if test -n "$TOOLCHAIN_PATH"; then
32945       PATH_save="$PATH"
32946       PATH="$TOOLCHAIN_PATH"
32947       for ac_prog in $SEARCH_LIST
32948 do
32949   # Extract the first word of "$ac_prog", so it can be a program name with args.
32950 set dummy $ac_prog; ac_word=$2
32951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32952 $as_echo_n "checking for $ac_word... " >&6; }
32953 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32954   $as_echo_n "(cached) " >&6
32955 else
32956   case $TOOLCHAIN_PATH_CXX in
32957   [\\/]* | ?:[\\/]*)
32958   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32959   ;;
32960   *)
32961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32962 for as_dir in $PATH
32963 do
32964   IFS=$as_save_IFS
32965   test -z "$as_dir" && as_dir=.
32966     for ac_exec_ext in '' $ac_executable_extensions; do
32967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32968     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32970     break 2
32971   fi
32972 done
32973   done
32974 IFS=$as_save_IFS
32975 
32976   ;;
32977 esac
32978 fi
32979 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32980 if test -n "$TOOLCHAIN_PATH_CXX"; then
32981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32982 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32983 else
32984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32985 $as_echo "no" >&6; }
32986 fi
32987 
32988 
32989   test -n "$TOOLCHAIN_PATH_CXX" && break
32990 done
32991 
32992       CXX=$TOOLCHAIN_PATH_CXX
32993       PATH="$PATH_save"
32994     fi
32995 
32996     # AC_PATH_PROGS can't be run multiple times with the same variable,
32997     # so create a new name for this run.
32998     if test "x$CXX" = x; then
32999       for ac_prog in $SEARCH_LIST
33000 do
33001   # Extract the first word of "$ac_prog", so it can be a program name with args.
33002 set dummy $ac_prog; ac_word=$2
33003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33004 $as_echo_n "checking for $ac_word... " >&6; }
33005 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33006   $as_echo_n "(cached) " >&6
33007 else
33008   case $POTENTIAL_CXX in
33009   [\\/]* | ?:[\\/]*)
33010   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33011   ;;
33012   *)
33013   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33014 for as_dir in $PATH
33015 do
33016   IFS=$as_save_IFS
33017   test -z "$as_dir" && as_dir=.
33018     for ac_exec_ext in '' $ac_executable_extensions; do
33019   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33020     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33021     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33022     break 2
33023   fi
33024 done
33025   done
33026 IFS=$as_save_IFS
33027 
33028   ;;
33029 esac
33030 fi
33031 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33032 if test -n "$POTENTIAL_CXX"; then
33033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33034 $as_echo "$POTENTIAL_CXX" >&6; }
33035 else
33036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33037 $as_echo "no" >&6; }
33038 fi
33039 
33040 
33041   test -n "$POTENTIAL_CXX" && break
33042 done
33043 
33044       CXX=$POTENTIAL_CXX
33045     fi
33046 
33047     if test "x$CXX" = x; then
33048 
33049   # Print a helpful message on how to acquire the necessary build dependency.
33050   # devkit is the help tag: freetype, cups, alsa etc
33051   MISSING_DEPENDENCY=devkit
33052 
33053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33054     cygwin_help $MISSING_DEPENDENCY
33055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33056     msys_help $MISSING_DEPENDENCY
33057   else
33058     PKGHANDLER_COMMAND=
33059 
33060     case $PKGHANDLER in
33061       apt-get)
33062         apt_help     $MISSING_DEPENDENCY ;;
33063       yum)
33064         yum_help     $MISSING_DEPENDENCY ;;
33065       port)
33066         port_help    $MISSING_DEPENDENCY ;;
33067       pkgutil)
33068         pkgutil_help $MISSING_DEPENDENCY ;;
33069       pkgadd)
33070         pkgadd_help  $MISSING_DEPENDENCY ;;
33071     esac
33072 
33073     if test "x$PKGHANDLER_COMMAND" != x; then
33074       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33075     fi
33076   fi
33077 
33078       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33079     fi
33080   fi
33081 
33082   # Now we have a compiler binary in CXX. Make sure it's okay.
33083 
33084   # Only process if variable expands to non-empty
33085 
33086   if test "x$CXX" != x; then
33087     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33088 
33089   # First separate the path from the arguments. This will split at the first
33090   # space.
33091   complete="$CXX"
33092   path="${complete%% *}"
33093   tmp="$complete EOL"
33094   arguments="${tmp#* }"
33095 
33096   # Input might be given as Windows format, start by converting to
33097   # unix format.
33098   new_path=`$CYGPATH -u "$path"`
33099 
33100   # Now try to locate executable using which
33101   new_path=`$WHICH "$new_path" 2> /dev/null`
33102   # bat and cmd files are not always considered executable in cygwin causing which
33103   # to not find them
33104   if test "x$new_path" = x \
33105       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33106       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33107     new_path=`$CYGPATH -u "$path"`
33108   fi
33109   if test "x$new_path" = x; then
33110     # Oops. Which didn't find the executable.
33111     # The splitting of arguments from the executable at a space might have been incorrect,
33112     # since paths with space are more likely in Windows. Give it another try with the whole
33113     # argument.
33114     path="$complete"
33115     arguments="EOL"
33116     new_path=`$CYGPATH -u "$path"`
33117     new_path=`$WHICH "$new_path" 2> /dev/null`
33118     # bat and cmd files are not always considered executable in cygwin causing which
33119     # to not find them
33120     if test "x$new_path" = x \
33121         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33122         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33123       new_path=`$CYGPATH -u "$path"`
33124     fi
33125     if test "x$new_path" = x; then
33126       # It's still not found. Now this is an unrecoverable error.
33127       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33128 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33129       has_space=`$ECHO "$complete" | $GREP " "`
33130       if test "x$has_space" != x; then
33131         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33132 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33133       fi
33134       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33135     fi
33136   fi
33137 
33138   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33139   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33140   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33141   # "foo.exe" is OK but "foo" is an error.
33142   #
33143   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33144   # It is also a way to make sure we got the proper file name for the real test later on.
33145   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33146   if test "x$test_shortpath" = x; then
33147     # Short path failed, file does not exist as specified.
33148     # Try adding .exe or .cmd
33149     if test -f "${new_path}.exe"; then
33150       input_to_shortpath="${new_path}.exe"
33151     elif test -f "${new_path}.cmd"; then
33152       input_to_shortpath="${new_path}.cmd"
33153     else
33154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33155 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33156       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33157 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33158       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33159     fi
33160   else
33161     input_to_shortpath="$new_path"
33162   fi
33163 
33164   # Call helper function which possibly converts this using DOS-style short mode.
33165   # If so, the updated path is stored in $new_path.
33166   new_path="$input_to_shortpath"
33167 
33168   input_path="$input_to_shortpath"
33169   # Check if we need to convert this using DOS-style short mode. If the path
33170   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33171   # take no chances and rewrite it.
33172   # Note: m4 eats our [], so we need to use [ and ] instead.
33173   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33174   if test "x$has_forbidden_chars" != x; then
33175     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33176     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33177     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33178     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33179       # Going to short mode and back again did indeed matter. Since short mode is
33180       # case insensitive, let's make it lowercase to improve readability.
33181       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33182       # Now convert it back to Unix-style (cygpath)
33183       input_path=`$CYGPATH -u "$shortmode_path"`
33184       new_path="$input_path"
33185     fi
33186   fi
33187 
33188   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33189   if test "x$test_cygdrive_prefix" = x; then
33190     # As a simple fix, exclude /usr/bin since it's not a real path.
33191     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33192       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33193       # a path prefixed by /cygdrive for fixpath to work.
33194       new_path="$CYGWIN_ROOT_PATH$input_path"
33195     fi
33196   fi
33197 
33198   # remove trailing .exe if any
33199   new_path="${new_path/%.exe/}"
33200 
33201     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33202 
33203   # First separate the path from the arguments. This will split at the first
33204   # space.
33205   complete="$CXX"
33206   path="${complete%% *}"
33207   tmp="$complete EOL"
33208   arguments="${tmp#* }"
33209 
33210   # Input might be given as Windows format, start by converting to
33211   # unix format.
33212   new_path="$path"
33213 
33214   windows_path="$new_path"
33215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33216     unix_path=`$CYGPATH -u "$windows_path"`
33217     new_path="$unix_path"
33218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33220     new_path="$unix_path"
33221   fi
33222 
33223 
33224   # Now try to locate executable using which
33225   new_path=`$WHICH "$new_path" 2> /dev/null`
33226 
33227   if test "x$new_path" = x; then
33228     # Oops. Which didn't find the executable.
33229     # The splitting of arguments from the executable at a space might have been incorrect,
33230     # since paths with space are more likely in Windows. Give it another try with the whole
33231     # argument.
33232     path="$complete"
33233     arguments="EOL"
33234     new_path="$path"
33235 
33236   windows_path="$new_path"
33237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33238     unix_path=`$CYGPATH -u "$windows_path"`
33239     new_path="$unix_path"
33240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33242     new_path="$unix_path"
33243   fi
33244 
33245 
33246     new_path=`$WHICH "$new_path" 2> /dev/null`
33247     # bat and cmd files are not always considered executable in MSYS causing which
33248     # to not find them
33249     if test "x$new_path" = x \
33250         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33251         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33252       new_path="$path"
33253 
33254   windows_path="$new_path"
33255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33256     unix_path=`$CYGPATH -u "$windows_path"`
33257     new_path="$unix_path"
33258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33260     new_path="$unix_path"
33261   fi
33262 
33263     fi
33264 
33265     if test "x$new_path" = x; then
33266       # It's still not found. Now this is an unrecoverable error.
33267       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33268 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33269       has_space=`$ECHO "$complete" | $GREP " "`
33270       if test "x$has_space" != x; then
33271         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33272 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33273       fi
33274       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33275     fi
33276   fi
33277 
33278   # Now new_path has a complete unix path to the binary
33279   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33280     # Keep paths in /bin as-is, but remove trailing .exe if any
33281     new_path="${new_path/%.exe/}"
33282     # Do not save /bin paths to all_fixpath_prefixes!
33283   else
33284     # Not in mixed or Windows style, start by that.
33285     new_path=`cmd //c echo $new_path`
33286 
33287   input_path="$new_path"
33288   # Check if we need to convert this using DOS-style short mode. If the path
33289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33290   # take no chances and rewrite it.
33291   # Note: m4 eats our [], so we need to use [ and ] instead.
33292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33293   if test "x$has_forbidden_chars" != x; then
33294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33295     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33296   fi
33297 
33298     # Output is in $new_path
33299 
33300   windows_path="$new_path"
33301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33302     unix_path=`$CYGPATH -u "$windows_path"`
33303     new_path="$unix_path"
33304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33306     new_path="$unix_path"
33307   fi
33308 
33309     # remove trailing .exe if any
33310     new_path="${new_path/%.exe/}"
33311 
33312     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33313     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33314   fi
33315 
33316     else
33317       # We're on a unix platform. Hooray! :)
33318       # First separate the path from the arguments. This will split at the first
33319       # space.
33320       complete="$CXX"
33321       path="${complete%% *}"
33322       tmp="$complete EOL"
33323       arguments="${tmp#* }"
33324 
33325       # Cannot rely on the command "which" here since it doesn't always work.
33326       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33327       if test -z "$is_absolute_path"; then
33328         # Path to executable is not absolute. Find it.
33329         IFS_save="$IFS"
33330         IFS=:
33331         for p in $PATH; do
33332           if test -f "$p/$path" && test -x "$p/$path"; then
33333             new_path="$p/$path"
33334             break
33335           fi
33336         done
33337         IFS="$IFS_save"
33338       else
33339         # This is an absolute path, we can use it without further modifications.
33340         new_path="$path"
33341       fi
33342 
33343       if test "x$new_path" = x; then
33344         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33345 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33346         has_space=`$ECHO "$complete" | $GREP " "`
33347         if test "x$has_space" != x; then
33348           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33349 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33350         fi
33351         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33352       fi
33353     fi
33354 
33355     # Now join together the path and the arguments once again
33356     if test "x$arguments" != xEOL; then
33357       new_complete="$new_path ${arguments% *}"
33358     else
33359       new_complete="$new_path"
33360     fi
33361 
33362     if test "x$complete" != "x$new_complete"; then
33363       CXX="$new_complete"
33364       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33365 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33366     fi
33367   fi
33368 
33369   TEST_COMPILER="$CXX"
33370 
33371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33372 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33373   SYMLINK_ORIGINAL="$TEST_COMPILER"
33374 
33375   if test "x$OPENJDK_BUILD_OS" != xwindows; then
33376     # Follow a chain of symbolic links. Use readlink
33377     # where it exists, else fall back to horribly
33378     # complicated shell code.
33379     if test "x$READLINK_TESTED" != yes; then
33380       # On MacOSX there is a readlink tool with a different
33381       # purpose than the GNU readlink tool. Check the found readlink.
33382       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33383       if test "x$ISGNU" = x; then
33384         # A readlink that we do not know how to use.
33385         # Are there other non-GNU readlinks out there?
33386         READLINK_TESTED=yes
33387         READLINK=
33388       fi
33389     fi
33390 
33391     if test "x$READLINK" != x; then
33392       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33393     else
33394       # Save the current directory for restoring afterwards
33395       STARTDIR=$PWD
33396       COUNTER=0
33397       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33398       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33399       cd $sym_link_dir
33400       # Use -P flag to resolve symlinks in directories.
33401       cd `$THEPWDCMD -P`
33402       sym_link_dir=`$THEPWDCMD -P`
33403       # Resolve file symlinks
33404       while test $COUNTER -lt 20; do
33405         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33406         if test "x$ISLINK" == x; then
33407           # This is not a symbolic link! We are done!
33408           break
33409         fi
33410         # Again resolve directory symlinks since the target of the just found
33411         # link could be in a different directory
33412         cd `$DIRNAME $ISLINK`
33413         sym_link_dir=`$THEPWDCMD -P`
33414         sym_link_file=`$BASENAME $ISLINK`
33415         let COUNTER=COUNTER+1
33416       done
33417       cd $STARTDIR
33418       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33419     fi
33420   fi
33421 
33422   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33423     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33424 $as_echo "no symlink" >&6; }
33425   else
33426     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33427 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33428 
33429     # We can't handle ccache by gcc wrappers, since we need to know if we're
33430     # using ccache. Instead ccache usage must be controlled by a configure option.
33431     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33432     if test "x$COMPILER_BASENAME" = "xccache"; then
33433       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33434 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33435       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33436     fi
33437   fi
33438 
33439 
33440   COMPILER=$CXX
33441   COMPILER_NAME=$COMPILER_NAME
33442 
33443   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33444     # cc -V output typically looks like
33445     #     cc: Sun C 5.12 Linux_i386 2011/11/16
33446     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33447     # Check that this is likely to be the Solaris Studio cc.
33448     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33449     if test $? -ne 0; then
33450       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33451       { $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
33452 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33453       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33454 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33455       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33456 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33457       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33458     fi
33459     # Remove usage instructions (if present), and
33460     # collapse compiler output into a single line
33461     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33462         $SED -e 's/ *[Uu]sage:.*//'`
33463     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33464         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33465   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33466     # xlc -qversion output typically looks like
33467     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33468     #     Version: 11.01.0000.0015
33469     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33470     # Check that this is likely to be the IBM XL C compiler.
33471     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33472     if test $? -ne 0; then
33473       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33474       { $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
33475 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33476       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33477 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33478       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33479 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33480       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33481     fi
33482     # Collapse compiler output into a single line
33483     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33484     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33485         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33486   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33487     # There is no specific version flag, but all output starts with a version string.
33488     # First line typically looks something like:
33489     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33490     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33491     # Check that this is likely to be Microsoft CL.EXE.
33492     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33493     if test $? -ne 0; then
33494       { $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
33495 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33496       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33497 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33498       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33499     fi
33500     # Collapse compiler output into a single line
33501     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33502     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33503         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33504   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33505     # gcc --version output typically looks like
33506     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33507     #     Copyright (C) 2013 Free Software Foundation, Inc.
33508     #     This is free software; see the source for copying conditions.  There is NO
33509     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33510     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33511     # Check that this is likely to be GCC.
33512     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33513     if test $? -ne 0; then
33514       { $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
33515 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33516       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33517 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33518       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33519     fi
33520     # Remove Copyright and legalese from version string, and
33521     # collapse into a single line
33522     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33523         $SED -e 's/ *Copyright .*//'`
33524     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33525         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33526   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33527     # clang --version output typically looks like
33528     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33529     #    clang version 3.3 (tags/RELEASE_33/final)
33530     # or
33531     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33532     #    Target: x86_64-pc-linux-gnu
33533     #    Thread model: posix
33534     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33535     # Check that this is likely to be clang
33536     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33537     if test $? -ne 0; then
33538       { $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
33539 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33540       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33541 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33542       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33543     fi
33544     # Collapse compiler output into a single line
33545     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33546     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33547         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33548   else
33549       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33550   fi
33551   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33552   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33553   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33554   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33555 
33556   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33557 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33558 
33559 
33560   # Now that we have resolved CXX ourself, let autoconf have its go at it
33561   ac_ext=cpp
33562 ac_cpp='$CXXCPP $CPPFLAGS'
33563 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33564 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33565 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33566 if test -z "$CXX"; then
33567   if test -n "$CCC"; then
33568     CXX=$CCC
33569   else
33570     if test -n "$ac_tool_prefix"; then
33571   for ac_prog in $CXX
33572   do
33573     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33574 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33576 $as_echo_n "checking for $ac_word... " >&6; }
33577 if ${ac_cv_prog_CXX+:} false; then :
33578   $as_echo_n "(cached) " >&6
33579 else
33580   if test -n "$CXX"; then
33581   ac_cv_prog_CXX="$CXX" # Let the user override the test.
33582 else
33583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33584 for as_dir in $PATH
33585 do
33586   IFS=$as_save_IFS
33587   test -z "$as_dir" && as_dir=.
33588     for ac_exec_ext in '' $ac_executable_extensions; do
33589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33590     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33592     break 2
33593   fi
33594 done
33595   done
33596 IFS=$as_save_IFS
33597 
33598 fi
33599 fi
33600 CXX=$ac_cv_prog_CXX
33601 if test -n "$CXX"; then
33602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33603 $as_echo "$CXX" >&6; }
33604 else
33605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33606 $as_echo "no" >&6; }
33607 fi
33608 
33609 
33610     test -n "$CXX" && break
33611   done
33612 fi
33613 if test -z "$CXX"; then
33614   ac_ct_CXX=$CXX
33615   for ac_prog in $CXX
33616 do
33617   # Extract the first word of "$ac_prog", so it can be a program name with args.
33618 set dummy $ac_prog; ac_word=$2
33619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33620 $as_echo_n "checking for $ac_word... " >&6; }
33621 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33622   $as_echo_n "(cached) " >&6
33623 else
33624   if test -n "$ac_ct_CXX"; then
33625   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33626 else
33627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33628 for as_dir in $PATH
33629 do
33630   IFS=$as_save_IFS
33631   test -z "$as_dir" && as_dir=.
33632     for ac_exec_ext in '' $ac_executable_extensions; do
33633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33634     ac_cv_prog_ac_ct_CXX="$ac_prog"
33635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33636     break 2
33637   fi
33638 done
33639   done
33640 IFS=$as_save_IFS
33641 
33642 fi
33643 fi
33644 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33645 if test -n "$ac_ct_CXX"; then
33646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33647 $as_echo "$ac_ct_CXX" >&6; }
33648 else
33649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33650 $as_echo "no" >&6; }
33651 fi
33652 
33653 
33654   test -n "$ac_ct_CXX" && break
33655 done
33656 
33657   if test "x$ac_ct_CXX" = x; then
33658     CXX="g++"
33659   else
33660     case $cross_compiling:$ac_tool_warned in
33661 yes:)
33662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33663 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33664 ac_tool_warned=yes ;;
33665 esac
33666     CXX=$ac_ct_CXX
33667   fi
33668 fi
33669 
33670   fi
33671 fi
33672 # Provide some information about the compiler.
33673 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33674 set X $ac_compile
33675 ac_compiler=$2
33676 for ac_option in --version -v -V -qversion; do
33677   { { ac_try="$ac_compiler $ac_option >&5"
33678 case "(($ac_try" in
33679   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33680   *) ac_try_echo=$ac_try;;
33681 esac
33682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33683 $as_echo "$ac_try_echo"; } >&5
33684   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33685   ac_status=$?
33686   if test -s conftest.err; then
33687     sed '10a\
33688 ... rest of stderr output deleted ...
33689          10q' conftest.err >conftest.er1
33690     cat conftest.er1 >&5
33691   fi
33692   rm -f conftest.er1 conftest.err
33693   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33694   test $ac_status = 0; }
33695 done
33696 
33697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33698 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33699 if ${ac_cv_cxx_compiler_gnu+:} false; then :
33700   $as_echo_n "(cached) " >&6
33701 else
33702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33703 /* end confdefs.h.  */
33704 
33705 int
33706 main ()
33707 {
33708 #ifndef __GNUC__
33709        choke me
33710 #endif
33711 
33712   ;
33713   return 0;
33714 }
33715 _ACEOF
33716 if ac_fn_cxx_try_compile "$LINENO"; then :
33717   ac_compiler_gnu=yes
33718 else
33719   ac_compiler_gnu=no
33720 fi
33721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33722 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33723 
33724 fi
33725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33726 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33727 if test $ac_compiler_gnu = yes; then
33728   GXX=yes
33729 else
33730   GXX=
33731 fi
33732 ac_test_CXXFLAGS=${CXXFLAGS+set}
33733 ac_save_CXXFLAGS=$CXXFLAGS
33734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33735 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
33736 if ${ac_cv_prog_cxx_g+:} false; then :
33737   $as_echo_n "(cached) " >&6
33738 else
33739   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33740    ac_cxx_werror_flag=yes
33741    ac_cv_prog_cxx_g=no
33742    CXXFLAGS="-g"
33743    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33744 /* end confdefs.h.  */
33745 
33746 int
33747 main ()
33748 {
33749 
33750   ;
33751   return 0;
33752 }
33753 _ACEOF
33754 if ac_fn_cxx_try_compile "$LINENO"; then :
33755   ac_cv_prog_cxx_g=yes
33756 else
33757   CXXFLAGS=""
33758       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33759 /* end confdefs.h.  */
33760 
33761 int
33762 main ()
33763 {
33764 
33765   ;
33766   return 0;
33767 }
33768 _ACEOF
33769 if ac_fn_cxx_try_compile "$LINENO"; then :
33770 
33771 else
33772   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33773          CXXFLAGS="-g"
33774          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33775 /* end confdefs.h.  */
33776 
33777 int
33778 main ()
33779 {
33780 
33781   ;
33782   return 0;
33783 }
33784 _ACEOF
33785 if ac_fn_cxx_try_compile "$LINENO"; then :
33786   ac_cv_prog_cxx_g=yes
33787 fi
33788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33789 fi
33790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33791 fi
33792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33793    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33794 fi
33795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33796 $as_echo "$ac_cv_prog_cxx_g" >&6; }
33797 if test "$ac_test_CXXFLAGS" = set; then
33798   CXXFLAGS=$ac_save_CXXFLAGS
33799 elif test $ac_cv_prog_cxx_g = yes; then
33800   if test "$GXX" = yes; then
33801     CXXFLAGS="-g -O2"
33802   else
33803     CXXFLAGS="-g"
33804   fi
33805 else
33806   if test "$GXX" = yes; then
33807     CXXFLAGS="-O2"
33808   else
33809     CXXFLAGS=
33810   fi
33811 fi
33812 ac_ext=cpp
33813 ac_cpp='$CXXCPP $CPPFLAGS'
33814 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33815 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33816 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33817 
33818 
33819   # This is the compiler version number on the form X.Y[.Z]
33820 
33821 
33822 
33823 
33824   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
33825     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
33826 $as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
33827     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
33828 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
33829   fi
33830 
33831   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
33832   if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
33833     { $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
33834 $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;}
33835   fi
33836 
33837   if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
33838     { $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
33839 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
33840   fi
33841 
33842   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
33843 
33844 
33845   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
33846 
33847 
33848 
33849 
33850 
33851 
33852 
33853 
33854 
33855 
33856 
33857 
33858 
33859 
33860 
33861 
33862 
33863 
33864 
33865 
33866 
33867 
33868 
33869 
33870 
33871 
33872 
33873 
33874 
33875 
33876 
33877 
33878 
33879 
33880 
33881 
33882 
33883 
33884 
33885 
33886 
33887 
33888     # Execute function body
33889 
33890   # Need to assign to a variable since m4 is blocked from modifying parts in [].
33891   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
33892 
33893   if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
33894     as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
33895   fi
33896 
33897   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
33898     as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
33899   fi
33900 
33901   # Version comparison method inspired by http://stackoverflow.com/a/24067243
33902   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
33903 
33904   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
33905     :
33906 
33907   else
33908     :
33909 
33910           { $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
33911 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
33912 
33913 
33914   fi
33915 
33916 
33917 
33918 
33919 
33920 
33921 
33922 
33923 
33924 
33925 
33926 
33927   fi
33928 
33929   #
33930   # Setup the preprocessor (CPP and CXXCPP)
33931   #
33932   ac_ext=c
33933 ac_cpp='$CPP $CPPFLAGS'
33934 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33935 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33936 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33938 $as_echo_n "checking how to run the C preprocessor... " >&6; }
33939 # On Suns, sometimes $CPP names a directory.
33940 if test -n "$CPP" && test -d "$CPP"; then
33941   CPP=
33942 fi
33943 if test -z "$CPP"; then
33944   if ${ac_cv_prog_CPP+:} false; then :
33945   $as_echo_n "(cached) " >&6
33946 else
33947       # Double quotes because CPP needs to be expanded
33948     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33949     do
33950       ac_preproc_ok=false
33951 for ac_c_preproc_warn_flag in '' yes
33952 do
33953   # Use a header file that comes with gcc, so configuring glibc
33954   # with a fresh cross-compiler works.
33955   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
33956   # <limits.h> exists even on freestanding compilers.
33957   # On the NeXT, cc -E runs the code through the compiler's parser,
33958   # not just through cpp. "Syntax error" is here to catch this case.
33959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33960 /* end confdefs.h.  */
33961 #ifdef __STDC__
33962 # include <limits.h>
33963 #else
33964 # include <assert.h>
33965 #endif
33966                      Syntax error
33967 _ACEOF
33968 if ac_fn_c_try_cpp "$LINENO"; then :
33969 
33970 else
33971   # Broken: fails on valid input.
33972 continue
33973 fi
33974 rm -f conftest.err conftest.i conftest.$ac_ext
33975 
33976   # OK, works on sane cases.  Now check whether nonexistent headers
33977   # can be detected and how.
33978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33979 /* end confdefs.h.  */
33980 #include <ac_nonexistent.h>
33981 _ACEOF
33982 if ac_fn_c_try_cpp "$LINENO"; then :
33983   # Broken: success on invalid input.
33984 continue
33985 else
33986   # Passes both tests.
33987 ac_preproc_ok=:
33988 break
33989 fi
33990 rm -f conftest.err conftest.i conftest.$ac_ext
33991 
33992 done
33993 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
33994 rm -f conftest.i conftest.err conftest.$ac_ext
33995 if $ac_preproc_ok; then :
33996   break
33997 fi
33998 
33999     done
34000     ac_cv_prog_CPP=$CPP
34001 
34002 fi
34003   CPP=$ac_cv_prog_CPP
34004 else
34005   ac_cv_prog_CPP=$CPP
34006 fi
34007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34008 $as_echo "$CPP" >&6; }
34009 ac_preproc_ok=false
34010 for ac_c_preproc_warn_flag in '' yes
34011 do
34012   # Use a header file that comes with gcc, so configuring glibc
34013   # with a fresh cross-compiler works.
34014   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34015   # <limits.h> exists even on freestanding compilers.
34016   # On the NeXT, cc -E runs the code through the compiler's parser,
34017   # not just through cpp. "Syntax error" is here to catch this case.
34018   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34019 /* end confdefs.h.  */
34020 #ifdef __STDC__
34021 # include <limits.h>
34022 #else
34023 # include <assert.h>
34024 #endif
34025                      Syntax error
34026 _ACEOF
34027 if ac_fn_c_try_cpp "$LINENO"; then :
34028 
34029 else
34030   # Broken: fails on valid input.
34031 continue
34032 fi
34033 rm -f conftest.err conftest.i conftest.$ac_ext
34034 
34035   # OK, works on sane cases.  Now check whether nonexistent headers
34036   # can be detected and how.
34037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34038 /* end confdefs.h.  */
34039 #include <ac_nonexistent.h>
34040 _ACEOF
34041 if ac_fn_c_try_cpp "$LINENO"; then :
34042   # Broken: success on invalid input.
34043 continue
34044 else
34045   # Passes both tests.
34046 ac_preproc_ok=:
34047 break
34048 fi
34049 rm -f conftest.err conftest.i conftest.$ac_ext
34050 
34051 done
34052 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34053 rm -f conftest.i conftest.err conftest.$ac_ext
34054 if $ac_preproc_ok; then :
34055 
34056 else
34057   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34058 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34059 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34060 See \`config.log' for more details" "$LINENO" 5; }
34061 fi
34062 
34063 ac_ext=cpp
34064 ac_cpp='$CXXCPP $CPPFLAGS'
34065 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34066 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34067 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34068 
34069 
34070   # Only process if variable expands to non-empty
34071 
34072   if test "x$CPP" != x; then
34073     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34074 
34075   # First separate the path from the arguments. This will split at the first
34076   # space.
34077   complete="$CPP"
34078   path="${complete%% *}"
34079   tmp="$complete EOL"
34080   arguments="${tmp#* }"
34081 
34082   # Input might be given as Windows format, start by converting to
34083   # unix format.
34084   new_path=`$CYGPATH -u "$path"`
34085 
34086   # Now try to locate executable using which
34087   new_path=`$WHICH "$new_path" 2> /dev/null`
34088   # bat and cmd files are not always considered executable in cygwin causing which
34089   # to not find them
34090   if test "x$new_path" = x \
34091       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34092       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34093     new_path=`$CYGPATH -u "$path"`
34094   fi
34095   if test "x$new_path" = x; then
34096     # Oops. Which didn't find the executable.
34097     # The splitting of arguments from the executable at a space might have been incorrect,
34098     # since paths with space are more likely in Windows. Give it another try with the whole
34099     # argument.
34100     path="$complete"
34101     arguments="EOL"
34102     new_path=`$CYGPATH -u "$path"`
34103     new_path=`$WHICH "$new_path" 2> /dev/null`
34104     # bat and cmd files are not always considered executable in cygwin causing which
34105     # to not find them
34106     if test "x$new_path" = x \
34107         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34108         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34109       new_path=`$CYGPATH -u "$path"`
34110     fi
34111     if test "x$new_path" = x; then
34112       # It's still not found. Now this is an unrecoverable error.
34113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34114 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34115       has_space=`$ECHO "$complete" | $GREP " "`
34116       if test "x$has_space" != x; then
34117         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34118 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34119       fi
34120       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34121     fi
34122   fi
34123 
34124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34127   # "foo.exe" is OK but "foo" is an error.
34128   #
34129   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34130   # It is also a way to make sure we got the proper file name for the real test later on.
34131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34132   if test "x$test_shortpath" = x; then
34133     # Short path failed, file does not exist as specified.
34134     # Try adding .exe or .cmd
34135     if test -f "${new_path}.exe"; then
34136       input_to_shortpath="${new_path}.exe"
34137     elif test -f "${new_path}.cmd"; then
34138       input_to_shortpath="${new_path}.cmd"
34139     else
34140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34141 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34142       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34143 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34144       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34145     fi
34146   else
34147     input_to_shortpath="$new_path"
34148   fi
34149 
34150   # Call helper function which possibly converts this using DOS-style short mode.
34151   # If so, the updated path is stored in $new_path.
34152   new_path="$input_to_shortpath"
34153 
34154   input_path="$input_to_shortpath"
34155   # Check if we need to convert this using DOS-style short mode. If the path
34156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34157   # take no chances and rewrite it.
34158   # Note: m4 eats our [], so we need to use [ and ] instead.
34159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34160   if test "x$has_forbidden_chars" != x; then
34161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34162     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34163     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34164     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34165       # Going to short mode and back again did indeed matter. Since short mode is
34166       # case insensitive, let's make it lowercase to improve readability.
34167       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34168       # Now convert it back to Unix-style (cygpath)
34169       input_path=`$CYGPATH -u "$shortmode_path"`
34170       new_path="$input_path"
34171     fi
34172   fi
34173 
34174   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34175   if test "x$test_cygdrive_prefix" = x; then
34176     # As a simple fix, exclude /usr/bin since it's not a real path.
34177     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34178       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34179       # a path prefixed by /cygdrive for fixpath to work.
34180       new_path="$CYGWIN_ROOT_PATH$input_path"
34181     fi
34182   fi
34183 
34184   # remove trailing .exe if any
34185   new_path="${new_path/%.exe/}"
34186 
34187     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34188 
34189   # First separate the path from the arguments. This will split at the first
34190   # space.
34191   complete="$CPP"
34192   path="${complete%% *}"
34193   tmp="$complete EOL"
34194   arguments="${tmp#* }"
34195 
34196   # Input might be given as Windows format, start by converting to
34197   # unix format.
34198   new_path="$path"
34199 
34200   windows_path="$new_path"
34201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34202     unix_path=`$CYGPATH -u "$windows_path"`
34203     new_path="$unix_path"
34204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34206     new_path="$unix_path"
34207   fi
34208 
34209 
34210   # Now try to locate executable using which
34211   new_path=`$WHICH "$new_path" 2> /dev/null`
34212 
34213   if test "x$new_path" = x; then
34214     # Oops. Which didn't find the executable.
34215     # The splitting of arguments from the executable at a space might have been incorrect,
34216     # since paths with space are more likely in Windows. Give it another try with the whole
34217     # argument.
34218     path="$complete"
34219     arguments="EOL"
34220     new_path="$path"
34221 
34222   windows_path="$new_path"
34223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34224     unix_path=`$CYGPATH -u "$windows_path"`
34225     new_path="$unix_path"
34226   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34227     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34228     new_path="$unix_path"
34229   fi
34230 
34231 
34232     new_path=`$WHICH "$new_path" 2> /dev/null`
34233     # bat and cmd files are not always considered executable in MSYS causing which
34234     # to not find them
34235     if test "x$new_path" = x \
34236         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34237         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34238       new_path="$path"
34239 
34240   windows_path="$new_path"
34241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34242     unix_path=`$CYGPATH -u "$windows_path"`
34243     new_path="$unix_path"
34244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34246     new_path="$unix_path"
34247   fi
34248 
34249     fi
34250 
34251     if test "x$new_path" = x; then
34252       # It's still not found. Now this is an unrecoverable error.
34253       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34254 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34255       has_space=`$ECHO "$complete" | $GREP " "`
34256       if test "x$has_space" != x; then
34257         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34258 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34259       fi
34260       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34261     fi
34262   fi
34263 
34264   # Now new_path has a complete unix path to the binary
34265   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34266     # Keep paths in /bin as-is, but remove trailing .exe if any
34267     new_path="${new_path/%.exe/}"
34268     # Do not save /bin paths to all_fixpath_prefixes!
34269   else
34270     # Not in mixed or Windows style, start by that.
34271     new_path=`cmd //c echo $new_path`
34272 
34273   input_path="$new_path"
34274   # Check if we need to convert this using DOS-style short mode. If the path
34275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34276   # take no chances and rewrite it.
34277   # Note: m4 eats our [], so we need to use [ and ] instead.
34278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34279   if test "x$has_forbidden_chars" != x; then
34280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34281     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34282   fi
34283 
34284     # Output is in $new_path
34285 
34286   windows_path="$new_path"
34287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34288     unix_path=`$CYGPATH -u "$windows_path"`
34289     new_path="$unix_path"
34290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34292     new_path="$unix_path"
34293   fi
34294 
34295     # remove trailing .exe if any
34296     new_path="${new_path/%.exe/}"
34297 
34298     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34299     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34300   fi
34301 
34302     else
34303       # We're on a unix platform. Hooray! :)
34304       # First separate the path from the arguments. This will split at the first
34305       # space.
34306       complete="$CPP"
34307       path="${complete%% *}"
34308       tmp="$complete EOL"
34309       arguments="${tmp#* }"
34310 
34311       # Cannot rely on the command "which" here since it doesn't always work.
34312       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34313       if test -z "$is_absolute_path"; then
34314         # Path to executable is not absolute. Find it.
34315         IFS_save="$IFS"
34316         IFS=:
34317         for p in $PATH; do
34318           if test -f "$p/$path" && test -x "$p/$path"; then
34319             new_path="$p/$path"
34320             break
34321           fi
34322         done
34323         IFS="$IFS_save"
34324       else
34325         # This is an absolute path, we can use it without further modifications.
34326         new_path="$path"
34327       fi
34328 
34329       if test "x$new_path" = x; then
34330         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34331 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34332         has_space=`$ECHO "$complete" | $GREP " "`
34333         if test "x$has_space" != x; then
34334           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34335 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34336         fi
34337         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34338       fi
34339     fi
34340 
34341     # Now join together the path and the arguments once again
34342     if test "x$arguments" != xEOL; then
34343       new_complete="$new_path ${arguments% *}"
34344     else
34345       new_complete="$new_path"
34346     fi
34347 
34348     if test "x$complete" != "x$new_complete"; then
34349       CPP="$new_complete"
34350       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34351 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34352     fi
34353   fi
34354 
34355   ac_ext=cpp
34356 ac_cpp='$CXXCPP $CPPFLAGS'
34357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34358 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34361 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34362 if test -z "$CXXCPP"; then
34363   if ${ac_cv_prog_CXXCPP+:} false; then :
34364   $as_echo_n "(cached) " >&6
34365 else
34366       # Double quotes because CXXCPP needs to be expanded
34367     for CXXCPP in "$CXX -E" "/lib/cpp"
34368     do
34369       ac_preproc_ok=false
34370 for ac_cxx_preproc_warn_flag in '' yes
34371 do
34372   # Use a header file that comes with gcc, so configuring glibc
34373   # with a fresh cross-compiler works.
34374   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34375   # <limits.h> exists even on freestanding compilers.
34376   # On the NeXT, cc -E runs the code through the compiler's parser,
34377   # not just through cpp. "Syntax error" is here to catch this case.
34378   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34379 /* end confdefs.h.  */
34380 #ifdef __STDC__
34381 # include <limits.h>
34382 #else
34383 # include <assert.h>
34384 #endif
34385                      Syntax error
34386 _ACEOF
34387 if ac_fn_cxx_try_cpp "$LINENO"; then :
34388 
34389 else
34390   # Broken: fails on valid input.
34391 continue
34392 fi
34393 rm -f conftest.err conftest.i conftest.$ac_ext
34394 
34395   # OK, works on sane cases.  Now check whether nonexistent headers
34396   # can be detected and how.
34397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34398 /* end confdefs.h.  */
34399 #include <ac_nonexistent.h>
34400 _ACEOF
34401 if ac_fn_cxx_try_cpp "$LINENO"; then :
34402   # Broken: success on invalid input.
34403 continue
34404 else
34405   # Passes both tests.
34406 ac_preproc_ok=:
34407 break
34408 fi
34409 rm -f conftest.err conftest.i conftest.$ac_ext
34410 
34411 done
34412 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34413 rm -f conftest.i conftest.err conftest.$ac_ext
34414 if $ac_preproc_ok; then :
34415   break
34416 fi
34417 
34418     done
34419     ac_cv_prog_CXXCPP=$CXXCPP
34420 
34421 fi
34422   CXXCPP=$ac_cv_prog_CXXCPP
34423 else
34424   ac_cv_prog_CXXCPP=$CXXCPP
34425 fi
34426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34427 $as_echo "$CXXCPP" >&6; }
34428 ac_preproc_ok=false
34429 for ac_cxx_preproc_warn_flag in '' yes
34430 do
34431   # Use a header file that comes with gcc, so configuring glibc
34432   # with a fresh cross-compiler works.
34433   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34434   # <limits.h> exists even on freestanding compilers.
34435   # On the NeXT, cc -E runs the code through the compiler's parser,
34436   # not just through cpp. "Syntax error" is here to catch this case.
34437   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34438 /* end confdefs.h.  */
34439 #ifdef __STDC__
34440 # include <limits.h>
34441 #else
34442 # include <assert.h>
34443 #endif
34444                      Syntax error
34445 _ACEOF
34446 if ac_fn_cxx_try_cpp "$LINENO"; then :
34447 
34448 else
34449   # Broken: fails on valid input.
34450 continue
34451 fi
34452 rm -f conftest.err conftest.i conftest.$ac_ext
34453 
34454   # OK, works on sane cases.  Now check whether nonexistent headers
34455   # can be detected and how.
34456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34457 /* end confdefs.h.  */
34458 #include <ac_nonexistent.h>
34459 _ACEOF
34460 if ac_fn_cxx_try_cpp "$LINENO"; then :
34461   # Broken: success on invalid input.
34462 continue
34463 else
34464   # Passes both tests.
34465 ac_preproc_ok=:
34466 break
34467 fi
34468 rm -f conftest.err conftest.i conftest.$ac_ext
34469 
34470 done
34471 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34472 rm -f conftest.i conftest.err conftest.$ac_ext
34473 if $ac_preproc_ok; then :
34474 
34475 else
34476   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34477 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34478 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34479 See \`config.log' for more details" "$LINENO" 5; }
34480 fi
34481 
34482 ac_ext=cpp
34483 ac_cpp='$CXXCPP $CPPFLAGS'
34484 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34485 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34486 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34487 
34488 
34489   # Only process if variable expands to non-empty
34490 
34491   if test "x$CXXCPP" != x; then
34492     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34493 
34494   # First separate the path from the arguments. This will split at the first
34495   # space.
34496   complete="$CXXCPP"
34497   path="${complete%% *}"
34498   tmp="$complete EOL"
34499   arguments="${tmp#* }"
34500 
34501   # Input might be given as Windows format, start by converting to
34502   # unix format.
34503   new_path=`$CYGPATH -u "$path"`
34504 
34505   # Now try to locate executable using which
34506   new_path=`$WHICH "$new_path" 2> /dev/null`
34507   # bat and cmd files are not always considered executable in cygwin causing which
34508   # to not find them
34509   if test "x$new_path" = x \
34510       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34511       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34512     new_path=`$CYGPATH -u "$path"`
34513   fi
34514   if test "x$new_path" = x; then
34515     # Oops. Which didn't find the executable.
34516     # The splitting of arguments from the executable at a space might have been incorrect,
34517     # since paths with space are more likely in Windows. Give it another try with the whole
34518     # argument.
34519     path="$complete"
34520     arguments="EOL"
34521     new_path=`$CYGPATH -u "$path"`
34522     new_path=`$WHICH "$new_path" 2> /dev/null`
34523     # bat and cmd files are not always considered executable in cygwin causing which
34524     # to not find them
34525     if test "x$new_path" = x \
34526         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34527         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34528       new_path=`$CYGPATH -u "$path"`
34529     fi
34530     if test "x$new_path" = x; then
34531       # It's still not found. Now this is an unrecoverable error.
34532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34533 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34534       has_space=`$ECHO "$complete" | $GREP " "`
34535       if test "x$has_space" != x; then
34536         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34537 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34538       fi
34539       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34540     fi
34541   fi
34542 
34543   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34544   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34545   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34546   # "foo.exe" is OK but "foo" is an error.
34547   #
34548   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34549   # It is also a way to make sure we got the proper file name for the real test later on.
34550   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34551   if test "x$test_shortpath" = x; then
34552     # Short path failed, file does not exist as specified.
34553     # Try adding .exe or .cmd
34554     if test -f "${new_path}.exe"; then
34555       input_to_shortpath="${new_path}.exe"
34556     elif test -f "${new_path}.cmd"; then
34557       input_to_shortpath="${new_path}.cmd"
34558     else
34559       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34560 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34561       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34562 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34563       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34564     fi
34565   else
34566     input_to_shortpath="$new_path"
34567   fi
34568 
34569   # Call helper function which possibly converts this using DOS-style short mode.
34570   # If so, the updated path is stored in $new_path.
34571   new_path="$input_to_shortpath"
34572 
34573   input_path="$input_to_shortpath"
34574   # Check if we need to convert this using DOS-style short mode. If the path
34575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34576   # take no chances and rewrite it.
34577   # Note: m4 eats our [], so we need to use [ and ] instead.
34578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34579   if test "x$has_forbidden_chars" != x; then
34580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34584       # Going to short mode and back again did indeed matter. Since short mode is
34585       # case insensitive, let's make it lowercase to improve readability.
34586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34587       # Now convert it back to Unix-style (cygpath)
34588       input_path=`$CYGPATH -u "$shortmode_path"`
34589       new_path="$input_path"
34590     fi
34591   fi
34592 
34593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34594   if test "x$test_cygdrive_prefix" = x; then
34595     # As a simple fix, exclude /usr/bin since it's not a real path.
34596     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34598       # a path prefixed by /cygdrive for fixpath to work.
34599       new_path="$CYGWIN_ROOT_PATH$input_path"
34600     fi
34601   fi
34602 
34603   # remove trailing .exe if any
34604   new_path="${new_path/%.exe/}"
34605 
34606     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34607 
34608   # First separate the path from the arguments. This will split at the first
34609   # space.
34610   complete="$CXXCPP"
34611   path="${complete%% *}"
34612   tmp="$complete EOL"
34613   arguments="${tmp#* }"
34614 
34615   # Input might be given as Windows format, start by converting to
34616   # unix format.
34617   new_path="$path"
34618 
34619   windows_path="$new_path"
34620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34621     unix_path=`$CYGPATH -u "$windows_path"`
34622     new_path="$unix_path"
34623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34625     new_path="$unix_path"
34626   fi
34627 
34628 
34629   # Now try to locate executable using which
34630   new_path=`$WHICH "$new_path" 2> /dev/null`
34631 
34632   if test "x$new_path" = x; then
34633     # Oops. Which didn't find the executable.
34634     # The splitting of arguments from the executable at a space might have been incorrect,
34635     # since paths with space are more likely in Windows. Give it another try with the whole
34636     # argument.
34637     path="$complete"
34638     arguments="EOL"
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     new_path=`$WHICH "$new_path" 2> /dev/null`
34652     # bat and cmd files are not always considered executable in MSYS causing which
34653     # to not find them
34654     if test "x$new_path" = x \
34655         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34656         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34657       new_path="$path"
34658 
34659   windows_path="$new_path"
34660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34661     unix_path=`$CYGPATH -u "$windows_path"`
34662     new_path="$unix_path"
34663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34665     new_path="$unix_path"
34666   fi
34667 
34668     fi
34669 
34670     if test "x$new_path" = x; then
34671       # It's still not found. Now this is an unrecoverable error.
34672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34673 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34674       has_space=`$ECHO "$complete" | $GREP " "`
34675       if test "x$has_space" != x; then
34676         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34677 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34678       fi
34679       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34680     fi
34681   fi
34682 
34683   # Now new_path has a complete unix path to the binary
34684   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34685     # Keep paths in /bin as-is, but remove trailing .exe if any
34686     new_path="${new_path/%.exe/}"
34687     # Do not save /bin paths to all_fixpath_prefixes!
34688   else
34689     # Not in mixed or Windows style, start by that.
34690     new_path=`cmd //c echo $new_path`
34691 
34692   input_path="$new_path"
34693   # Check if we need to convert this using DOS-style short mode. If the path
34694   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34695   # take no chances and rewrite it.
34696   # Note: m4 eats our [], so we need to use [ and ] instead.
34697   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34698   if test "x$has_forbidden_chars" != x; then
34699     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34700     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34701   fi
34702 
34703     # Output is in $new_path
34704 
34705   windows_path="$new_path"
34706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34707     unix_path=`$CYGPATH -u "$windows_path"`
34708     new_path="$unix_path"
34709   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34710     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34711     new_path="$unix_path"
34712   fi
34713 
34714     # remove trailing .exe if any
34715     new_path="${new_path/%.exe/}"
34716 
34717     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34718     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34719   fi
34720 
34721     else
34722       # We're on a unix platform. Hooray! :)
34723       # First separate the path from the arguments. This will split at the first
34724       # space.
34725       complete="$CXXCPP"
34726       path="${complete%% *}"
34727       tmp="$complete EOL"
34728       arguments="${tmp#* }"
34729 
34730       # Cannot rely on the command "which" here since it doesn't always work.
34731       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34732       if test -z "$is_absolute_path"; then
34733         # Path to executable is not absolute. Find it.
34734         IFS_save="$IFS"
34735         IFS=:
34736         for p in $PATH; do
34737           if test -f "$p/$path" && test -x "$p/$path"; then
34738             new_path="$p/$path"
34739             break
34740           fi
34741         done
34742         IFS="$IFS_save"
34743       else
34744         # This is an absolute path, we can use it without further modifications.
34745         new_path="$path"
34746       fi
34747 
34748       if test "x$new_path" = x; then
34749         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34750 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34751         has_space=`$ECHO "$complete" | $GREP " "`
34752         if test "x$has_space" != x; then
34753           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34754 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34755         fi
34756         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34757       fi
34758     fi
34759 
34760     # Now join together the path and the arguments once again
34761     if test "x$arguments" != xEOL; then
34762       new_complete="$new_path ${arguments% *}"
34763     else
34764       new_complete="$new_path"
34765     fi
34766 
34767     if test "x$complete" != "x$new_complete"; then
34768       CXXCPP="$new_complete"
34769       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34770 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34771     fi
34772   fi
34773 
34774 
34775   #
34776   # Setup the linker (LD)
34777   #
34778   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34779     # In the Microsoft toolchain we have a separate LD command "link".
34780     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34781     # a cygwin program for something completely different.
34782     # Extract the first word of "link", so it can be a program name with args.
34783 set dummy link; ac_word=$2
34784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34785 $as_echo_n "checking for $ac_word... " >&6; }
34786 if ${ac_cv_prog_LD+:} false; then :
34787   $as_echo_n "(cached) " >&6
34788 else
34789   if test -n "$LD"; then
34790   ac_cv_prog_LD="$LD" # Let the user override the test.
34791 else
34792   ac_prog_rejected=no
34793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34794 for as_dir in $PATH
34795 do
34796   IFS=$as_save_IFS
34797   test -z "$as_dir" && as_dir=.
34798     for ac_exec_ext in '' $ac_executable_extensions; do
34799   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34800     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34801        ac_prog_rejected=yes
34802        continue
34803      fi
34804     ac_cv_prog_LD="link"
34805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34806     break 2
34807   fi
34808 done
34809   done
34810 IFS=$as_save_IFS
34811 
34812 if test $ac_prog_rejected = yes; then
34813   # We found a bogon in the path, so make sure we never use it.
34814   set dummy $ac_cv_prog_LD
34815   shift
34816   if test $# != 0; then
34817     # We chose a different compiler from the bogus one.
34818     # However, it has the same basename, so the bogon will be chosen
34819     # first if we set LD to just the basename; use the full file name.
34820     shift
34821     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34822   fi
34823 fi
34824 fi
34825 fi
34826 LD=$ac_cv_prog_LD
34827 if test -n "$LD"; then
34828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34829 $as_echo "$LD" >&6; }
34830 else
34831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34832 $as_echo "no" >&6; }
34833 fi
34834 
34835 
34836 
34837   # Only process if variable expands to non-empty
34838 
34839   if test "x$LD" != x; then
34840     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34841 
34842   # First separate the path from the arguments. This will split at the first
34843   # space.
34844   complete="$LD"
34845   path="${complete%% *}"
34846   tmp="$complete EOL"
34847   arguments="${tmp#* }"
34848 
34849   # Input might be given as Windows format, start by converting to
34850   # unix format.
34851   new_path=`$CYGPATH -u "$path"`
34852 
34853   # Now try to locate executable using which
34854   new_path=`$WHICH "$new_path" 2> /dev/null`
34855   # bat and cmd files are not always considered executable in cygwin causing which
34856   # to not find them
34857   if test "x$new_path" = x \
34858       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34859       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34860     new_path=`$CYGPATH -u "$path"`
34861   fi
34862   if test "x$new_path" = x; then
34863     # Oops. Which didn't find the executable.
34864     # The splitting of arguments from the executable at a space might have been incorrect,
34865     # since paths with space are more likely in Windows. Give it another try with the whole
34866     # argument.
34867     path="$complete"
34868     arguments="EOL"
34869     new_path=`$CYGPATH -u "$path"`
34870     new_path=`$WHICH "$new_path" 2> /dev/null`
34871     # bat and cmd files are not always considered executable in cygwin causing which
34872     # to not find them
34873     if test "x$new_path" = x \
34874         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34875         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34876       new_path=`$CYGPATH -u "$path"`
34877     fi
34878     if test "x$new_path" = x; then
34879       # It's still not found. Now this is an unrecoverable error.
34880       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34881 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34882       has_space=`$ECHO "$complete" | $GREP " "`
34883       if test "x$has_space" != x; then
34884         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34885 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34886       fi
34887       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34888     fi
34889   fi
34890 
34891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34894   # "foo.exe" is OK but "foo" is an error.
34895   #
34896   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34897   # It is also a way to make sure we got the proper file name for the real test later on.
34898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34899   if test "x$test_shortpath" = x; then
34900     # Short path failed, file does not exist as specified.
34901     # Try adding .exe or .cmd
34902     if test -f "${new_path}.exe"; then
34903       input_to_shortpath="${new_path}.exe"
34904     elif test -f "${new_path}.cmd"; then
34905       input_to_shortpath="${new_path}.cmd"
34906     else
34907       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34908 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34909       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34910 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34911       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34912     fi
34913   else
34914     input_to_shortpath="$new_path"
34915   fi
34916 
34917   # Call helper function which possibly converts this using DOS-style short mode.
34918   # If so, the updated path is stored in $new_path.
34919   new_path="$input_to_shortpath"
34920 
34921   input_path="$input_to_shortpath"
34922   # Check if we need to convert this using DOS-style short mode. If the path
34923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34924   # take no chances and rewrite it.
34925   # Note: m4 eats our [], so we need to use [ and ] instead.
34926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34927   if test "x$has_forbidden_chars" != x; then
34928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34929     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34930     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34931     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34932       # Going to short mode and back again did indeed matter. Since short mode is
34933       # case insensitive, let's make it lowercase to improve readability.
34934       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34935       # Now convert it back to Unix-style (cygpath)
34936       input_path=`$CYGPATH -u "$shortmode_path"`
34937       new_path="$input_path"
34938     fi
34939   fi
34940 
34941   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34942   if test "x$test_cygdrive_prefix" = x; then
34943     # As a simple fix, exclude /usr/bin since it's not a real path.
34944     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34945       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34946       # a path prefixed by /cygdrive for fixpath to work.
34947       new_path="$CYGWIN_ROOT_PATH$input_path"
34948     fi
34949   fi
34950 
34951   # remove trailing .exe if any
34952   new_path="${new_path/%.exe/}"
34953 
34954     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34955 
34956   # First separate the path from the arguments. This will split at the first
34957   # space.
34958   complete="$LD"
34959   path="${complete%% *}"
34960   tmp="$complete EOL"
34961   arguments="${tmp#* }"
34962 
34963   # Input might be given as Windows format, start by converting to
34964   # unix format.
34965   new_path="$path"
34966 
34967   windows_path="$new_path"
34968   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34969     unix_path=`$CYGPATH -u "$windows_path"`
34970     new_path="$unix_path"
34971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34972     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34973     new_path="$unix_path"
34974   fi
34975 
34976 
34977   # Now try to locate executable using which
34978   new_path=`$WHICH "$new_path" 2> /dev/null`
34979 
34980   if test "x$new_path" = x; then
34981     # Oops. Which didn't find the executable.
34982     # The splitting of arguments from the executable at a space might have been incorrect,
34983     # since paths with space are more likely in Windows. Give it another try with the whole
34984     # argument.
34985     path="$complete"
34986     arguments="EOL"
34987     new_path="$path"
34988 
34989   windows_path="$new_path"
34990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34991     unix_path=`$CYGPATH -u "$windows_path"`
34992     new_path="$unix_path"
34993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34995     new_path="$unix_path"
34996   fi
34997 
34998 
34999     new_path=`$WHICH "$new_path" 2> /dev/null`
35000     # bat and cmd files are not always considered executable in MSYS causing which
35001     # to not find them
35002     if test "x$new_path" = x \
35003         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35004         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35005       new_path="$path"
35006 
35007   windows_path="$new_path"
35008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35009     unix_path=`$CYGPATH -u "$windows_path"`
35010     new_path="$unix_path"
35011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35013     new_path="$unix_path"
35014   fi
35015 
35016     fi
35017 
35018     if test "x$new_path" = x; then
35019       # It's still not found. Now this is an unrecoverable error.
35020       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35021 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35022       has_space=`$ECHO "$complete" | $GREP " "`
35023       if test "x$has_space" != x; then
35024         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35025 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35026       fi
35027       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35028     fi
35029   fi
35030 
35031   # Now new_path has a complete unix path to the binary
35032   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35033     # Keep paths in /bin as-is, but remove trailing .exe if any
35034     new_path="${new_path/%.exe/}"
35035     # Do not save /bin paths to all_fixpath_prefixes!
35036   else
35037     # Not in mixed or Windows style, start by that.
35038     new_path=`cmd //c echo $new_path`
35039 
35040   input_path="$new_path"
35041   # Check if we need to convert this using DOS-style short mode. If the path
35042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35043   # take no chances and rewrite it.
35044   # Note: m4 eats our [], so we need to use [ and ] instead.
35045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35046   if test "x$has_forbidden_chars" != x; then
35047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35048     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35049   fi
35050 
35051     # Output is in $new_path
35052 
35053   windows_path="$new_path"
35054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35055     unix_path=`$CYGPATH -u "$windows_path"`
35056     new_path="$unix_path"
35057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35059     new_path="$unix_path"
35060   fi
35061 
35062     # remove trailing .exe if any
35063     new_path="${new_path/%.exe/}"
35064 
35065     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35066     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35067   fi
35068 
35069     else
35070       # We're on a unix platform. Hooray! :)
35071       # First separate the path from the arguments. This will split at the first
35072       # space.
35073       complete="$LD"
35074       path="${complete%% *}"
35075       tmp="$complete EOL"
35076       arguments="${tmp#* }"
35077 
35078       # Cannot rely on the command "which" here since it doesn't always work.
35079       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35080       if test -z "$is_absolute_path"; then
35081         # Path to executable is not absolute. Find it.
35082         IFS_save="$IFS"
35083         IFS=:
35084         for p in $PATH; do
35085           if test -f "$p/$path" && test -x "$p/$path"; then
35086             new_path="$p/$path"
35087             break
35088           fi
35089         done
35090         IFS="$IFS_save"
35091       else
35092         # This is an absolute path, we can use it without further modifications.
35093         new_path="$path"
35094       fi
35095 
35096       if test "x$new_path" = x; then
35097         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35098 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35099         has_space=`$ECHO "$complete" | $GREP " "`
35100         if test "x$has_space" != x; then
35101           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35102 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35103         fi
35104         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35105       fi
35106     fi
35107 
35108     # Now join together the path and the arguments once again
35109     if test "x$arguments" != xEOL; then
35110       new_complete="$new_path ${arguments% *}"
35111     else
35112       new_complete="$new_path"
35113     fi
35114 
35115     if test "x$complete" != "x$new_complete"; then
35116       LD="$new_complete"
35117       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35118 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35119     fi
35120   fi
35121 
35122     # Verify that we indeed succeeded with this trick.
35123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35124 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35125     "$LD" --version > /dev/null
35126     if test $? -eq 0 ; then
35127       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35128 $as_echo "no" >&6; }
35129       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35130     else
35131       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35132 $as_echo "yes" >&6; }
35133     fi
35134     LDCXX="$LD"
35135   else
35136     # All other toolchains use the compiler to link.
35137     LD="$CC"
35138     LDCXX="$CXX"
35139   fi
35140 
35141   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35142 
35143 
35144   #
35145   # Setup the assembler (AS)
35146   #
35147   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35148     # FIXME: should this really be solaris, or solstudio?
35149 
35150 
35151   # Publish this variable in the help.
35152 
35153 
35154   if [ -z "${AS+x}" ]; then
35155     # The variable is not set by user, try to locate tool using the code snippet
35156     for ac_prog in as
35157 do
35158   # Extract the first word of "$ac_prog", so it can be a program name with args.
35159 set dummy $ac_prog; ac_word=$2
35160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35161 $as_echo_n "checking for $ac_word... " >&6; }
35162 if ${ac_cv_path_AS+:} false; then :
35163   $as_echo_n "(cached) " >&6
35164 else
35165   case $AS in
35166   [\\/]* | ?:[\\/]*)
35167   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35168   ;;
35169   *)
35170   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35171 for as_dir in $PATH
35172 do
35173   IFS=$as_save_IFS
35174   test -z "$as_dir" && as_dir=.
35175     for ac_exec_ext in '' $ac_executable_extensions; do
35176   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35177     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35179     break 2
35180   fi
35181 done
35182   done
35183 IFS=$as_save_IFS
35184 
35185   ;;
35186 esac
35187 fi
35188 AS=$ac_cv_path_AS
35189 if test -n "$AS"; then
35190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35191 $as_echo "$AS" >&6; }
35192 else
35193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35194 $as_echo "no" >&6; }
35195 fi
35196 
35197 
35198   test -n "$AS" && break
35199 done
35200 
35201   else
35202     # The variable is set, but is it from the command line or the environment?
35203 
35204     # Try to remove the string !AS! from our list.
35205     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35206     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35207       # If it failed, the variable was not from the command line. Ignore it,
35208       # but warn the user (except for BASH, which is always set by the calling BASH).
35209       if test "xAS" != xBASH; then
35210         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35211 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35212       fi
35213       # Try to locate tool using the code snippet
35214       for ac_prog in as
35215 do
35216   # Extract the first word of "$ac_prog", so it can be a program name with args.
35217 set dummy $ac_prog; ac_word=$2
35218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35219 $as_echo_n "checking for $ac_word... " >&6; }
35220 if ${ac_cv_path_AS+:} false; then :
35221   $as_echo_n "(cached) " >&6
35222 else
35223   case $AS in
35224   [\\/]* | ?:[\\/]*)
35225   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35226   ;;
35227   *)
35228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35229 for as_dir in $PATH
35230 do
35231   IFS=$as_save_IFS
35232   test -z "$as_dir" && as_dir=.
35233     for ac_exec_ext in '' $ac_executable_extensions; do
35234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35235     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35237     break 2
35238   fi
35239 done
35240   done
35241 IFS=$as_save_IFS
35242 
35243   ;;
35244 esac
35245 fi
35246 AS=$ac_cv_path_AS
35247 if test -n "$AS"; then
35248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35249 $as_echo "$AS" >&6; }
35250 else
35251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35252 $as_echo "no" >&6; }
35253 fi
35254 
35255 
35256   test -n "$AS" && break
35257 done
35258 
35259     else
35260       # If it succeeded, then it was overridden by the user. We will use it
35261       # for the tool.
35262 
35263       # First remove it from the list of overridden variables, so we can test
35264       # for unknown variables in the end.
35265       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35266 
35267       # Check if we try to supply an empty value
35268       if test "x$AS" = x; then
35269         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35270 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35271         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35272 $as_echo_n "checking for AS... " >&6; }
35273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35274 $as_echo "disabled" >&6; }
35275       else
35276         # Check if the provided tool contains a complete path.
35277         tool_specified="$AS"
35278         tool_basename="${tool_specified##*/}"
35279         if test "x$tool_basename" = "x$tool_specified"; then
35280           # A command without a complete path is provided, search $PATH.
35281           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35282 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35283           # Extract the first word of "$tool_basename", so it can be a program name with args.
35284 set dummy $tool_basename; ac_word=$2
35285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35286 $as_echo_n "checking for $ac_word... " >&6; }
35287 if ${ac_cv_path_AS+:} false; then :
35288   $as_echo_n "(cached) " >&6
35289 else
35290   case $AS in
35291   [\\/]* | ?:[\\/]*)
35292   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35293   ;;
35294   *)
35295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35296 for as_dir in $PATH
35297 do
35298   IFS=$as_save_IFS
35299   test -z "$as_dir" && as_dir=.
35300     for ac_exec_ext in '' $ac_executable_extensions; do
35301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35302     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35304     break 2
35305   fi
35306 done
35307   done
35308 IFS=$as_save_IFS
35309 
35310   ;;
35311 esac
35312 fi
35313 AS=$ac_cv_path_AS
35314 if test -n "$AS"; then
35315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35316 $as_echo "$AS" >&6; }
35317 else
35318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35319 $as_echo "no" >&6; }
35320 fi
35321 
35322 
35323           if test "x$AS" = x; then
35324             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35325           fi
35326         else
35327           # Otherwise we believe it is a complete path. Use it as it is.
35328           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35329 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35330           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35331 $as_echo_n "checking for AS... " >&6; }
35332           if test ! -x "$tool_specified"; then
35333             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35334 $as_echo "not found" >&6; }
35335             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35336           fi
35337           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35338 $as_echo "$tool_specified" >&6; }
35339         fi
35340       fi
35341     fi
35342 
35343   fi
35344 
35345 
35346 
35347   # Only process if variable expands to non-empty
35348 
35349   if test "x$AS" != x; then
35350     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35351 
35352   # First separate the path from the arguments. This will split at the first
35353   # space.
35354   complete="$AS"
35355   path="${complete%% *}"
35356   tmp="$complete EOL"
35357   arguments="${tmp#* }"
35358 
35359   # Input might be given as Windows format, start by converting to
35360   # unix format.
35361   new_path=`$CYGPATH -u "$path"`
35362 
35363   # Now try to locate executable using which
35364   new_path=`$WHICH "$new_path" 2> /dev/null`
35365   # bat and cmd files are not always considered executable in cygwin causing which
35366   # to not find them
35367   if test "x$new_path" = x \
35368       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35369       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35370     new_path=`$CYGPATH -u "$path"`
35371   fi
35372   if test "x$new_path" = x; then
35373     # Oops. Which didn't find the executable.
35374     # The splitting of arguments from the executable at a space might have been incorrect,
35375     # since paths with space are more likely in Windows. Give it another try with the whole
35376     # argument.
35377     path="$complete"
35378     arguments="EOL"
35379     new_path=`$CYGPATH -u "$path"`
35380     new_path=`$WHICH "$new_path" 2> /dev/null`
35381     # bat and cmd files are not always considered executable in cygwin causing which
35382     # to not find them
35383     if test "x$new_path" = x \
35384         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35385         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35386       new_path=`$CYGPATH -u "$path"`
35387     fi
35388     if test "x$new_path" = x; then
35389       # It's still not found. Now this is an unrecoverable error.
35390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35391 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35392       has_space=`$ECHO "$complete" | $GREP " "`
35393       if test "x$has_space" != x; then
35394         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35395 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35396       fi
35397       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35398     fi
35399   fi
35400 
35401   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35402   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35403   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35404   # "foo.exe" is OK but "foo" is an error.
35405   #
35406   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35407   # It is also a way to make sure we got the proper file name for the real test later on.
35408   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35409   if test "x$test_shortpath" = x; then
35410     # Short path failed, file does not exist as specified.
35411     # Try adding .exe or .cmd
35412     if test -f "${new_path}.exe"; then
35413       input_to_shortpath="${new_path}.exe"
35414     elif test -f "${new_path}.cmd"; then
35415       input_to_shortpath="${new_path}.cmd"
35416     else
35417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35418 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35419       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35420 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35421       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35422     fi
35423   else
35424     input_to_shortpath="$new_path"
35425   fi
35426 
35427   # Call helper function which possibly converts this using DOS-style short mode.
35428   # If so, the updated path is stored in $new_path.
35429   new_path="$input_to_shortpath"
35430 
35431   input_path="$input_to_shortpath"
35432   # Check if we need to convert this using DOS-style short mode. If the path
35433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35434   # take no chances and rewrite it.
35435   # Note: m4 eats our [], so we need to use [ and ] instead.
35436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35437   if test "x$has_forbidden_chars" != x; then
35438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35439     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35440     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35441     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35442       # Going to short mode and back again did indeed matter. Since short mode is
35443       # case insensitive, let's make it lowercase to improve readability.
35444       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35445       # Now convert it back to Unix-style (cygpath)
35446       input_path=`$CYGPATH -u "$shortmode_path"`
35447       new_path="$input_path"
35448     fi
35449   fi
35450 
35451   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35452   if test "x$test_cygdrive_prefix" = x; then
35453     # As a simple fix, exclude /usr/bin since it's not a real path.
35454     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35455       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35456       # a path prefixed by /cygdrive for fixpath to work.
35457       new_path="$CYGWIN_ROOT_PATH$input_path"
35458     fi
35459   fi
35460 
35461   # remove trailing .exe if any
35462   new_path="${new_path/%.exe/}"
35463 
35464     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35465 
35466   # First separate the path from the arguments. This will split at the first
35467   # space.
35468   complete="$AS"
35469   path="${complete%% *}"
35470   tmp="$complete EOL"
35471   arguments="${tmp#* }"
35472 
35473   # Input might be given as Windows format, start by converting to
35474   # unix format.
35475   new_path="$path"
35476 
35477   windows_path="$new_path"
35478   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35479     unix_path=`$CYGPATH -u "$windows_path"`
35480     new_path="$unix_path"
35481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35482     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35483     new_path="$unix_path"
35484   fi
35485 
35486 
35487   # Now try to locate executable using which
35488   new_path=`$WHICH "$new_path" 2> /dev/null`
35489 
35490   if test "x$new_path" = x; then
35491     # Oops. Which didn't find the executable.
35492     # The splitting of arguments from the executable at a space might have been incorrect,
35493     # since paths with space are more likely in Windows. Give it another try with the whole
35494     # argument.
35495     path="$complete"
35496     arguments="EOL"
35497     new_path="$path"
35498 
35499   windows_path="$new_path"
35500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35501     unix_path=`$CYGPATH -u "$windows_path"`
35502     new_path="$unix_path"
35503   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35504     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35505     new_path="$unix_path"
35506   fi
35507 
35508 
35509     new_path=`$WHICH "$new_path" 2> /dev/null`
35510     # bat and cmd files are not always considered executable in MSYS causing which
35511     # to not find them
35512     if test "x$new_path" = x \
35513         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35514         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35515       new_path="$path"
35516 
35517   windows_path="$new_path"
35518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35519     unix_path=`$CYGPATH -u "$windows_path"`
35520     new_path="$unix_path"
35521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35523     new_path="$unix_path"
35524   fi
35525 
35526     fi
35527 
35528     if test "x$new_path" = x; then
35529       # It's still not found. Now this is an unrecoverable error.
35530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35531 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35532       has_space=`$ECHO "$complete" | $GREP " "`
35533       if test "x$has_space" != x; then
35534         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35535 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35536       fi
35537       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35538     fi
35539   fi
35540 
35541   # Now new_path has a complete unix path to the binary
35542   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35543     # Keep paths in /bin as-is, but remove trailing .exe if any
35544     new_path="${new_path/%.exe/}"
35545     # Do not save /bin paths to all_fixpath_prefixes!
35546   else
35547     # Not in mixed or Windows style, start by that.
35548     new_path=`cmd //c echo $new_path`
35549 
35550   input_path="$new_path"
35551   # Check if we need to convert this using DOS-style short mode. If the path
35552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35553   # take no chances and rewrite it.
35554   # Note: m4 eats our [], so we need to use [ and ] instead.
35555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35556   if test "x$has_forbidden_chars" != x; then
35557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35559   fi
35560 
35561     # Output is in $new_path
35562 
35563   windows_path="$new_path"
35564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35565     unix_path=`$CYGPATH -u "$windows_path"`
35566     new_path="$unix_path"
35567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35569     new_path="$unix_path"
35570   fi
35571 
35572     # remove trailing .exe if any
35573     new_path="${new_path/%.exe/}"
35574 
35575     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35576     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35577   fi
35578 
35579     else
35580       # We're on a unix platform. Hooray! :)
35581       # First separate the path from the arguments. This will split at the first
35582       # space.
35583       complete="$AS"
35584       path="${complete%% *}"
35585       tmp="$complete EOL"
35586       arguments="${tmp#* }"
35587 
35588       # Cannot rely on the command "which" here since it doesn't always work.
35589       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35590       if test -z "$is_absolute_path"; then
35591         # Path to executable is not absolute. Find it.
35592         IFS_save="$IFS"
35593         IFS=:
35594         for p in $PATH; do
35595           if test -f "$p/$path" && test -x "$p/$path"; then
35596             new_path="$p/$path"
35597             break
35598           fi
35599         done
35600         IFS="$IFS_save"
35601       else
35602         # This is an absolute path, we can use it without further modifications.
35603         new_path="$path"
35604       fi
35605 
35606       if test "x$new_path" = x; then
35607         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35608 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35609         has_space=`$ECHO "$complete" | $GREP " "`
35610         if test "x$has_space" != x; then
35611           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35612 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35613         fi
35614         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35615       fi
35616     fi
35617 
35618     # Now join together the path and the arguments once again
35619     if test "x$arguments" != xEOL; then
35620       new_complete="$new_path ${arguments% *}"
35621     else
35622       new_complete="$new_path"
35623     fi
35624 
35625     if test "x$complete" != "x$new_complete"; then
35626       AS="$new_complete"
35627       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35628 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35629     fi
35630   fi
35631 
35632   else
35633     # FIXME: is this correct for microsoft?
35634     AS="$CC -c"
35635   fi
35636 
35637 
35638   #
35639   # Setup the archiver (AR)
35640   #
35641   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35642     # The corresponding ar tool is lib.exe (used to create static libraries)
35643     # Extract the first word of "lib", so it can be a program name with args.
35644 set dummy lib; ac_word=$2
35645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35646 $as_echo_n "checking for $ac_word... " >&6; }
35647 if ${ac_cv_prog_AR+:} false; then :
35648   $as_echo_n "(cached) " >&6
35649 else
35650   if test -n "$AR"; then
35651   ac_cv_prog_AR="$AR" # Let the user override the test.
35652 else
35653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35654 for as_dir in $PATH
35655 do
35656   IFS=$as_save_IFS
35657   test -z "$as_dir" && as_dir=.
35658     for ac_exec_ext in '' $ac_executable_extensions; do
35659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35660     ac_cv_prog_AR="lib"
35661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35662     break 2
35663   fi
35664 done
35665   done
35666 IFS=$as_save_IFS
35667 
35668 fi
35669 fi
35670 AR=$ac_cv_prog_AR
35671 if test -n "$AR"; then
35672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35673 $as_echo "$AR" >&6; }
35674 else
35675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35676 $as_echo "no" >&6; }
35677 fi
35678 
35679 
35680   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35681 
35682 
35683   # Publish this variable in the help.
35684 
35685 
35686   if [ -z "${AR+x}" ]; then
35687     # The variable is not set by user, try to locate tool using the code snippet
35688     if test -n "$ac_tool_prefix"; then
35689   for ac_prog in ar gcc-ar
35690   do
35691     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35692 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35694 $as_echo_n "checking for $ac_word... " >&6; }
35695 if ${ac_cv_prog_AR+:} false; then :
35696   $as_echo_n "(cached) " >&6
35697 else
35698   if test -n "$AR"; then
35699   ac_cv_prog_AR="$AR" # Let the user override the test.
35700 else
35701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35702 for as_dir in $PATH
35703 do
35704   IFS=$as_save_IFS
35705   test -z "$as_dir" && as_dir=.
35706     for ac_exec_ext in '' $ac_executable_extensions; do
35707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35708     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35710     break 2
35711   fi
35712 done
35713   done
35714 IFS=$as_save_IFS
35715 
35716 fi
35717 fi
35718 AR=$ac_cv_prog_AR
35719 if test -n "$AR"; then
35720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35721 $as_echo "$AR" >&6; }
35722 else
35723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35724 $as_echo "no" >&6; }
35725 fi
35726 
35727 
35728     test -n "$AR" && break
35729   done
35730 fi
35731 if test -z "$AR"; then
35732   ac_ct_AR=$AR
35733   for ac_prog in ar gcc-ar
35734 do
35735   # Extract the first word of "$ac_prog", so it can be a program name with args.
35736 set dummy $ac_prog; ac_word=$2
35737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35738 $as_echo_n "checking for $ac_word... " >&6; }
35739 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35740   $as_echo_n "(cached) " >&6
35741 else
35742   if test -n "$ac_ct_AR"; then
35743   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35744 else
35745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35746 for as_dir in $PATH
35747 do
35748   IFS=$as_save_IFS
35749   test -z "$as_dir" && as_dir=.
35750     for ac_exec_ext in '' $ac_executable_extensions; do
35751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35752     ac_cv_prog_ac_ct_AR="$ac_prog"
35753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35754     break 2
35755   fi
35756 done
35757   done
35758 IFS=$as_save_IFS
35759 
35760 fi
35761 fi
35762 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35763 if test -n "$ac_ct_AR"; then
35764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35765 $as_echo "$ac_ct_AR" >&6; }
35766 else
35767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35768 $as_echo "no" >&6; }
35769 fi
35770 
35771 
35772   test -n "$ac_ct_AR" && break
35773 done
35774 
35775   if test "x$ac_ct_AR" = x; then
35776     AR=""
35777   else
35778     case $cross_compiling:$ac_tool_warned in
35779 yes:)
35780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35781 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35782 ac_tool_warned=yes ;;
35783 esac
35784     AR=$ac_ct_AR
35785   fi
35786 fi
35787 
35788   else
35789     # The variable is set, but is it from the command line or the environment?
35790 
35791     # Try to remove the string !AR! from our list.
35792     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35793     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35794       # If it failed, the variable was not from the command line. Ignore it,
35795       # but warn the user (except for BASH, which is always set by the calling BASH).
35796       if test "xAR" != xBASH; then
35797         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35798 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35799       fi
35800       # Try to locate tool using the code snippet
35801       if test -n "$ac_tool_prefix"; then
35802   for ac_prog in ar gcc-ar
35803   do
35804     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35805 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35807 $as_echo_n "checking for $ac_word... " >&6; }
35808 if ${ac_cv_prog_AR+:} false; then :
35809   $as_echo_n "(cached) " >&6
35810 else
35811   if test -n "$AR"; then
35812   ac_cv_prog_AR="$AR" # Let the user override the test.
35813 else
35814 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35815 for as_dir in $PATH
35816 do
35817   IFS=$as_save_IFS
35818   test -z "$as_dir" && as_dir=.
35819     for ac_exec_ext in '' $ac_executable_extensions; do
35820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35821     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35823     break 2
35824   fi
35825 done
35826   done
35827 IFS=$as_save_IFS
35828 
35829 fi
35830 fi
35831 AR=$ac_cv_prog_AR
35832 if test -n "$AR"; then
35833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35834 $as_echo "$AR" >&6; }
35835 else
35836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35837 $as_echo "no" >&6; }
35838 fi
35839 
35840 
35841     test -n "$AR" && break
35842   done
35843 fi
35844 if test -z "$AR"; then
35845   ac_ct_AR=$AR
35846   for ac_prog in ar gcc-ar
35847 do
35848   # Extract the first word of "$ac_prog", so it can be a program name with args.
35849 set dummy $ac_prog; ac_word=$2
35850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35851 $as_echo_n "checking for $ac_word... " >&6; }
35852 if ${ac_cv_prog_ac_ct_AR+:} false; then :
35853   $as_echo_n "(cached) " >&6
35854 else
35855   if test -n "$ac_ct_AR"; then
35856   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35857 else
35858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35859 for as_dir in $PATH
35860 do
35861   IFS=$as_save_IFS
35862   test -z "$as_dir" && as_dir=.
35863     for ac_exec_ext in '' $ac_executable_extensions; do
35864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35865     ac_cv_prog_ac_ct_AR="$ac_prog"
35866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35867     break 2
35868   fi
35869 done
35870   done
35871 IFS=$as_save_IFS
35872 
35873 fi
35874 fi
35875 ac_ct_AR=$ac_cv_prog_ac_ct_AR
35876 if test -n "$ac_ct_AR"; then
35877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35878 $as_echo "$ac_ct_AR" >&6; }
35879 else
35880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35881 $as_echo "no" >&6; }
35882 fi
35883 
35884 
35885   test -n "$ac_ct_AR" && break
35886 done
35887 
35888   if test "x$ac_ct_AR" = x; then
35889     AR=""
35890   else
35891     case $cross_compiling:$ac_tool_warned in
35892 yes:)
35893 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35894 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35895 ac_tool_warned=yes ;;
35896 esac
35897     AR=$ac_ct_AR
35898   fi
35899 fi
35900 
35901     else
35902       # If it succeeded, then it was overridden by the user. We will use it
35903       # for the tool.
35904 
35905       # First remove it from the list of overridden variables, so we can test
35906       # for unknown variables in the end.
35907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35908 
35909       # Check if we try to supply an empty value
35910       if test "x$AR" = x; then
35911         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35912 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35914 $as_echo_n "checking for AR... " >&6; }
35915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35916 $as_echo "disabled" >&6; }
35917       else
35918         # Check if the provided tool contains a complete path.
35919         tool_specified="$AR"
35920         tool_basename="${tool_specified##*/}"
35921         if test "x$tool_basename" = "x$tool_specified"; then
35922           # A command without a complete path is provided, search $PATH.
35923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35924 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35925           # Extract the first word of "$tool_basename", so it can be a program name with args.
35926 set dummy $tool_basename; ac_word=$2
35927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35928 $as_echo_n "checking for $ac_word... " >&6; }
35929 if ${ac_cv_path_AR+:} false; then :
35930   $as_echo_n "(cached) " >&6
35931 else
35932   case $AR in
35933   [\\/]* | ?:[\\/]*)
35934   ac_cv_path_AR="$AR" # Let the user override the test with a path.
35935   ;;
35936   *)
35937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35938 for as_dir in $PATH
35939 do
35940   IFS=$as_save_IFS
35941   test -z "$as_dir" && as_dir=.
35942     for ac_exec_ext in '' $ac_executable_extensions; do
35943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35944     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35946     break 2
35947   fi
35948 done
35949   done
35950 IFS=$as_save_IFS
35951 
35952   ;;
35953 esac
35954 fi
35955 AR=$ac_cv_path_AR
35956 if test -n "$AR"; then
35957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35958 $as_echo "$AR" >&6; }
35959 else
35960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35961 $as_echo "no" >&6; }
35962 fi
35963 
35964 
35965           if test "x$AR" = x; then
35966             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35967           fi
35968         else
35969           # Otherwise we believe it is a complete path. Use it as it is.
35970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
35971 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
35972           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35973 $as_echo_n "checking for AR... " >&6; }
35974           if test ! -x "$tool_specified"; then
35975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35976 $as_echo "not found" >&6; }
35977             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
35978           fi
35979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35980 $as_echo "$tool_specified" >&6; }
35981         fi
35982       fi
35983     fi
35984 
35985   fi
35986 
35987 
35988   else
35989 
35990 
35991   # Publish this variable in the help.
35992 
35993 
35994   if [ -z "${AR+x}" ]; then
35995     # The variable is not set by user, try to locate tool using the code snippet
35996     if test -n "$ac_tool_prefix"; then
35997   for ac_prog in ar
35998   do
35999     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36000 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36002 $as_echo_n "checking for $ac_word... " >&6; }
36003 if ${ac_cv_prog_AR+:} false; then :
36004   $as_echo_n "(cached) " >&6
36005 else
36006   if test -n "$AR"; then
36007   ac_cv_prog_AR="$AR" # Let the user override the test.
36008 else
36009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36010 for as_dir in $PATH
36011 do
36012   IFS=$as_save_IFS
36013   test -z "$as_dir" && as_dir=.
36014     for ac_exec_ext in '' $ac_executable_extensions; do
36015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36016     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36018     break 2
36019   fi
36020 done
36021   done
36022 IFS=$as_save_IFS
36023 
36024 fi
36025 fi
36026 AR=$ac_cv_prog_AR
36027 if test -n "$AR"; then
36028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36029 $as_echo "$AR" >&6; }
36030 else
36031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36032 $as_echo "no" >&6; }
36033 fi
36034 
36035 
36036     test -n "$AR" && break
36037   done
36038 fi
36039 if test -z "$AR"; then
36040   ac_ct_AR=$AR
36041   for ac_prog in ar
36042 do
36043   # Extract the first word of "$ac_prog", so it can be a program name with args.
36044 set dummy $ac_prog; ac_word=$2
36045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36046 $as_echo_n "checking for $ac_word... " >&6; }
36047 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36048   $as_echo_n "(cached) " >&6
36049 else
36050   if test -n "$ac_ct_AR"; then
36051   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36052 else
36053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36054 for as_dir in $PATH
36055 do
36056   IFS=$as_save_IFS
36057   test -z "$as_dir" && as_dir=.
36058     for ac_exec_ext in '' $ac_executable_extensions; do
36059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36060     ac_cv_prog_ac_ct_AR="$ac_prog"
36061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36062     break 2
36063   fi
36064 done
36065   done
36066 IFS=$as_save_IFS
36067 
36068 fi
36069 fi
36070 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36071 if test -n "$ac_ct_AR"; then
36072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36073 $as_echo "$ac_ct_AR" >&6; }
36074 else
36075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36076 $as_echo "no" >&6; }
36077 fi
36078 
36079 
36080   test -n "$ac_ct_AR" && break
36081 done
36082 
36083   if test "x$ac_ct_AR" = x; then
36084     AR=""
36085   else
36086     case $cross_compiling:$ac_tool_warned in
36087 yes:)
36088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36089 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36090 ac_tool_warned=yes ;;
36091 esac
36092     AR=$ac_ct_AR
36093   fi
36094 fi
36095 
36096   else
36097     # The variable is set, but is it from the command line or the environment?
36098 
36099     # Try to remove the string !AR! from our list.
36100     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36101     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36102       # If it failed, the variable was not from the command line. Ignore it,
36103       # but warn the user (except for BASH, which is always set by the calling BASH).
36104       if test "xAR" != xBASH; then
36105         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36106 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36107       fi
36108       # Try to locate tool using the code snippet
36109       if test -n "$ac_tool_prefix"; then
36110   for ac_prog in ar
36111   do
36112     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36113 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36115 $as_echo_n "checking for $ac_word... " >&6; }
36116 if ${ac_cv_prog_AR+:} false; then :
36117   $as_echo_n "(cached) " >&6
36118 else
36119   if test -n "$AR"; then
36120   ac_cv_prog_AR="$AR" # Let the user override the test.
36121 else
36122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36123 for as_dir in $PATH
36124 do
36125   IFS=$as_save_IFS
36126   test -z "$as_dir" && as_dir=.
36127     for ac_exec_ext in '' $ac_executable_extensions; do
36128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36129     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36131     break 2
36132   fi
36133 done
36134   done
36135 IFS=$as_save_IFS
36136 
36137 fi
36138 fi
36139 AR=$ac_cv_prog_AR
36140 if test -n "$AR"; then
36141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36142 $as_echo "$AR" >&6; }
36143 else
36144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36145 $as_echo "no" >&6; }
36146 fi
36147 
36148 
36149     test -n "$AR" && break
36150   done
36151 fi
36152 if test -z "$AR"; then
36153   ac_ct_AR=$AR
36154   for ac_prog in ar
36155 do
36156   # Extract the first word of "$ac_prog", so it can be a program name with args.
36157 set dummy $ac_prog; ac_word=$2
36158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36159 $as_echo_n "checking for $ac_word... " >&6; }
36160 if ${ac_cv_prog_ac_ct_AR+:} false; then :
36161   $as_echo_n "(cached) " >&6
36162 else
36163   if test -n "$ac_ct_AR"; then
36164   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36165 else
36166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36167 for as_dir in $PATH
36168 do
36169   IFS=$as_save_IFS
36170   test -z "$as_dir" && as_dir=.
36171     for ac_exec_ext in '' $ac_executable_extensions; do
36172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36173     ac_cv_prog_ac_ct_AR="$ac_prog"
36174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36175     break 2
36176   fi
36177 done
36178   done
36179 IFS=$as_save_IFS
36180 
36181 fi
36182 fi
36183 ac_ct_AR=$ac_cv_prog_ac_ct_AR
36184 if test -n "$ac_ct_AR"; then
36185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36186 $as_echo "$ac_ct_AR" >&6; }
36187 else
36188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36189 $as_echo "no" >&6; }
36190 fi
36191 
36192 
36193   test -n "$ac_ct_AR" && break
36194 done
36195 
36196   if test "x$ac_ct_AR" = x; then
36197     AR=""
36198   else
36199     case $cross_compiling:$ac_tool_warned in
36200 yes:)
36201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36202 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36203 ac_tool_warned=yes ;;
36204 esac
36205     AR=$ac_ct_AR
36206   fi
36207 fi
36208 
36209     else
36210       # If it succeeded, then it was overridden by the user. We will use it
36211       # for the tool.
36212 
36213       # First remove it from the list of overridden variables, so we can test
36214       # for unknown variables in the end.
36215       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36216 
36217       # Check if we try to supply an empty value
36218       if test "x$AR" = x; then
36219         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36220 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36221         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36222 $as_echo_n "checking for AR... " >&6; }
36223         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36224 $as_echo "disabled" >&6; }
36225       else
36226         # Check if the provided tool contains a complete path.
36227         tool_specified="$AR"
36228         tool_basename="${tool_specified##*/}"
36229         if test "x$tool_basename" = "x$tool_specified"; then
36230           # A command without a complete path is provided, search $PATH.
36231           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36232 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36233           # Extract the first word of "$tool_basename", so it can be a program name with args.
36234 set dummy $tool_basename; ac_word=$2
36235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36236 $as_echo_n "checking for $ac_word... " >&6; }
36237 if ${ac_cv_path_AR+:} false; then :
36238   $as_echo_n "(cached) " >&6
36239 else
36240   case $AR in
36241   [\\/]* | ?:[\\/]*)
36242   ac_cv_path_AR="$AR" # Let the user override the test with a path.
36243   ;;
36244   *)
36245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36246 for as_dir in $PATH
36247 do
36248   IFS=$as_save_IFS
36249   test -z "$as_dir" && as_dir=.
36250     for ac_exec_ext in '' $ac_executable_extensions; do
36251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36252     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36254     break 2
36255   fi
36256 done
36257   done
36258 IFS=$as_save_IFS
36259 
36260   ;;
36261 esac
36262 fi
36263 AR=$ac_cv_path_AR
36264 if test -n "$AR"; then
36265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36266 $as_echo "$AR" >&6; }
36267 else
36268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36269 $as_echo "no" >&6; }
36270 fi
36271 
36272 
36273           if test "x$AR" = x; then
36274             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36275           fi
36276         else
36277           # Otherwise we believe it is a complete path. Use it as it is.
36278           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36279 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36280           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36281 $as_echo_n "checking for AR... " >&6; }
36282           if test ! -x "$tool_specified"; then
36283             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36284 $as_echo "not found" >&6; }
36285             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36286           fi
36287           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36288 $as_echo "$tool_specified" >&6; }
36289         fi
36290       fi
36291     fi
36292 
36293   fi
36294 
36295 
36296   fi
36297 
36298   # Only process if variable expands to non-empty
36299 
36300   if test "x$AR" != x; then
36301     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36302 
36303   # First separate the path from the arguments. This will split at the first
36304   # space.
36305   complete="$AR"
36306   path="${complete%% *}"
36307   tmp="$complete EOL"
36308   arguments="${tmp#* }"
36309 
36310   # Input might be given as Windows format, start by converting to
36311   # unix format.
36312   new_path=`$CYGPATH -u "$path"`
36313 
36314   # Now try to locate executable using which
36315   new_path=`$WHICH "$new_path" 2> /dev/null`
36316   # bat and cmd files are not always considered executable in cygwin causing which
36317   # to not find them
36318   if test "x$new_path" = x \
36319       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36320       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36321     new_path=`$CYGPATH -u "$path"`
36322   fi
36323   if test "x$new_path" = x; then
36324     # Oops. Which didn't find the executable.
36325     # The splitting of arguments from the executable at a space might have been incorrect,
36326     # since paths with space are more likely in Windows. Give it another try with the whole
36327     # argument.
36328     path="$complete"
36329     arguments="EOL"
36330     new_path=`$CYGPATH -u "$path"`
36331     new_path=`$WHICH "$new_path" 2> /dev/null`
36332     # bat and cmd files are not always considered executable in cygwin causing which
36333     # to not find them
36334     if test "x$new_path" = x \
36335         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36336         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36337       new_path=`$CYGPATH -u "$path"`
36338     fi
36339     if test "x$new_path" = x; then
36340       # It's still not found. Now this is an unrecoverable error.
36341       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36342 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36343       has_space=`$ECHO "$complete" | $GREP " "`
36344       if test "x$has_space" != x; then
36345         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36346 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36347       fi
36348       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36349     fi
36350   fi
36351 
36352   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36353   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36354   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36355   # "foo.exe" is OK but "foo" is an error.
36356   #
36357   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36358   # It is also a way to make sure we got the proper file name for the real test later on.
36359   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36360   if test "x$test_shortpath" = x; then
36361     # Short path failed, file does not exist as specified.
36362     # Try adding .exe or .cmd
36363     if test -f "${new_path}.exe"; then
36364       input_to_shortpath="${new_path}.exe"
36365     elif test -f "${new_path}.cmd"; then
36366       input_to_shortpath="${new_path}.cmd"
36367     else
36368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36369 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36370       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36371 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36372       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36373     fi
36374   else
36375     input_to_shortpath="$new_path"
36376   fi
36377 
36378   # Call helper function which possibly converts this using DOS-style short mode.
36379   # If so, the updated path is stored in $new_path.
36380   new_path="$input_to_shortpath"
36381 
36382   input_path="$input_to_shortpath"
36383   # Check if we need to convert this using DOS-style short mode. If the path
36384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36385   # take no chances and rewrite it.
36386   # Note: m4 eats our [], so we need to use [ and ] instead.
36387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36388   if test "x$has_forbidden_chars" != x; then
36389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36390     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36391     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36392     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36393       # Going to short mode and back again did indeed matter. Since short mode is
36394       # case insensitive, let's make it lowercase to improve readability.
36395       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36396       # Now convert it back to Unix-style (cygpath)
36397       input_path=`$CYGPATH -u "$shortmode_path"`
36398       new_path="$input_path"
36399     fi
36400   fi
36401 
36402   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36403   if test "x$test_cygdrive_prefix" = x; then
36404     # As a simple fix, exclude /usr/bin since it's not a real path.
36405     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36406       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36407       # a path prefixed by /cygdrive for fixpath to work.
36408       new_path="$CYGWIN_ROOT_PATH$input_path"
36409     fi
36410   fi
36411 
36412   # remove trailing .exe if any
36413   new_path="${new_path/%.exe/}"
36414 
36415     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36416 
36417   # First separate the path from the arguments. This will split at the first
36418   # space.
36419   complete="$AR"
36420   path="${complete%% *}"
36421   tmp="$complete EOL"
36422   arguments="${tmp#* }"
36423 
36424   # Input might be given as Windows format, start by converting to
36425   # unix format.
36426   new_path="$path"
36427 
36428   windows_path="$new_path"
36429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36430     unix_path=`$CYGPATH -u "$windows_path"`
36431     new_path="$unix_path"
36432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36434     new_path="$unix_path"
36435   fi
36436 
36437 
36438   # Now try to locate executable using which
36439   new_path=`$WHICH "$new_path" 2> /dev/null`
36440 
36441   if test "x$new_path" = x; then
36442     # Oops. Which didn't find the executable.
36443     # The splitting of arguments from the executable at a space might have been incorrect,
36444     # since paths with space are more likely in Windows. Give it another try with the whole
36445     # argument.
36446     path="$complete"
36447     arguments="EOL"
36448     new_path="$path"
36449 
36450   windows_path="$new_path"
36451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36452     unix_path=`$CYGPATH -u "$windows_path"`
36453     new_path="$unix_path"
36454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36456     new_path="$unix_path"
36457   fi
36458 
36459 
36460     new_path=`$WHICH "$new_path" 2> /dev/null`
36461     # bat and cmd files are not always considered executable in MSYS causing which
36462     # to not find them
36463     if test "x$new_path" = x \
36464         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36465         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36466       new_path="$path"
36467 
36468   windows_path="$new_path"
36469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36470     unix_path=`$CYGPATH -u "$windows_path"`
36471     new_path="$unix_path"
36472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36474     new_path="$unix_path"
36475   fi
36476 
36477     fi
36478 
36479     if test "x$new_path" = x; then
36480       # It's still not found. Now this is an unrecoverable error.
36481       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36482 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36483       has_space=`$ECHO "$complete" | $GREP " "`
36484       if test "x$has_space" != x; then
36485         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36486 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36487       fi
36488       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36489     fi
36490   fi
36491 
36492   # Now new_path has a complete unix path to the binary
36493   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36494     # Keep paths in /bin as-is, but remove trailing .exe if any
36495     new_path="${new_path/%.exe/}"
36496     # Do not save /bin paths to all_fixpath_prefixes!
36497   else
36498     # Not in mixed or Windows style, start by that.
36499     new_path=`cmd //c echo $new_path`
36500 
36501   input_path="$new_path"
36502   # Check if we need to convert this using DOS-style short mode. If the path
36503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36504   # take no chances and rewrite it.
36505   # Note: m4 eats our [], so we need to use [ and ] instead.
36506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36507   if test "x$has_forbidden_chars" != x; then
36508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36510   fi
36511 
36512     # Output is in $new_path
36513 
36514   windows_path="$new_path"
36515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36516     unix_path=`$CYGPATH -u "$windows_path"`
36517     new_path="$unix_path"
36518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36520     new_path="$unix_path"
36521   fi
36522 
36523     # remove trailing .exe if any
36524     new_path="${new_path/%.exe/}"
36525 
36526     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36527     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36528   fi
36529 
36530     else
36531       # We're on a unix platform. Hooray! :)
36532       # First separate the path from the arguments. This will split at the first
36533       # space.
36534       complete="$AR"
36535       path="${complete%% *}"
36536       tmp="$complete EOL"
36537       arguments="${tmp#* }"
36538 
36539       # Cannot rely on the command "which" here since it doesn't always work.
36540       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36541       if test -z "$is_absolute_path"; then
36542         # Path to executable is not absolute. Find it.
36543         IFS_save="$IFS"
36544         IFS=:
36545         for p in $PATH; do
36546           if test -f "$p/$path" && test -x "$p/$path"; then
36547             new_path="$p/$path"
36548             break
36549           fi
36550         done
36551         IFS="$IFS_save"
36552       else
36553         # This is an absolute path, we can use it without further modifications.
36554         new_path="$path"
36555       fi
36556 
36557       if test "x$new_path" = x; then
36558         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36559 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36560         has_space=`$ECHO "$complete" | $GREP " "`
36561         if test "x$has_space" != x; then
36562           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36563 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36564         fi
36565         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36566       fi
36567     fi
36568 
36569     # Now join together the path and the arguments once again
36570     if test "x$arguments" != xEOL; then
36571       new_complete="$new_path ${arguments% *}"
36572     else
36573       new_complete="$new_path"
36574     fi
36575 
36576     if test "x$complete" != "x$new_complete"; then
36577       AR="$new_complete"
36578       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36579 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36580     fi
36581   fi
36582 
36583 
36584 
36585   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36586 
36587 
36588   # Publish this variable in the help.
36589 
36590 
36591   if [ -z "${LIPO+x}" ]; then
36592     # The variable is not set by user, try to locate tool using the code snippet
36593     for ac_prog in lipo
36594 do
36595   # Extract the first word of "$ac_prog", so it can be a program name with args.
36596 set dummy $ac_prog; ac_word=$2
36597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36598 $as_echo_n "checking for $ac_word... " >&6; }
36599 if ${ac_cv_path_LIPO+:} false; then :
36600   $as_echo_n "(cached) " >&6
36601 else
36602   case $LIPO in
36603   [\\/]* | ?:[\\/]*)
36604   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36605   ;;
36606   *)
36607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36608 for as_dir in $PATH
36609 do
36610   IFS=$as_save_IFS
36611   test -z "$as_dir" && as_dir=.
36612     for ac_exec_ext in '' $ac_executable_extensions; do
36613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36614     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36616     break 2
36617   fi
36618 done
36619   done
36620 IFS=$as_save_IFS
36621 
36622   ;;
36623 esac
36624 fi
36625 LIPO=$ac_cv_path_LIPO
36626 if test -n "$LIPO"; then
36627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36628 $as_echo "$LIPO" >&6; }
36629 else
36630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36631 $as_echo "no" >&6; }
36632 fi
36633 
36634 
36635   test -n "$LIPO" && break
36636 done
36637 
36638   else
36639     # The variable is set, but is it from the command line or the environment?
36640 
36641     # Try to remove the string !LIPO! from our list.
36642     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36643     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36644       # If it failed, the variable was not from the command line. Ignore it,
36645       # but warn the user (except for BASH, which is always set by the calling BASH).
36646       if test "xLIPO" != xBASH; then
36647         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36648 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36649       fi
36650       # Try to locate tool using the code snippet
36651       for ac_prog in lipo
36652 do
36653   # Extract the first word of "$ac_prog", so it can be a program name with args.
36654 set dummy $ac_prog; ac_word=$2
36655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36656 $as_echo_n "checking for $ac_word... " >&6; }
36657 if ${ac_cv_path_LIPO+:} false; then :
36658   $as_echo_n "(cached) " >&6
36659 else
36660   case $LIPO in
36661   [\\/]* | ?:[\\/]*)
36662   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36663   ;;
36664   *)
36665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36666 for as_dir in $PATH
36667 do
36668   IFS=$as_save_IFS
36669   test -z "$as_dir" && as_dir=.
36670     for ac_exec_ext in '' $ac_executable_extensions; do
36671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36672     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36674     break 2
36675   fi
36676 done
36677   done
36678 IFS=$as_save_IFS
36679 
36680   ;;
36681 esac
36682 fi
36683 LIPO=$ac_cv_path_LIPO
36684 if test -n "$LIPO"; then
36685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36686 $as_echo "$LIPO" >&6; }
36687 else
36688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36689 $as_echo "no" >&6; }
36690 fi
36691 
36692 
36693   test -n "$LIPO" && break
36694 done
36695 
36696     else
36697       # If it succeeded, then it was overridden by the user. We will use it
36698       # for the tool.
36699 
36700       # First remove it from the list of overridden variables, so we can test
36701       # for unknown variables in the end.
36702       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36703 
36704       # Check if we try to supply an empty value
36705       if test "x$LIPO" = x; then
36706         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36707 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36709 $as_echo_n "checking for LIPO... " >&6; }
36710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36711 $as_echo "disabled" >&6; }
36712       else
36713         # Check if the provided tool contains a complete path.
36714         tool_specified="$LIPO"
36715         tool_basename="${tool_specified##*/}"
36716         if test "x$tool_basename" = "x$tool_specified"; then
36717           # A command without a complete path is provided, search $PATH.
36718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36719 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36720           # Extract the first word of "$tool_basename", so it can be a program name with args.
36721 set dummy $tool_basename; ac_word=$2
36722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36723 $as_echo_n "checking for $ac_word... " >&6; }
36724 if ${ac_cv_path_LIPO+:} false; then :
36725   $as_echo_n "(cached) " >&6
36726 else
36727   case $LIPO in
36728   [\\/]* | ?:[\\/]*)
36729   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36730   ;;
36731   *)
36732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36733 for as_dir in $PATH
36734 do
36735   IFS=$as_save_IFS
36736   test -z "$as_dir" && as_dir=.
36737     for ac_exec_ext in '' $ac_executable_extensions; do
36738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36739     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36741     break 2
36742   fi
36743 done
36744   done
36745 IFS=$as_save_IFS
36746 
36747   ;;
36748 esac
36749 fi
36750 LIPO=$ac_cv_path_LIPO
36751 if test -n "$LIPO"; then
36752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36753 $as_echo "$LIPO" >&6; }
36754 else
36755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36756 $as_echo "no" >&6; }
36757 fi
36758 
36759 
36760           if test "x$LIPO" = x; then
36761             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36762           fi
36763         else
36764           # Otherwise we believe it is a complete path. Use it as it is.
36765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36766 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36767           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36768 $as_echo_n "checking for LIPO... " >&6; }
36769           if test ! -x "$tool_specified"; then
36770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36771 $as_echo "not found" >&6; }
36772             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36773           fi
36774           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36775 $as_echo "$tool_specified" >&6; }
36776         fi
36777       fi
36778     fi
36779 
36780   fi
36781 
36782 
36783 
36784   # Only process if variable expands to non-empty
36785 
36786   if test "x$LIPO" != x; then
36787     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36788 
36789   # First separate the path from the arguments. This will split at the first
36790   # space.
36791   complete="$LIPO"
36792   path="${complete%% *}"
36793   tmp="$complete EOL"
36794   arguments="${tmp#* }"
36795 
36796   # Input might be given as Windows format, start by converting to
36797   # unix format.
36798   new_path=`$CYGPATH -u "$path"`
36799 
36800   # Now try to locate executable using which
36801   new_path=`$WHICH "$new_path" 2> /dev/null`
36802   # bat and cmd files are not always considered executable in cygwin causing which
36803   # to not find them
36804   if test "x$new_path" = x \
36805       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36806       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36807     new_path=`$CYGPATH -u "$path"`
36808   fi
36809   if test "x$new_path" = x; then
36810     # Oops. Which didn't find the executable.
36811     # The splitting of arguments from the executable at a space might have been incorrect,
36812     # since paths with space are more likely in Windows. Give it another try with the whole
36813     # argument.
36814     path="$complete"
36815     arguments="EOL"
36816     new_path=`$CYGPATH -u "$path"`
36817     new_path=`$WHICH "$new_path" 2> /dev/null`
36818     # bat and cmd files are not always considered executable in cygwin causing which
36819     # to not find them
36820     if test "x$new_path" = x \
36821         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36822         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36823       new_path=`$CYGPATH -u "$path"`
36824     fi
36825     if test "x$new_path" = x; then
36826       # It's still not found. Now this is an unrecoverable error.
36827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36828 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36829       has_space=`$ECHO "$complete" | $GREP " "`
36830       if test "x$has_space" != x; then
36831         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36832 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36833       fi
36834       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36835     fi
36836   fi
36837 
36838   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36839   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36840   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36841   # "foo.exe" is OK but "foo" is an error.
36842   #
36843   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36844   # It is also a way to make sure we got the proper file name for the real test later on.
36845   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36846   if test "x$test_shortpath" = x; then
36847     # Short path failed, file does not exist as specified.
36848     # Try adding .exe or .cmd
36849     if test -f "${new_path}.exe"; then
36850       input_to_shortpath="${new_path}.exe"
36851     elif test -f "${new_path}.cmd"; then
36852       input_to_shortpath="${new_path}.cmd"
36853     else
36854       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36855 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36856       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36857 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36858       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36859     fi
36860   else
36861     input_to_shortpath="$new_path"
36862   fi
36863 
36864   # Call helper function which possibly converts this using DOS-style short mode.
36865   # If so, the updated path is stored in $new_path.
36866   new_path="$input_to_shortpath"
36867 
36868   input_path="$input_to_shortpath"
36869   # Check if we need to convert this using DOS-style short mode. If the path
36870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36871   # take no chances and rewrite it.
36872   # Note: m4 eats our [], so we need to use [ and ] instead.
36873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36874   if test "x$has_forbidden_chars" != x; then
36875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36876     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36877     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36878     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36879       # Going to short mode and back again did indeed matter. Since short mode is
36880       # case insensitive, let's make it lowercase to improve readability.
36881       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36882       # Now convert it back to Unix-style (cygpath)
36883       input_path=`$CYGPATH -u "$shortmode_path"`
36884       new_path="$input_path"
36885     fi
36886   fi
36887 
36888   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36889   if test "x$test_cygdrive_prefix" = x; then
36890     # As a simple fix, exclude /usr/bin since it's not a real path.
36891     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36892       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36893       # a path prefixed by /cygdrive for fixpath to work.
36894       new_path="$CYGWIN_ROOT_PATH$input_path"
36895     fi
36896   fi
36897 
36898   # remove trailing .exe if any
36899   new_path="${new_path/%.exe/}"
36900 
36901     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36902 
36903   # First separate the path from the arguments. This will split at the first
36904   # space.
36905   complete="$LIPO"
36906   path="${complete%% *}"
36907   tmp="$complete EOL"
36908   arguments="${tmp#* }"
36909 
36910   # Input might be given as Windows format, start by converting to
36911   # unix format.
36912   new_path="$path"
36913 
36914   windows_path="$new_path"
36915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36916     unix_path=`$CYGPATH -u "$windows_path"`
36917     new_path="$unix_path"
36918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36920     new_path="$unix_path"
36921   fi
36922 
36923 
36924   # Now try to locate executable using which
36925   new_path=`$WHICH "$new_path" 2> /dev/null`
36926 
36927   if test "x$new_path" = x; then
36928     # Oops. Which didn't find the executable.
36929     # The splitting of arguments from the executable at a space might have been incorrect,
36930     # since paths with space are more likely in Windows. Give it another try with the whole
36931     # argument.
36932     path="$complete"
36933     arguments="EOL"
36934     new_path="$path"
36935 
36936   windows_path="$new_path"
36937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36938     unix_path=`$CYGPATH -u "$windows_path"`
36939     new_path="$unix_path"
36940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36942     new_path="$unix_path"
36943   fi
36944 
36945 
36946     new_path=`$WHICH "$new_path" 2> /dev/null`
36947     # bat and cmd files are not always considered executable in MSYS causing which
36948     # to not find them
36949     if test "x$new_path" = x \
36950         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36951         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36952       new_path="$path"
36953 
36954   windows_path="$new_path"
36955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36956     unix_path=`$CYGPATH -u "$windows_path"`
36957     new_path="$unix_path"
36958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36960     new_path="$unix_path"
36961   fi
36962 
36963     fi
36964 
36965     if test "x$new_path" = x; then
36966       # It's still not found. Now this is an unrecoverable error.
36967       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36968 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36969       has_space=`$ECHO "$complete" | $GREP " "`
36970       if test "x$has_space" != x; then
36971         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36972 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36973       fi
36974       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36975     fi
36976   fi
36977 
36978   # Now new_path has a complete unix path to the binary
36979   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36980     # Keep paths in /bin as-is, but remove trailing .exe if any
36981     new_path="${new_path/%.exe/}"
36982     # Do not save /bin paths to all_fixpath_prefixes!
36983   else
36984     # Not in mixed or Windows style, start by that.
36985     new_path=`cmd //c echo $new_path`
36986 
36987   input_path="$new_path"
36988   # Check if we need to convert this using DOS-style short mode. If the path
36989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36990   # take no chances and rewrite it.
36991   # Note: m4 eats our [], so we need to use [ and ] instead.
36992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36993   if test "x$has_forbidden_chars" != x; then
36994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36995     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36996   fi
36997 
36998     # Output is in $new_path
36999 
37000   windows_path="$new_path"
37001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37002     unix_path=`$CYGPATH -u "$windows_path"`
37003     new_path="$unix_path"
37004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37006     new_path="$unix_path"
37007   fi
37008 
37009     # remove trailing .exe if any
37010     new_path="${new_path/%.exe/}"
37011 
37012     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37013     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37014   fi
37015 
37016     else
37017       # We're on a unix platform. Hooray! :)
37018       # First separate the path from the arguments. This will split at the first
37019       # space.
37020       complete="$LIPO"
37021       path="${complete%% *}"
37022       tmp="$complete EOL"
37023       arguments="${tmp#* }"
37024 
37025       # Cannot rely on the command "which" here since it doesn't always work.
37026       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37027       if test -z "$is_absolute_path"; then
37028         # Path to executable is not absolute. Find it.
37029         IFS_save="$IFS"
37030         IFS=:
37031         for p in $PATH; do
37032           if test -f "$p/$path" && test -x "$p/$path"; then
37033             new_path="$p/$path"
37034             break
37035           fi
37036         done
37037         IFS="$IFS_save"
37038       else
37039         # This is an absolute path, we can use it without further modifications.
37040         new_path="$path"
37041       fi
37042 
37043       if test "x$new_path" = x; then
37044         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37045 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37046         has_space=`$ECHO "$complete" | $GREP " "`
37047         if test "x$has_space" != x; then
37048           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37049 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37050         fi
37051         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37052       fi
37053     fi
37054 
37055     # Now join together the path and the arguments once again
37056     if test "x$arguments" != xEOL; then
37057       new_complete="$new_path ${arguments% *}"
37058     else
37059       new_complete="$new_path"
37060     fi
37061 
37062     if test "x$complete" != "x$new_complete"; then
37063       LIPO="$new_complete"
37064       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37065 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37066     fi
37067   fi
37068 
37069   fi
37070 
37071   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37072     # Extract the first word of "mt", so it can be a program name with args.
37073 set dummy mt; ac_word=$2
37074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37075 $as_echo_n "checking for $ac_word... " >&6; }
37076 if ${ac_cv_prog_MT+:} false; then :
37077   $as_echo_n "(cached) " >&6
37078 else
37079   if test -n "$MT"; then
37080   ac_cv_prog_MT="$MT" # Let the user override the test.
37081 else
37082   ac_prog_rejected=no
37083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37084 for as_dir in $PATH
37085 do
37086   IFS=$as_save_IFS
37087   test -z "$as_dir" && as_dir=.
37088     for ac_exec_ext in '' $ac_executable_extensions; do
37089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37090     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37091        ac_prog_rejected=yes
37092        continue
37093      fi
37094     ac_cv_prog_MT="mt"
37095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37096     break 2
37097   fi
37098 done
37099   done
37100 IFS=$as_save_IFS
37101 
37102 if test $ac_prog_rejected = yes; then
37103   # We found a bogon in the path, so make sure we never use it.
37104   set dummy $ac_cv_prog_MT
37105   shift
37106   if test $# != 0; then
37107     # We chose a different compiler from the bogus one.
37108     # However, it has the same basename, so the bogon will be chosen
37109     # first if we set MT to just the basename; use the full file name.
37110     shift
37111     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37112   fi
37113 fi
37114 fi
37115 fi
37116 MT=$ac_cv_prog_MT
37117 if test -n "$MT"; then
37118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37119 $as_echo "$MT" >&6; }
37120 else
37121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37122 $as_echo "no" >&6; }
37123 fi
37124 
37125 
37126 
37127   # Only process if variable expands to non-empty
37128 
37129   if test "x$MT" != x; then
37130     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37131 
37132   # First separate the path from the arguments. This will split at the first
37133   # space.
37134   complete="$MT"
37135   path="${complete%% *}"
37136   tmp="$complete EOL"
37137   arguments="${tmp#* }"
37138 
37139   # Input might be given as Windows format, start by converting to
37140   # unix format.
37141   new_path=`$CYGPATH -u "$path"`
37142 
37143   # Now try to locate executable using which
37144   new_path=`$WHICH "$new_path" 2> /dev/null`
37145   # bat and cmd files are not always considered executable in cygwin causing which
37146   # to not find them
37147   if test "x$new_path" = x \
37148       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37149       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37150     new_path=`$CYGPATH -u "$path"`
37151   fi
37152   if test "x$new_path" = x; then
37153     # Oops. Which didn't find the executable.
37154     # The splitting of arguments from the executable at a space might have been incorrect,
37155     # since paths with space are more likely in Windows. Give it another try with the whole
37156     # argument.
37157     path="$complete"
37158     arguments="EOL"
37159     new_path=`$CYGPATH -u "$path"`
37160     new_path=`$WHICH "$new_path" 2> /dev/null`
37161     # bat and cmd files are not always considered executable in cygwin causing which
37162     # to not find them
37163     if test "x$new_path" = x \
37164         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37165         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37166       new_path=`$CYGPATH -u "$path"`
37167     fi
37168     if test "x$new_path" = x; then
37169       # It's still not found. Now this is an unrecoverable error.
37170       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37171 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37172       has_space=`$ECHO "$complete" | $GREP " "`
37173       if test "x$has_space" != x; then
37174         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37175 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37176       fi
37177       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37178     fi
37179   fi
37180 
37181   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37182   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37183   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37184   # "foo.exe" is OK but "foo" is an error.
37185   #
37186   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37187   # It is also a way to make sure we got the proper file name for the real test later on.
37188   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37189   if test "x$test_shortpath" = x; then
37190     # Short path failed, file does not exist as specified.
37191     # Try adding .exe or .cmd
37192     if test -f "${new_path}.exe"; then
37193       input_to_shortpath="${new_path}.exe"
37194     elif test -f "${new_path}.cmd"; then
37195       input_to_shortpath="${new_path}.cmd"
37196     else
37197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37198 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37199       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37200 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37201       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37202     fi
37203   else
37204     input_to_shortpath="$new_path"
37205   fi
37206 
37207   # Call helper function which possibly converts this using DOS-style short mode.
37208   # If so, the updated path is stored in $new_path.
37209   new_path="$input_to_shortpath"
37210 
37211   input_path="$input_to_shortpath"
37212   # Check if we need to convert this using DOS-style short mode. If the path
37213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37214   # take no chances and rewrite it.
37215   # Note: m4 eats our [], so we need to use [ and ] instead.
37216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37217   if test "x$has_forbidden_chars" != x; then
37218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37219     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37220     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37221     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37222       # Going to short mode and back again did indeed matter. Since short mode is
37223       # case insensitive, let's make it lowercase to improve readability.
37224       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37225       # Now convert it back to Unix-style (cygpath)
37226       input_path=`$CYGPATH -u "$shortmode_path"`
37227       new_path="$input_path"
37228     fi
37229   fi
37230 
37231   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37232   if test "x$test_cygdrive_prefix" = x; then
37233     # As a simple fix, exclude /usr/bin since it's not a real path.
37234     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37235       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37236       # a path prefixed by /cygdrive for fixpath to work.
37237       new_path="$CYGWIN_ROOT_PATH$input_path"
37238     fi
37239   fi
37240 
37241   # remove trailing .exe if any
37242   new_path="${new_path/%.exe/}"
37243 
37244     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37245 
37246   # First separate the path from the arguments. This will split at the first
37247   # space.
37248   complete="$MT"
37249   path="${complete%% *}"
37250   tmp="$complete EOL"
37251   arguments="${tmp#* }"
37252 
37253   # Input might be given as Windows format, start by converting to
37254   # unix format.
37255   new_path="$path"
37256 
37257   windows_path="$new_path"
37258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37259     unix_path=`$CYGPATH -u "$windows_path"`
37260     new_path="$unix_path"
37261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37263     new_path="$unix_path"
37264   fi
37265 
37266 
37267   # Now try to locate executable using which
37268   new_path=`$WHICH "$new_path" 2> /dev/null`
37269 
37270   if test "x$new_path" = x; then
37271     # Oops. Which didn't find the executable.
37272     # The splitting of arguments from the executable at a space might have been incorrect,
37273     # since paths with space are more likely in Windows. Give it another try with the whole
37274     # argument.
37275     path="$complete"
37276     arguments="EOL"
37277     new_path="$path"
37278 
37279   windows_path="$new_path"
37280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37281     unix_path=`$CYGPATH -u "$windows_path"`
37282     new_path="$unix_path"
37283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37284     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37285     new_path="$unix_path"
37286   fi
37287 
37288 
37289     new_path=`$WHICH "$new_path" 2> /dev/null`
37290     # bat and cmd files are not always considered executable in MSYS causing which
37291     # to not find them
37292     if test "x$new_path" = x \
37293         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37294         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37295       new_path="$path"
37296 
37297   windows_path="$new_path"
37298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37299     unix_path=`$CYGPATH -u "$windows_path"`
37300     new_path="$unix_path"
37301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37303     new_path="$unix_path"
37304   fi
37305 
37306     fi
37307 
37308     if test "x$new_path" = x; then
37309       # It's still not found. Now this is an unrecoverable error.
37310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37311 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37312       has_space=`$ECHO "$complete" | $GREP " "`
37313       if test "x$has_space" != x; then
37314         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37315 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37316       fi
37317       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37318     fi
37319   fi
37320 
37321   # Now new_path has a complete unix path to the binary
37322   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37323     # Keep paths in /bin as-is, but remove trailing .exe if any
37324     new_path="${new_path/%.exe/}"
37325     # Do not save /bin paths to all_fixpath_prefixes!
37326   else
37327     # Not in mixed or Windows style, start by that.
37328     new_path=`cmd //c echo $new_path`
37329 
37330   input_path="$new_path"
37331   # Check if we need to convert this using DOS-style short mode. If the path
37332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37333   # take no chances and rewrite it.
37334   # Note: m4 eats our [], so we need to use [ and ] instead.
37335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37336   if test "x$has_forbidden_chars" != x; then
37337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37338     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37339   fi
37340 
37341     # Output is in $new_path
37342 
37343   windows_path="$new_path"
37344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37345     unix_path=`$CYGPATH -u "$windows_path"`
37346     new_path="$unix_path"
37347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37349     new_path="$unix_path"
37350   fi
37351 
37352     # remove trailing .exe if any
37353     new_path="${new_path/%.exe/}"
37354 
37355     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37356     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37357   fi
37358 
37359     else
37360       # We're on a unix platform. Hooray! :)
37361       # First separate the path from the arguments. This will split at the first
37362       # space.
37363       complete="$MT"
37364       path="${complete%% *}"
37365       tmp="$complete EOL"
37366       arguments="${tmp#* }"
37367 
37368       # Cannot rely on the command "which" here since it doesn't always work.
37369       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37370       if test -z "$is_absolute_path"; then
37371         # Path to executable is not absolute. Find it.
37372         IFS_save="$IFS"
37373         IFS=:
37374         for p in $PATH; do
37375           if test -f "$p/$path" && test -x "$p/$path"; then
37376             new_path="$p/$path"
37377             break
37378           fi
37379         done
37380         IFS="$IFS_save"
37381       else
37382         # This is an absolute path, we can use it without further modifications.
37383         new_path="$path"
37384       fi
37385 
37386       if test "x$new_path" = x; then
37387         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37388 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37389         has_space=`$ECHO "$complete" | $GREP " "`
37390         if test "x$has_space" != x; then
37391           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37392 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37393         fi
37394         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37395       fi
37396     fi
37397 
37398     # Now join together the path and the arguments once again
37399     if test "x$arguments" != xEOL; then
37400       new_complete="$new_path ${arguments% *}"
37401     else
37402       new_complete="$new_path"
37403     fi
37404 
37405     if test "x$complete" != "x$new_complete"; then
37406       MT="$new_complete"
37407       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37408 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37409     fi
37410   fi
37411 
37412     # Setup the resource compiler (RC)
37413     # Extract the first word of "rc", so it can be a program name with args.
37414 set dummy rc; ac_word=$2
37415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37416 $as_echo_n "checking for $ac_word... " >&6; }
37417 if ${ac_cv_prog_RC+:} false; then :
37418   $as_echo_n "(cached) " >&6
37419 else
37420   if test -n "$RC"; then
37421   ac_cv_prog_RC="$RC" # Let the user override the test.
37422 else
37423   ac_prog_rejected=no
37424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37425 for as_dir in $PATH
37426 do
37427   IFS=$as_save_IFS
37428   test -z "$as_dir" && as_dir=.
37429     for ac_exec_ext in '' $ac_executable_extensions; do
37430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37431     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37432        ac_prog_rejected=yes
37433        continue
37434      fi
37435     ac_cv_prog_RC="rc"
37436     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37437     break 2
37438   fi
37439 done
37440   done
37441 IFS=$as_save_IFS
37442 
37443 if test $ac_prog_rejected = yes; then
37444   # We found a bogon in the path, so make sure we never use it.
37445   set dummy $ac_cv_prog_RC
37446   shift
37447   if test $# != 0; then
37448     # We chose a different compiler from the bogus one.
37449     # However, it has the same basename, so the bogon will be chosen
37450     # first if we set RC to just the basename; use the full file name.
37451     shift
37452     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37453   fi
37454 fi
37455 fi
37456 fi
37457 RC=$ac_cv_prog_RC
37458 if test -n "$RC"; then
37459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37460 $as_echo "$RC" >&6; }
37461 else
37462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37463 $as_echo "no" >&6; }
37464 fi
37465 
37466 
37467 
37468   # Only process if variable expands to non-empty
37469 
37470   if test "x$RC" != x; then
37471     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37472 
37473   # First separate the path from the arguments. This will split at the first
37474   # space.
37475   complete="$RC"
37476   path="${complete%% *}"
37477   tmp="$complete EOL"
37478   arguments="${tmp#* }"
37479 
37480   # Input might be given as Windows format, start by converting to
37481   # unix format.
37482   new_path=`$CYGPATH -u "$path"`
37483 
37484   # Now try to locate executable using which
37485   new_path=`$WHICH "$new_path" 2> /dev/null`
37486   # bat and cmd files are not always considered executable in cygwin causing which
37487   # to not find them
37488   if test "x$new_path" = x \
37489       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37490       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37491     new_path=`$CYGPATH -u "$path"`
37492   fi
37493   if test "x$new_path" = x; then
37494     # Oops. Which didn't find the executable.
37495     # The splitting of arguments from the executable at a space might have been incorrect,
37496     # since paths with space are more likely in Windows. Give it another try with the whole
37497     # argument.
37498     path="$complete"
37499     arguments="EOL"
37500     new_path=`$CYGPATH -u "$path"`
37501     new_path=`$WHICH "$new_path" 2> /dev/null`
37502     # bat and cmd files are not always considered executable in cygwin causing which
37503     # to not find them
37504     if test "x$new_path" = x \
37505         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37506         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37507       new_path=`$CYGPATH -u "$path"`
37508     fi
37509     if test "x$new_path" = x; then
37510       # It's still not found. Now this is an unrecoverable error.
37511       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37512 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37513       has_space=`$ECHO "$complete" | $GREP " "`
37514       if test "x$has_space" != x; then
37515         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37516 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37517       fi
37518       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37519     fi
37520   fi
37521 
37522   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37523   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37524   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37525   # "foo.exe" is OK but "foo" is an error.
37526   #
37527   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37528   # It is also a way to make sure we got the proper file name for the real test later on.
37529   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37530   if test "x$test_shortpath" = x; then
37531     # Short path failed, file does not exist as specified.
37532     # Try adding .exe or .cmd
37533     if test -f "${new_path}.exe"; then
37534       input_to_shortpath="${new_path}.exe"
37535     elif test -f "${new_path}.cmd"; then
37536       input_to_shortpath="${new_path}.cmd"
37537     else
37538       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37539 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37540       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37541 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37542       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37543     fi
37544   else
37545     input_to_shortpath="$new_path"
37546   fi
37547 
37548   # Call helper function which possibly converts this using DOS-style short mode.
37549   # If so, the updated path is stored in $new_path.
37550   new_path="$input_to_shortpath"
37551 
37552   input_path="$input_to_shortpath"
37553   # Check if we need to convert this using DOS-style short mode. If the path
37554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37555   # take no chances and rewrite it.
37556   # Note: m4 eats our [], so we need to use [ and ] instead.
37557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37558   if test "x$has_forbidden_chars" != x; then
37559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37560     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37561     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37562     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37563       # Going to short mode and back again did indeed matter. Since short mode is
37564       # case insensitive, let's make it lowercase to improve readability.
37565       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37566       # Now convert it back to Unix-style (cygpath)
37567       input_path=`$CYGPATH -u "$shortmode_path"`
37568       new_path="$input_path"
37569     fi
37570   fi
37571 
37572   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37573   if test "x$test_cygdrive_prefix" = x; then
37574     # As a simple fix, exclude /usr/bin since it's not a real path.
37575     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37576       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37577       # a path prefixed by /cygdrive for fixpath to work.
37578       new_path="$CYGWIN_ROOT_PATH$input_path"
37579     fi
37580   fi
37581 
37582   # remove trailing .exe if any
37583   new_path="${new_path/%.exe/}"
37584 
37585     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37586 
37587   # First separate the path from the arguments. This will split at the first
37588   # space.
37589   complete="$RC"
37590   path="${complete%% *}"
37591   tmp="$complete EOL"
37592   arguments="${tmp#* }"
37593 
37594   # Input might be given as Windows format, start by converting to
37595   # unix format.
37596   new_path="$path"
37597 
37598   windows_path="$new_path"
37599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37600     unix_path=`$CYGPATH -u "$windows_path"`
37601     new_path="$unix_path"
37602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37604     new_path="$unix_path"
37605   fi
37606 
37607 
37608   # Now try to locate executable using which
37609   new_path=`$WHICH "$new_path" 2> /dev/null`
37610 
37611   if test "x$new_path" = x; then
37612     # Oops. Which didn't find the executable.
37613     # The splitting of arguments from the executable at a space might have been incorrect,
37614     # since paths with space are more likely in Windows. Give it another try with the whole
37615     # argument.
37616     path="$complete"
37617     arguments="EOL"
37618     new_path="$path"
37619 
37620   windows_path="$new_path"
37621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37622     unix_path=`$CYGPATH -u "$windows_path"`
37623     new_path="$unix_path"
37624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37626     new_path="$unix_path"
37627   fi
37628 
37629 
37630     new_path=`$WHICH "$new_path" 2> /dev/null`
37631     # bat and cmd files are not always considered executable in MSYS causing which
37632     # to not find them
37633     if test "x$new_path" = x \
37634         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37635         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37636       new_path="$path"
37637 
37638   windows_path="$new_path"
37639   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37640     unix_path=`$CYGPATH -u "$windows_path"`
37641     new_path="$unix_path"
37642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37643     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37644     new_path="$unix_path"
37645   fi
37646 
37647     fi
37648 
37649     if test "x$new_path" = x; then
37650       # It's still not found. Now this is an unrecoverable error.
37651       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37652 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37653       has_space=`$ECHO "$complete" | $GREP " "`
37654       if test "x$has_space" != x; then
37655         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37656 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37657       fi
37658       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37659     fi
37660   fi
37661 
37662   # Now new_path has a complete unix path to the binary
37663   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37664     # Keep paths in /bin as-is, but remove trailing .exe if any
37665     new_path="${new_path/%.exe/}"
37666     # Do not save /bin paths to all_fixpath_prefixes!
37667   else
37668     # Not in mixed or Windows style, start by that.
37669     new_path=`cmd //c echo $new_path`
37670 
37671   input_path="$new_path"
37672   # Check if we need to convert this using DOS-style short mode. If the path
37673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37674   # take no chances and rewrite it.
37675   # Note: m4 eats our [], so we need to use [ and ] instead.
37676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37677   if test "x$has_forbidden_chars" != x; then
37678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37680   fi
37681 
37682     # Output is in $new_path
37683 
37684   windows_path="$new_path"
37685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37686     unix_path=`$CYGPATH -u "$windows_path"`
37687     new_path="$unix_path"
37688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37689     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37690     new_path="$unix_path"
37691   fi
37692 
37693     # remove trailing .exe if any
37694     new_path="${new_path/%.exe/}"
37695 
37696     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37697     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37698   fi
37699 
37700     else
37701       # We're on a unix platform. Hooray! :)
37702       # First separate the path from the arguments. This will split at the first
37703       # space.
37704       complete="$RC"
37705       path="${complete%% *}"
37706       tmp="$complete EOL"
37707       arguments="${tmp#* }"
37708 
37709       # Cannot rely on the command "which" here since it doesn't always work.
37710       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37711       if test -z "$is_absolute_path"; then
37712         # Path to executable is not absolute. Find it.
37713         IFS_save="$IFS"
37714         IFS=:
37715         for p in $PATH; do
37716           if test -f "$p/$path" && test -x "$p/$path"; then
37717             new_path="$p/$path"
37718             break
37719           fi
37720         done
37721         IFS="$IFS_save"
37722       else
37723         # This is an absolute path, we can use it without further modifications.
37724         new_path="$path"
37725       fi
37726 
37727       if test "x$new_path" = x; then
37728         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37729 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37730         has_space=`$ECHO "$complete" | $GREP " "`
37731         if test "x$has_space" != x; then
37732           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37733 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37734         fi
37735         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37736       fi
37737     fi
37738 
37739     # Now join together the path and the arguments once again
37740     if test "x$arguments" != xEOL; then
37741       new_complete="$new_path ${arguments% *}"
37742     else
37743       new_complete="$new_path"
37744     fi
37745 
37746     if test "x$complete" != "x$new_complete"; then
37747       RC="$new_complete"
37748       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37749 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37750     fi
37751   fi
37752 
37753     # Extract the first word of "dumpbin", so it can be a program name with args.
37754 set dummy dumpbin; ac_word=$2
37755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37756 $as_echo_n "checking for $ac_word... " >&6; }
37757 if ${ac_cv_prog_DUMPBIN+:} false; then :
37758   $as_echo_n "(cached) " >&6
37759 else
37760   if test -n "$DUMPBIN"; then
37761   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37762 else
37763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37764 for as_dir in $PATH
37765 do
37766   IFS=$as_save_IFS
37767   test -z "$as_dir" && as_dir=.
37768     for ac_exec_ext in '' $ac_executable_extensions; do
37769   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37770     ac_cv_prog_DUMPBIN="dumpbin"
37771     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37772     break 2
37773   fi
37774 done
37775   done
37776 IFS=$as_save_IFS
37777 
37778 fi
37779 fi
37780 DUMPBIN=$ac_cv_prog_DUMPBIN
37781 if test -n "$DUMPBIN"; then
37782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37783 $as_echo "$DUMPBIN" >&6; }
37784 else
37785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37786 $as_echo "no" >&6; }
37787 fi
37788 
37789 
37790 
37791   # Only process if variable expands to non-empty
37792 
37793   if test "x$DUMPBIN" != x; then
37794     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37795 
37796   # First separate the path from the arguments. This will split at the first
37797   # space.
37798   complete="$DUMPBIN"
37799   path="${complete%% *}"
37800   tmp="$complete EOL"
37801   arguments="${tmp#* }"
37802 
37803   # Input might be given as Windows format, start by converting to
37804   # unix format.
37805   new_path=`$CYGPATH -u "$path"`
37806 
37807   # Now try to locate executable using which
37808   new_path=`$WHICH "$new_path" 2> /dev/null`
37809   # bat and cmd files are not always considered executable in cygwin causing which
37810   # to not find them
37811   if test "x$new_path" = x \
37812       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37813       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37814     new_path=`$CYGPATH -u "$path"`
37815   fi
37816   if test "x$new_path" = x; then
37817     # Oops. Which didn't find the executable.
37818     # The splitting of arguments from the executable at a space might have been incorrect,
37819     # since paths with space are more likely in Windows. Give it another try with the whole
37820     # argument.
37821     path="$complete"
37822     arguments="EOL"
37823     new_path=`$CYGPATH -u "$path"`
37824     new_path=`$WHICH "$new_path" 2> /dev/null`
37825     # bat and cmd files are not always considered executable in cygwin causing which
37826     # to not find them
37827     if test "x$new_path" = x \
37828         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37829         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37830       new_path=`$CYGPATH -u "$path"`
37831     fi
37832     if test "x$new_path" = x; then
37833       # It's still not found. Now this is an unrecoverable error.
37834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37835 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37836       has_space=`$ECHO "$complete" | $GREP " "`
37837       if test "x$has_space" != x; then
37838         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37840       fi
37841       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37842     fi
37843   fi
37844 
37845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37848   # "foo.exe" is OK but "foo" is an error.
37849   #
37850   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37851   # It is also a way to make sure we got the proper file name for the real test later on.
37852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37853   if test "x$test_shortpath" = x; then
37854     # Short path failed, file does not exist as specified.
37855     # Try adding .exe or .cmd
37856     if test -f "${new_path}.exe"; then
37857       input_to_shortpath="${new_path}.exe"
37858     elif test -f "${new_path}.cmd"; then
37859       input_to_shortpath="${new_path}.cmd"
37860     else
37861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37862 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37863       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37864 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37865       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37866     fi
37867   else
37868     input_to_shortpath="$new_path"
37869   fi
37870 
37871   # Call helper function which possibly converts this using DOS-style short mode.
37872   # If so, the updated path is stored in $new_path.
37873   new_path="$input_to_shortpath"
37874 
37875   input_path="$input_to_shortpath"
37876   # Check if we need to convert this using DOS-style short mode. If the path
37877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37878   # take no chances and rewrite it.
37879   # Note: m4 eats our [], so we need to use [ and ] instead.
37880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37881   if test "x$has_forbidden_chars" != x; then
37882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37883     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37884     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37885     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37886       # Going to short mode and back again did indeed matter. Since short mode is
37887       # case insensitive, let's make it lowercase to improve readability.
37888       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37889       # Now convert it back to Unix-style (cygpath)
37890       input_path=`$CYGPATH -u "$shortmode_path"`
37891       new_path="$input_path"
37892     fi
37893   fi
37894 
37895   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37896   if test "x$test_cygdrive_prefix" = x; then
37897     # As a simple fix, exclude /usr/bin since it's not a real path.
37898     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37899       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37900       # a path prefixed by /cygdrive for fixpath to work.
37901       new_path="$CYGWIN_ROOT_PATH$input_path"
37902     fi
37903   fi
37904 
37905   # remove trailing .exe if any
37906   new_path="${new_path/%.exe/}"
37907 
37908     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37909 
37910   # First separate the path from the arguments. This will split at the first
37911   # space.
37912   complete="$DUMPBIN"
37913   path="${complete%% *}"
37914   tmp="$complete EOL"
37915   arguments="${tmp#* }"
37916 
37917   # Input might be given as Windows format, start by converting to
37918   # unix format.
37919   new_path="$path"
37920 
37921   windows_path="$new_path"
37922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37923     unix_path=`$CYGPATH -u "$windows_path"`
37924     new_path="$unix_path"
37925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37926     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37927     new_path="$unix_path"
37928   fi
37929 
37930 
37931   # Now try to locate executable using which
37932   new_path=`$WHICH "$new_path" 2> /dev/null`
37933 
37934   if test "x$new_path" = x; then
37935     # Oops. Which didn't find the executable.
37936     # The splitting of arguments from the executable at a space might have been incorrect,
37937     # since paths with space are more likely in Windows. Give it another try with the whole
37938     # argument.
37939     path="$complete"
37940     arguments="EOL"
37941     new_path="$path"
37942 
37943   windows_path="$new_path"
37944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37945     unix_path=`$CYGPATH -u "$windows_path"`
37946     new_path="$unix_path"
37947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37949     new_path="$unix_path"
37950   fi
37951 
37952 
37953     new_path=`$WHICH "$new_path" 2> /dev/null`
37954     # bat and cmd files are not always considered executable in MSYS causing which
37955     # to not find them
37956     if test "x$new_path" = x \
37957         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37958         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37959       new_path="$path"
37960 
37961   windows_path="$new_path"
37962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37963     unix_path=`$CYGPATH -u "$windows_path"`
37964     new_path="$unix_path"
37965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37967     new_path="$unix_path"
37968   fi
37969 
37970     fi
37971 
37972     if test "x$new_path" = x; then
37973       # It's still not found. Now this is an unrecoverable error.
37974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37975 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37976       has_space=`$ECHO "$complete" | $GREP " "`
37977       if test "x$has_space" != x; then
37978         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37979 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37980       fi
37981       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37982     fi
37983   fi
37984 
37985   # Now new_path has a complete unix path to the binary
37986   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37987     # Keep paths in /bin as-is, but remove trailing .exe if any
37988     new_path="${new_path/%.exe/}"
37989     # Do not save /bin paths to all_fixpath_prefixes!
37990   else
37991     # Not in mixed or Windows style, start by that.
37992     new_path=`cmd //c echo $new_path`
37993 
37994   input_path="$new_path"
37995   # Check if we need to convert this using DOS-style short mode. If the path
37996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37997   # take no chances and rewrite it.
37998   # Note: m4 eats our [], so we need to use [ and ] instead.
37999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38000   if test "x$has_forbidden_chars" != x; then
38001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38003   fi
38004 
38005     # Output is in $new_path
38006 
38007   windows_path="$new_path"
38008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38009     unix_path=`$CYGPATH -u "$windows_path"`
38010     new_path="$unix_path"
38011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38013     new_path="$unix_path"
38014   fi
38015 
38016     # remove trailing .exe if any
38017     new_path="${new_path/%.exe/}"
38018 
38019     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38020     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38021   fi
38022 
38023     else
38024       # We're on a unix platform. Hooray! :)
38025       # First separate the path from the arguments. This will split at the first
38026       # space.
38027       complete="$DUMPBIN"
38028       path="${complete%% *}"
38029       tmp="$complete EOL"
38030       arguments="${tmp#* }"
38031 
38032       # Cannot rely on the command "which" here since it doesn't always work.
38033       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38034       if test -z "$is_absolute_path"; then
38035         # Path to executable is not absolute. Find it.
38036         IFS_save="$IFS"
38037         IFS=:
38038         for p in $PATH; do
38039           if test -f "$p/$path" && test -x "$p/$path"; then
38040             new_path="$p/$path"
38041             break
38042           fi
38043         done
38044         IFS="$IFS_save"
38045       else
38046         # This is an absolute path, we can use it without further modifications.
38047         new_path="$path"
38048       fi
38049 
38050       if test "x$new_path" = x; then
38051         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38052 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38053         has_space=`$ECHO "$complete" | $GREP " "`
38054         if test "x$has_space" != x; then
38055           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38056 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38057         fi
38058         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38059       fi
38060     fi
38061 
38062     # Now join together the path and the arguments once again
38063     if test "x$arguments" != xEOL; then
38064       new_complete="$new_path ${arguments% *}"
38065     else
38066       new_complete="$new_path"
38067     fi
38068 
38069     if test "x$complete" != "x$new_complete"; then
38070       DUMPBIN="$new_complete"
38071       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38072 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38073     fi
38074   fi
38075 
38076     # We need to check for 'msbuild.exe' because at the place where we expect to
38077     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38078     # won't find the 'msbuild.exe' executable in that case (and the
38079     # 'ac_executable_extensions' is unusable due to performance reasons).
38080     # Notice that we intentionally don't fix up the path to MSBUILD because we
38081     # will call it in a DOS shell during freetype detection on Windows (see
38082     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38083     # Extract the first word of "msbuild.exe", so it can be a program name with args.
38084 set dummy msbuild.exe; ac_word=$2
38085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38086 $as_echo_n "checking for $ac_word... " >&6; }
38087 if ${ac_cv_prog_MSBUILD+:} false; then :
38088   $as_echo_n "(cached) " >&6
38089 else
38090   if test -n "$MSBUILD"; then
38091   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38092 else
38093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38094 for as_dir in $PATH
38095 do
38096   IFS=$as_save_IFS
38097   test -z "$as_dir" && as_dir=.
38098     for ac_exec_ext in '' $ac_executable_extensions; do
38099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38100     ac_cv_prog_MSBUILD="msbuild.exe"
38101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38102     break 2
38103   fi
38104 done
38105   done
38106 IFS=$as_save_IFS
38107 
38108 fi
38109 fi
38110 MSBUILD=$ac_cv_prog_MSBUILD
38111 if test -n "$MSBUILD"; then
38112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38113 $as_echo "$MSBUILD" >&6; }
38114 else
38115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38116 $as_echo "no" >&6; }
38117 fi
38118 
38119 
38120   fi
38121 
38122   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38123 
38124 
38125   # Publish this variable in the help.
38126 
38127 
38128   if [ -z "${STRIP+x}" ]; then
38129     # The variable is not set by user, try to locate tool using the code snippet
38130     for ac_prog in strip
38131 do
38132   # Extract the first word of "$ac_prog", so it can be a program name with args.
38133 set dummy $ac_prog; ac_word=$2
38134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38135 $as_echo_n "checking for $ac_word... " >&6; }
38136 if ${ac_cv_path_STRIP+:} false; then :
38137   $as_echo_n "(cached) " >&6
38138 else
38139   case $STRIP in
38140   [\\/]* | ?:[\\/]*)
38141   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38142   ;;
38143   *)
38144   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38145 for as_dir in $PATH
38146 do
38147   IFS=$as_save_IFS
38148   test -z "$as_dir" && as_dir=.
38149     for ac_exec_ext in '' $ac_executable_extensions; do
38150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38151     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38153     break 2
38154   fi
38155 done
38156   done
38157 IFS=$as_save_IFS
38158 
38159   ;;
38160 esac
38161 fi
38162 STRIP=$ac_cv_path_STRIP
38163 if test -n "$STRIP"; then
38164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38165 $as_echo "$STRIP" >&6; }
38166 else
38167   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38168 $as_echo "no" >&6; }
38169 fi
38170 
38171 
38172   test -n "$STRIP" && break
38173 done
38174 
38175   else
38176     # The variable is set, but is it from the command line or the environment?
38177 
38178     # Try to remove the string !STRIP! from our list.
38179     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38180     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38181       # If it failed, the variable was not from the command line. Ignore it,
38182       # but warn the user (except for BASH, which is always set by the calling BASH).
38183       if test "xSTRIP" != xBASH; then
38184         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38185 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38186       fi
38187       # Try to locate tool using the code snippet
38188       for ac_prog in strip
38189 do
38190   # Extract the first word of "$ac_prog", so it can be a program name with args.
38191 set dummy $ac_prog; ac_word=$2
38192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38193 $as_echo_n "checking for $ac_word... " >&6; }
38194 if ${ac_cv_path_STRIP+:} false; then :
38195   $as_echo_n "(cached) " >&6
38196 else
38197   case $STRIP in
38198   [\\/]* | ?:[\\/]*)
38199   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38200   ;;
38201   *)
38202   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38203 for as_dir in $PATH
38204 do
38205   IFS=$as_save_IFS
38206   test -z "$as_dir" && as_dir=.
38207     for ac_exec_ext in '' $ac_executable_extensions; do
38208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38209     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38211     break 2
38212   fi
38213 done
38214   done
38215 IFS=$as_save_IFS
38216 
38217   ;;
38218 esac
38219 fi
38220 STRIP=$ac_cv_path_STRIP
38221 if test -n "$STRIP"; then
38222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38223 $as_echo "$STRIP" >&6; }
38224 else
38225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38226 $as_echo "no" >&6; }
38227 fi
38228 
38229 
38230   test -n "$STRIP" && break
38231 done
38232 
38233     else
38234       # If it succeeded, then it was overridden by the user. We will use it
38235       # for the tool.
38236 
38237       # First remove it from the list of overridden variables, so we can test
38238       # for unknown variables in the end.
38239       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38240 
38241       # Check if we try to supply an empty value
38242       if test "x$STRIP" = x; then
38243         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38244 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38245         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38246 $as_echo_n "checking for STRIP... " >&6; }
38247         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38248 $as_echo "disabled" >&6; }
38249       else
38250         # Check if the provided tool contains a complete path.
38251         tool_specified="$STRIP"
38252         tool_basename="${tool_specified##*/}"
38253         if test "x$tool_basename" = "x$tool_specified"; then
38254           # A command without a complete path is provided, search $PATH.
38255           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38256 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38257           # Extract the first word of "$tool_basename", so it can be a program name with args.
38258 set dummy $tool_basename; ac_word=$2
38259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38260 $as_echo_n "checking for $ac_word... " >&6; }
38261 if ${ac_cv_path_STRIP+:} false; then :
38262   $as_echo_n "(cached) " >&6
38263 else
38264   case $STRIP in
38265   [\\/]* | ?:[\\/]*)
38266   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38267   ;;
38268   *)
38269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38270 for as_dir in $PATH
38271 do
38272   IFS=$as_save_IFS
38273   test -z "$as_dir" && as_dir=.
38274     for ac_exec_ext in '' $ac_executable_extensions; do
38275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38276     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38278     break 2
38279   fi
38280 done
38281   done
38282 IFS=$as_save_IFS
38283 
38284   ;;
38285 esac
38286 fi
38287 STRIP=$ac_cv_path_STRIP
38288 if test -n "$STRIP"; then
38289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38290 $as_echo "$STRIP" >&6; }
38291 else
38292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38293 $as_echo "no" >&6; }
38294 fi
38295 
38296 
38297           if test "x$STRIP" = x; then
38298             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38299           fi
38300         else
38301           # Otherwise we believe it is a complete path. Use it as it is.
38302           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38303 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38304           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38305 $as_echo_n "checking for STRIP... " >&6; }
38306           if test ! -x "$tool_specified"; then
38307             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38308 $as_echo "not found" >&6; }
38309             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38310           fi
38311           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38312 $as_echo "$tool_specified" >&6; }
38313         fi
38314       fi
38315     fi
38316 
38317   fi
38318 
38319 
38320 
38321   # Only process if variable expands to non-empty
38322 
38323   if test "x$STRIP" != x; then
38324     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38325 
38326   # First separate the path from the arguments. This will split at the first
38327   # space.
38328   complete="$STRIP"
38329   path="${complete%% *}"
38330   tmp="$complete EOL"
38331   arguments="${tmp#* }"
38332 
38333   # Input might be given as Windows format, start by converting to
38334   # unix format.
38335   new_path=`$CYGPATH -u "$path"`
38336 
38337   # Now try to locate executable using which
38338   new_path=`$WHICH "$new_path" 2> /dev/null`
38339   # bat and cmd files are not always considered executable in cygwin causing which
38340   # to not find them
38341   if test "x$new_path" = x \
38342       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38343       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38344     new_path=`$CYGPATH -u "$path"`
38345   fi
38346   if test "x$new_path" = x; then
38347     # Oops. Which didn't find the executable.
38348     # The splitting of arguments from the executable at a space might have been incorrect,
38349     # since paths with space are more likely in Windows. Give it another try with the whole
38350     # argument.
38351     path="$complete"
38352     arguments="EOL"
38353     new_path=`$CYGPATH -u "$path"`
38354     new_path=`$WHICH "$new_path" 2> /dev/null`
38355     # bat and cmd files are not always considered executable in cygwin causing which
38356     # to not find them
38357     if test "x$new_path" = x \
38358         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38359         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38360       new_path=`$CYGPATH -u "$path"`
38361     fi
38362     if test "x$new_path" = x; then
38363       # It's still not found. Now this is an unrecoverable error.
38364       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38365 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38366       has_space=`$ECHO "$complete" | $GREP " "`
38367       if test "x$has_space" != x; then
38368         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38369 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38370       fi
38371       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38372     fi
38373   fi
38374 
38375   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38376   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38377   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38378   # "foo.exe" is OK but "foo" is an error.
38379   #
38380   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38381   # It is also a way to make sure we got the proper file name for the real test later on.
38382   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38383   if test "x$test_shortpath" = x; then
38384     # Short path failed, file does not exist as specified.
38385     # Try adding .exe or .cmd
38386     if test -f "${new_path}.exe"; then
38387       input_to_shortpath="${new_path}.exe"
38388     elif test -f "${new_path}.cmd"; then
38389       input_to_shortpath="${new_path}.cmd"
38390     else
38391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38392 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38393       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38394 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38395       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38396     fi
38397   else
38398     input_to_shortpath="$new_path"
38399   fi
38400 
38401   # Call helper function which possibly converts this using DOS-style short mode.
38402   # If so, the updated path is stored in $new_path.
38403   new_path="$input_to_shortpath"
38404 
38405   input_path="$input_to_shortpath"
38406   # Check if we need to convert this using DOS-style short mode. If the path
38407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38408   # take no chances and rewrite it.
38409   # Note: m4 eats our [], so we need to use [ and ] instead.
38410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38411   if test "x$has_forbidden_chars" != x; then
38412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38413     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38414     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38415     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38416       # Going to short mode and back again did indeed matter. Since short mode is
38417       # case insensitive, let's make it lowercase to improve readability.
38418       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38419       # Now convert it back to Unix-style (cygpath)
38420       input_path=`$CYGPATH -u "$shortmode_path"`
38421       new_path="$input_path"
38422     fi
38423   fi
38424 
38425   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38426   if test "x$test_cygdrive_prefix" = x; then
38427     # As a simple fix, exclude /usr/bin since it's not a real path.
38428     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38429       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38430       # a path prefixed by /cygdrive for fixpath to work.
38431       new_path="$CYGWIN_ROOT_PATH$input_path"
38432     fi
38433   fi
38434 
38435   # remove trailing .exe if any
38436   new_path="${new_path/%.exe/}"
38437 
38438     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38439 
38440   # First separate the path from the arguments. This will split at the first
38441   # space.
38442   complete="$STRIP"
38443   path="${complete%% *}"
38444   tmp="$complete EOL"
38445   arguments="${tmp#* }"
38446 
38447   # Input might be given as Windows format, start by converting to
38448   # unix format.
38449   new_path="$path"
38450 
38451   windows_path="$new_path"
38452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38453     unix_path=`$CYGPATH -u "$windows_path"`
38454     new_path="$unix_path"
38455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38457     new_path="$unix_path"
38458   fi
38459 
38460 
38461   # Now try to locate executable using which
38462   new_path=`$WHICH "$new_path" 2> /dev/null`
38463 
38464   if test "x$new_path" = x; then
38465     # Oops. Which didn't find the executable.
38466     # The splitting of arguments from the executable at a space might have been incorrect,
38467     # since paths with space are more likely in Windows. Give it another try with the whole
38468     # argument.
38469     path="$complete"
38470     arguments="EOL"
38471     new_path="$path"
38472 
38473   windows_path="$new_path"
38474   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38475     unix_path=`$CYGPATH -u "$windows_path"`
38476     new_path="$unix_path"
38477   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38478     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38479     new_path="$unix_path"
38480   fi
38481 
38482 
38483     new_path=`$WHICH "$new_path" 2> /dev/null`
38484     # bat and cmd files are not always considered executable in MSYS causing which
38485     # to not find them
38486     if test "x$new_path" = x \
38487         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38488         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38489       new_path="$path"
38490 
38491   windows_path="$new_path"
38492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38493     unix_path=`$CYGPATH -u "$windows_path"`
38494     new_path="$unix_path"
38495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38497     new_path="$unix_path"
38498   fi
38499 
38500     fi
38501 
38502     if test "x$new_path" = x; then
38503       # It's still not found. Now this is an unrecoverable error.
38504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38505 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38506       has_space=`$ECHO "$complete" | $GREP " "`
38507       if test "x$has_space" != x; then
38508         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38509 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38510       fi
38511       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38512     fi
38513   fi
38514 
38515   # Now new_path has a complete unix path to the binary
38516   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38517     # Keep paths in /bin as-is, but remove trailing .exe if any
38518     new_path="${new_path/%.exe/}"
38519     # Do not save /bin paths to all_fixpath_prefixes!
38520   else
38521     # Not in mixed or Windows style, start by that.
38522     new_path=`cmd //c echo $new_path`
38523 
38524   input_path="$new_path"
38525   # Check if we need to convert this using DOS-style short mode. If the path
38526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38527   # take no chances and rewrite it.
38528   # Note: m4 eats our [], so we need to use [ and ] instead.
38529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38530   if test "x$has_forbidden_chars" != x; then
38531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38533   fi
38534 
38535     # Output is in $new_path
38536 
38537   windows_path="$new_path"
38538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38539     unix_path=`$CYGPATH -u "$windows_path"`
38540     new_path="$unix_path"
38541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38543     new_path="$unix_path"
38544   fi
38545 
38546     # remove trailing .exe if any
38547     new_path="${new_path/%.exe/}"
38548 
38549     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38550     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38551   fi
38552 
38553     else
38554       # We're on a unix platform. Hooray! :)
38555       # First separate the path from the arguments. This will split at the first
38556       # space.
38557       complete="$STRIP"
38558       path="${complete%% *}"
38559       tmp="$complete EOL"
38560       arguments="${tmp#* }"
38561 
38562       # Cannot rely on the command "which" here since it doesn't always work.
38563       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38564       if test -z "$is_absolute_path"; then
38565         # Path to executable is not absolute. Find it.
38566         IFS_save="$IFS"
38567         IFS=:
38568         for p in $PATH; do
38569           if test -f "$p/$path" && test -x "$p/$path"; then
38570             new_path="$p/$path"
38571             break
38572           fi
38573         done
38574         IFS="$IFS_save"
38575       else
38576         # This is an absolute path, we can use it without further modifications.
38577         new_path="$path"
38578       fi
38579 
38580       if test "x$new_path" = x; then
38581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38582 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38583         has_space=`$ECHO "$complete" | $GREP " "`
38584         if test "x$has_space" != x; then
38585           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38586 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38587         fi
38588         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38589       fi
38590     fi
38591 
38592     # Now join together the path and the arguments once again
38593     if test "x$arguments" != xEOL; then
38594       new_complete="$new_path ${arguments% *}"
38595     else
38596       new_complete="$new_path"
38597     fi
38598 
38599     if test "x$complete" != "x$new_complete"; then
38600       STRIP="$new_complete"
38601       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38602 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38603     fi
38604   fi
38605 
38606 
38607 
38608   # Publish this variable in the help.
38609 
38610 
38611   if [ -z "${NM+x}" ]; then
38612     # The variable is not set by user, try to locate tool using the code snippet
38613     for ac_prog in nm
38614 do
38615   # Extract the first word of "$ac_prog", so it can be a program name with args.
38616 set dummy $ac_prog; ac_word=$2
38617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38618 $as_echo_n "checking for $ac_word... " >&6; }
38619 if ${ac_cv_path_NM+:} false; then :
38620   $as_echo_n "(cached) " >&6
38621 else
38622   case $NM in
38623   [\\/]* | ?:[\\/]*)
38624   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38625   ;;
38626   *)
38627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38628 for as_dir in $PATH
38629 do
38630   IFS=$as_save_IFS
38631   test -z "$as_dir" && as_dir=.
38632     for ac_exec_ext in '' $ac_executable_extensions; do
38633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38634     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38636     break 2
38637   fi
38638 done
38639   done
38640 IFS=$as_save_IFS
38641 
38642   ;;
38643 esac
38644 fi
38645 NM=$ac_cv_path_NM
38646 if test -n "$NM"; then
38647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38648 $as_echo "$NM" >&6; }
38649 else
38650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38651 $as_echo "no" >&6; }
38652 fi
38653 
38654 
38655   test -n "$NM" && break
38656 done
38657 
38658   else
38659     # The variable is set, but is it from the command line or the environment?
38660 
38661     # Try to remove the string !NM! from our list.
38662     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38663     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38664       # If it failed, the variable was not from the command line. Ignore it,
38665       # but warn the user (except for BASH, which is always set by the calling BASH).
38666       if test "xNM" != xBASH; then
38667         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38668 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38669       fi
38670       # Try to locate tool using the code snippet
38671       for ac_prog in nm
38672 do
38673   # Extract the first word of "$ac_prog", so it can be a program name with args.
38674 set dummy $ac_prog; ac_word=$2
38675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38676 $as_echo_n "checking for $ac_word... " >&6; }
38677 if ${ac_cv_path_NM+:} false; then :
38678   $as_echo_n "(cached) " >&6
38679 else
38680   case $NM in
38681   [\\/]* | ?:[\\/]*)
38682   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38683   ;;
38684   *)
38685   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38686 for as_dir in $PATH
38687 do
38688   IFS=$as_save_IFS
38689   test -z "$as_dir" && as_dir=.
38690     for ac_exec_ext in '' $ac_executable_extensions; do
38691   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38692     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38693     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38694     break 2
38695   fi
38696 done
38697   done
38698 IFS=$as_save_IFS
38699 
38700   ;;
38701 esac
38702 fi
38703 NM=$ac_cv_path_NM
38704 if test -n "$NM"; then
38705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38706 $as_echo "$NM" >&6; }
38707 else
38708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38709 $as_echo "no" >&6; }
38710 fi
38711 
38712 
38713   test -n "$NM" && break
38714 done
38715 
38716     else
38717       # If it succeeded, then it was overridden by the user. We will use it
38718       # for the tool.
38719 
38720       # First remove it from the list of overridden variables, so we can test
38721       # for unknown variables in the end.
38722       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38723 
38724       # Check if we try to supply an empty value
38725       if test "x$NM" = x; then
38726         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38727 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38728         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38729 $as_echo_n "checking for NM... " >&6; }
38730         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38731 $as_echo "disabled" >&6; }
38732       else
38733         # Check if the provided tool contains a complete path.
38734         tool_specified="$NM"
38735         tool_basename="${tool_specified##*/}"
38736         if test "x$tool_basename" = "x$tool_specified"; then
38737           # A command without a complete path is provided, search $PATH.
38738           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38739 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38740           # Extract the first word of "$tool_basename", so it can be a program name with args.
38741 set dummy $tool_basename; ac_word=$2
38742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38743 $as_echo_n "checking for $ac_word... " >&6; }
38744 if ${ac_cv_path_NM+:} false; then :
38745   $as_echo_n "(cached) " >&6
38746 else
38747   case $NM in
38748   [\\/]* | ?:[\\/]*)
38749   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38750   ;;
38751   *)
38752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38753 for as_dir in $PATH
38754 do
38755   IFS=$as_save_IFS
38756   test -z "$as_dir" && as_dir=.
38757     for ac_exec_ext in '' $ac_executable_extensions; do
38758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38759     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38761     break 2
38762   fi
38763 done
38764   done
38765 IFS=$as_save_IFS
38766 
38767   ;;
38768 esac
38769 fi
38770 NM=$ac_cv_path_NM
38771 if test -n "$NM"; then
38772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38773 $as_echo "$NM" >&6; }
38774 else
38775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38776 $as_echo "no" >&6; }
38777 fi
38778 
38779 
38780           if test "x$NM" = x; then
38781             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38782           fi
38783         else
38784           # Otherwise we believe it is a complete path. Use it as it is.
38785           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38786 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38787           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38788 $as_echo_n "checking for NM... " >&6; }
38789           if test ! -x "$tool_specified"; then
38790             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38791 $as_echo "not found" >&6; }
38792             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38793           fi
38794           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38795 $as_echo "$tool_specified" >&6; }
38796         fi
38797       fi
38798     fi
38799 
38800   fi
38801 
38802 
38803 
38804   # Only process if variable expands to non-empty
38805 
38806   if test "x$NM" != x; then
38807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38808 
38809   # First separate the path from the arguments. This will split at the first
38810   # space.
38811   complete="$NM"
38812   path="${complete%% *}"
38813   tmp="$complete EOL"
38814   arguments="${tmp#* }"
38815 
38816   # Input might be given as Windows format, start by converting to
38817   # unix format.
38818   new_path=`$CYGPATH -u "$path"`
38819 
38820   # Now try to locate executable using which
38821   new_path=`$WHICH "$new_path" 2> /dev/null`
38822   # bat and cmd files are not always considered executable in cygwin causing which
38823   # to not find them
38824   if test "x$new_path" = x \
38825       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38826       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38827     new_path=`$CYGPATH -u "$path"`
38828   fi
38829   if test "x$new_path" = x; then
38830     # Oops. Which didn't find the executable.
38831     # The splitting of arguments from the executable at a space might have been incorrect,
38832     # since paths with space are more likely in Windows. Give it another try with the whole
38833     # argument.
38834     path="$complete"
38835     arguments="EOL"
38836     new_path=`$CYGPATH -u "$path"`
38837     new_path=`$WHICH "$new_path" 2> /dev/null`
38838     # bat and cmd files are not always considered executable in cygwin causing which
38839     # to not find them
38840     if test "x$new_path" = x \
38841         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38842         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38843       new_path=`$CYGPATH -u "$path"`
38844     fi
38845     if test "x$new_path" = x; then
38846       # It's still not found. Now this is an unrecoverable error.
38847       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38848 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38849       has_space=`$ECHO "$complete" | $GREP " "`
38850       if test "x$has_space" != x; then
38851         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38852 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38853       fi
38854       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38855     fi
38856   fi
38857 
38858   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38859   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38860   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38861   # "foo.exe" is OK but "foo" is an error.
38862   #
38863   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38864   # It is also a way to make sure we got the proper file name for the real test later on.
38865   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38866   if test "x$test_shortpath" = x; then
38867     # Short path failed, file does not exist as specified.
38868     # Try adding .exe or .cmd
38869     if test -f "${new_path}.exe"; then
38870       input_to_shortpath="${new_path}.exe"
38871     elif test -f "${new_path}.cmd"; then
38872       input_to_shortpath="${new_path}.cmd"
38873     else
38874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38875 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38876       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38877 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38878       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38879     fi
38880   else
38881     input_to_shortpath="$new_path"
38882   fi
38883 
38884   # Call helper function which possibly converts this using DOS-style short mode.
38885   # If so, the updated path is stored in $new_path.
38886   new_path="$input_to_shortpath"
38887 
38888   input_path="$input_to_shortpath"
38889   # Check if we need to convert this using DOS-style short mode. If the path
38890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38891   # take no chances and rewrite it.
38892   # Note: m4 eats our [], so we need to use [ and ] instead.
38893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38894   if test "x$has_forbidden_chars" != x; then
38895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38896     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38897     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38898     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38899       # Going to short mode and back again did indeed matter. Since short mode is
38900       # case insensitive, let's make it lowercase to improve readability.
38901       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38902       # Now convert it back to Unix-style (cygpath)
38903       input_path=`$CYGPATH -u "$shortmode_path"`
38904       new_path="$input_path"
38905     fi
38906   fi
38907 
38908   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38909   if test "x$test_cygdrive_prefix" = x; then
38910     # As a simple fix, exclude /usr/bin since it's not a real path.
38911     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38912       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38913       # a path prefixed by /cygdrive for fixpath to work.
38914       new_path="$CYGWIN_ROOT_PATH$input_path"
38915     fi
38916   fi
38917 
38918   # remove trailing .exe if any
38919   new_path="${new_path/%.exe/}"
38920 
38921     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38922 
38923   # First separate the path from the arguments. This will split at the first
38924   # space.
38925   complete="$NM"
38926   path="${complete%% *}"
38927   tmp="$complete EOL"
38928   arguments="${tmp#* }"
38929 
38930   # Input might be given as Windows format, start by converting to
38931   # unix format.
38932   new_path="$path"
38933 
38934   windows_path="$new_path"
38935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38936     unix_path=`$CYGPATH -u "$windows_path"`
38937     new_path="$unix_path"
38938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38940     new_path="$unix_path"
38941   fi
38942 
38943 
38944   # Now try to locate executable using which
38945   new_path=`$WHICH "$new_path" 2> /dev/null`
38946 
38947   if test "x$new_path" = x; then
38948     # Oops. Which didn't find the executable.
38949     # The splitting of arguments from the executable at a space might have been incorrect,
38950     # since paths with space are more likely in Windows. Give it another try with the whole
38951     # argument.
38952     path="$complete"
38953     arguments="EOL"
38954     new_path="$path"
38955 
38956   windows_path="$new_path"
38957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38958     unix_path=`$CYGPATH -u "$windows_path"`
38959     new_path="$unix_path"
38960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38962     new_path="$unix_path"
38963   fi
38964 
38965 
38966     new_path=`$WHICH "$new_path" 2> /dev/null`
38967     # bat and cmd files are not always considered executable in MSYS causing which
38968     # to not find them
38969     if test "x$new_path" = x \
38970         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38971         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38972       new_path="$path"
38973 
38974   windows_path="$new_path"
38975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38976     unix_path=`$CYGPATH -u "$windows_path"`
38977     new_path="$unix_path"
38978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38980     new_path="$unix_path"
38981   fi
38982 
38983     fi
38984 
38985     if test "x$new_path" = x; then
38986       # It's still not found. Now this is an unrecoverable error.
38987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38988 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38989       has_space=`$ECHO "$complete" | $GREP " "`
38990       if test "x$has_space" != x; then
38991         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38992 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38993       fi
38994       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38995     fi
38996   fi
38997 
38998   # Now new_path has a complete unix path to the binary
38999   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39000     # Keep paths in /bin as-is, but remove trailing .exe if any
39001     new_path="${new_path/%.exe/}"
39002     # Do not save /bin paths to all_fixpath_prefixes!
39003   else
39004     # Not in mixed or Windows style, start by that.
39005     new_path=`cmd //c echo $new_path`
39006 
39007   input_path="$new_path"
39008   # Check if we need to convert this using DOS-style short mode. If the path
39009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39010   # take no chances and rewrite it.
39011   # Note: m4 eats our [], so we need to use [ and ] instead.
39012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39013   if test "x$has_forbidden_chars" != x; then
39014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39016   fi
39017 
39018     # Output is in $new_path
39019 
39020   windows_path="$new_path"
39021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39022     unix_path=`$CYGPATH -u "$windows_path"`
39023     new_path="$unix_path"
39024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39026     new_path="$unix_path"
39027   fi
39028 
39029     # remove trailing .exe if any
39030     new_path="${new_path/%.exe/}"
39031 
39032     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39033     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39034   fi
39035 
39036     else
39037       # We're on a unix platform. Hooray! :)
39038       # First separate the path from the arguments. This will split at the first
39039       # space.
39040       complete="$NM"
39041       path="${complete%% *}"
39042       tmp="$complete EOL"
39043       arguments="${tmp#* }"
39044 
39045       # Cannot rely on the command "which" here since it doesn't always work.
39046       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39047       if test -z "$is_absolute_path"; then
39048         # Path to executable is not absolute. Find it.
39049         IFS_save="$IFS"
39050         IFS=:
39051         for p in $PATH; do
39052           if test -f "$p/$path" && test -x "$p/$path"; then
39053             new_path="$p/$path"
39054             break
39055           fi
39056         done
39057         IFS="$IFS_save"
39058       else
39059         # This is an absolute path, we can use it without further modifications.
39060         new_path="$path"
39061       fi
39062 
39063       if test "x$new_path" = x; then
39064         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39065 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39066         has_space=`$ECHO "$complete" | $GREP " "`
39067         if test "x$has_space" != x; then
39068           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39069 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39070         fi
39071         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39072       fi
39073     fi
39074 
39075     # Now join together the path and the arguments once again
39076     if test "x$arguments" != xEOL; then
39077       new_complete="$new_path ${arguments% *}"
39078     else
39079       new_complete="$new_path"
39080     fi
39081 
39082     if test "x$complete" != "x$new_complete"; then
39083       NM="$new_complete"
39084       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39085 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39086     fi
39087   fi
39088 
39089 
39090 
39091   # Publish this variable in the help.
39092 
39093 
39094   if [ -z "${GNM+x}" ]; then
39095     # The variable is not set by user, try to locate tool using the code snippet
39096     for ac_prog in gnm
39097 do
39098   # Extract the first word of "$ac_prog", so it can be a program name with args.
39099 set dummy $ac_prog; ac_word=$2
39100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39101 $as_echo_n "checking for $ac_word... " >&6; }
39102 if ${ac_cv_path_GNM+:} false; then :
39103   $as_echo_n "(cached) " >&6
39104 else
39105   case $GNM in
39106   [\\/]* | ?:[\\/]*)
39107   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39108   ;;
39109   *)
39110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39111 for as_dir in $PATH
39112 do
39113   IFS=$as_save_IFS
39114   test -z "$as_dir" && as_dir=.
39115     for ac_exec_ext in '' $ac_executable_extensions; do
39116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39117     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39119     break 2
39120   fi
39121 done
39122   done
39123 IFS=$as_save_IFS
39124 
39125   ;;
39126 esac
39127 fi
39128 GNM=$ac_cv_path_GNM
39129 if test -n "$GNM"; then
39130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39131 $as_echo "$GNM" >&6; }
39132 else
39133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39134 $as_echo "no" >&6; }
39135 fi
39136 
39137 
39138   test -n "$GNM" && break
39139 done
39140 
39141   else
39142     # The variable is set, but is it from the command line or the environment?
39143 
39144     # Try to remove the string !GNM! from our list.
39145     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39146     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39147       # If it failed, the variable was not from the command line. Ignore it,
39148       # but warn the user (except for BASH, which is always set by the calling BASH).
39149       if test "xGNM" != xBASH; then
39150         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39151 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39152       fi
39153       # Try to locate tool using the code snippet
39154       for ac_prog in gnm
39155 do
39156   # Extract the first word of "$ac_prog", so it can be a program name with args.
39157 set dummy $ac_prog; ac_word=$2
39158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39159 $as_echo_n "checking for $ac_word... " >&6; }
39160 if ${ac_cv_path_GNM+:} false; then :
39161   $as_echo_n "(cached) " >&6
39162 else
39163   case $GNM in
39164   [\\/]* | ?:[\\/]*)
39165   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39166   ;;
39167   *)
39168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39169 for as_dir in $PATH
39170 do
39171   IFS=$as_save_IFS
39172   test -z "$as_dir" && as_dir=.
39173     for ac_exec_ext in '' $ac_executable_extensions; do
39174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39175     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39177     break 2
39178   fi
39179 done
39180   done
39181 IFS=$as_save_IFS
39182 
39183   ;;
39184 esac
39185 fi
39186 GNM=$ac_cv_path_GNM
39187 if test -n "$GNM"; then
39188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39189 $as_echo "$GNM" >&6; }
39190 else
39191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39192 $as_echo "no" >&6; }
39193 fi
39194 
39195 
39196   test -n "$GNM" && break
39197 done
39198 
39199     else
39200       # If it succeeded, then it was overridden by the user. We will use it
39201       # for the tool.
39202 
39203       # First remove it from the list of overridden variables, so we can test
39204       # for unknown variables in the end.
39205       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39206 
39207       # Check if we try to supply an empty value
39208       if test "x$GNM" = x; then
39209         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39210 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39211         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39212 $as_echo_n "checking for GNM... " >&6; }
39213         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39214 $as_echo "disabled" >&6; }
39215       else
39216         # Check if the provided tool contains a complete path.
39217         tool_specified="$GNM"
39218         tool_basename="${tool_specified##*/}"
39219         if test "x$tool_basename" = "x$tool_specified"; then
39220           # A command without a complete path is provided, search $PATH.
39221           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39222 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39223           # Extract the first word of "$tool_basename", so it can be a program name with args.
39224 set dummy $tool_basename; ac_word=$2
39225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39226 $as_echo_n "checking for $ac_word... " >&6; }
39227 if ${ac_cv_path_GNM+:} false; then :
39228   $as_echo_n "(cached) " >&6
39229 else
39230   case $GNM in
39231   [\\/]* | ?:[\\/]*)
39232   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39233   ;;
39234   *)
39235   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39236 for as_dir in $PATH
39237 do
39238   IFS=$as_save_IFS
39239   test -z "$as_dir" && as_dir=.
39240     for ac_exec_ext in '' $ac_executable_extensions; do
39241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39242     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39244     break 2
39245   fi
39246 done
39247   done
39248 IFS=$as_save_IFS
39249 
39250   ;;
39251 esac
39252 fi
39253 GNM=$ac_cv_path_GNM
39254 if test -n "$GNM"; then
39255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39256 $as_echo "$GNM" >&6; }
39257 else
39258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39259 $as_echo "no" >&6; }
39260 fi
39261 
39262 
39263           if test "x$GNM" = x; then
39264             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39265           fi
39266         else
39267           # Otherwise we believe it is a complete path. Use it as it is.
39268           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39269 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39270           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39271 $as_echo_n "checking for GNM... " >&6; }
39272           if test ! -x "$tool_specified"; then
39273             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39274 $as_echo "not found" >&6; }
39275             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39276           fi
39277           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39278 $as_echo "$tool_specified" >&6; }
39279         fi
39280       fi
39281     fi
39282 
39283   fi
39284 
39285 
39286 
39287   # Only process if variable expands to non-empty
39288 
39289   if test "x$GNM" != x; then
39290     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39291 
39292   # First separate the path from the arguments. This will split at the first
39293   # space.
39294   complete="$GNM"
39295   path="${complete%% *}"
39296   tmp="$complete EOL"
39297   arguments="${tmp#* }"
39298 
39299   # Input might be given as Windows format, start by converting to
39300   # unix format.
39301   new_path=`$CYGPATH -u "$path"`
39302 
39303   # Now try to locate executable using which
39304   new_path=`$WHICH "$new_path" 2> /dev/null`
39305   # bat and cmd files are not always considered executable in cygwin causing which
39306   # to not find them
39307   if test "x$new_path" = x \
39308       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39309       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39310     new_path=`$CYGPATH -u "$path"`
39311   fi
39312   if test "x$new_path" = x; then
39313     # Oops. Which didn't find the executable.
39314     # The splitting of arguments from the executable at a space might have been incorrect,
39315     # since paths with space are more likely in Windows. Give it another try with the whole
39316     # argument.
39317     path="$complete"
39318     arguments="EOL"
39319     new_path=`$CYGPATH -u "$path"`
39320     new_path=`$WHICH "$new_path" 2> /dev/null`
39321     # bat and cmd files are not always considered executable in cygwin causing which
39322     # to not find them
39323     if test "x$new_path" = x \
39324         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39325         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39326       new_path=`$CYGPATH -u "$path"`
39327     fi
39328     if test "x$new_path" = x; then
39329       # It's still not found. Now this is an unrecoverable error.
39330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39331 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39332       has_space=`$ECHO "$complete" | $GREP " "`
39333       if test "x$has_space" != x; then
39334         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39335 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39336       fi
39337       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39338     fi
39339   fi
39340 
39341   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39342   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39343   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39344   # "foo.exe" is OK but "foo" is an error.
39345   #
39346   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39347   # It is also a way to make sure we got the proper file name for the real test later on.
39348   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39349   if test "x$test_shortpath" = x; then
39350     # Short path failed, file does not exist as specified.
39351     # Try adding .exe or .cmd
39352     if test -f "${new_path}.exe"; then
39353       input_to_shortpath="${new_path}.exe"
39354     elif test -f "${new_path}.cmd"; then
39355       input_to_shortpath="${new_path}.cmd"
39356     else
39357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39358 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39359       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39360 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39361       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39362     fi
39363   else
39364     input_to_shortpath="$new_path"
39365   fi
39366 
39367   # Call helper function which possibly converts this using DOS-style short mode.
39368   # If so, the updated path is stored in $new_path.
39369   new_path="$input_to_shortpath"
39370 
39371   input_path="$input_to_shortpath"
39372   # Check if we need to convert this using DOS-style short mode. If the path
39373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39374   # take no chances and rewrite it.
39375   # Note: m4 eats our [], so we need to use [ and ] instead.
39376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39377   if test "x$has_forbidden_chars" != x; then
39378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39379     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39380     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39381     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39382       # Going to short mode and back again did indeed matter. Since short mode is
39383       # case insensitive, let's make it lowercase to improve readability.
39384       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39385       # Now convert it back to Unix-style (cygpath)
39386       input_path=`$CYGPATH -u "$shortmode_path"`
39387       new_path="$input_path"
39388     fi
39389   fi
39390 
39391   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39392   if test "x$test_cygdrive_prefix" = x; then
39393     # As a simple fix, exclude /usr/bin since it's not a real path.
39394     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39395       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39396       # a path prefixed by /cygdrive for fixpath to work.
39397       new_path="$CYGWIN_ROOT_PATH$input_path"
39398     fi
39399   fi
39400 
39401   # remove trailing .exe if any
39402   new_path="${new_path/%.exe/}"
39403 
39404     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39405 
39406   # First separate the path from the arguments. This will split at the first
39407   # space.
39408   complete="$GNM"
39409   path="${complete%% *}"
39410   tmp="$complete EOL"
39411   arguments="${tmp#* }"
39412 
39413   # Input might be given as Windows format, start by converting to
39414   # unix format.
39415   new_path="$path"
39416 
39417   windows_path="$new_path"
39418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39419     unix_path=`$CYGPATH -u "$windows_path"`
39420     new_path="$unix_path"
39421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39423     new_path="$unix_path"
39424   fi
39425 
39426 
39427   # Now try to locate executable using which
39428   new_path=`$WHICH "$new_path" 2> /dev/null`
39429 
39430   if test "x$new_path" = x; then
39431     # Oops. Which didn't find the executable.
39432     # The splitting of arguments from the executable at a space might have been incorrect,
39433     # since paths with space are more likely in Windows. Give it another try with the whole
39434     # argument.
39435     path="$complete"
39436     arguments="EOL"
39437     new_path="$path"
39438 
39439   windows_path="$new_path"
39440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39441     unix_path=`$CYGPATH -u "$windows_path"`
39442     new_path="$unix_path"
39443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39445     new_path="$unix_path"
39446   fi
39447 
39448 
39449     new_path=`$WHICH "$new_path" 2> /dev/null`
39450     # bat and cmd files are not always considered executable in MSYS causing which
39451     # to not find them
39452     if test "x$new_path" = x \
39453         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39454         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39455       new_path="$path"
39456 
39457   windows_path="$new_path"
39458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39459     unix_path=`$CYGPATH -u "$windows_path"`
39460     new_path="$unix_path"
39461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39462     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39463     new_path="$unix_path"
39464   fi
39465 
39466     fi
39467 
39468     if test "x$new_path" = x; then
39469       # It's still not found. Now this is an unrecoverable error.
39470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39471 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39472       has_space=`$ECHO "$complete" | $GREP " "`
39473       if test "x$has_space" != x; then
39474         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39475 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39476       fi
39477       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39478     fi
39479   fi
39480 
39481   # Now new_path has a complete unix path to the binary
39482   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39483     # Keep paths in /bin as-is, but remove trailing .exe if any
39484     new_path="${new_path/%.exe/}"
39485     # Do not save /bin paths to all_fixpath_prefixes!
39486   else
39487     # Not in mixed or Windows style, start by that.
39488     new_path=`cmd //c echo $new_path`
39489 
39490   input_path="$new_path"
39491   # Check if we need to convert this using DOS-style short mode. If the path
39492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39493   # take no chances and rewrite it.
39494   # Note: m4 eats our [], so we need to use [ and ] instead.
39495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39496   if test "x$has_forbidden_chars" != x; then
39497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39498     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39499   fi
39500 
39501     # Output is in $new_path
39502 
39503   windows_path="$new_path"
39504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39505     unix_path=`$CYGPATH -u "$windows_path"`
39506     new_path="$unix_path"
39507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39508     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39509     new_path="$unix_path"
39510   fi
39511 
39512     # remove trailing .exe if any
39513     new_path="${new_path/%.exe/}"
39514 
39515     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39516     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39517   fi
39518 
39519     else
39520       # We're on a unix platform. Hooray! :)
39521       # First separate the path from the arguments. This will split at the first
39522       # space.
39523       complete="$GNM"
39524       path="${complete%% *}"
39525       tmp="$complete EOL"
39526       arguments="${tmp#* }"
39527 
39528       # Cannot rely on the command "which" here since it doesn't always work.
39529       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39530       if test -z "$is_absolute_path"; then
39531         # Path to executable is not absolute. Find it.
39532         IFS_save="$IFS"
39533         IFS=:
39534         for p in $PATH; do
39535           if test -f "$p/$path" && test -x "$p/$path"; then
39536             new_path="$p/$path"
39537             break
39538           fi
39539         done
39540         IFS="$IFS_save"
39541       else
39542         # This is an absolute path, we can use it without further modifications.
39543         new_path="$path"
39544       fi
39545 
39546       if test "x$new_path" = x; then
39547         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39548 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39549         has_space=`$ECHO "$complete" | $GREP " "`
39550         if test "x$has_space" != x; then
39551           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39552 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39553         fi
39554         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39555       fi
39556     fi
39557 
39558     # Now join together the path and the arguments once again
39559     if test "x$arguments" != xEOL; then
39560       new_complete="$new_path ${arguments% *}"
39561     else
39562       new_complete="$new_path"
39563     fi
39564 
39565     if test "x$complete" != "x$new_complete"; then
39566       GNM="$new_complete"
39567       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39568 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39569     fi
39570   fi
39571 
39572   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39573     # FIXME: we should unify this with the solaris case above.
39574 
39575 
39576   # Publish this variable in the help.
39577 
39578 
39579   if [ -z "${STRIP+x}" ]; then
39580     # The variable is not set by user, try to locate tool using the code snippet
39581     if test -n "$ac_tool_prefix"; then
39582   for ac_prog in strip
39583   do
39584     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39585 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39587 $as_echo_n "checking for $ac_word... " >&6; }
39588 if ${ac_cv_prog_STRIP+:} false; then :
39589   $as_echo_n "(cached) " >&6
39590 else
39591   if test -n "$STRIP"; then
39592   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39593 else
39594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39595 for as_dir in $PATH
39596 do
39597   IFS=$as_save_IFS
39598   test -z "$as_dir" && as_dir=.
39599     for ac_exec_ext in '' $ac_executable_extensions; do
39600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39601     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39603     break 2
39604   fi
39605 done
39606   done
39607 IFS=$as_save_IFS
39608 
39609 fi
39610 fi
39611 STRIP=$ac_cv_prog_STRIP
39612 if test -n "$STRIP"; then
39613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39614 $as_echo "$STRIP" >&6; }
39615 else
39616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39617 $as_echo "no" >&6; }
39618 fi
39619 
39620 
39621     test -n "$STRIP" && break
39622   done
39623 fi
39624 if test -z "$STRIP"; then
39625   ac_ct_STRIP=$STRIP
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_prog_ac_ct_STRIP+:} false; then :
39633   $as_echo_n "(cached) " >&6
39634 else
39635   if test -n "$ac_ct_STRIP"; then
39636   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39637 else
39638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39639 for as_dir in $PATH
39640 do
39641   IFS=$as_save_IFS
39642   test -z "$as_dir" && as_dir=.
39643     for ac_exec_ext in '' $ac_executable_extensions; do
39644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39645     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39647     break 2
39648   fi
39649 done
39650   done
39651 IFS=$as_save_IFS
39652 
39653 fi
39654 fi
39655 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39656 if test -n "$ac_ct_STRIP"; then
39657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39658 $as_echo "$ac_ct_STRIP" >&6; }
39659 else
39660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39661 $as_echo "no" >&6; }
39662 fi
39663 
39664 
39665   test -n "$ac_ct_STRIP" && break
39666 done
39667 
39668   if test "x$ac_ct_STRIP" = x; then
39669     STRIP=""
39670   else
39671     case $cross_compiling:$ac_tool_warned in
39672 yes:)
39673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39674 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39675 ac_tool_warned=yes ;;
39676 esac
39677     STRIP=$ac_ct_STRIP
39678   fi
39679 fi
39680 
39681   else
39682     # The variable is set, but is it from the command line or the environment?
39683 
39684     # Try to remove the string !STRIP! from our list.
39685     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39686     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39687       # If it failed, the variable was not from the command line. Ignore it,
39688       # but warn the user (except for BASH, which is always set by the calling BASH).
39689       if test "xSTRIP" != xBASH; then
39690         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39691 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39692       fi
39693       # Try to locate tool using the code snippet
39694       if test -n "$ac_tool_prefix"; then
39695   for ac_prog in strip
39696   do
39697     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39698 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39700 $as_echo_n "checking for $ac_word... " >&6; }
39701 if ${ac_cv_prog_STRIP+:} false; then :
39702   $as_echo_n "(cached) " >&6
39703 else
39704   if test -n "$STRIP"; then
39705   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39706 else
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_prog_STRIP="$ac_tool_prefix$ac_prog"
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 fi
39723 fi
39724 STRIP=$ac_cv_prog_STRIP
39725 if test -n "$STRIP"; then
39726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39727 $as_echo "$STRIP" >&6; }
39728 else
39729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39730 $as_echo "no" >&6; }
39731 fi
39732 
39733 
39734     test -n "$STRIP" && break
39735   done
39736 fi
39737 if test -z "$STRIP"; then
39738   ac_ct_STRIP=$STRIP
39739   for ac_prog in strip
39740 do
39741   # Extract the first word of "$ac_prog", so it can be a program name with args.
39742 set dummy $ac_prog; ac_word=$2
39743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39744 $as_echo_n "checking for $ac_word... " >&6; }
39745 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39746   $as_echo_n "(cached) " >&6
39747 else
39748   if test -n "$ac_ct_STRIP"; then
39749   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39750 else
39751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39752 for as_dir in $PATH
39753 do
39754   IFS=$as_save_IFS
39755   test -z "$as_dir" && as_dir=.
39756     for ac_exec_ext in '' $ac_executable_extensions; do
39757   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39758     ac_cv_prog_ac_ct_STRIP="$ac_prog"
39759     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39760     break 2
39761   fi
39762 done
39763   done
39764 IFS=$as_save_IFS
39765 
39766 fi
39767 fi
39768 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39769 if test -n "$ac_ct_STRIP"; then
39770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39771 $as_echo "$ac_ct_STRIP" >&6; }
39772 else
39773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39774 $as_echo "no" >&6; }
39775 fi
39776 
39777 
39778   test -n "$ac_ct_STRIP" && break
39779 done
39780 
39781   if test "x$ac_ct_STRIP" = x; then
39782     STRIP=""
39783   else
39784     case $cross_compiling:$ac_tool_warned in
39785 yes:)
39786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39787 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39788 ac_tool_warned=yes ;;
39789 esac
39790     STRIP=$ac_ct_STRIP
39791   fi
39792 fi
39793 
39794     else
39795       # If it succeeded, then it was overridden by the user. We will use it
39796       # for the tool.
39797 
39798       # First remove it from the list of overridden variables, so we can test
39799       # for unknown variables in the end.
39800       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39801 
39802       # Check if we try to supply an empty value
39803       if test "x$STRIP" = x; then
39804         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39805 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39806         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39807 $as_echo_n "checking for STRIP... " >&6; }
39808         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39809 $as_echo "disabled" >&6; }
39810       else
39811         # Check if the provided tool contains a complete path.
39812         tool_specified="$STRIP"
39813         tool_basename="${tool_specified##*/}"
39814         if test "x$tool_basename" = "x$tool_specified"; then
39815           # A command without a complete path is provided, search $PATH.
39816           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39817 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39818           # Extract the first word of "$tool_basename", so it can be a program name with args.
39819 set dummy $tool_basename; ac_word=$2
39820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39821 $as_echo_n "checking for $ac_word... " >&6; }
39822 if ${ac_cv_path_STRIP+:} false; then :
39823   $as_echo_n "(cached) " >&6
39824 else
39825   case $STRIP in
39826   [\\/]* | ?:[\\/]*)
39827   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39828   ;;
39829   *)
39830   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39831 for as_dir in $PATH
39832 do
39833   IFS=$as_save_IFS
39834   test -z "$as_dir" && as_dir=.
39835     for ac_exec_ext in '' $ac_executable_extensions; do
39836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39837     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39839     break 2
39840   fi
39841 done
39842   done
39843 IFS=$as_save_IFS
39844 
39845   ;;
39846 esac
39847 fi
39848 STRIP=$ac_cv_path_STRIP
39849 if test -n "$STRIP"; then
39850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39851 $as_echo "$STRIP" >&6; }
39852 else
39853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39854 $as_echo "no" >&6; }
39855 fi
39856 
39857 
39858           if test "x$STRIP" = x; then
39859             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39860           fi
39861         else
39862           # Otherwise we believe it is a complete path. Use it as it is.
39863           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39864 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39865           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39866 $as_echo_n "checking for STRIP... " >&6; }
39867           if test ! -x "$tool_specified"; then
39868             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39869 $as_echo "not found" >&6; }
39870             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39871           fi
39872           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39873 $as_echo "$tool_specified" >&6; }
39874         fi
39875       fi
39876     fi
39877 
39878   fi
39879 
39880 
39881 
39882   # Only process if variable expands to non-empty
39883 
39884   if test "x$STRIP" != x; then
39885     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39886 
39887   # First separate the path from the arguments. This will split at the first
39888   # space.
39889   complete="$STRIP"
39890   path="${complete%% *}"
39891   tmp="$complete EOL"
39892   arguments="${tmp#* }"
39893 
39894   # Input might be given as Windows format, start by converting to
39895   # unix format.
39896   new_path=`$CYGPATH -u "$path"`
39897 
39898   # Now try to locate executable using which
39899   new_path=`$WHICH "$new_path" 2> /dev/null`
39900   # bat and cmd files are not always considered executable in cygwin causing which
39901   # to not find them
39902   if test "x$new_path" = x \
39903       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39904       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39905     new_path=`$CYGPATH -u "$path"`
39906   fi
39907   if test "x$new_path" = x; then
39908     # Oops. Which didn't find the executable.
39909     # The splitting of arguments from the executable at a space might have been incorrect,
39910     # since paths with space are more likely in Windows. Give it another try with the whole
39911     # argument.
39912     path="$complete"
39913     arguments="EOL"
39914     new_path=`$CYGPATH -u "$path"`
39915     new_path=`$WHICH "$new_path" 2> /dev/null`
39916     # bat and cmd files are not always considered executable in cygwin causing which
39917     # to not find them
39918     if test "x$new_path" = x \
39919         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39920         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39921       new_path=`$CYGPATH -u "$path"`
39922     fi
39923     if test "x$new_path" = x; then
39924       # It's still not found. Now this is an unrecoverable error.
39925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39926 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39927       has_space=`$ECHO "$complete" | $GREP " "`
39928       if test "x$has_space" != x; then
39929         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39930 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39931       fi
39932       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39933     fi
39934   fi
39935 
39936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39939   # "foo.exe" is OK but "foo" is an error.
39940   #
39941   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39942   # It is also a way to make sure we got the proper file name for the real test later on.
39943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39944   if test "x$test_shortpath" = x; then
39945     # Short path failed, file does not exist as specified.
39946     # Try adding .exe or .cmd
39947     if test -f "${new_path}.exe"; then
39948       input_to_shortpath="${new_path}.exe"
39949     elif test -f "${new_path}.cmd"; then
39950       input_to_shortpath="${new_path}.cmd"
39951     else
39952       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39953 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39954       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39955 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39956       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39957     fi
39958   else
39959     input_to_shortpath="$new_path"
39960   fi
39961 
39962   # Call helper function which possibly converts this using DOS-style short mode.
39963   # If so, the updated path is stored in $new_path.
39964   new_path="$input_to_shortpath"
39965 
39966   input_path="$input_to_shortpath"
39967   # Check if we need to convert this using DOS-style short mode. If the path
39968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39969   # take no chances and rewrite it.
39970   # Note: m4 eats our [], so we need to use [ and ] instead.
39971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39972   if test "x$has_forbidden_chars" != x; then
39973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39974     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39975     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39976     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39977       # Going to short mode and back again did indeed matter. Since short mode is
39978       # case insensitive, let's make it lowercase to improve readability.
39979       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39980       # Now convert it back to Unix-style (cygpath)
39981       input_path=`$CYGPATH -u "$shortmode_path"`
39982       new_path="$input_path"
39983     fi
39984   fi
39985 
39986   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39987   if test "x$test_cygdrive_prefix" = x; then
39988     # As a simple fix, exclude /usr/bin since it's not a real path.
39989     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39990       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39991       # a path prefixed by /cygdrive for fixpath to work.
39992       new_path="$CYGWIN_ROOT_PATH$input_path"
39993     fi
39994   fi
39995 
39996   # remove trailing .exe if any
39997   new_path="${new_path/%.exe/}"
39998 
39999     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40000 
40001   # First separate the path from the arguments. This will split at the first
40002   # space.
40003   complete="$STRIP"
40004   path="${complete%% *}"
40005   tmp="$complete EOL"
40006   arguments="${tmp#* }"
40007 
40008   # Input might be given as Windows format, start by converting to
40009   # unix format.
40010   new_path="$path"
40011 
40012   windows_path="$new_path"
40013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40014     unix_path=`$CYGPATH -u "$windows_path"`
40015     new_path="$unix_path"
40016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40018     new_path="$unix_path"
40019   fi
40020 
40021 
40022   # Now try to locate executable using which
40023   new_path=`$WHICH "$new_path" 2> /dev/null`
40024 
40025   if test "x$new_path" = x; then
40026     # Oops. Which didn't find the executable.
40027     # The splitting of arguments from the executable at a space might have been incorrect,
40028     # since paths with space are more likely in Windows. Give it another try with the whole
40029     # argument.
40030     path="$complete"
40031     arguments="EOL"
40032     new_path="$path"
40033 
40034   windows_path="$new_path"
40035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40036     unix_path=`$CYGPATH -u "$windows_path"`
40037     new_path="$unix_path"
40038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40040     new_path="$unix_path"
40041   fi
40042 
40043 
40044     new_path=`$WHICH "$new_path" 2> /dev/null`
40045     # bat and cmd files are not always considered executable in MSYS causing which
40046     # to not find them
40047     if test "x$new_path" = x \
40048         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40049         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40050       new_path="$path"
40051 
40052   windows_path="$new_path"
40053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40054     unix_path=`$CYGPATH -u "$windows_path"`
40055     new_path="$unix_path"
40056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40058     new_path="$unix_path"
40059   fi
40060 
40061     fi
40062 
40063     if test "x$new_path" = x; then
40064       # It's still not found. Now this is an unrecoverable error.
40065       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40066 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40067       has_space=`$ECHO "$complete" | $GREP " "`
40068       if test "x$has_space" != x; then
40069         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40070 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40071       fi
40072       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40073     fi
40074   fi
40075 
40076   # Now new_path has a complete unix path to the binary
40077   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40078     # Keep paths in /bin as-is, but remove trailing .exe if any
40079     new_path="${new_path/%.exe/}"
40080     # Do not save /bin paths to all_fixpath_prefixes!
40081   else
40082     # Not in mixed or Windows style, start by that.
40083     new_path=`cmd //c echo $new_path`
40084 
40085   input_path="$new_path"
40086   # Check if we need to convert this using DOS-style short mode. If the path
40087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40088   # take no chances and rewrite it.
40089   # Note: m4 eats our [], so we need to use [ and ] instead.
40090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40091   if test "x$has_forbidden_chars" != x; then
40092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40093     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40094   fi
40095 
40096     # Output is in $new_path
40097 
40098   windows_path="$new_path"
40099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40100     unix_path=`$CYGPATH -u "$windows_path"`
40101     new_path="$unix_path"
40102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40104     new_path="$unix_path"
40105   fi
40106 
40107     # remove trailing .exe if any
40108     new_path="${new_path/%.exe/}"
40109 
40110     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40111     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40112   fi
40113 
40114     else
40115       # We're on a unix platform. Hooray! :)
40116       # First separate the path from the arguments. This will split at the first
40117       # space.
40118       complete="$STRIP"
40119       path="${complete%% *}"
40120       tmp="$complete EOL"
40121       arguments="${tmp#* }"
40122 
40123       # Cannot rely on the command "which" here since it doesn't always work.
40124       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40125       if test -z "$is_absolute_path"; then
40126         # Path to executable is not absolute. Find it.
40127         IFS_save="$IFS"
40128         IFS=:
40129         for p in $PATH; do
40130           if test -f "$p/$path" && test -x "$p/$path"; then
40131             new_path="$p/$path"
40132             break
40133           fi
40134         done
40135         IFS="$IFS_save"
40136       else
40137         # This is an absolute path, we can use it without further modifications.
40138         new_path="$path"
40139       fi
40140 
40141       if test "x$new_path" = x; then
40142         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40143 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40144         has_space=`$ECHO "$complete" | $GREP " "`
40145         if test "x$has_space" != x; then
40146           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40147 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40148         fi
40149         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40150       fi
40151     fi
40152 
40153     # Now join together the path and the arguments once again
40154     if test "x$arguments" != xEOL; then
40155       new_complete="$new_path ${arguments% *}"
40156     else
40157       new_complete="$new_path"
40158     fi
40159 
40160     if test "x$complete" != "x$new_complete"; then
40161       STRIP="$new_complete"
40162       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40163 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40164     fi
40165   fi
40166 
40167     if test "x$TOOLCHAIN_TYPE" = xgcc; then
40168 
40169 
40170   # Publish this variable in the help.
40171 
40172 
40173   if [ -z "${NM+x}" ]; then
40174     # The variable is not set by user, try to locate tool using the code snippet
40175     if test -n "$ac_tool_prefix"; then
40176   for ac_prog in nm gcc-nm
40177   do
40178     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40179 set dummy $ac_tool_prefix$ac_prog; 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_prog_NM+:} false; then :
40183   $as_echo_n "(cached) " >&6
40184 else
40185   if test -n "$NM"; then
40186   ac_cv_prog_NM="$NM" # Let the user override the test.
40187 else
40188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40189 for as_dir in $PATH
40190 do
40191   IFS=$as_save_IFS
40192   test -z "$as_dir" && as_dir=.
40193     for ac_exec_ext in '' $ac_executable_extensions; do
40194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40195     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40197     break 2
40198   fi
40199 done
40200   done
40201 IFS=$as_save_IFS
40202 
40203 fi
40204 fi
40205 NM=$ac_cv_prog_NM
40206 if test -n "$NM"; then
40207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40208 $as_echo "$NM" >&6; }
40209 else
40210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40211 $as_echo "no" >&6; }
40212 fi
40213 
40214 
40215     test -n "$NM" && break
40216   done
40217 fi
40218 if test -z "$NM"; then
40219   ac_ct_NM=$NM
40220   for ac_prog in nm gcc-nm
40221 do
40222   # Extract the first word of "$ac_prog", so it can be a program name with args.
40223 set dummy $ac_prog; ac_word=$2
40224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40225 $as_echo_n "checking for $ac_word... " >&6; }
40226 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40227   $as_echo_n "(cached) " >&6
40228 else
40229   if test -n "$ac_ct_NM"; then
40230   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40231 else
40232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40233 for as_dir in $PATH
40234 do
40235   IFS=$as_save_IFS
40236   test -z "$as_dir" && as_dir=.
40237     for ac_exec_ext in '' $ac_executable_extensions; do
40238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40239     ac_cv_prog_ac_ct_NM="$ac_prog"
40240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40241     break 2
40242   fi
40243 done
40244   done
40245 IFS=$as_save_IFS
40246 
40247 fi
40248 fi
40249 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40250 if test -n "$ac_ct_NM"; then
40251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40252 $as_echo "$ac_ct_NM" >&6; }
40253 else
40254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40255 $as_echo "no" >&6; }
40256 fi
40257 
40258 
40259   test -n "$ac_ct_NM" && break
40260 done
40261 
40262   if test "x$ac_ct_NM" = x; then
40263     NM=""
40264   else
40265     case $cross_compiling:$ac_tool_warned in
40266 yes:)
40267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40268 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40269 ac_tool_warned=yes ;;
40270 esac
40271     NM=$ac_ct_NM
40272   fi
40273 fi
40274 
40275   else
40276     # The variable is set, but is it from the command line or the environment?
40277 
40278     # Try to remove the string !NM! from our list.
40279     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40280     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40281       # If it failed, the variable was not from the command line. Ignore it,
40282       # but warn the user (except for BASH, which is always set by the calling BASH).
40283       if test "xNM" != xBASH; then
40284         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40285 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40286       fi
40287       # Try to locate tool using the code snippet
40288       if test -n "$ac_tool_prefix"; then
40289   for ac_prog in nm gcc-nm
40290   do
40291     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40292 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40294 $as_echo_n "checking for $ac_word... " >&6; }
40295 if ${ac_cv_prog_NM+:} false; then :
40296   $as_echo_n "(cached) " >&6
40297 else
40298   if test -n "$NM"; then
40299   ac_cv_prog_NM="$NM" # Let the user override the test.
40300 else
40301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40302 for as_dir in $PATH
40303 do
40304   IFS=$as_save_IFS
40305   test -z "$as_dir" && as_dir=.
40306     for ac_exec_ext in '' $ac_executable_extensions; do
40307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40308     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40310     break 2
40311   fi
40312 done
40313   done
40314 IFS=$as_save_IFS
40315 
40316 fi
40317 fi
40318 NM=$ac_cv_prog_NM
40319 if test -n "$NM"; then
40320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40321 $as_echo "$NM" >&6; }
40322 else
40323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40324 $as_echo "no" >&6; }
40325 fi
40326 
40327 
40328     test -n "$NM" && break
40329   done
40330 fi
40331 if test -z "$NM"; then
40332   ac_ct_NM=$NM
40333   for ac_prog in nm gcc-nm
40334 do
40335   # Extract the first word of "$ac_prog", so it can be a program name with args.
40336 set dummy $ac_prog; ac_word=$2
40337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40338 $as_echo_n "checking for $ac_word... " >&6; }
40339 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40340   $as_echo_n "(cached) " >&6
40341 else
40342   if test -n "$ac_ct_NM"; then
40343   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40344 else
40345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40346 for as_dir in $PATH
40347 do
40348   IFS=$as_save_IFS
40349   test -z "$as_dir" && as_dir=.
40350     for ac_exec_ext in '' $ac_executable_extensions; do
40351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40352     ac_cv_prog_ac_ct_NM="$ac_prog"
40353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40354     break 2
40355   fi
40356 done
40357   done
40358 IFS=$as_save_IFS
40359 
40360 fi
40361 fi
40362 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40363 if test -n "$ac_ct_NM"; then
40364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40365 $as_echo "$ac_ct_NM" >&6; }
40366 else
40367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40368 $as_echo "no" >&6; }
40369 fi
40370 
40371 
40372   test -n "$ac_ct_NM" && break
40373 done
40374 
40375   if test "x$ac_ct_NM" = x; then
40376     NM=""
40377   else
40378     case $cross_compiling:$ac_tool_warned in
40379 yes:)
40380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40381 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40382 ac_tool_warned=yes ;;
40383 esac
40384     NM=$ac_ct_NM
40385   fi
40386 fi
40387 
40388     else
40389       # If it succeeded, then it was overridden by the user. We will use it
40390       # for the tool.
40391 
40392       # First remove it from the list of overridden variables, so we can test
40393       # for unknown variables in the end.
40394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40395 
40396       # Check if we try to supply an empty value
40397       if test "x$NM" = x; then
40398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40399 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40401 $as_echo_n "checking for NM... " >&6; }
40402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40403 $as_echo "disabled" >&6; }
40404       else
40405         # Check if the provided tool contains a complete path.
40406         tool_specified="$NM"
40407         tool_basename="${tool_specified##*/}"
40408         if test "x$tool_basename" = "x$tool_specified"; then
40409           # A command without a complete path is provided, search $PATH.
40410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40411 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40412           # Extract the first word of "$tool_basename", so it can be a program name with args.
40413 set dummy $tool_basename; ac_word=$2
40414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40415 $as_echo_n "checking for $ac_word... " >&6; }
40416 if ${ac_cv_path_NM+:} false; then :
40417   $as_echo_n "(cached) " >&6
40418 else
40419   case $NM in
40420   [\\/]* | ?:[\\/]*)
40421   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40422   ;;
40423   *)
40424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40425 for as_dir in $PATH
40426 do
40427   IFS=$as_save_IFS
40428   test -z "$as_dir" && as_dir=.
40429     for ac_exec_ext in '' $ac_executable_extensions; do
40430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40431     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40433     break 2
40434   fi
40435 done
40436   done
40437 IFS=$as_save_IFS
40438 
40439   ;;
40440 esac
40441 fi
40442 NM=$ac_cv_path_NM
40443 if test -n "$NM"; then
40444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40445 $as_echo "$NM" >&6; }
40446 else
40447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40448 $as_echo "no" >&6; }
40449 fi
40450 
40451 
40452           if test "x$NM" = x; then
40453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40454           fi
40455         else
40456           # Otherwise we believe it is a complete path. Use it as it is.
40457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40458 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40460 $as_echo_n "checking for NM... " >&6; }
40461           if test ! -x "$tool_specified"; then
40462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40463 $as_echo "not found" >&6; }
40464             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40465           fi
40466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40467 $as_echo "$tool_specified" >&6; }
40468         fi
40469       fi
40470     fi
40471 
40472   fi
40473 
40474 
40475     else
40476 
40477 
40478   # Publish this variable in the help.
40479 
40480 
40481   if [ -z "${NM+x}" ]; then
40482     # The variable is not set by user, try to locate tool using the code snippet
40483     if test -n "$ac_tool_prefix"; then
40484   for ac_prog in nm
40485   do
40486     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40487 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40489 $as_echo_n "checking for $ac_word... " >&6; }
40490 if ${ac_cv_prog_NM+:} false; then :
40491   $as_echo_n "(cached) " >&6
40492 else
40493   if test -n "$NM"; then
40494   ac_cv_prog_NM="$NM" # Let the user override the test.
40495 else
40496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40497 for as_dir in $PATH
40498 do
40499   IFS=$as_save_IFS
40500   test -z "$as_dir" && as_dir=.
40501     for ac_exec_ext in '' $ac_executable_extensions; do
40502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40503     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40505     break 2
40506   fi
40507 done
40508   done
40509 IFS=$as_save_IFS
40510 
40511 fi
40512 fi
40513 NM=$ac_cv_prog_NM
40514 if test -n "$NM"; then
40515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40516 $as_echo "$NM" >&6; }
40517 else
40518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40519 $as_echo "no" >&6; }
40520 fi
40521 
40522 
40523     test -n "$NM" && break
40524   done
40525 fi
40526 if test -z "$NM"; then
40527   ac_ct_NM=$NM
40528   for ac_prog in nm
40529 do
40530   # Extract the first word of "$ac_prog", so it can be a program name with args.
40531 set dummy $ac_prog; ac_word=$2
40532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40533 $as_echo_n "checking for $ac_word... " >&6; }
40534 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40535   $as_echo_n "(cached) " >&6
40536 else
40537   if test -n "$ac_ct_NM"; then
40538   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40539 else
40540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40541 for as_dir in $PATH
40542 do
40543   IFS=$as_save_IFS
40544   test -z "$as_dir" && as_dir=.
40545     for ac_exec_ext in '' $ac_executable_extensions; do
40546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40547     ac_cv_prog_ac_ct_NM="$ac_prog"
40548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40549     break 2
40550   fi
40551 done
40552   done
40553 IFS=$as_save_IFS
40554 
40555 fi
40556 fi
40557 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40558 if test -n "$ac_ct_NM"; then
40559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40560 $as_echo "$ac_ct_NM" >&6; }
40561 else
40562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40563 $as_echo "no" >&6; }
40564 fi
40565 
40566 
40567   test -n "$ac_ct_NM" && break
40568 done
40569 
40570   if test "x$ac_ct_NM" = x; then
40571     NM=""
40572   else
40573     case $cross_compiling:$ac_tool_warned in
40574 yes:)
40575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40576 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40577 ac_tool_warned=yes ;;
40578 esac
40579     NM=$ac_ct_NM
40580   fi
40581 fi
40582 
40583   else
40584     # The variable is set, but is it from the command line or the environment?
40585 
40586     # Try to remove the string !NM! from our list.
40587     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40588     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40589       # If it failed, the variable was not from the command line. Ignore it,
40590       # but warn the user (except for BASH, which is always set by the calling BASH).
40591       if test "xNM" != xBASH; then
40592         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40593 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40594       fi
40595       # Try to locate tool using the code snippet
40596       if test -n "$ac_tool_prefix"; then
40597   for ac_prog in nm
40598   do
40599     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40600 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40602 $as_echo_n "checking for $ac_word... " >&6; }
40603 if ${ac_cv_prog_NM+:} false; then :
40604   $as_echo_n "(cached) " >&6
40605 else
40606   if test -n "$NM"; then
40607   ac_cv_prog_NM="$NM" # Let the user override the test.
40608 else
40609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40610 for as_dir in $PATH
40611 do
40612   IFS=$as_save_IFS
40613   test -z "$as_dir" && as_dir=.
40614     for ac_exec_ext in '' $ac_executable_extensions; do
40615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40616     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40618     break 2
40619   fi
40620 done
40621   done
40622 IFS=$as_save_IFS
40623 
40624 fi
40625 fi
40626 NM=$ac_cv_prog_NM
40627 if test -n "$NM"; then
40628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40629 $as_echo "$NM" >&6; }
40630 else
40631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40632 $as_echo "no" >&6; }
40633 fi
40634 
40635 
40636     test -n "$NM" && break
40637   done
40638 fi
40639 if test -z "$NM"; then
40640   ac_ct_NM=$NM
40641   for ac_prog in nm
40642 do
40643   # Extract the first word of "$ac_prog", so it can be a program name with args.
40644 set dummy $ac_prog; ac_word=$2
40645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40646 $as_echo_n "checking for $ac_word... " >&6; }
40647 if ${ac_cv_prog_ac_ct_NM+:} false; then :
40648   $as_echo_n "(cached) " >&6
40649 else
40650   if test -n "$ac_ct_NM"; then
40651   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40652 else
40653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40654 for as_dir in $PATH
40655 do
40656   IFS=$as_save_IFS
40657   test -z "$as_dir" && as_dir=.
40658     for ac_exec_ext in '' $ac_executable_extensions; do
40659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40660     ac_cv_prog_ac_ct_NM="$ac_prog"
40661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40662     break 2
40663   fi
40664 done
40665   done
40666 IFS=$as_save_IFS
40667 
40668 fi
40669 fi
40670 ac_ct_NM=$ac_cv_prog_ac_ct_NM
40671 if test -n "$ac_ct_NM"; then
40672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40673 $as_echo "$ac_ct_NM" >&6; }
40674 else
40675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40676 $as_echo "no" >&6; }
40677 fi
40678 
40679 
40680   test -n "$ac_ct_NM" && break
40681 done
40682 
40683   if test "x$ac_ct_NM" = x; then
40684     NM=""
40685   else
40686     case $cross_compiling:$ac_tool_warned in
40687 yes:)
40688 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40689 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40690 ac_tool_warned=yes ;;
40691 esac
40692     NM=$ac_ct_NM
40693   fi
40694 fi
40695 
40696     else
40697       # If it succeeded, then it was overridden by the user. We will use it
40698       # for the tool.
40699 
40700       # First remove it from the list of overridden variables, so we can test
40701       # for unknown variables in the end.
40702       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40703 
40704       # Check if we try to supply an empty value
40705       if test "x$NM" = x; then
40706         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40707 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40709 $as_echo_n "checking for NM... " >&6; }
40710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40711 $as_echo "disabled" >&6; }
40712       else
40713         # Check if the provided tool contains a complete path.
40714         tool_specified="$NM"
40715         tool_basename="${tool_specified##*/}"
40716         if test "x$tool_basename" = "x$tool_specified"; then
40717           # A command without a complete path is provided, search $PATH.
40718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40719 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40720           # Extract the first word of "$tool_basename", so it can be a program name with args.
40721 set dummy $tool_basename; ac_word=$2
40722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40723 $as_echo_n "checking for $ac_word... " >&6; }
40724 if ${ac_cv_path_NM+:} false; then :
40725   $as_echo_n "(cached) " >&6
40726 else
40727   case $NM in
40728   [\\/]* | ?:[\\/]*)
40729   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40730   ;;
40731   *)
40732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40733 for as_dir in $PATH
40734 do
40735   IFS=$as_save_IFS
40736   test -z "$as_dir" && as_dir=.
40737     for ac_exec_ext in '' $ac_executable_extensions; do
40738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40739     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40741     break 2
40742   fi
40743 done
40744   done
40745 IFS=$as_save_IFS
40746 
40747   ;;
40748 esac
40749 fi
40750 NM=$ac_cv_path_NM
40751 if test -n "$NM"; then
40752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40753 $as_echo "$NM" >&6; }
40754 else
40755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40756 $as_echo "no" >&6; }
40757 fi
40758 
40759 
40760           if test "x$NM" = x; then
40761             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40762           fi
40763         else
40764           # Otherwise we believe it is a complete path. Use it as it is.
40765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40766 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40767           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40768 $as_echo_n "checking for NM... " >&6; }
40769           if test ! -x "$tool_specified"; then
40770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40771 $as_echo "not found" >&6; }
40772             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40773           fi
40774           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40775 $as_echo "$tool_specified" >&6; }
40776         fi
40777       fi
40778     fi
40779 
40780   fi
40781 
40782 
40783     fi
40784 
40785   # Only process if variable expands to non-empty
40786 
40787   if test "x$NM" != x; then
40788     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40789 
40790   # First separate the path from the arguments. This will split at the first
40791   # space.
40792   complete="$NM"
40793   path="${complete%% *}"
40794   tmp="$complete EOL"
40795   arguments="${tmp#* }"
40796 
40797   # Input might be given as Windows format, start by converting to
40798   # unix format.
40799   new_path=`$CYGPATH -u "$path"`
40800 
40801   # Now try to locate executable using which
40802   new_path=`$WHICH "$new_path" 2> /dev/null`
40803   # bat and cmd files are not always considered executable in cygwin causing which
40804   # to not find them
40805   if test "x$new_path" = x \
40806       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40807       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40808     new_path=`$CYGPATH -u "$path"`
40809   fi
40810   if test "x$new_path" = x; then
40811     # Oops. Which didn't find the executable.
40812     # The splitting of arguments from the executable at a space might have been incorrect,
40813     # since paths with space are more likely in Windows. Give it another try with the whole
40814     # argument.
40815     path="$complete"
40816     arguments="EOL"
40817     new_path=`$CYGPATH -u "$path"`
40818     new_path=`$WHICH "$new_path" 2> /dev/null`
40819     # bat and cmd files are not always considered executable in cygwin causing which
40820     # to not find them
40821     if test "x$new_path" = x \
40822         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40823         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40824       new_path=`$CYGPATH -u "$path"`
40825     fi
40826     if test "x$new_path" = x; then
40827       # It's still not found. Now this is an unrecoverable error.
40828       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40829 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40830       has_space=`$ECHO "$complete" | $GREP " "`
40831       if test "x$has_space" != x; then
40832         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40833 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40834       fi
40835       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40836     fi
40837   fi
40838 
40839   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40840   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40841   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40842   # "foo.exe" is OK but "foo" is an error.
40843   #
40844   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40845   # It is also a way to make sure we got the proper file name for the real test later on.
40846   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40847   if test "x$test_shortpath" = x; then
40848     # Short path failed, file does not exist as specified.
40849     # Try adding .exe or .cmd
40850     if test -f "${new_path}.exe"; then
40851       input_to_shortpath="${new_path}.exe"
40852     elif test -f "${new_path}.cmd"; then
40853       input_to_shortpath="${new_path}.cmd"
40854     else
40855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40856 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40857       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40858 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40859       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40860     fi
40861   else
40862     input_to_shortpath="$new_path"
40863   fi
40864 
40865   # Call helper function which possibly converts this using DOS-style short mode.
40866   # If so, the updated path is stored in $new_path.
40867   new_path="$input_to_shortpath"
40868 
40869   input_path="$input_to_shortpath"
40870   # Check if we need to convert this using DOS-style short mode. If the path
40871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40872   # take no chances and rewrite it.
40873   # Note: m4 eats our [], so we need to use [ and ] instead.
40874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40875   if test "x$has_forbidden_chars" != x; then
40876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40880       # Going to short mode and back again did indeed matter. Since short mode is
40881       # case insensitive, let's make it lowercase to improve readability.
40882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40883       # Now convert it back to Unix-style (cygpath)
40884       input_path=`$CYGPATH -u "$shortmode_path"`
40885       new_path="$input_path"
40886     fi
40887   fi
40888 
40889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40890   if test "x$test_cygdrive_prefix" = x; then
40891     # As a simple fix, exclude /usr/bin since it's not a real path.
40892     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40894       # a path prefixed by /cygdrive for fixpath to work.
40895       new_path="$CYGWIN_ROOT_PATH$input_path"
40896     fi
40897   fi
40898 
40899   # remove trailing .exe if any
40900   new_path="${new_path/%.exe/}"
40901 
40902     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40903 
40904   # First separate the path from the arguments. This will split at the first
40905   # space.
40906   complete="$NM"
40907   path="${complete%% *}"
40908   tmp="$complete EOL"
40909   arguments="${tmp#* }"
40910 
40911   # Input might be given as Windows format, start by converting to
40912   # unix format.
40913   new_path="$path"
40914 
40915   windows_path="$new_path"
40916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40917     unix_path=`$CYGPATH -u "$windows_path"`
40918     new_path="$unix_path"
40919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40921     new_path="$unix_path"
40922   fi
40923 
40924 
40925   # Now try to locate executable using which
40926   new_path=`$WHICH "$new_path" 2> /dev/null`
40927 
40928   if test "x$new_path" = x; then
40929     # Oops. Which didn't find the executable.
40930     # The splitting of arguments from the executable at a space might have been incorrect,
40931     # since paths with space are more likely in Windows. Give it another try with the whole
40932     # argument.
40933     path="$complete"
40934     arguments="EOL"
40935     new_path="$path"
40936 
40937   windows_path="$new_path"
40938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40939     unix_path=`$CYGPATH -u "$windows_path"`
40940     new_path="$unix_path"
40941   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40942     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40943     new_path="$unix_path"
40944   fi
40945 
40946 
40947     new_path=`$WHICH "$new_path" 2> /dev/null`
40948     # bat and cmd files are not always considered executable in MSYS causing which
40949     # to not find them
40950     if test "x$new_path" = x \
40951         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40952         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40953       new_path="$path"
40954 
40955   windows_path="$new_path"
40956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40957     unix_path=`$CYGPATH -u "$windows_path"`
40958     new_path="$unix_path"
40959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40961     new_path="$unix_path"
40962   fi
40963 
40964     fi
40965 
40966     if test "x$new_path" = x; then
40967       # It's still not found. Now this is an unrecoverable error.
40968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40969 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40970       has_space=`$ECHO "$complete" | $GREP " "`
40971       if test "x$has_space" != x; then
40972         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40974       fi
40975       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40976     fi
40977   fi
40978 
40979   # Now new_path has a complete unix path to the binary
40980   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40981     # Keep paths in /bin as-is, but remove trailing .exe if any
40982     new_path="${new_path/%.exe/}"
40983     # Do not save /bin paths to all_fixpath_prefixes!
40984   else
40985     # Not in mixed or Windows style, start by that.
40986     new_path=`cmd //c echo $new_path`
40987 
40988   input_path="$new_path"
40989   # Check if we need to convert this using DOS-style short mode. If the path
40990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40991   # take no chances and rewrite it.
40992   # Note: m4 eats our [], so we need to use [ and ] instead.
40993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40994   if test "x$has_forbidden_chars" != x; then
40995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40997   fi
40998 
40999     # Output is in $new_path
41000 
41001   windows_path="$new_path"
41002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41003     unix_path=`$CYGPATH -u "$windows_path"`
41004     new_path="$unix_path"
41005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41007     new_path="$unix_path"
41008   fi
41009 
41010     # remove trailing .exe if any
41011     new_path="${new_path/%.exe/}"
41012 
41013     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41014     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41015   fi
41016 
41017     else
41018       # We're on a unix platform. Hooray! :)
41019       # First separate the path from the arguments. This will split at the first
41020       # space.
41021       complete="$NM"
41022       path="${complete%% *}"
41023       tmp="$complete EOL"
41024       arguments="${tmp#* }"
41025 
41026       # Cannot rely on the command "which" here since it doesn't always work.
41027       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41028       if test -z "$is_absolute_path"; then
41029         # Path to executable is not absolute. Find it.
41030         IFS_save="$IFS"
41031         IFS=:
41032         for p in $PATH; do
41033           if test -f "$p/$path" && test -x "$p/$path"; then
41034             new_path="$p/$path"
41035             break
41036           fi
41037         done
41038         IFS="$IFS_save"
41039       else
41040         # This is an absolute path, we can use it without further modifications.
41041         new_path="$path"
41042       fi
41043 
41044       if test "x$new_path" = x; then
41045         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41046 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41047         has_space=`$ECHO "$complete" | $GREP " "`
41048         if test "x$has_space" != x; then
41049           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41050 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41051         fi
41052         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41053       fi
41054     fi
41055 
41056     # Now join together the path and the arguments once again
41057     if test "x$arguments" != xEOL; then
41058       new_complete="$new_path ${arguments% *}"
41059     else
41060       new_complete="$new_path"
41061     fi
41062 
41063     if test "x$complete" != "x$new_complete"; then
41064       NM="$new_complete"
41065       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41066 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41067     fi
41068   fi
41069 
41070     GNM="$NM"
41071 
41072   fi
41073 
41074   # objcopy is used for moving debug symbols to separate files when
41075   # full debug symbols are enabled.
41076   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41077 
41078 
41079   # Publish this variable in the help.
41080 
41081 
41082   if [ -z "${OBJCOPY+x}" ]; then
41083     # The variable is not set by user, try to locate tool using the code snippet
41084     if test -n "$ac_tool_prefix"; then
41085   for ac_prog in gobjcopy objcopy
41086   do
41087     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41088 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41090 $as_echo_n "checking for $ac_word... " >&6; }
41091 if ${ac_cv_prog_OBJCOPY+:} false; then :
41092   $as_echo_n "(cached) " >&6
41093 else
41094   if test -n "$OBJCOPY"; then
41095   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41096 else
41097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41098 for as_dir in $PATH
41099 do
41100   IFS=$as_save_IFS
41101   test -z "$as_dir" && as_dir=.
41102     for ac_exec_ext in '' $ac_executable_extensions; do
41103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41104     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41106     break 2
41107   fi
41108 done
41109   done
41110 IFS=$as_save_IFS
41111 
41112 fi
41113 fi
41114 OBJCOPY=$ac_cv_prog_OBJCOPY
41115 if test -n "$OBJCOPY"; then
41116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41117 $as_echo "$OBJCOPY" >&6; }
41118 else
41119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41120 $as_echo "no" >&6; }
41121 fi
41122 
41123 
41124     test -n "$OBJCOPY" && break
41125   done
41126 fi
41127 if test -z "$OBJCOPY"; then
41128   ac_ct_OBJCOPY=$OBJCOPY
41129   for ac_prog in gobjcopy objcopy
41130 do
41131   # Extract the first word of "$ac_prog", so it can be a program name with args.
41132 set dummy $ac_prog; ac_word=$2
41133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41134 $as_echo_n "checking for $ac_word... " >&6; }
41135 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41136   $as_echo_n "(cached) " >&6
41137 else
41138   if test -n "$ac_ct_OBJCOPY"; then
41139   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41140 else
41141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41142 for as_dir in $PATH
41143 do
41144   IFS=$as_save_IFS
41145   test -z "$as_dir" && as_dir=.
41146     for ac_exec_ext in '' $ac_executable_extensions; do
41147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41148     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41150     break 2
41151   fi
41152 done
41153   done
41154 IFS=$as_save_IFS
41155 
41156 fi
41157 fi
41158 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41159 if test -n "$ac_ct_OBJCOPY"; then
41160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41161 $as_echo "$ac_ct_OBJCOPY" >&6; }
41162 else
41163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41164 $as_echo "no" >&6; }
41165 fi
41166 
41167 
41168   test -n "$ac_ct_OBJCOPY" && break
41169 done
41170 
41171   if test "x$ac_ct_OBJCOPY" = x; then
41172     OBJCOPY=""
41173   else
41174     case $cross_compiling:$ac_tool_warned in
41175 yes:)
41176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41177 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41178 ac_tool_warned=yes ;;
41179 esac
41180     OBJCOPY=$ac_ct_OBJCOPY
41181   fi
41182 fi
41183 
41184   else
41185     # The variable is set, but is it from the command line or the environment?
41186 
41187     # Try to remove the string !OBJCOPY! from our list.
41188     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41189     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41190       # If it failed, the variable was not from the command line. Ignore it,
41191       # but warn the user (except for BASH, which is always set by the calling BASH).
41192       if test "xOBJCOPY" != xBASH; then
41193         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41194 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41195       fi
41196       # Try to locate tool using the code snippet
41197       if test -n "$ac_tool_prefix"; then
41198   for ac_prog in gobjcopy objcopy
41199   do
41200     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41201 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41203 $as_echo_n "checking for $ac_word... " >&6; }
41204 if ${ac_cv_prog_OBJCOPY+:} false; then :
41205   $as_echo_n "(cached) " >&6
41206 else
41207   if test -n "$OBJCOPY"; then
41208   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41209 else
41210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41211 for as_dir in $PATH
41212 do
41213   IFS=$as_save_IFS
41214   test -z "$as_dir" && as_dir=.
41215     for ac_exec_ext in '' $ac_executable_extensions; do
41216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41217     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41219     break 2
41220   fi
41221 done
41222   done
41223 IFS=$as_save_IFS
41224 
41225 fi
41226 fi
41227 OBJCOPY=$ac_cv_prog_OBJCOPY
41228 if test -n "$OBJCOPY"; then
41229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41230 $as_echo "$OBJCOPY" >&6; }
41231 else
41232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41233 $as_echo "no" >&6; }
41234 fi
41235 
41236 
41237     test -n "$OBJCOPY" && break
41238   done
41239 fi
41240 if test -z "$OBJCOPY"; then
41241   ac_ct_OBJCOPY=$OBJCOPY
41242   for ac_prog in gobjcopy objcopy
41243 do
41244   # Extract the first word of "$ac_prog", so it can be a program name with args.
41245 set dummy $ac_prog; ac_word=$2
41246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41247 $as_echo_n "checking for $ac_word... " >&6; }
41248 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41249   $as_echo_n "(cached) " >&6
41250 else
41251   if test -n "$ac_ct_OBJCOPY"; then
41252   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41253 else
41254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41255 for as_dir in $PATH
41256 do
41257   IFS=$as_save_IFS
41258   test -z "$as_dir" && as_dir=.
41259     for ac_exec_ext in '' $ac_executable_extensions; do
41260   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41261     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41262     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41263     break 2
41264   fi
41265 done
41266   done
41267 IFS=$as_save_IFS
41268 
41269 fi
41270 fi
41271 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41272 if test -n "$ac_ct_OBJCOPY"; then
41273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41274 $as_echo "$ac_ct_OBJCOPY" >&6; }
41275 else
41276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41277 $as_echo "no" >&6; }
41278 fi
41279 
41280 
41281   test -n "$ac_ct_OBJCOPY" && break
41282 done
41283 
41284   if test "x$ac_ct_OBJCOPY" = x; then
41285     OBJCOPY=""
41286   else
41287     case $cross_compiling:$ac_tool_warned in
41288 yes:)
41289 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41290 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41291 ac_tool_warned=yes ;;
41292 esac
41293     OBJCOPY=$ac_ct_OBJCOPY
41294   fi
41295 fi
41296 
41297     else
41298       # If it succeeded, then it was overridden by the user. We will use it
41299       # for the tool.
41300 
41301       # First remove it from the list of overridden variables, so we can test
41302       # for unknown variables in the end.
41303       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41304 
41305       # Check if we try to supply an empty value
41306       if test "x$OBJCOPY" = x; then
41307         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41308 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41310 $as_echo_n "checking for OBJCOPY... " >&6; }
41311         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41312 $as_echo "disabled" >&6; }
41313       else
41314         # Check if the provided tool contains a complete path.
41315         tool_specified="$OBJCOPY"
41316         tool_basename="${tool_specified##*/}"
41317         if test "x$tool_basename" = "x$tool_specified"; then
41318           # A command without a complete path is provided, search $PATH.
41319           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41320 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41321           # Extract the first word of "$tool_basename", so it can be a program name with args.
41322 set dummy $tool_basename; ac_word=$2
41323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41324 $as_echo_n "checking for $ac_word... " >&6; }
41325 if ${ac_cv_path_OBJCOPY+:} false; then :
41326   $as_echo_n "(cached) " >&6
41327 else
41328   case $OBJCOPY in
41329   [\\/]* | ?:[\\/]*)
41330   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41331   ;;
41332   *)
41333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41334 for as_dir in $PATH
41335 do
41336   IFS=$as_save_IFS
41337   test -z "$as_dir" && as_dir=.
41338     for ac_exec_ext in '' $ac_executable_extensions; do
41339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41340     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41342     break 2
41343   fi
41344 done
41345   done
41346 IFS=$as_save_IFS
41347 
41348   ;;
41349 esac
41350 fi
41351 OBJCOPY=$ac_cv_path_OBJCOPY
41352 if test -n "$OBJCOPY"; then
41353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41354 $as_echo "$OBJCOPY" >&6; }
41355 else
41356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41357 $as_echo "no" >&6; }
41358 fi
41359 
41360 
41361           if test "x$OBJCOPY" = x; then
41362             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41363           fi
41364         else
41365           # Otherwise we believe it is a complete path. Use it as it is.
41366           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41367 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41368           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41369 $as_echo_n "checking for OBJCOPY... " >&6; }
41370           if test ! -x "$tool_specified"; then
41371             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41372 $as_echo "not found" >&6; }
41373             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41374           fi
41375           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41376 $as_echo "$tool_specified" >&6; }
41377         fi
41378       fi
41379     fi
41380 
41381   fi
41382 
41383 
41384     # Only call fixup if objcopy was found.
41385     if test -n "$OBJCOPY"; then
41386 
41387   # Only process if variable expands to non-empty
41388 
41389   if test "x$OBJCOPY" != x; then
41390     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41391 
41392   # First separate the path from the arguments. This will split at the first
41393   # space.
41394   complete="$OBJCOPY"
41395   path="${complete%% *}"
41396   tmp="$complete EOL"
41397   arguments="${tmp#* }"
41398 
41399   # Input might be given as Windows format, start by converting to
41400   # unix format.
41401   new_path=`$CYGPATH -u "$path"`
41402 
41403   # Now try to locate executable using which
41404   new_path=`$WHICH "$new_path" 2> /dev/null`
41405   # bat and cmd files are not always considered executable in cygwin causing which
41406   # to not find them
41407   if test "x$new_path" = x \
41408       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41409       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41410     new_path=`$CYGPATH -u "$path"`
41411   fi
41412   if test "x$new_path" = x; then
41413     # Oops. Which didn't find the executable.
41414     # The splitting of arguments from the executable at a space might have been incorrect,
41415     # since paths with space are more likely in Windows. Give it another try with the whole
41416     # argument.
41417     path="$complete"
41418     arguments="EOL"
41419     new_path=`$CYGPATH -u "$path"`
41420     new_path=`$WHICH "$new_path" 2> /dev/null`
41421     # bat and cmd files are not always considered executable in cygwin causing which
41422     # to not find them
41423     if test "x$new_path" = x \
41424         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41425         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41426       new_path=`$CYGPATH -u "$path"`
41427     fi
41428     if test "x$new_path" = x; then
41429       # It's still not found. Now this is an unrecoverable error.
41430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41431 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41432       has_space=`$ECHO "$complete" | $GREP " "`
41433       if test "x$has_space" != x; then
41434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41436       fi
41437       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41438     fi
41439   fi
41440 
41441   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41442   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41443   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41444   # "foo.exe" is OK but "foo" is an error.
41445   #
41446   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41447   # It is also a way to make sure we got the proper file name for the real test later on.
41448   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41449   if test "x$test_shortpath" = x; then
41450     # Short path failed, file does not exist as specified.
41451     # Try adding .exe or .cmd
41452     if test -f "${new_path}.exe"; then
41453       input_to_shortpath="${new_path}.exe"
41454     elif test -f "${new_path}.cmd"; then
41455       input_to_shortpath="${new_path}.cmd"
41456     else
41457       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41458 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41459       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41460 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41461       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41462     fi
41463   else
41464     input_to_shortpath="$new_path"
41465   fi
41466 
41467   # Call helper function which possibly converts this using DOS-style short mode.
41468   # If so, the updated path is stored in $new_path.
41469   new_path="$input_to_shortpath"
41470 
41471   input_path="$input_to_shortpath"
41472   # Check if we need to convert this using DOS-style short mode. If the path
41473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41474   # take no chances and rewrite it.
41475   # Note: m4 eats our [], so we need to use [ and ] instead.
41476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41477   if test "x$has_forbidden_chars" != x; then
41478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41479     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41480     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41481     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41482       # Going to short mode and back again did indeed matter. Since short mode is
41483       # case insensitive, let's make it lowercase to improve readability.
41484       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41485       # Now convert it back to Unix-style (cygpath)
41486       input_path=`$CYGPATH -u "$shortmode_path"`
41487       new_path="$input_path"
41488     fi
41489   fi
41490 
41491   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41492   if test "x$test_cygdrive_prefix" = x; then
41493     # As a simple fix, exclude /usr/bin since it's not a real path.
41494     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41495       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41496       # a path prefixed by /cygdrive for fixpath to work.
41497       new_path="$CYGWIN_ROOT_PATH$input_path"
41498     fi
41499   fi
41500 
41501   # remove trailing .exe if any
41502   new_path="${new_path/%.exe/}"
41503 
41504     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41505 
41506   # First separate the path from the arguments. This will split at the first
41507   # space.
41508   complete="$OBJCOPY"
41509   path="${complete%% *}"
41510   tmp="$complete EOL"
41511   arguments="${tmp#* }"
41512 
41513   # Input might be given as Windows format, start by converting to
41514   # unix format.
41515   new_path="$path"
41516 
41517   windows_path="$new_path"
41518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41519     unix_path=`$CYGPATH -u "$windows_path"`
41520     new_path="$unix_path"
41521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41523     new_path="$unix_path"
41524   fi
41525 
41526 
41527   # Now try to locate executable using which
41528   new_path=`$WHICH "$new_path" 2> /dev/null`
41529 
41530   if test "x$new_path" = x; then
41531     # Oops. Which didn't find the executable.
41532     # The splitting of arguments from the executable at a space might have been incorrect,
41533     # since paths with space are more likely in Windows. Give it another try with the whole
41534     # argument.
41535     path="$complete"
41536     arguments="EOL"
41537     new_path="$path"
41538 
41539   windows_path="$new_path"
41540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41541     unix_path=`$CYGPATH -u "$windows_path"`
41542     new_path="$unix_path"
41543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41545     new_path="$unix_path"
41546   fi
41547 
41548 
41549     new_path=`$WHICH "$new_path" 2> /dev/null`
41550     # bat and cmd files are not always considered executable in MSYS causing which
41551     # to not find them
41552     if test "x$new_path" = x \
41553         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41554         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41555       new_path="$path"
41556 
41557   windows_path="$new_path"
41558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41559     unix_path=`$CYGPATH -u "$windows_path"`
41560     new_path="$unix_path"
41561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41562     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41563     new_path="$unix_path"
41564   fi
41565 
41566     fi
41567 
41568     if test "x$new_path" = x; then
41569       # It's still not found. Now this is an unrecoverable error.
41570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41571 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41572       has_space=`$ECHO "$complete" | $GREP " "`
41573       if test "x$has_space" != x; then
41574         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41575 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41576       fi
41577       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41578     fi
41579   fi
41580 
41581   # Now new_path has a complete unix path to the binary
41582   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41583     # Keep paths in /bin as-is, but remove trailing .exe if any
41584     new_path="${new_path/%.exe/}"
41585     # Do not save /bin paths to all_fixpath_prefixes!
41586   else
41587     # Not in mixed or Windows style, start by that.
41588     new_path=`cmd //c echo $new_path`
41589 
41590   input_path="$new_path"
41591   # Check if we need to convert this using DOS-style short mode. If the path
41592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41593   # take no chances and rewrite it.
41594   # Note: m4 eats our [], so we need to use [ and ] instead.
41595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41596   if test "x$has_forbidden_chars" != x; then
41597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41598     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41599   fi
41600 
41601     # Output is in $new_path
41602 
41603   windows_path="$new_path"
41604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41605     unix_path=`$CYGPATH -u "$windows_path"`
41606     new_path="$unix_path"
41607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41609     new_path="$unix_path"
41610   fi
41611 
41612     # remove trailing .exe if any
41613     new_path="${new_path/%.exe/}"
41614 
41615     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41616     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41617   fi
41618 
41619     else
41620       # We're on a unix platform. Hooray! :)
41621       # First separate the path from the arguments. This will split at the first
41622       # space.
41623       complete="$OBJCOPY"
41624       path="${complete%% *}"
41625       tmp="$complete EOL"
41626       arguments="${tmp#* }"
41627 
41628       # Cannot rely on the command "which" here since it doesn't always work.
41629       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41630       if test -z "$is_absolute_path"; then
41631         # Path to executable is not absolute. Find it.
41632         IFS_save="$IFS"
41633         IFS=:
41634         for p in $PATH; do
41635           if test -f "$p/$path" && test -x "$p/$path"; then
41636             new_path="$p/$path"
41637             break
41638           fi
41639         done
41640         IFS="$IFS_save"
41641       else
41642         # This is an absolute path, we can use it without further modifications.
41643         new_path="$path"
41644       fi
41645 
41646       if test "x$new_path" = x; then
41647         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41648 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41649         has_space=`$ECHO "$complete" | $GREP " "`
41650         if test "x$has_space" != x; then
41651           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41652 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41653         fi
41654         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41655       fi
41656     fi
41657 
41658     # Now join together the path and the arguments once again
41659     if test "x$arguments" != xEOL; then
41660       new_complete="$new_path ${arguments% *}"
41661     else
41662       new_complete="$new_path"
41663     fi
41664 
41665     if test "x$complete" != "x$new_complete"; then
41666       OBJCOPY="$new_complete"
41667       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41668 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41669     fi
41670   fi
41671 
41672       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41673         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41674         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41675         # - version number is last blank separate word on first line
41676         # - version number formats that have been seen:
41677         #   - <major>.<minor>
41678         #   - <major>.<minor>.<micro>
41679         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41680         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41681          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41682               -e 's/.* //' \
41683               -e '/^[01]\./b bad' \
41684               -e '/^2\./{' \
41685               -e '  s/^2\.//' \
41686               -e '  /^[0-9]$/b bad' \
41687               -e '  /^[0-9]\./b bad' \
41688               -e '  /^1[0-9]$/b bad' \
41689               -e '  /^1[0-9]\./b bad' \
41690               -e '  /^20\./b bad' \
41691               -e '  /^21\.0$/b bad' \
41692               -e '  /^21\.0\./b bad' \
41693               -e '}' \
41694               -e ':good' \
41695               -e 's/.*/VALID_VERSION/p' \
41696               -e 'q' \
41697               -e ':bad' \
41698               -e 's/.*/BAD_VERSION/p' \
41699               -e 'q'`
41700         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41701           OBJCOPY=
41702           { $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
41703 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41704           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41705 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41706           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41707 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41708           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41709 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41710           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41711 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41712         fi
41713       fi
41714     fi
41715   fi
41716 
41717 
41718 
41719   # Publish this variable in the help.
41720 
41721 
41722   if [ -z "${OBJDUMP+x}" ]; then
41723     # The variable is not set by user, try to locate tool using the code snippet
41724     if test -n "$ac_tool_prefix"; then
41725   for ac_prog in gobjdump objdump
41726   do
41727     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41728 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41730 $as_echo_n "checking for $ac_word... " >&6; }
41731 if ${ac_cv_prog_OBJDUMP+:} false; then :
41732   $as_echo_n "(cached) " >&6
41733 else
41734   if test -n "$OBJDUMP"; then
41735   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41736 else
41737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41738 for as_dir in $PATH
41739 do
41740   IFS=$as_save_IFS
41741   test -z "$as_dir" && as_dir=.
41742     for ac_exec_ext in '' $ac_executable_extensions; do
41743   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41744     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41745     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41746     break 2
41747   fi
41748 done
41749   done
41750 IFS=$as_save_IFS
41751 
41752 fi
41753 fi
41754 OBJDUMP=$ac_cv_prog_OBJDUMP
41755 if test -n "$OBJDUMP"; then
41756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41757 $as_echo "$OBJDUMP" >&6; }
41758 else
41759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41760 $as_echo "no" >&6; }
41761 fi
41762 
41763 
41764     test -n "$OBJDUMP" && break
41765   done
41766 fi
41767 if test -z "$OBJDUMP"; then
41768   ac_ct_OBJDUMP=$OBJDUMP
41769   for ac_prog in gobjdump objdump
41770 do
41771   # Extract the first word of "$ac_prog", so it can be a program name with args.
41772 set dummy $ac_prog; ac_word=$2
41773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41774 $as_echo_n "checking for $ac_word... " >&6; }
41775 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41776   $as_echo_n "(cached) " >&6
41777 else
41778   if test -n "$ac_ct_OBJDUMP"; then
41779   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41780 else
41781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41782 for as_dir in $PATH
41783 do
41784   IFS=$as_save_IFS
41785   test -z "$as_dir" && as_dir=.
41786     for ac_exec_ext in '' $ac_executable_extensions; do
41787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41788     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41790     break 2
41791   fi
41792 done
41793   done
41794 IFS=$as_save_IFS
41795 
41796 fi
41797 fi
41798 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41799 if test -n "$ac_ct_OBJDUMP"; then
41800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41801 $as_echo "$ac_ct_OBJDUMP" >&6; }
41802 else
41803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41804 $as_echo "no" >&6; }
41805 fi
41806 
41807 
41808   test -n "$ac_ct_OBJDUMP" && break
41809 done
41810 
41811   if test "x$ac_ct_OBJDUMP" = x; then
41812     OBJDUMP=""
41813   else
41814     case $cross_compiling:$ac_tool_warned in
41815 yes:)
41816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41817 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41818 ac_tool_warned=yes ;;
41819 esac
41820     OBJDUMP=$ac_ct_OBJDUMP
41821   fi
41822 fi
41823 
41824   else
41825     # The variable is set, but is it from the command line or the environment?
41826 
41827     # Try to remove the string !OBJDUMP! from our list.
41828     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41829     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41830       # If it failed, the variable was not from the command line. Ignore it,
41831       # but warn the user (except for BASH, which is always set by the calling BASH).
41832       if test "xOBJDUMP" != xBASH; then
41833         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41834 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41835       fi
41836       # Try to locate tool using the code snippet
41837       if test -n "$ac_tool_prefix"; then
41838   for ac_prog in gobjdump objdump
41839   do
41840     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41841 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41843 $as_echo_n "checking for $ac_word... " >&6; }
41844 if ${ac_cv_prog_OBJDUMP+:} false; then :
41845   $as_echo_n "(cached) " >&6
41846 else
41847   if test -n "$OBJDUMP"; then
41848   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41849 else
41850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41851 for as_dir in $PATH
41852 do
41853   IFS=$as_save_IFS
41854   test -z "$as_dir" && as_dir=.
41855     for ac_exec_ext in '' $ac_executable_extensions; do
41856   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41857     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41858     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41859     break 2
41860   fi
41861 done
41862   done
41863 IFS=$as_save_IFS
41864 
41865 fi
41866 fi
41867 OBJDUMP=$ac_cv_prog_OBJDUMP
41868 if test -n "$OBJDUMP"; then
41869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41870 $as_echo "$OBJDUMP" >&6; }
41871 else
41872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41873 $as_echo "no" >&6; }
41874 fi
41875 
41876 
41877     test -n "$OBJDUMP" && break
41878   done
41879 fi
41880 if test -z "$OBJDUMP"; then
41881   ac_ct_OBJDUMP=$OBJDUMP
41882   for ac_prog in gobjdump objdump
41883 do
41884   # Extract the first word of "$ac_prog", so it can be a program name with args.
41885 set dummy $ac_prog; ac_word=$2
41886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41887 $as_echo_n "checking for $ac_word... " >&6; }
41888 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41889   $as_echo_n "(cached) " >&6
41890 else
41891   if test -n "$ac_ct_OBJDUMP"; then
41892   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41893 else
41894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41895 for as_dir in $PATH
41896 do
41897   IFS=$as_save_IFS
41898   test -z "$as_dir" && as_dir=.
41899     for ac_exec_ext in '' $ac_executable_extensions; do
41900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41901     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41903     break 2
41904   fi
41905 done
41906   done
41907 IFS=$as_save_IFS
41908 
41909 fi
41910 fi
41911 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41912 if test -n "$ac_ct_OBJDUMP"; then
41913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41914 $as_echo "$ac_ct_OBJDUMP" >&6; }
41915 else
41916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41917 $as_echo "no" >&6; }
41918 fi
41919 
41920 
41921   test -n "$ac_ct_OBJDUMP" && break
41922 done
41923 
41924   if test "x$ac_ct_OBJDUMP" = x; then
41925     OBJDUMP=""
41926   else
41927     case $cross_compiling:$ac_tool_warned in
41928 yes:)
41929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41930 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41931 ac_tool_warned=yes ;;
41932 esac
41933     OBJDUMP=$ac_ct_OBJDUMP
41934   fi
41935 fi
41936 
41937     else
41938       # If it succeeded, then it was overridden by the user. We will use it
41939       # for the tool.
41940 
41941       # First remove it from the list of overridden variables, so we can test
41942       # for unknown variables in the end.
41943       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41944 
41945       # Check if we try to supply an empty value
41946       if test "x$OBJDUMP" = x; then
41947         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41948 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41949         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41950 $as_echo_n "checking for OBJDUMP... " >&6; }
41951         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41952 $as_echo "disabled" >&6; }
41953       else
41954         # Check if the provided tool contains a complete path.
41955         tool_specified="$OBJDUMP"
41956         tool_basename="${tool_specified##*/}"
41957         if test "x$tool_basename" = "x$tool_specified"; then
41958           # A command without a complete path is provided, search $PATH.
41959           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
41960 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
41961           # Extract the first word of "$tool_basename", so it can be a program name with args.
41962 set dummy $tool_basename; ac_word=$2
41963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41964 $as_echo_n "checking for $ac_word... " >&6; }
41965 if ${ac_cv_path_OBJDUMP+:} false; then :
41966   $as_echo_n "(cached) " >&6
41967 else
41968   case $OBJDUMP in
41969   [\\/]* | ?:[\\/]*)
41970   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
41971   ;;
41972   *)
41973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41974 for as_dir in $PATH
41975 do
41976   IFS=$as_save_IFS
41977   test -z "$as_dir" && as_dir=.
41978     for ac_exec_ext in '' $ac_executable_extensions; do
41979   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41980     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
41981     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41982     break 2
41983   fi
41984 done
41985   done
41986 IFS=$as_save_IFS
41987 
41988   ;;
41989 esac
41990 fi
41991 OBJDUMP=$ac_cv_path_OBJDUMP
41992 if test -n "$OBJDUMP"; then
41993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41994 $as_echo "$OBJDUMP" >&6; }
41995 else
41996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41997 $as_echo "no" >&6; }
41998 fi
41999 
42000 
42001           if test "x$OBJDUMP" = x; then
42002             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42003           fi
42004         else
42005           # Otherwise we believe it is a complete path. Use it as it is.
42006           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42007 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42008           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42009 $as_echo_n "checking for OBJDUMP... " >&6; }
42010           if test ! -x "$tool_specified"; then
42011             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42012 $as_echo "not found" >&6; }
42013             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42014           fi
42015           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42016 $as_echo "$tool_specified" >&6; }
42017         fi
42018       fi
42019     fi
42020 
42021   fi
42022 
42023 
42024   if test "x$OBJDUMP" != x; then
42025     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42026     # bails if argument is missing.
42027 
42028   # Only process if variable expands to non-empty
42029 
42030   if test "x$OBJDUMP" != x; then
42031     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42032 
42033   # First separate the path from the arguments. This will split at the first
42034   # space.
42035   complete="$OBJDUMP"
42036   path="${complete%% *}"
42037   tmp="$complete EOL"
42038   arguments="${tmp#* }"
42039 
42040   # Input might be given as Windows format, start by converting to
42041   # unix format.
42042   new_path=`$CYGPATH -u "$path"`
42043 
42044   # Now try to locate executable using which
42045   new_path=`$WHICH "$new_path" 2> /dev/null`
42046   # bat and cmd files are not always considered executable in cygwin causing which
42047   # to not find them
42048   if test "x$new_path" = x \
42049       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42050       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42051     new_path=`$CYGPATH -u "$path"`
42052   fi
42053   if test "x$new_path" = x; then
42054     # Oops. Which didn't find the executable.
42055     # The splitting of arguments from the executable at a space might have been incorrect,
42056     # since paths with space are more likely in Windows. Give it another try with the whole
42057     # argument.
42058     path="$complete"
42059     arguments="EOL"
42060     new_path=`$CYGPATH -u "$path"`
42061     new_path=`$WHICH "$new_path" 2> /dev/null`
42062     # bat and cmd files are not always considered executable in cygwin causing which
42063     # to not find them
42064     if test "x$new_path" = x \
42065         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42066         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42067       new_path=`$CYGPATH -u "$path"`
42068     fi
42069     if test "x$new_path" = x; then
42070       # It's still not found. Now this is an unrecoverable error.
42071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42072 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42073       has_space=`$ECHO "$complete" | $GREP " "`
42074       if test "x$has_space" != x; then
42075         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42076 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42077       fi
42078       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42079     fi
42080   fi
42081 
42082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42085   # "foo.exe" is OK but "foo" is an error.
42086   #
42087   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42088   # It is also a way to make sure we got the proper file name for the real test later on.
42089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42090   if test "x$test_shortpath" = x; then
42091     # Short path failed, file does not exist as specified.
42092     # Try adding .exe or .cmd
42093     if test -f "${new_path}.exe"; then
42094       input_to_shortpath="${new_path}.exe"
42095     elif test -f "${new_path}.cmd"; then
42096       input_to_shortpath="${new_path}.cmd"
42097     else
42098       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42099 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42100       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42101 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42102       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42103     fi
42104   else
42105     input_to_shortpath="$new_path"
42106   fi
42107 
42108   # Call helper function which possibly converts this using DOS-style short mode.
42109   # If so, the updated path is stored in $new_path.
42110   new_path="$input_to_shortpath"
42111 
42112   input_path="$input_to_shortpath"
42113   # Check if we need to convert this using DOS-style short mode. If the path
42114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42115   # take no chances and rewrite it.
42116   # Note: m4 eats our [], so we need to use [ and ] instead.
42117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42118   if test "x$has_forbidden_chars" != x; then
42119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42123       # Going to short mode and back again did indeed matter. Since short mode is
42124       # case insensitive, let's make it lowercase to improve readability.
42125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42126       # Now convert it back to Unix-style (cygpath)
42127       input_path=`$CYGPATH -u "$shortmode_path"`
42128       new_path="$input_path"
42129     fi
42130   fi
42131 
42132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42133   if test "x$test_cygdrive_prefix" = x; then
42134     # As a simple fix, exclude /usr/bin since it's not a real path.
42135     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42137       # a path prefixed by /cygdrive for fixpath to work.
42138       new_path="$CYGWIN_ROOT_PATH$input_path"
42139     fi
42140   fi
42141 
42142   # remove trailing .exe if any
42143   new_path="${new_path/%.exe/}"
42144 
42145     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42146 
42147   # First separate the path from the arguments. This will split at the first
42148   # space.
42149   complete="$OBJDUMP"
42150   path="${complete%% *}"
42151   tmp="$complete EOL"
42152   arguments="${tmp#* }"
42153 
42154   # Input might be given as Windows format, start by converting to
42155   # unix format.
42156   new_path="$path"
42157 
42158   windows_path="$new_path"
42159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42160     unix_path=`$CYGPATH -u "$windows_path"`
42161     new_path="$unix_path"
42162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42164     new_path="$unix_path"
42165   fi
42166 
42167 
42168   # Now try to locate executable using which
42169   new_path=`$WHICH "$new_path" 2> /dev/null`
42170 
42171   if test "x$new_path" = x; then
42172     # Oops. Which didn't find the executable.
42173     # The splitting of arguments from the executable at a space might have been incorrect,
42174     # since paths with space are more likely in Windows. Give it another try with the whole
42175     # argument.
42176     path="$complete"
42177     arguments="EOL"
42178     new_path="$path"
42179 
42180   windows_path="$new_path"
42181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42182     unix_path=`$CYGPATH -u "$windows_path"`
42183     new_path="$unix_path"
42184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42186     new_path="$unix_path"
42187   fi
42188 
42189 
42190     new_path=`$WHICH "$new_path" 2> /dev/null`
42191     # bat and cmd files are not always considered executable in MSYS causing which
42192     # to not find them
42193     if test "x$new_path" = x \
42194         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42195         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42196       new_path="$path"
42197 
42198   windows_path="$new_path"
42199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42200     unix_path=`$CYGPATH -u "$windows_path"`
42201     new_path="$unix_path"
42202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42203     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42204     new_path="$unix_path"
42205   fi
42206 
42207     fi
42208 
42209     if test "x$new_path" = x; then
42210       # It's still not found. Now this is an unrecoverable error.
42211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42212 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42213       has_space=`$ECHO "$complete" | $GREP " "`
42214       if test "x$has_space" != x; then
42215         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42216 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42217       fi
42218       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42219     fi
42220   fi
42221 
42222   # Now new_path has a complete unix path to the binary
42223   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42224     # Keep paths in /bin as-is, but remove trailing .exe if any
42225     new_path="${new_path/%.exe/}"
42226     # Do not save /bin paths to all_fixpath_prefixes!
42227   else
42228     # Not in mixed or Windows style, start by that.
42229     new_path=`cmd //c echo $new_path`
42230 
42231   input_path="$new_path"
42232   # Check if we need to convert this using DOS-style short mode. If the path
42233   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42234   # take no chances and rewrite it.
42235   # Note: m4 eats our [], so we need to use [ and ] instead.
42236   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42237   if test "x$has_forbidden_chars" != x; then
42238     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42239     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42240   fi
42241 
42242     # Output is in $new_path
42243 
42244   windows_path="$new_path"
42245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42246     unix_path=`$CYGPATH -u "$windows_path"`
42247     new_path="$unix_path"
42248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42249     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42250     new_path="$unix_path"
42251   fi
42252 
42253     # remove trailing .exe if any
42254     new_path="${new_path/%.exe/}"
42255 
42256     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42257     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42258   fi
42259 
42260     else
42261       # We're on a unix platform. Hooray! :)
42262       # First separate the path from the arguments. This will split at the first
42263       # space.
42264       complete="$OBJDUMP"
42265       path="${complete%% *}"
42266       tmp="$complete EOL"
42267       arguments="${tmp#* }"
42268 
42269       # Cannot rely on the command "which" here since it doesn't always work.
42270       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42271       if test -z "$is_absolute_path"; then
42272         # Path to executable is not absolute. Find it.
42273         IFS_save="$IFS"
42274         IFS=:
42275         for p in $PATH; do
42276           if test -f "$p/$path" && test -x "$p/$path"; then
42277             new_path="$p/$path"
42278             break
42279           fi
42280         done
42281         IFS="$IFS_save"
42282       else
42283         # This is an absolute path, we can use it without further modifications.
42284         new_path="$path"
42285       fi
42286 
42287       if test "x$new_path" = x; then
42288         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42289 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42290         has_space=`$ECHO "$complete" | $GREP " "`
42291         if test "x$has_space" != x; then
42292           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42293 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42294         fi
42295         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42296       fi
42297     fi
42298 
42299     # Now join together the path and the arguments once again
42300     if test "x$arguments" != xEOL; then
42301       new_complete="$new_path ${arguments% *}"
42302     else
42303       new_complete="$new_path"
42304     fi
42305 
42306     if test "x$complete" != "x$new_complete"; then
42307       OBJDUMP="$new_complete"
42308       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42309 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42310     fi
42311   fi
42312 
42313   fi
42314 
42315 
42316   # Restore old path.
42317   PATH="$OLD_PATH"
42318 
42319   # Restore the flags to the user specified values.
42320   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42321   CFLAGS="$ORG_CFLAGS"
42322   CXXFLAGS="$ORG_CXXFLAGS"
42323 
42324 
42325 # Finally do some processing after the detection phase
42326 
42327   if test "x$COMPILE_TYPE" = "xcross"; then
42328     # Now we need to find a C/C++ compiler that can build executables for the
42329     # build platform. We can't use the AC_PROG_CC macro, since it can only be
42330     # used once. Also, we need to do this without adding a tools dir to the
42331     # path, otherwise we might pick up cross-compilers which don't use standard
42332     # naming.
42333 
42334     OLDPATH="$PATH"
42335 
42336 
42337 # Check whether --with-build-devkit was given.
42338 if test "${with_build_devkit+set}" = set; then :
42339   withval=$with_build_devkit;
42340 fi
42341 
42342     if test "x$with_build_devkit" = "xyes"; then
42343       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42344     elif test -n "$with_build_devkit"; then
42345       if test ! -d "$with_build_devkit"; then
42346         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42347       else
42348 
42349   # Only process if variable expands to non-empty
42350 
42351   if test "x$with_build_devkit" != x; then
42352     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42353 
42354   # Input might be given as Windows format, start by converting to
42355   # unix format.
42356   path="$with_build_devkit"
42357   new_path=`$CYGPATH -u "$path"`
42358 
42359   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42360   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42361   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42362   # "foo.exe" is OK but "foo" is an error.
42363   #
42364   # This test is therefore slightly more accurate than "test -f" to check for file precense.
42365   # It is also a way to make sure we got the proper file name for the real test later on.
42366   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42367   if test "x$test_shortpath" = x; then
42368     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42369 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42370     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42371   fi
42372 
42373   # Call helper function which possibly converts this using DOS-style short mode.
42374   # If so, the updated path is stored in $new_path.
42375 
42376   input_path="$new_path"
42377   # Check if we need to convert this using DOS-style short mode. If the path
42378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42379   # take no chances and rewrite it.
42380   # Note: m4 eats our [], so we need to use [ and ] instead.
42381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42382   if test "x$has_forbidden_chars" != x; then
42383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42384     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42385     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42386     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42387       # Going to short mode and back again did indeed matter. Since short mode is
42388       # case insensitive, let's make it lowercase to improve readability.
42389       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42390       # Now convert it back to Unix-style (cygpath)
42391       input_path=`$CYGPATH -u "$shortmode_path"`
42392       new_path="$input_path"
42393     fi
42394   fi
42395 
42396   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42397   if test "x$test_cygdrive_prefix" = x; then
42398     # As a simple fix, exclude /usr/bin since it's not a real path.
42399     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42400       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42401       # a path prefixed by /cygdrive for fixpath to work.
42402       new_path="$CYGWIN_ROOT_PATH$input_path"
42403     fi
42404   fi
42405 
42406 
42407   if test "x$path" != "x$new_path"; then
42408     with_build_devkit="$new_path"
42409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42410 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42411   fi
42412 
42413     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42414 
42415   path="$with_build_devkit"
42416   has_colon=`$ECHO $path | $GREP ^.:`
42417   new_path="$path"
42418   if test "x$has_colon" = x; then
42419     # Not in mixed or Windows style, start by that.
42420     new_path=`cmd //c echo $path`
42421   fi
42422 
42423 
42424   input_path="$new_path"
42425   # Check if we need to convert this using DOS-style short mode. If the path
42426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42427   # take no chances and rewrite it.
42428   # Note: m4 eats our [], so we need to use [ and ] instead.
42429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42430   if test "x$has_forbidden_chars" != x; then
42431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42432     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42433   fi
42434 
42435 
42436   windows_path="$new_path"
42437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42438     unix_path=`$CYGPATH -u "$windows_path"`
42439     new_path="$unix_path"
42440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42442     new_path="$unix_path"
42443   fi
42444 
42445   if test "x$path" != "x$new_path"; then
42446     with_build_devkit="$new_path"
42447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42448 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42449   fi
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 
42454     else
42455       # We're on a unix platform. Hooray! :)
42456       path="$with_build_devkit"
42457       has_space=`$ECHO "$path" | $GREP " "`
42458       if test "x$has_space" != x; then
42459         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42460 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42461         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42462       fi
42463 
42464       # Use eval to expand a potential ~
42465       eval path="$path"
42466       if test ! -f "$path" && test ! -d "$path"; then
42467         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42468       fi
42469 
42470       if test -d "$path"; then
42471         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42472       else
42473         dir="`$DIRNAME "$path"`"
42474         base="`$BASENAME "$path"`"
42475         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
42476       fi
42477     fi
42478   fi
42479 
42480         BUILD_DEVKIT_ROOT="$with_build_devkit"
42481         # Check for a meta data info file in the root of the devkit
42482         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42483           # Process devkit.info so that existing devkit variables are not
42484           # modified by this
42485           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42486               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42487               -e "s/\$host/\$build/g" \
42488               $BUILD_DEVKIT_ROOT/devkit.info \
42489               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42490           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42491           # This potentially sets the following:
42492           # A descriptive name of the devkit
42493 
42494   if test "x$BUILD_DEVKIT_NAME" = x; then
42495     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42496   fi
42497 
42498           # Corresponds to --with-extra-path
42499 
42500   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42501     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42502   fi
42503 
42504           # Corresponds to --with-toolchain-path
42505 
42506   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42507     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42508   fi
42509 
42510           # Corresponds to --with-sysroot
42511 
42512   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42513     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42514   fi
42515 
42516           # Skip the Window specific parts
42517         fi
42518 
42519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42520 $as_echo_n "checking for build platform devkit... " >&6; }
42521         if test "x$BUILD_DEVKIT_NAME" != x; then
42522           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42523 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42524         else
42525           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42526 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42527         fi
42528 
42529         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42530 
42531   if test "x$BUILD_SYSROOT" != "x"; then
42532     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42533       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42534         # Solaris Studio does not have a concept of sysroot. Instead we must
42535         # make sure the default include and lib dirs are appended to each
42536         # compile and link command line. Must also add -I-xbuiltin to enable
42537         # inlining of system functions and intrinsics.
42538         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
42539         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42540             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42541             -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42542       fi
42543     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42544       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42545       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42546     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42547       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42548       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42549     fi
42550     # Propagate the sysroot args to hotspot
42551     BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42552     BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42553     BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42554     # The global CFLAGS and LDFLAGS variables need these for configure to function
42555     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42556     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42557     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42558     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42559   fi
42560 
42561   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42562     # We also need -iframework<path>/System/Library/Frameworks
42563     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42564     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42565     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42566     # set this here so it doesn't have to be peppered throughout the forest
42567     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42568     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42569   fi
42570 
42571 
42572 
42573 
42574 
42575          # Fallback default of just /bin if DEVKIT_PATH is not defined
42576         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42577           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42578         fi
42579         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42580       fi
42581     fi
42582 
42583     # FIXME: we should list the discovered compilers as an exclude pattern!
42584     # If we do that, we can do this detection before POST_DETECTION, and still
42585     # find the build compilers in the tools dir, if needed.
42586 
42587 
42588 
42589   # Publish this variable in the help.
42590 
42591 
42592   if [ -z "${BUILD_CC+x}" ]; then
42593     # The variable is not set by user, try to locate tool using the code snippet
42594     for ac_prog in cl cc gcc
42595 do
42596   # Extract the first word of "$ac_prog", so it can be a program name with args.
42597 set dummy $ac_prog; ac_word=$2
42598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42599 $as_echo_n "checking for $ac_word... " >&6; }
42600 if ${ac_cv_path_BUILD_CC+:} false; then :
42601   $as_echo_n "(cached) " >&6
42602 else
42603   case $BUILD_CC in
42604   [\\/]* | ?:[\\/]*)
42605   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42606   ;;
42607   *)
42608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42609 for as_dir in $PATH
42610 do
42611   IFS=$as_save_IFS
42612   test -z "$as_dir" && as_dir=.
42613     for ac_exec_ext in '' $ac_executable_extensions; do
42614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42615     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42617     break 2
42618   fi
42619 done
42620   done
42621 IFS=$as_save_IFS
42622 
42623   ;;
42624 esac
42625 fi
42626 BUILD_CC=$ac_cv_path_BUILD_CC
42627 if test -n "$BUILD_CC"; then
42628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42629 $as_echo "$BUILD_CC" >&6; }
42630 else
42631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42632 $as_echo "no" >&6; }
42633 fi
42634 
42635 
42636   test -n "$BUILD_CC" && break
42637 done
42638 
42639   else
42640     # The variable is set, but is it from the command line or the environment?
42641 
42642     # Try to remove the string !BUILD_CC! from our list.
42643     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42644     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42645       # If it failed, the variable was not from the command line. Ignore it,
42646       # but warn the user (except for BASH, which is always set by the calling BASH).
42647       if test "xBUILD_CC" != xBASH; then
42648         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42649 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42650       fi
42651       # Try to locate tool using the code snippet
42652       for ac_prog in cl cc gcc
42653 do
42654   # Extract the first word of "$ac_prog", so it can be a program name with args.
42655 set dummy $ac_prog; ac_word=$2
42656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42657 $as_echo_n "checking for $ac_word... " >&6; }
42658 if ${ac_cv_path_BUILD_CC+:} false; then :
42659   $as_echo_n "(cached) " >&6
42660 else
42661   case $BUILD_CC in
42662   [\\/]* | ?:[\\/]*)
42663   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42664   ;;
42665   *)
42666   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42667 for as_dir in $PATH
42668 do
42669   IFS=$as_save_IFS
42670   test -z "$as_dir" && as_dir=.
42671     for ac_exec_ext in '' $ac_executable_extensions; do
42672   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42673     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42674     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42675     break 2
42676   fi
42677 done
42678   done
42679 IFS=$as_save_IFS
42680 
42681   ;;
42682 esac
42683 fi
42684 BUILD_CC=$ac_cv_path_BUILD_CC
42685 if test -n "$BUILD_CC"; then
42686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42687 $as_echo "$BUILD_CC" >&6; }
42688 else
42689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42690 $as_echo "no" >&6; }
42691 fi
42692 
42693 
42694   test -n "$BUILD_CC" && break
42695 done
42696 
42697     else
42698       # If it succeeded, then it was overridden by the user. We will use it
42699       # for the tool.
42700 
42701       # First remove it from the list of overridden variables, so we can test
42702       # for unknown variables in the end.
42703       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42704 
42705       # Check if we try to supply an empty value
42706       if test "x$BUILD_CC" = x; then
42707         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42708 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42710 $as_echo_n "checking for BUILD_CC... " >&6; }
42711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42712 $as_echo "disabled" >&6; }
42713       else
42714         # Check if the provided tool contains a complete path.
42715         tool_specified="$BUILD_CC"
42716         tool_basename="${tool_specified##*/}"
42717         if test "x$tool_basename" = "x$tool_specified"; then
42718           # A command without a complete path is provided, search $PATH.
42719           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42720 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42721           # Extract the first word of "$tool_basename", so it can be a program name with args.
42722 set dummy $tool_basename; ac_word=$2
42723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42724 $as_echo_n "checking for $ac_word... " >&6; }
42725 if ${ac_cv_path_BUILD_CC+:} false; then :
42726   $as_echo_n "(cached) " >&6
42727 else
42728   case $BUILD_CC in
42729   [\\/]* | ?:[\\/]*)
42730   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42731   ;;
42732   *)
42733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42734 for as_dir in $PATH
42735 do
42736   IFS=$as_save_IFS
42737   test -z "$as_dir" && as_dir=.
42738     for ac_exec_ext in '' $ac_executable_extensions; do
42739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42740     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42742     break 2
42743   fi
42744 done
42745   done
42746 IFS=$as_save_IFS
42747 
42748   ;;
42749 esac
42750 fi
42751 BUILD_CC=$ac_cv_path_BUILD_CC
42752 if test -n "$BUILD_CC"; then
42753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42754 $as_echo "$BUILD_CC" >&6; }
42755 else
42756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42757 $as_echo "no" >&6; }
42758 fi
42759 
42760 
42761           if test "x$BUILD_CC" = x; then
42762             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42763           fi
42764         else
42765           # Otherwise we believe it is a complete path. Use it as it is.
42766           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42767 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42768           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42769 $as_echo_n "checking for BUILD_CC... " >&6; }
42770           if test ! -x "$tool_specified"; then
42771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42772 $as_echo "not found" >&6; }
42773             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42774           fi
42775           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42776 $as_echo "$tool_specified" >&6; }
42777         fi
42778       fi
42779     fi
42780 
42781   fi
42782 
42783 
42784 
42785   if test "x$BUILD_CC" = x; then
42786     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42787   fi
42788 
42789 
42790 
42791   # Only process if variable expands to non-empty
42792 
42793   if test "x$BUILD_CC" != x; then
42794     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42795 
42796   # First separate the path from the arguments. This will split at the first
42797   # space.
42798   complete="$BUILD_CC"
42799   path="${complete%% *}"
42800   tmp="$complete EOL"
42801   arguments="${tmp#* }"
42802 
42803   # Input might be given as Windows format, start by converting to
42804   # unix format.
42805   new_path=`$CYGPATH -u "$path"`
42806 
42807   # Now try to locate executable using which
42808   new_path=`$WHICH "$new_path" 2> /dev/null`
42809   # bat and cmd files are not always considered executable in cygwin causing which
42810   # to not find them
42811   if test "x$new_path" = x \
42812       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42813       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42814     new_path=`$CYGPATH -u "$path"`
42815   fi
42816   if test "x$new_path" = x; then
42817     # Oops. Which didn't find the executable.
42818     # The splitting of arguments from the executable at a space might have been incorrect,
42819     # since paths with space are more likely in Windows. Give it another try with the whole
42820     # argument.
42821     path="$complete"
42822     arguments="EOL"
42823     new_path=`$CYGPATH -u "$path"`
42824     new_path=`$WHICH "$new_path" 2> /dev/null`
42825     # bat and cmd files are not always considered executable in cygwin causing which
42826     # to not find them
42827     if test "x$new_path" = x \
42828         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42829         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42830       new_path=`$CYGPATH -u "$path"`
42831     fi
42832     if test "x$new_path" = x; then
42833       # It's still not found. Now this is an unrecoverable error.
42834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42835 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42836       has_space=`$ECHO "$complete" | $GREP " "`
42837       if test "x$has_space" != x; then
42838         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42839 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42840       fi
42841       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42842     fi
42843   fi
42844 
42845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42848   # "foo.exe" is OK but "foo" is an error.
42849   #
42850   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42851   # It is also a way to make sure we got the proper file name for the real test later on.
42852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42853   if test "x$test_shortpath" = x; then
42854     # Short path failed, file does not exist as specified.
42855     # Try adding .exe or .cmd
42856     if test -f "${new_path}.exe"; then
42857       input_to_shortpath="${new_path}.exe"
42858     elif test -f "${new_path}.cmd"; then
42859       input_to_shortpath="${new_path}.cmd"
42860     else
42861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42862 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42863       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42864 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42865       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42866     fi
42867   else
42868     input_to_shortpath="$new_path"
42869   fi
42870 
42871   # Call helper function which possibly converts this using DOS-style short mode.
42872   # If so, the updated path is stored in $new_path.
42873   new_path="$input_to_shortpath"
42874 
42875   input_path="$input_to_shortpath"
42876   # Check if we need to convert this using DOS-style short mode. If the path
42877   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42878   # take no chances and rewrite it.
42879   # Note: m4 eats our [], so we need to use [ and ] instead.
42880   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42881   if test "x$has_forbidden_chars" != x; then
42882     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42883     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42884     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42885     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42886       # Going to short mode and back again did indeed matter. Since short mode is
42887       # case insensitive, let's make it lowercase to improve readability.
42888       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42889       # Now convert it back to Unix-style (cygpath)
42890       input_path=`$CYGPATH -u "$shortmode_path"`
42891       new_path="$input_path"
42892     fi
42893   fi
42894 
42895   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42896   if test "x$test_cygdrive_prefix" = x; then
42897     # As a simple fix, exclude /usr/bin since it's not a real path.
42898     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42899       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42900       # a path prefixed by /cygdrive for fixpath to work.
42901       new_path="$CYGWIN_ROOT_PATH$input_path"
42902     fi
42903   fi
42904 
42905   # remove trailing .exe if any
42906   new_path="${new_path/%.exe/}"
42907 
42908     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42909 
42910   # First separate the path from the arguments. This will split at the first
42911   # space.
42912   complete="$BUILD_CC"
42913   path="${complete%% *}"
42914   tmp="$complete EOL"
42915   arguments="${tmp#* }"
42916 
42917   # Input might be given as Windows format, start by converting to
42918   # unix format.
42919   new_path="$path"
42920 
42921   windows_path="$new_path"
42922   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42923     unix_path=`$CYGPATH -u "$windows_path"`
42924     new_path="$unix_path"
42925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42926     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42927     new_path="$unix_path"
42928   fi
42929 
42930 
42931   # Now try to locate executable using which
42932   new_path=`$WHICH "$new_path" 2> /dev/null`
42933 
42934   if test "x$new_path" = x; then
42935     # Oops. Which didn't find the executable.
42936     # The splitting of arguments from the executable at a space might have been incorrect,
42937     # since paths with space are more likely in Windows. Give it another try with the whole
42938     # argument.
42939     path="$complete"
42940     arguments="EOL"
42941     new_path="$path"
42942 
42943   windows_path="$new_path"
42944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42945     unix_path=`$CYGPATH -u "$windows_path"`
42946     new_path="$unix_path"
42947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42949     new_path="$unix_path"
42950   fi
42951 
42952 
42953     new_path=`$WHICH "$new_path" 2> /dev/null`
42954     # bat and cmd files are not always considered executable in MSYS causing which
42955     # to not find them
42956     if test "x$new_path" = x \
42957         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42958         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42959       new_path="$path"
42960 
42961   windows_path="$new_path"
42962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42963     unix_path=`$CYGPATH -u "$windows_path"`
42964     new_path="$unix_path"
42965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42967     new_path="$unix_path"
42968   fi
42969 
42970     fi
42971 
42972     if test "x$new_path" = x; then
42973       # It's still not found. Now this is an unrecoverable error.
42974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42975 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42976       has_space=`$ECHO "$complete" | $GREP " "`
42977       if test "x$has_space" != x; then
42978         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42979 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42980       fi
42981       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42982     fi
42983   fi
42984 
42985   # Now new_path has a complete unix path to the binary
42986   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42987     # Keep paths in /bin as-is, but remove trailing .exe if any
42988     new_path="${new_path/%.exe/}"
42989     # Do not save /bin paths to all_fixpath_prefixes!
42990   else
42991     # Not in mixed or Windows style, start by that.
42992     new_path=`cmd //c echo $new_path`
42993 
42994   input_path="$new_path"
42995   # Check if we need to convert this using DOS-style short mode. If the path
42996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42997   # take no chances and rewrite it.
42998   # Note: m4 eats our [], so we need to use [ and ] instead.
42999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43000   if test "x$has_forbidden_chars" != x; then
43001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43003   fi
43004 
43005     # Output is in $new_path
43006 
43007   windows_path="$new_path"
43008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43009     unix_path=`$CYGPATH -u "$windows_path"`
43010     new_path="$unix_path"
43011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43013     new_path="$unix_path"
43014   fi
43015 
43016     # remove trailing .exe if any
43017     new_path="${new_path/%.exe/}"
43018 
43019     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43020     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43021   fi
43022 
43023     else
43024       # We're on a unix platform. Hooray! :)
43025       # First separate the path from the arguments. This will split at the first
43026       # space.
43027       complete="$BUILD_CC"
43028       path="${complete%% *}"
43029       tmp="$complete EOL"
43030       arguments="${tmp#* }"
43031 
43032       # Cannot rely on the command "which" here since it doesn't always work.
43033       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43034       if test -z "$is_absolute_path"; then
43035         # Path to executable is not absolute. Find it.
43036         IFS_save="$IFS"
43037         IFS=:
43038         for p in $PATH; do
43039           if test -f "$p/$path" && test -x "$p/$path"; then
43040             new_path="$p/$path"
43041             break
43042           fi
43043         done
43044         IFS="$IFS_save"
43045       else
43046         # This is an absolute path, we can use it without further modifications.
43047         new_path="$path"
43048       fi
43049 
43050       if test "x$new_path" = x; then
43051         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43052 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43053         has_space=`$ECHO "$complete" | $GREP " "`
43054         if test "x$has_space" != x; then
43055           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43056 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43057         fi
43058         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43059       fi
43060     fi
43061 
43062     # Now join together the path and the arguments once again
43063     if test "x$arguments" != xEOL; then
43064       new_complete="$new_path ${arguments% *}"
43065     else
43066       new_complete="$new_path"
43067     fi
43068 
43069     if test "x$complete" != "x$new_complete"; then
43070       BUILD_CC="$new_complete"
43071       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43072 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43073     fi
43074   fi
43075 
43076 
43077 
43078 
43079   # Publish this variable in the help.
43080 
43081 
43082   if [ -z "${BUILD_CXX+x}" ]; then
43083     # The variable is not set by user, try to locate tool using the code snippet
43084     for ac_prog in cl CC g++
43085 do
43086   # Extract the first word of "$ac_prog", so it can be a program name with args.
43087 set dummy $ac_prog; ac_word=$2
43088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43089 $as_echo_n "checking for $ac_word... " >&6; }
43090 if ${ac_cv_path_BUILD_CXX+:} false; then :
43091   $as_echo_n "(cached) " >&6
43092 else
43093   case $BUILD_CXX in
43094   [\\/]* | ?:[\\/]*)
43095   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43096   ;;
43097   *)
43098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43099 for as_dir in $PATH
43100 do
43101   IFS=$as_save_IFS
43102   test -z "$as_dir" && as_dir=.
43103     for ac_exec_ext in '' $ac_executable_extensions; do
43104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43105     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43107     break 2
43108   fi
43109 done
43110   done
43111 IFS=$as_save_IFS
43112 
43113   ;;
43114 esac
43115 fi
43116 BUILD_CXX=$ac_cv_path_BUILD_CXX
43117 if test -n "$BUILD_CXX"; then
43118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43119 $as_echo "$BUILD_CXX" >&6; }
43120 else
43121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43122 $as_echo "no" >&6; }
43123 fi
43124 
43125 
43126   test -n "$BUILD_CXX" && break
43127 done
43128 
43129   else
43130     # The variable is set, but is it from the command line or the environment?
43131 
43132     # Try to remove the string !BUILD_CXX! from our list.
43133     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43134     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43135       # If it failed, the variable was not from the command line. Ignore it,
43136       # but warn the user (except for BASH, which is always set by the calling BASH).
43137       if test "xBUILD_CXX" != xBASH; then
43138         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43139 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43140       fi
43141       # Try to locate tool using the code snippet
43142       for ac_prog in cl CC g++
43143 do
43144   # Extract the first word of "$ac_prog", so it can be a program name with args.
43145 set dummy $ac_prog; ac_word=$2
43146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43147 $as_echo_n "checking for $ac_word... " >&6; }
43148 if ${ac_cv_path_BUILD_CXX+:} false; then :
43149   $as_echo_n "(cached) " >&6
43150 else
43151   case $BUILD_CXX in
43152   [\\/]* | ?:[\\/]*)
43153   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43154   ;;
43155   *)
43156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43157 for as_dir in $PATH
43158 do
43159   IFS=$as_save_IFS
43160   test -z "$as_dir" && as_dir=.
43161     for ac_exec_ext in '' $ac_executable_extensions; do
43162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43163     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43165     break 2
43166   fi
43167 done
43168   done
43169 IFS=$as_save_IFS
43170 
43171   ;;
43172 esac
43173 fi
43174 BUILD_CXX=$ac_cv_path_BUILD_CXX
43175 if test -n "$BUILD_CXX"; then
43176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43177 $as_echo "$BUILD_CXX" >&6; }
43178 else
43179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43180 $as_echo "no" >&6; }
43181 fi
43182 
43183 
43184   test -n "$BUILD_CXX" && break
43185 done
43186 
43187     else
43188       # If it succeeded, then it was overridden by the user. We will use it
43189       # for the tool.
43190 
43191       # First remove it from the list of overridden variables, so we can test
43192       # for unknown variables in the end.
43193       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43194 
43195       # Check if we try to supply an empty value
43196       if test "x$BUILD_CXX" = x; then
43197         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43198 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43199         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43200 $as_echo_n "checking for BUILD_CXX... " >&6; }
43201         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43202 $as_echo "disabled" >&6; }
43203       else
43204         # Check if the provided tool contains a complete path.
43205         tool_specified="$BUILD_CXX"
43206         tool_basename="${tool_specified##*/}"
43207         if test "x$tool_basename" = "x$tool_specified"; then
43208           # A command without a complete path is provided, search $PATH.
43209           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43210 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43211           # Extract the first word of "$tool_basename", so it can be a program name with args.
43212 set dummy $tool_basename; ac_word=$2
43213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43214 $as_echo_n "checking for $ac_word... " >&6; }
43215 if ${ac_cv_path_BUILD_CXX+:} false; then :
43216   $as_echo_n "(cached) " >&6
43217 else
43218   case $BUILD_CXX in
43219   [\\/]* | ?:[\\/]*)
43220   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43221   ;;
43222   *)
43223   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43224 for as_dir in $PATH
43225 do
43226   IFS=$as_save_IFS
43227   test -z "$as_dir" && as_dir=.
43228     for ac_exec_ext in '' $ac_executable_extensions; do
43229   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43230     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43231     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43232     break 2
43233   fi
43234 done
43235   done
43236 IFS=$as_save_IFS
43237 
43238   ;;
43239 esac
43240 fi
43241 BUILD_CXX=$ac_cv_path_BUILD_CXX
43242 if test -n "$BUILD_CXX"; then
43243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43244 $as_echo "$BUILD_CXX" >&6; }
43245 else
43246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43247 $as_echo "no" >&6; }
43248 fi
43249 
43250 
43251           if test "x$BUILD_CXX" = x; then
43252             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43253           fi
43254         else
43255           # Otherwise we believe it is a complete path. Use it as it is.
43256           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43257 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43258           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43259 $as_echo_n "checking for BUILD_CXX... " >&6; }
43260           if test ! -x "$tool_specified"; then
43261             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43262 $as_echo "not found" >&6; }
43263             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43264           fi
43265           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43266 $as_echo "$tool_specified" >&6; }
43267         fi
43268       fi
43269     fi
43270 
43271   fi
43272 
43273 
43274 
43275   if test "x$BUILD_CXX" = x; then
43276     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43277   fi
43278 
43279 
43280 
43281   # Only process if variable expands to non-empty
43282 
43283   if test "x$BUILD_CXX" != x; then
43284     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43285 
43286   # First separate the path from the arguments. This will split at the first
43287   # space.
43288   complete="$BUILD_CXX"
43289   path="${complete%% *}"
43290   tmp="$complete EOL"
43291   arguments="${tmp#* }"
43292 
43293   # Input might be given as Windows format, start by converting to
43294   # unix format.
43295   new_path=`$CYGPATH -u "$path"`
43296 
43297   # Now try to locate executable using which
43298   new_path=`$WHICH "$new_path" 2> /dev/null`
43299   # bat and cmd files are not always considered executable in cygwin causing which
43300   # to not find them
43301   if test "x$new_path" = x \
43302       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43303       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43304     new_path=`$CYGPATH -u "$path"`
43305   fi
43306   if test "x$new_path" = x; then
43307     # Oops. Which didn't find the executable.
43308     # The splitting of arguments from the executable at a space might have been incorrect,
43309     # since paths with space are more likely in Windows. Give it another try with the whole
43310     # argument.
43311     path="$complete"
43312     arguments="EOL"
43313     new_path=`$CYGPATH -u "$path"`
43314     new_path=`$WHICH "$new_path" 2> /dev/null`
43315     # bat and cmd files are not always considered executable in cygwin causing which
43316     # to not find them
43317     if test "x$new_path" = x \
43318         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43319         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43320       new_path=`$CYGPATH -u "$path"`
43321     fi
43322     if test "x$new_path" = x; then
43323       # It's still not found. Now this is an unrecoverable error.
43324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43325 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43326       has_space=`$ECHO "$complete" | $GREP " "`
43327       if test "x$has_space" != x; then
43328         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43329 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43330       fi
43331       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43332     fi
43333   fi
43334 
43335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43338   # "foo.exe" is OK but "foo" is an error.
43339   #
43340   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43341   # It is also a way to make sure we got the proper file name for the real test later on.
43342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43343   if test "x$test_shortpath" = x; then
43344     # Short path failed, file does not exist as specified.
43345     # Try adding .exe or .cmd
43346     if test -f "${new_path}.exe"; then
43347       input_to_shortpath="${new_path}.exe"
43348     elif test -f "${new_path}.cmd"; then
43349       input_to_shortpath="${new_path}.cmd"
43350     else
43351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43352 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43353       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43354 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43355       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43356     fi
43357   else
43358     input_to_shortpath="$new_path"
43359   fi
43360 
43361   # Call helper function which possibly converts this using DOS-style short mode.
43362   # If so, the updated path is stored in $new_path.
43363   new_path="$input_to_shortpath"
43364 
43365   input_path="$input_to_shortpath"
43366   # Check if we need to convert this using DOS-style short mode. If the path
43367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43368   # take no chances and rewrite it.
43369   # Note: m4 eats our [], so we need to use [ and ] instead.
43370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43371   if test "x$has_forbidden_chars" != x; then
43372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43373     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43374     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43375     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43376       # Going to short mode and back again did indeed matter. Since short mode is
43377       # case insensitive, let's make it lowercase to improve readability.
43378       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43379       # Now convert it back to Unix-style (cygpath)
43380       input_path=`$CYGPATH -u "$shortmode_path"`
43381       new_path="$input_path"
43382     fi
43383   fi
43384 
43385   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43386   if test "x$test_cygdrive_prefix" = x; then
43387     # As a simple fix, exclude /usr/bin since it's not a real path.
43388     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43389       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43390       # a path prefixed by /cygdrive for fixpath to work.
43391       new_path="$CYGWIN_ROOT_PATH$input_path"
43392     fi
43393   fi
43394 
43395   # remove trailing .exe if any
43396   new_path="${new_path/%.exe/}"
43397 
43398     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43399 
43400   # First separate the path from the arguments. This will split at the first
43401   # space.
43402   complete="$BUILD_CXX"
43403   path="${complete%% *}"
43404   tmp="$complete EOL"
43405   arguments="${tmp#* }"
43406 
43407   # Input might be given as Windows format, start by converting to
43408   # unix format.
43409   new_path="$path"
43410 
43411   windows_path="$new_path"
43412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43413     unix_path=`$CYGPATH -u "$windows_path"`
43414     new_path="$unix_path"
43415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43417     new_path="$unix_path"
43418   fi
43419 
43420 
43421   # Now try to locate executable using which
43422   new_path=`$WHICH "$new_path" 2> /dev/null`
43423 
43424   if test "x$new_path" = x; then
43425     # Oops. Which didn't find the executable.
43426     # The splitting of arguments from the executable at a space might have been incorrect,
43427     # since paths with space are more likely in Windows. Give it another try with the whole
43428     # argument.
43429     path="$complete"
43430     arguments="EOL"
43431     new_path="$path"
43432 
43433   windows_path="$new_path"
43434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43435     unix_path=`$CYGPATH -u "$windows_path"`
43436     new_path="$unix_path"
43437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43439     new_path="$unix_path"
43440   fi
43441 
43442 
43443     new_path=`$WHICH "$new_path" 2> /dev/null`
43444     # bat and cmd files are not always considered executable in MSYS causing which
43445     # to not find them
43446     if test "x$new_path" = x \
43447         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43448         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43449       new_path="$path"
43450 
43451   windows_path="$new_path"
43452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43453     unix_path=`$CYGPATH -u "$windows_path"`
43454     new_path="$unix_path"
43455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43457     new_path="$unix_path"
43458   fi
43459 
43460     fi
43461 
43462     if test "x$new_path" = x; then
43463       # It's still not found. Now this is an unrecoverable error.
43464       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43465 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43466       has_space=`$ECHO "$complete" | $GREP " "`
43467       if test "x$has_space" != x; then
43468         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43469 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43470       fi
43471       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43472     fi
43473   fi
43474 
43475   # Now new_path has a complete unix path to the binary
43476   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43477     # Keep paths in /bin as-is, but remove trailing .exe if any
43478     new_path="${new_path/%.exe/}"
43479     # Do not save /bin paths to all_fixpath_prefixes!
43480   else
43481     # Not in mixed or Windows style, start by that.
43482     new_path=`cmd //c echo $new_path`
43483 
43484   input_path="$new_path"
43485   # Check if we need to convert this using DOS-style short mode. If the path
43486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43487   # take no chances and rewrite it.
43488   # Note: m4 eats our [], so we need to use [ and ] instead.
43489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43490   if test "x$has_forbidden_chars" != x; then
43491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43492     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43493   fi
43494 
43495     # Output is in $new_path
43496 
43497   windows_path="$new_path"
43498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43499     unix_path=`$CYGPATH -u "$windows_path"`
43500     new_path="$unix_path"
43501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43503     new_path="$unix_path"
43504   fi
43505 
43506     # remove trailing .exe if any
43507     new_path="${new_path/%.exe/}"
43508 
43509     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43510     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43511   fi
43512 
43513     else
43514       # We're on a unix platform. Hooray! :)
43515       # First separate the path from the arguments. This will split at the first
43516       # space.
43517       complete="$BUILD_CXX"
43518       path="${complete%% *}"
43519       tmp="$complete EOL"
43520       arguments="${tmp#* }"
43521 
43522       # Cannot rely on the command "which" here since it doesn't always work.
43523       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43524       if test -z "$is_absolute_path"; then
43525         # Path to executable is not absolute. Find it.
43526         IFS_save="$IFS"
43527         IFS=:
43528         for p in $PATH; do
43529           if test -f "$p/$path" && test -x "$p/$path"; then
43530             new_path="$p/$path"
43531             break
43532           fi
43533         done
43534         IFS="$IFS_save"
43535       else
43536         # This is an absolute path, we can use it without further modifications.
43537         new_path="$path"
43538       fi
43539 
43540       if test "x$new_path" = x; then
43541         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43542 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43543         has_space=`$ECHO "$complete" | $GREP " "`
43544         if test "x$has_space" != x; then
43545           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43546 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43547         fi
43548         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43549       fi
43550     fi
43551 
43552     # Now join together the path and the arguments once again
43553     if test "x$arguments" != xEOL; then
43554       new_complete="$new_path ${arguments% *}"
43555     else
43556       new_complete="$new_path"
43557     fi
43558 
43559     if test "x$complete" != "x$new_complete"; then
43560       BUILD_CXX="$new_complete"
43561       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43562 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43563     fi
43564   fi
43565 
43566 
43567 
43568   # Publish this variable in the help.
43569 
43570 
43571   if [ -z "${BUILD_NM+x}" ]; then
43572     # The variable is not set by user, try to locate tool using the code snippet
43573     for ac_prog in nm gcc-nm
43574 do
43575   # Extract the first word of "$ac_prog", so it can be a program name with args.
43576 set dummy $ac_prog; ac_word=$2
43577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43578 $as_echo_n "checking for $ac_word... " >&6; }
43579 if ${ac_cv_path_BUILD_NM+:} false; then :
43580   $as_echo_n "(cached) " >&6
43581 else
43582   case $BUILD_NM in
43583   [\\/]* | ?:[\\/]*)
43584   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43585   ;;
43586   *)
43587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43588 for as_dir in $PATH
43589 do
43590   IFS=$as_save_IFS
43591   test -z "$as_dir" && as_dir=.
43592     for ac_exec_ext in '' $ac_executable_extensions; do
43593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43594     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43596     break 2
43597   fi
43598 done
43599   done
43600 IFS=$as_save_IFS
43601 
43602   ;;
43603 esac
43604 fi
43605 BUILD_NM=$ac_cv_path_BUILD_NM
43606 if test -n "$BUILD_NM"; then
43607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43608 $as_echo "$BUILD_NM" >&6; }
43609 else
43610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43611 $as_echo "no" >&6; }
43612 fi
43613 
43614 
43615   test -n "$BUILD_NM" && break
43616 done
43617 
43618   else
43619     # The variable is set, but is it from the command line or the environment?
43620 
43621     # Try to remove the string !BUILD_NM! from our list.
43622     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43623     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43624       # If it failed, the variable was not from the command line. Ignore it,
43625       # but warn the user (except for BASH, which is always set by the calling BASH).
43626       if test "xBUILD_NM" != xBASH; then
43627         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43628 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43629       fi
43630       # Try to locate tool using the code snippet
43631       for ac_prog in nm gcc-nm
43632 do
43633   # Extract the first word of "$ac_prog", so it can be a program name with args.
43634 set dummy $ac_prog; ac_word=$2
43635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43636 $as_echo_n "checking for $ac_word... " >&6; }
43637 if ${ac_cv_path_BUILD_NM+:} false; then :
43638   $as_echo_n "(cached) " >&6
43639 else
43640   case $BUILD_NM in
43641   [\\/]* | ?:[\\/]*)
43642   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43643   ;;
43644   *)
43645   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43646 for as_dir in $PATH
43647 do
43648   IFS=$as_save_IFS
43649   test -z "$as_dir" && as_dir=.
43650     for ac_exec_ext in '' $ac_executable_extensions; do
43651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43652     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43654     break 2
43655   fi
43656 done
43657   done
43658 IFS=$as_save_IFS
43659 
43660   ;;
43661 esac
43662 fi
43663 BUILD_NM=$ac_cv_path_BUILD_NM
43664 if test -n "$BUILD_NM"; then
43665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43666 $as_echo "$BUILD_NM" >&6; }
43667 else
43668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43669 $as_echo "no" >&6; }
43670 fi
43671 
43672 
43673   test -n "$BUILD_NM" && break
43674 done
43675 
43676     else
43677       # If it succeeded, then it was overridden by the user. We will use it
43678       # for the tool.
43679 
43680       # First remove it from the list of overridden variables, so we can test
43681       # for unknown variables in the end.
43682       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43683 
43684       # Check if we try to supply an empty value
43685       if test "x$BUILD_NM" = x; then
43686         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43687 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43688         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43689 $as_echo_n "checking for BUILD_NM... " >&6; }
43690         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43691 $as_echo "disabled" >&6; }
43692       else
43693         # Check if the provided tool contains a complete path.
43694         tool_specified="$BUILD_NM"
43695         tool_basename="${tool_specified##*/}"
43696         if test "x$tool_basename" = "x$tool_specified"; then
43697           # A command without a complete path is provided, search $PATH.
43698           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43699 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43700           # Extract the first word of "$tool_basename", so it can be a program name with args.
43701 set dummy $tool_basename; ac_word=$2
43702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43703 $as_echo_n "checking for $ac_word... " >&6; }
43704 if ${ac_cv_path_BUILD_NM+:} false; then :
43705   $as_echo_n "(cached) " >&6
43706 else
43707   case $BUILD_NM in
43708   [\\/]* | ?:[\\/]*)
43709   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43710   ;;
43711   *)
43712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43713 for as_dir in $PATH
43714 do
43715   IFS=$as_save_IFS
43716   test -z "$as_dir" && as_dir=.
43717     for ac_exec_ext in '' $ac_executable_extensions; do
43718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43719     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43721     break 2
43722   fi
43723 done
43724   done
43725 IFS=$as_save_IFS
43726 
43727   ;;
43728 esac
43729 fi
43730 BUILD_NM=$ac_cv_path_BUILD_NM
43731 if test -n "$BUILD_NM"; then
43732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43733 $as_echo "$BUILD_NM" >&6; }
43734 else
43735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43736 $as_echo "no" >&6; }
43737 fi
43738 
43739 
43740           if test "x$BUILD_NM" = x; then
43741             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43742           fi
43743         else
43744           # Otherwise we believe it is a complete path. Use it as it is.
43745           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43746 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43747           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43748 $as_echo_n "checking for BUILD_NM... " >&6; }
43749           if test ! -x "$tool_specified"; then
43750             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43751 $as_echo "not found" >&6; }
43752             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43753           fi
43754           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43755 $as_echo "$tool_specified" >&6; }
43756         fi
43757       fi
43758     fi
43759 
43760   fi
43761 
43762 
43763 
43764   # Only process if variable expands to non-empty
43765 
43766   if test "x$BUILD_NM" != x; then
43767     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43768 
43769   # First separate the path from the arguments. This will split at the first
43770   # space.
43771   complete="$BUILD_NM"
43772   path="${complete%% *}"
43773   tmp="$complete EOL"
43774   arguments="${tmp#* }"
43775 
43776   # Input might be given as Windows format, start by converting to
43777   # unix format.
43778   new_path=`$CYGPATH -u "$path"`
43779 
43780   # Now try to locate executable using which
43781   new_path=`$WHICH "$new_path" 2> /dev/null`
43782   # bat and cmd files are not always considered executable in cygwin causing which
43783   # to not find them
43784   if test "x$new_path" = x \
43785       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43786       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43787     new_path=`$CYGPATH -u "$path"`
43788   fi
43789   if test "x$new_path" = x; then
43790     # Oops. Which didn't find the executable.
43791     # The splitting of arguments from the executable at a space might have been incorrect,
43792     # since paths with space are more likely in Windows. Give it another try with the whole
43793     # argument.
43794     path="$complete"
43795     arguments="EOL"
43796     new_path=`$CYGPATH -u "$path"`
43797     new_path=`$WHICH "$new_path" 2> /dev/null`
43798     # bat and cmd files are not always considered executable in cygwin causing which
43799     # to not find them
43800     if test "x$new_path" = x \
43801         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43802         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43803       new_path=`$CYGPATH -u "$path"`
43804     fi
43805     if test "x$new_path" = x; then
43806       # It's still not found. Now this is an unrecoverable error.
43807       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43808 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43809       has_space=`$ECHO "$complete" | $GREP " "`
43810       if test "x$has_space" != x; then
43811         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43812 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43813       fi
43814       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43815     fi
43816   fi
43817 
43818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43821   # "foo.exe" is OK but "foo" is an error.
43822   #
43823   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43824   # It is also a way to make sure we got the proper file name for the real test later on.
43825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43826   if test "x$test_shortpath" = x; then
43827     # Short path failed, file does not exist as specified.
43828     # Try adding .exe or .cmd
43829     if test -f "${new_path}.exe"; then
43830       input_to_shortpath="${new_path}.exe"
43831     elif test -f "${new_path}.cmd"; then
43832       input_to_shortpath="${new_path}.cmd"
43833     else
43834       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43835 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43836       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43837 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43838       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43839     fi
43840   else
43841     input_to_shortpath="$new_path"
43842   fi
43843 
43844   # Call helper function which possibly converts this using DOS-style short mode.
43845   # If so, the updated path is stored in $new_path.
43846   new_path="$input_to_shortpath"
43847 
43848   input_path="$input_to_shortpath"
43849   # Check if we need to convert this using DOS-style short mode. If the path
43850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43851   # take no chances and rewrite it.
43852   # Note: m4 eats our [], so we need to use [ and ] instead.
43853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43854   if test "x$has_forbidden_chars" != x; then
43855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43859       # Going to short mode and back again did indeed matter. Since short mode is
43860       # case insensitive, let's make it lowercase to improve readability.
43861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43862       # Now convert it back to Unix-style (cygpath)
43863       input_path=`$CYGPATH -u "$shortmode_path"`
43864       new_path="$input_path"
43865     fi
43866   fi
43867 
43868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43869   if test "x$test_cygdrive_prefix" = x; then
43870     # As a simple fix, exclude /usr/bin since it's not a real path.
43871     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43873       # a path prefixed by /cygdrive for fixpath to work.
43874       new_path="$CYGWIN_ROOT_PATH$input_path"
43875     fi
43876   fi
43877 
43878   # remove trailing .exe if any
43879   new_path="${new_path/%.exe/}"
43880 
43881     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43882 
43883   # First separate the path from the arguments. This will split at the first
43884   # space.
43885   complete="$BUILD_NM"
43886   path="${complete%% *}"
43887   tmp="$complete EOL"
43888   arguments="${tmp#* }"
43889 
43890   # Input might be given as Windows format, start by converting to
43891   # unix format.
43892   new_path="$path"
43893 
43894   windows_path="$new_path"
43895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43896     unix_path=`$CYGPATH -u "$windows_path"`
43897     new_path="$unix_path"
43898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43900     new_path="$unix_path"
43901   fi
43902 
43903 
43904   # Now try to locate executable using which
43905   new_path=`$WHICH "$new_path" 2> /dev/null`
43906 
43907   if test "x$new_path" = x; then
43908     # Oops. Which didn't find the executable.
43909     # The splitting of arguments from the executable at a space might have been incorrect,
43910     # since paths with space are more likely in Windows. Give it another try with the whole
43911     # argument.
43912     path="$complete"
43913     arguments="EOL"
43914     new_path="$path"
43915 
43916   windows_path="$new_path"
43917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43918     unix_path=`$CYGPATH -u "$windows_path"`
43919     new_path="$unix_path"
43920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43922     new_path="$unix_path"
43923   fi
43924 
43925 
43926     new_path=`$WHICH "$new_path" 2> /dev/null`
43927     # bat and cmd files are not always considered executable in MSYS causing which
43928     # to not find them
43929     if test "x$new_path" = x \
43930         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43931         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43932       new_path="$path"
43933 
43934   windows_path="$new_path"
43935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43936     unix_path=`$CYGPATH -u "$windows_path"`
43937     new_path="$unix_path"
43938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43939     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43940     new_path="$unix_path"
43941   fi
43942 
43943     fi
43944 
43945     if test "x$new_path" = x; then
43946       # It's still not found. Now this is an unrecoverable error.
43947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43948 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43949       has_space=`$ECHO "$complete" | $GREP " "`
43950       if test "x$has_space" != x; then
43951         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43952 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43953       fi
43954       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43955     fi
43956   fi
43957 
43958   # Now new_path has a complete unix path to the binary
43959   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43960     # Keep paths in /bin as-is, but remove trailing .exe if any
43961     new_path="${new_path/%.exe/}"
43962     # Do not save /bin paths to all_fixpath_prefixes!
43963   else
43964     # Not in mixed or Windows style, start by that.
43965     new_path=`cmd //c echo $new_path`
43966 
43967   input_path="$new_path"
43968   # Check if we need to convert this using DOS-style short mode. If the path
43969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43970   # take no chances and rewrite it.
43971   # Note: m4 eats our [], so we need to use [ and ] instead.
43972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43973   if test "x$has_forbidden_chars" != x; then
43974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43975     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43976   fi
43977 
43978     # Output is in $new_path
43979 
43980   windows_path="$new_path"
43981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43982     unix_path=`$CYGPATH -u "$windows_path"`
43983     new_path="$unix_path"
43984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43986     new_path="$unix_path"
43987   fi
43988 
43989     # remove trailing .exe if any
43990     new_path="${new_path/%.exe/}"
43991 
43992     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43993     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43994   fi
43995 
43996     else
43997       # We're on a unix platform. Hooray! :)
43998       # First separate the path from the arguments. This will split at the first
43999       # space.
44000       complete="$BUILD_NM"
44001       path="${complete%% *}"
44002       tmp="$complete EOL"
44003       arguments="${tmp#* }"
44004 
44005       # Cannot rely on the command "which" here since it doesn't always work.
44006       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44007       if test -z "$is_absolute_path"; then
44008         # Path to executable is not absolute. Find it.
44009         IFS_save="$IFS"
44010         IFS=:
44011         for p in $PATH; do
44012           if test -f "$p/$path" && test -x "$p/$path"; then
44013             new_path="$p/$path"
44014             break
44015           fi
44016         done
44017         IFS="$IFS_save"
44018       else
44019         # This is an absolute path, we can use it without further modifications.
44020         new_path="$path"
44021       fi
44022 
44023       if test "x$new_path" = x; then
44024         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44025 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44026         has_space=`$ECHO "$complete" | $GREP " "`
44027         if test "x$has_space" != x; then
44028           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44029 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44030         fi
44031         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44032       fi
44033     fi
44034 
44035     # Now join together the path and the arguments once again
44036     if test "x$arguments" != xEOL; then
44037       new_complete="$new_path ${arguments% *}"
44038     else
44039       new_complete="$new_path"
44040     fi
44041 
44042     if test "x$complete" != "x$new_complete"; then
44043       BUILD_NM="$new_complete"
44044       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44045 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44046     fi
44047   fi
44048 
44049 
44050 
44051   # Publish this variable in the help.
44052 
44053 
44054   if [ -z "${BUILD_AR+x}" ]; then
44055     # The variable is not set by user, try to locate tool using the code snippet
44056     for ac_prog in ar gcc-ar
44057 do
44058   # Extract the first word of "$ac_prog", so it can be a program name with args.
44059 set dummy $ac_prog; ac_word=$2
44060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44061 $as_echo_n "checking for $ac_word... " >&6; }
44062 if ${ac_cv_path_BUILD_AR+:} false; then :
44063   $as_echo_n "(cached) " >&6
44064 else
44065   case $BUILD_AR in
44066   [\\/]* | ?:[\\/]*)
44067   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44068   ;;
44069   *)
44070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44071 for as_dir in $PATH
44072 do
44073   IFS=$as_save_IFS
44074   test -z "$as_dir" && as_dir=.
44075     for ac_exec_ext in '' $ac_executable_extensions; do
44076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44077     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44079     break 2
44080   fi
44081 done
44082   done
44083 IFS=$as_save_IFS
44084 
44085   ;;
44086 esac
44087 fi
44088 BUILD_AR=$ac_cv_path_BUILD_AR
44089 if test -n "$BUILD_AR"; then
44090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44091 $as_echo "$BUILD_AR" >&6; }
44092 else
44093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44094 $as_echo "no" >&6; }
44095 fi
44096 
44097 
44098   test -n "$BUILD_AR" && break
44099 done
44100 
44101   else
44102     # The variable is set, but is it from the command line or the environment?
44103 
44104     # Try to remove the string !BUILD_AR! from our list.
44105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44107       # If it failed, the variable was not from the command line. Ignore it,
44108       # but warn the user (except for BASH, which is always set by the calling BASH).
44109       if test "xBUILD_AR" != xBASH; then
44110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44111 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44112       fi
44113       # Try to locate tool using the code snippet
44114       for ac_prog in ar gcc-ar
44115 do
44116   # Extract the first word of "$ac_prog", so it can be a program name with args.
44117 set dummy $ac_prog; ac_word=$2
44118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44119 $as_echo_n "checking for $ac_word... " >&6; }
44120 if ${ac_cv_path_BUILD_AR+:} false; then :
44121   $as_echo_n "(cached) " >&6
44122 else
44123   case $BUILD_AR in
44124   [\\/]* | ?:[\\/]*)
44125   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44126   ;;
44127   *)
44128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44129 for as_dir in $PATH
44130 do
44131   IFS=$as_save_IFS
44132   test -z "$as_dir" && as_dir=.
44133     for ac_exec_ext in '' $ac_executable_extensions; do
44134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44135     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44137     break 2
44138   fi
44139 done
44140   done
44141 IFS=$as_save_IFS
44142 
44143   ;;
44144 esac
44145 fi
44146 BUILD_AR=$ac_cv_path_BUILD_AR
44147 if test -n "$BUILD_AR"; then
44148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44149 $as_echo "$BUILD_AR" >&6; }
44150 else
44151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44152 $as_echo "no" >&6; }
44153 fi
44154 
44155 
44156   test -n "$BUILD_AR" && break
44157 done
44158 
44159     else
44160       # If it succeeded, then it was overridden by the user. We will use it
44161       # for the tool.
44162 
44163       # First remove it from the list of overridden variables, so we can test
44164       # for unknown variables in the end.
44165       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44166 
44167       # Check if we try to supply an empty value
44168       if test "x$BUILD_AR" = x; then
44169         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44170 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44171         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44172 $as_echo_n "checking for BUILD_AR... " >&6; }
44173         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44174 $as_echo "disabled" >&6; }
44175       else
44176         # Check if the provided tool contains a complete path.
44177         tool_specified="$BUILD_AR"
44178         tool_basename="${tool_specified##*/}"
44179         if test "x$tool_basename" = "x$tool_specified"; then
44180           # A command without a complete path is provided, search $PATH.
44181           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44182 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44183           # Extract the first word of "$tool_basename", so it can be a program name with args.
44184 set dummy $tool_basename; ac_word=$2
44185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44186 $as_echo_n "checking for $ac_word... " >&6; }
44187 if ${ac_cv_path_BUILD_AR+:} false; then :
44188   $as_echo_n "(cached) " >&6
44189 else
44190   case $BUILD_AR in
44191   [\\/]* | ?:[\\/]*)
44192   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44193   ;;
44194   *)
44195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44196 for as_dir in $PATH
44197 do
44198   IFS=$as_save_IFS
44199   test -z "$as_dir" && as_dir=.
44200     for ac_exec_ext in '' $ac_executable_extensions; do
44201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44202     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44204     break 2
44205   fi
44206 done
44207   done
44208 IFS=$as_save_IFS
44209 
44210   ;;
44211 esac
44212 fi
44213 BUILD_AR=$ac_cv_path_BUILD_AR
44214 if test -n "$BUILD_AR"; then
44215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44216 $as_echo "$BUILD_AR" >&6; }
44217 else
44218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44219 $as_echo "no" >&6; }
44220 fi
44221 
44222 
44223           if test "x$BUILD_AR" = x; then
44224             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44225           fi
44226         else
44227           # Otherwise we believe it is a complete path. Use it as it is.
44228           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44229 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44230           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44231 $as_echo_n "checking for BUILD_AR... " >&6; }
44232           if test ! -x "$tool_specified"; then
44233             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44234 $as_echo "not found" >&6; }
44235             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44236           fi
44237           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44238 $as_echo "$tool_specified" >&6; }
44239         fi
44240       fi
44241     fi
44242 
44243   fi
44244 
44245 
44246 
44247   # Only process if variable expands to non-empty
44248 
44249   if test "x$BUILD_AR" != x; then
44250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44251 
44252   # First separate the path from the arguments. This will split at the first
44253   # space.
44254   complete="$BUILD_AR"
44255   path="${complete%% *}"
44256   tmp="$complete EOL"
44257   arguments="${tmp#* }"
44258 
44259   # Input might be given as Windows format, start by converting to
44260   # unix format.
44261   new_path=`$CYGPATH -u "$path"`
44262 
44263   # Now try to locate executable using which
44264   new_path=`$WHICH "$new_path" 2> /dev/null`
44265   # bat and cmd files are not always considered executable in cygwin causing which
44266   # to not find them
44267   if test "x$new_path" = x \
44268       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44269       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44270     new_path=`$CYGPATH -u "$path"`
44271   fi
44272   if test "x$new_path" = x; then
44273     # Oops. Which didn't find the executable.
44274     # The splitting of arguments from the executable at a space might have been incorrect,
44275     # since paths with space are more likely in Windows. Give it another try with the whole
44276     # argument.
44277     path="$complete"
44278     arguments="EOL"
44279     new_path=`$CYGPATH -u "$path"`
44280     new_path=`$WHICH "$new_path" 2> /dev/null`
44281     # bat and cmd files are not always considered executable in cygwin causing which
44282     # to not find them
44283     if test "x$new_path" = x \
44284         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44285         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44286       new_path=`$CYGPATH -u "$path"`
44287     fi
44288     if test "x$new_path" = x; then
44289       # It's still not found. Now this is an unrecoverable error.
44290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44291 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44292       has_space=`$ECHO "$complete" | $GREP " "`
44293       if test "x$has_space" != x; then
44294         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44296       fi
44297       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44298     fi
44299   fi
44300 
44301   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44302   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44303   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44304   # "foo.exe" is OK but "foo" is an error.
44305   #
44306   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44307   # It is also a way to make sure we got the proper file name for the real test later on.
44308   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44309   if test "x$test_shortpath" = x; then
44310     # Short path failed, file does not exist as specified.
44311     # Try adding .exe or .cmd
44312     if test -f "${new_path}.exe"; then
44313       input_to_shortpath="${new_path}.exe"
44314     elif test -f "${new_path}.cmd"; then
44315       input_to_shortpath="${new_path}.cmd"
44316     else
44317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44318 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44319       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44320 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44321       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44322     fi
44323   else
44324     input_to_shortpath="$new_path"
44325   fi
44326 
44327   # Call helper function which possibly converts this using DOS-style short mode.
44328   # If so, the updated path is stored in $new_path.
44329   new_path="$input_to_shortpath"
44330 
44331   input_path="$input_to_shortpath"
44332   # Check if we need to convert this using DOS-style short mode. If the path
44333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44334   # take no chances and rewrite it.
44335   # Note: m4 eats our [], so we need to use [ and ] instead.
44336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44337   if test "x$has_forbidden_chars" != x; then
44338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44339     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44340     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44341     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44342       # Going to short mode and back again did indeed matter. Since short mode is
44343       # case insensitive, let's make it lowercase to improve readability.
44344       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44345       # Now convert it back to Unix-style (cygpath)
44346       input_path=`$CYGPATH -u "$shortmode_path"`
44347       new_path="$input_path"
44348     fi
44349   fi
44350 
44351   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44352   if test "x$test_cygdrive_prefix" = x; then
44353     # As a simple fix, exclude /usr/bin since it's not a real path.
44354     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44355       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44356       # a path prefixed by /cygdrive for fixpath to work.
44357       new_path="$CYGWIN_ROOT_PATH$input_path"
44358     fi
44359   fi
44360 
44361   # remove trailing .exe if any
44362   new_path="${new_path/%.exe/}"
44363 
44364     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44365 
44366   # First separate the path from the arguments. This will split at the first
44367   # space.
44368   complete="$BUILD_AR"
44369   path="${complete%% *}"
44370   tmp="$complete EOL"
44371   arguments="${tmp#* }"
44372 
44373   # Input might be given as Windows format, start by converting to
44374   # unix format.
44375   new_path="$path"
44376 
44377   windows_path="$new_path"
44378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44379     unix_path=`$CYGPATH -u "$windows_path"`
44380     new_path="$unix_path"
44381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44383     new_path="$unix_path"
44384   fi
44385 
44386 
44387   # Now try to locate executable using which
44388   new_path=`$WHICH "$new_path" 2> /dev/null`
44389 
44390   if test "x$new_path" = x; then
44391     # Oops. Which didn't find the executable.
44392     # The splitting of arguments from the executable at a space might have been incorrect,
44393     # since paths with space are more likely in Windows. Give it another try with the whole
44394     # argument.
44395     path="$complete"
44396     arguments="EOL"
44397     new_path="$path"
44398 
44399   windows_path="$new_path"
44400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44401     unix_path=`$CYGPATH -u "$windows_path"`
44402     new_path="$unix_path"
44403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44405     new_path="$unix_path"
44406   fi
44407 
44408 
44409     new_path=`$WHICH "$new_path" 2> /dev/null`
44410     # bat and cmd files are not always considered executable in MSYS causing which
44411     # to not find them
44412     if test "x$new_path" = x \
44413         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44414         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44415       new_path="$path"
44416 
44417   windows_path="$new_path"
44418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44419     unix_path=`$CYGPATH -u "$windows_path"`
44420     new_path="$unix_path"
44421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44423     new_path="$unix_path"
44424   fi
44425 
44426     fi
44427 
44428     if test "x$new_path" = x; then
44429       # It's still not found. Now this is an unrecoverable error.
44430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44431 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44432       has_space=`$ECHO "$complete" | $GREP " "`
44433       if test "x$has_space" != x; then
44434         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44435 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44436       fi
44437       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44438     fi
44439   fi
44440 
44441   # Now new_path has a complete unix path to the binary
44442   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44443     # Keep paths in /bin as-is, but remove trailing .exe if any
44444     new_path="${new_path/%.exe/}"
44445     # Do not save /bin paths to all_fixpath_prefixes!
44446   else
44447     # Not in mixed or Windows style, start by that.
44448     new_path=`cmd //c echo $new_path`
44449 
44450   input_path="$new_path"
44451   # Check if we need to convert this using DOS-style short mode. If the path
44452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44453   # take no chances and rewrite it.
44454   # Note: m4 eats our [], so we need to use [ and ] instead.
44455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44456   if test "x$has_forbidden_chars" != x; then
44457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44459   fi
44460 
44461     # Output is in $new_path
44462 
44463   windows_path="$new_path"
44464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44465     unix_path=`$CYGPATH -u "$windows_path"`
44466     new_path="$unix_path"
44467   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44468     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44469     new_path="$unix_path"
44470   fi
44471 
44472     # remove trailing .exe if any
44473     new_path="${new_path/%.exe/}"
44474 
44475     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44476     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44477   fi
44478 
44479     else
44480       # We're on a unix platform. Hooray! :)
44481       # First separate the path from the arguments. This will split at the first
44482       # space.
44483       complete="$BUILD_AR"
44484       path="${complete%% *}"
44485       tmp="$complete EOL"
44486       arguments="${tmp#* }"
44487 
44488       # Cannot rely on the command "which" here since it doesn't always work.
44489       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44490       if test -z "$is_absolute_path"; then
44491         # Path to executable is not absolute. Find it.
44492         IFS_save="$IFS"
44493         IFS=:
44494         for p in $PATH; do
44495           if test -f "$p/$path" && test -x "$p/$path"; then
44496             new_path="$p/$path"
44497             break
44498           fi
44499         done
44500         IFS="$IFS_save"
44501       else
44502         # This is an absolute path, we can use it without further modifications.
44503         new_path="$path"
44504       fi
44505 
44506       if test "x$new_path" = x; then
44507         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44508 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44509         has_space=`$ECHO "$complete" | $GREP " "`
44510         if test "x$has_space" != x; then
44511           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44512 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44513         fi
44514         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44515       fi
44516     fi
44517 
44518     # Now join together the path and the arguments once again
44519     if test "x$arguments" != xEOL; then
44520       new_complete="$new_path ${arguments% *}"
44521     else
44522       new_complete="$new_path"
44523     fi
44524 
44525     if test "x$complete" != "x$new_complete"; then
44526       BUILD_AR="$new_complete"
44527       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44528 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44529     fi
44530   fi
44531 
44532     # Assume the C compiler is the assembler
44533     BUILD_AS="$BUILD_CC -c"
44534     # Just like for the target compiler, use the compiler as linker
44535     BUILD_LD="$BUILD_CC"
44536     BUILD_LDCXX="$BUILD_CXX"
44537 
44538     PATH="$OLDPATH"
44539   else
44540     # If we are not cross compiling, use the normal target compilers for
44541     # building the build platform executables.
44542     BUILD_CC="$CC"
44543     BUILD_CXX="$CXX"
44544     BUILD_LD="$LD"
44545     BUILD_LDCXX="$LDCXX"
44546     BUILD_NM="$NM"
44547     BUILD_AS="$AS"
44548     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44549     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44550     BUILD_AR="$AR"
44551   fi
44552 
44553 
44554 
44555 
44556 
44557 
44558 
44559 
44560 
44561 
44562 
44563 
44564   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44565     # For hotspot, we need these in Windows mixed path,
44566     # so rewrite them all. Need added .exe suffix.
44567     HOTSPOT_CXX="$CXX.exe"
44568     HOTSPOT_LD="$LD.exe"
44569     HOTSPOT_MT="$MT.exe"
44570     HOTSPOT_RC="$RC.exe"
44571 
44572   unix_path="$HOTSPOT_CXX"
44573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44574     windows_path=`$CYGPATH -m "$unix_path"`
44575     HOTSPOT_CXX="$windows_path"
44576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44577     windows_path=`cmd //c echo $unix_path`
44578     HOTSPOT_CXX="$windows_path"
44579   fi
44580 
44581 
44582   unix_path="$HOTSPOT_LD"
44583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44584     windows_path=`$CYGPATH -m "$unix_path"`
44585     HOTSPOT_LD="$windows_path"
44586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44587     windows_path=`cmd //c echo $unix_path`
44588     HOTSPOT_LD="$windows_path"
44589   fi
44590 
44591 
44592   unix_path="$HOTSPOT_MT"
44593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44594     windows_path=`$CYGPATH -m "$unix_path"`
44595     HOTSPOT_MT="$windows_path"
44596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44597     windows_path=`cmd //c echo $unix_path`
44598     HOTSPOT_MT="$windows_path"
44599   fi
44600 
44601 
44602   unix_path="$HOTSPOT_RC"
44603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44604     windows_path=`$CYGPATH -m "$unix_path"`
44605     HOTSPOT_RC="$windows_path"
44606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44607     windows_path=`cmd //c echo $unix_path`
44608     HOTSPOT_RC="$windows_path"
44609   fi
44610 
44611 
44612 
44613   else
44614     HOTSPOT_CXX="$CXX"
44615     HOTSPOT_LD="$LD"
44616   fi
44617 
44618 
44619 
44620   if test  "x$TOOLCHAIN_TYPE" = xclang; then
44621     USE_CLANG=true
44622   fi
44623 
44624 
44625 
44626 
44627 
44628   # The package path is used only on macosx?
44629   # FIXME: clean this up, and/or move it elsewhere.
44630   PACKAGE_PATH=/opt/local
44631 
44632 
44633   # Check for extra potential brokenness.
44634   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44635     # On Windows, double-check that we got the right compiler.
44636     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44637     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44638     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44639       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44640         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
44641       fi
44642     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44643       if test "x$COMPILER_CPU_TEST" != "xx64"; then
44644         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44645       fi
44646     fi
44647   fi
44648 
44649   if test "x$TOOLCHAIN_TYPE" = xgcc; then
44650     # If this is a --hash-style=gnu system, use --hash-style=both, why?
44651     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44652     # This is later checked when setting flags.
44653 
44654     # "-Og" suppported for GCC 4.8 and later
44655     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44656 
44657 
44658 
44659 
44660 
44661 
44662 
44663 
44664 
44665 
44666 
44667 
44668 
44669 
44670 
44671 
44672 
44673 
44674 
44675 
44676 
44677 
44678 
44679 
44680 
44681 
44682 
44683 
44684 
44685 
44686 
44687 
44688 
44689 
44690 
44691 
44692 
44693 
44694 
44695 
44696 
44697 
44698 
44699 
44700 
44701 
44702 
44703     # Execute function body
44704 
44705 
44706 
44707 
44708 
44709 
44710 
44711 
44712 
44713 
44714 
44715 
44716 
44717 
44718 
44719 
44720 
44721 
44722 
44723 
44724 
44725 
44726 
44727 
44728 
44729 
44730 
44731 
44732 
44733 
44734 
44735 
44736 
44737 
44738 
44739 
44740 
44741 
44742 
44743 
44744 
44745 
44746 
44747 
44748 
44749 
44750 
44751 
44752     # Execute function body
44753 
44754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44755 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44756   supports=yes
44757 
44758   saved_cflags="$CFLAGS"
44759   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44760   ac_ext=c
44761 ac_cpp='$CPP $CPPFLAGS'
44762 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44763 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44764 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44765 
44766   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44767 /* end confdefs.h.  */
44768 int i;
44769 _ACEOF
44770 if ac_fn_c_try_compile "$LINENO"; then :
44771 
44772 else
44773   supports=no
44774 fi
44775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44776   ac_ext=cpp
44777 ac_cpp='$CXXCPP $CPPFLAGS'
44778 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44779 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44780 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44781 
44782   CFLAGS="$saved_cflags"
44783 
44784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44785 $as_echo "$supports" >&6; }
44786   if test "x$supports" = "xyes" ; then
44787     :
44788     C_COMP_SUPPORTS="yes"
44789   else
44790     :
44791     C_COMP_SUPPORTS="no"
44792   fi
44793 
44794 
44795 
44796 
44797 
44798 
44799 
44800 
44801 
44802 
44803 
44804 
44805 
44806 
44807 
44808 
44809 
44810 
44811 
44812 
44813 
44814 
44815 
44816 
44817 
44818 
44819 
44820 
44821 
44822 
44823 
44824 
44825 
44826 
44827 
44828 
44829 
44830 
44831 
44832 
44833 
44834 
44835 
44836 
44837 
44838 
44839 
44840 
44841 
44842 
44843 
44844 
44845 
44846 
44847 
44848 
44849 
44850 
44851 
44852     # Execute function body
44853 
44854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44855 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44856   supports=yes
44857 
44858   saved_cxxflags="$CXXFLAGS"
44859   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44860   ac_ext=cpp
44861 ac_cpp='$CXXCPP $CPPFLAGS'
44862 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44863 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44864 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44865 
44866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44867 /* end confdefs.h.  */
44868 int i;
44869 _ACEOF
44870 if ac_fn_cxx_try_compile "$LINENO"; then :
44871 
44872 else
44873   supports=no
44874 fi
44875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44876   ac_ext=cpp
44877 ac_cpp='$CXXCPP $CPPFLAGS'
44878 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44879 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44880 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44881 
44882   CXXFLAGS="$saved_cxxflags"
44883 
44884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44885 $as_echo "$supports" >&6; }
44886   if test "x$supports" = "xyes" ; then
44887     :
44888     CXX_COMP_SUPPORTS="yes"
44889   else
44890     :
44891     CXX_COMP_SUPPORTS="no"
44892   fi
44893 
44894 
44895 
44896 
44897 
44898 
44899 
44900 
44901 
44902 
44903 
44904 
44905 
44906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44907 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44908   supports=no
44909   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
44910 
44911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44912 $as_echo "$supports" >&6; }
44913   if test "x$supports" = "xyes" ; then
44914     :
44915     HAS_CFLAG_OPTIMIZE_DEBUG=true
44916   else
44917     :
44918     HAS_CFLAG_OPTIMIZE_DEBUG=false
44919   fi
44920 
44921 
44922 
44923 
44924 
44925 
44926 
44927     # "-z relro" supported in GNU binutils 2.17 and later
44928     LINKER_RELRO_FLAG="-Wl,-z,relro"
44929 
44930 
44931 
44932 
44933 
44934 
44935 
44936 
44937 
44938 
44939 
44940 
44941 
44942 
44943 
44944 
44945 
44946 
44947 
44948 
44949 
44950 
44951 
44952 
44953 
44954 
44955 
44956 
44957 
44958 
44959 
44960 
44961 
44962 
44963 
44964 
44965 
44966 
44967 
44968 
44969 
44970 
44971 
44972 
44973 
44974 
44975 
44976     # Execute function body
44977 
44978   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44979 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44980   supports=yes
44981 
44982   saved_ldflags="$LDFLAGS"
44983   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44984   ac_ext=c
44985 ac_cpp='$CPP $CPPFLAGS'
44986 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44987 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44988 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44989 
44990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44991 /* end confdefs.h.  */
44992 
44993 int
44994 main ()
44995 {
44996 
44997   ;
44998   return 0;
44999 }
45000 _ACEOF
45001 if ac_fn_c_try_link "$LINENO"; then :
45002 
45003 else
45004   supports=no
45005 fi
45006 rm -f core conftest.err conftest.$ac_objext \
45007     conftest$ac_exeext conftest.$ac_ext
45008   ac_ext=cpp
45009 ac_cpp='$CXXCPP $CPPFLAGS'
45010 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45011 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45012 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45013 
45014   LDFLAGS="$saved_ldflags"
45015 
45016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45017 $as_echo "$supports" >&6; }
45018   if test "x$supports" = "xyes" ; then
45019     :
45020     HAS_LINKER_RELRO=true
45021   else
45022     :
45023     HAS_LINKER_RELRO=false
45024   fi
45025 
45026 
45027 
45028 
45029 
45030 
45031 
45032 
45033 
45034 
45035 
45036 
45037 
45038     # "-z now" supported in GNU binutils 2.11 and later
45039     LINKER_NOW_FLAG="-Wl,-z,now"
45040 
45041 
45042 
45043 
45044 
45045 
45046 
45047 
45048 
45049 
45050 
45051 
45052 
45053 
45054 
45055 
45056 
45057 
45058 
45059 
45060 
45061 
45062 
45063 
45064 
45065 
45066 
45067 
45068 
45069 
45070 
45071 
45072 
45073 
45074 
45075 
45076 
45077 
45078 
45079 
45080 
45081 
45082 
45083 
45084 
45085 
45086 
45087     # Execute function body
45088 
45089   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45090 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45091   supports=yes
45092 
45093   saved_ldflags="$LDFLAGS"
45094   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45095   ac_ext=c
45096 ac_cpp='$CPP $CPPFLAGS'
45097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45100 
45101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45102 /* end confdefs.h.  */
45103 
45104 int
45105 main ()
45106 {
45107 
45108   ;
45109   return 0;
45110 }
45111 _ACEOF
45112 if ac_fn_c_try_link "$LINENO"; then :
45113 
45114 else
45115   supports=no
45116 fi
45117 rm -f core conftest.err conftest.$ac_objext \
45118     conftest$ac_exeext conftest.$ac_ext
45119   ac_ext=cpp
45120 ac_cpp='$CXXCPP $CPPFLAGS'
45121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45124 
45125   LDFLAGS="$saved_ldflags"
45126 
45127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45128 $as_echo "$supports" >&6; }
45129   if test "x$supports" = "xyes" ; then
45130     :
45131     HAS_LINKER_NOW=true
45132   else
45133     :
45134     HAS_LINKER_NOW=false
45135   fi
45136 
45137 
45138 
45139 
45140 
45141 
45142 
45143 
45144 
45145 
45146 
45147 
45148   fi
45149 
45150   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45151   # in executable.'
45152   USING_BROKEN_SUSE_LD=no
45153   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45154     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45155 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45156     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45157     $ECHO "int main() { }" > main.c
45158     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
45159       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45160 $as_echo "no" >&6; }
45161       USING_BROKEN_SUSE_LD=no
45162     else
45163       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45164 $as_echo "yes" >&6; }
45165       USING_BROKEN_SUSE_LD=yes
45166     fi
45167     rm -rf version-script.map main.c a.out
45168   fi
45169 
45170 
45171 
45172 # Setup the JTReg Regression Test Harness.
45173 
45174 
45175 # Check whether --with-jtreg was given.
45176 if test "${with_jtreg+set}" = set; then :
45177   withval=$with_jtreg;
45178 else
45179   with_jtreg=no
45180 fi
45181 
45182 
45183   if test "x$with_jtreg" = xno; then
45184     # jtreg disabled
45185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45186 $as_echo_n "checking for jtreg... " >&6; }
45187     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45188 $as_echo "no" >&6; }
45189   else
45190     if test "x$with_jtreg" != xyes; then
45191       # with path specified.
45192       JT_HOME="$with_jtreg"
45193     fi
45194 
45195     if test "x$JT_HOME" != x; then
45196       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45197 $as_echo_n "checking for jtreg... " >&6; }
45198 
45199       # use JT_HOME enviroment var.
45200 
45201   # Only process if variable expands to non-empty
45202 
45203   if test "x$JT_HOME" != x; then
45204     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45205 
45206   # Input might be given as Windows format, start by converting to
45207   # unix format.
45208   path="$JT_HOME"
45209   new_path=`$CYGPATH -u "$path"`
45210 
45211   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45212   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45213   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45214   # "foo.exe" is OK but "foo" is an error.
45215   #
45216   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45217   # It is also a way to make sure we got the proper file name for the real test later on.
45218   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45219   if test "x$test_shortpath" = x; then
45220     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45221 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45222     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45223   fi
45224 
45225   # Call helper function which possibly converts this using DOS-style short mode.
45226   # If so, the updated path is stored in $new_path.
45227 
45228   input_path="$new_path"
45229   # Check if we need to convert this using DOS-style short mode. If the path
45230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45231   # take no chances and rewrite it.
45232   # Note: m4 eats our [], so we need to use [ and ] instead.
45233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45234   if test "x$has_forbidden_chars" != x; then
45235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45239       # Going to short mode and back again did indeed matter. Since short mode is
45240       # case insensitive, let's make it lowercase to improve readability.
45241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45242       # Now convert it back to Unix-style (cygpath)
45243       input_path=`$CYGPATH -u "$shortmode_path"`
45244       new_path="$input_path"
45245     fi
45246   fi
45247 
45248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45249   if test "x$test_cygdrive_prefix" = x; then
45250     # As a simple fix, exclude /usr/bin since it's not a real path.
45251     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45253       # a path prefixed by /cygdrive for fixpath to work.
45254       new_path="$CYGWIN_ROOT_PATH$input_path"
45255     fi
45256   fi
45257 
45258 
45259   if test "x$path" != "x$new_path"; then
45260     JT_HOME="$new_path"
45261     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45262 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45263   fi
45264 
45265     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45266 
45267   path="$JT_HOME"
45268   has_colon=`$ECHO $path | $GREP ^.:`
45269   new_path="$path"
45270   if test "x$has_colon" = x; then
45271     # Not in mixed or Windows style, start by that.
45272     new_path=`cmd //c echo $path`
45273   fi
45274 
45275 
45276   input_path="$new_path"
45277   # Check if we need to convert this using DOS-style short mode. If the path
45278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45279   # take no chances and rewrite it.
45280   # Note: m4 eats our [], so we need to use [ and ] instead.
45281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45282   if test "x$has_forbidden_chars" != x; then
45283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45284     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45285   fi
45286 
45287 
45288   windows_path="$new_path"
45289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45290     unix_path=`$CYGPATH -u "$windows_path"`
45291     new_path="$unix_path"
45292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45294     new_path="$unix_path"
45295   fi
45296 
45297   if test "x$path" != "x$new_path"; then
45298     JT_HOME="$new_path"
45299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45300 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45301   fi
45302 
45303   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45304   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45305 
45306     else
45307       # We're on a unix platform. Hooray! :)
45308       path="$JT_HOME"
45309       has_space=`$ECHO "$path" | $GREP " "`
45310       if test "x$has_space" != x; then
45311         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45312 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45313         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45314       fi
45315 
45316       # Use eval to expand a potential ~
45317       eval path="$path"
45318       if test ! -f "$path" && test ! -d "$path"; then
45319         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45320       fi
45321 
45322       if test -d "$path"; then
45323         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45324       else
45325         dir="`$DIRNAME "$path"`"
45326         base="`$BASENAME "$path"`"
45327         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45328       fi
45329     fi
45330   fi
45331 
45332 
45333       # jtreg win32 script works for everybody
45334       JTREGEXE="$JT_HOME/bin/jtreg"
45335 
45336       if test ! -f "$JTREGEXE"; then
45337         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45338       fi
45339 
45340       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45341 $as_echo "$JTREGEXE" >&6; }
45342     else
45343       # try to find jtreg on path
45344 
45345 
45346 
45347   # Publish this variable in the help.
45348 
45349 
45350   if [ -z "${JTREGEXE+x}" ]; then
45351     # The variable is not set by user, try to locate tool using the code snippet
45352     for ac_prog in jtreg
45353 do
45354   # Extract the first word of "$ac_prog", so it can be a program name with args.
45355 set dummy $ac_prog; ac_word=$2
45356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45357 $as_echo_n "checking for $ac_word... " >&6; }
45358 if ${ac_cv_path_JTREGEXE+:} false; then :
45359   $as_echo_n "(cached) " >&6
45360 else
45361   case $JTREGEXE in
45362   [\\/]* | ?:[\\/]*)
45363   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45364   ;;
45365   *)
45366   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45367 for as_dir in $PATH
45368 do
45369   IFS=$as_save_IFS
45370   test -z "$as_dir" && as_dir=.
45371     for ac_exec_ext in '' $ac_executable_extensions; do
45372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45373     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45375     break 2
45376   fi
45377 done
45378   done
45379 IFS=$as_save_IFS
45380 
45381   ;;
45382 esac
45383 fi
45384 JTREGEXE=$ac_cv_path_JTREGEXE
45385 if test -n "$JTREGEXE"; then
45386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45387 $as_echo "$JTREGEXE" >&6; }
45388 else
45389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45390 $as_echo "no" >&6; }
45391 fi
45392 
45393 
45394   test -n "$JTREGEXE" && break
45395 done
45396 
45397   else
45398     # The variable is set, but is it from the command line or the environment?
45399 
45400     # Try to remove the string !JTREGEXE! from our list.
45401     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45402     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45403       # If it failed, the variable was not from the command line. Ignore it,
45404       # but warn the user (except for BASH, which is always set by the calling BASH).
45405       if test "xJTREGEXE" != xBASH; then
45406         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45407 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45408       fi
45409       # Try to locate tool using the code snippet
45410       for ac_prog in jtreg
45411 do
45412   # Extract the first word of "$ac_prog", so it can be a program name with args.
45413 set dummy $ac_prog; ac_word=$2
45414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45415 $as_echo_n "checking for $ac_word... " >&6; }
45416 if ${ac_cv_path_JTREGEXE+:} false; then :
45417   $as_echo_n "(cached) " >&6
45418 else
45419   case $JTREGEXE in
45420   [\\/]* | ?:[\\/]*)
45421   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45422   ;;
45423   *)
45424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45425 for as_dir in $PATH
45426 do
45427   IFS=$as_save_IFS
45428   test -z "$as_dir" && as_dir=.
45429     for ac_exec_ext in '' $ac_executable_extensions; do
45430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45431     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45433     break 2
45434   fi
45435 done
45436   done
45437 IFS=$as_save_IFS
45438 
45439   ;;
45440 esac
45441 fi
45442 JTREGEXE=$ac_cv_path_JTREGEXE
45443 if test -n "$JTREGEXE"; then
45444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45445 $as_echo "$JTREGEXE" >&6; }
45446 else
45447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45448 $as_echo "no" >&6; }
45449 fi
45450 
45451 
45452   test -n "$JTREGEXE" && break
45453 done
45454 
45455     else
45456       # If it succeeded, then it was overridden by the user. We will use it
45457       # for the tool.
45458 
45459       # First remove it from the list of overridden variables, so we can test
45460       # for unknown variables in the end.
45461       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45462 
45463       # Check if we try to supply an empty value
45464       if test "x$JTREGEXE" = x; then
45465         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45466 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45467         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45468 $as_echo_n "checking for JTREGEXE... " >&6; }
45469         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45470 $as_echo "disabled" >&6; }
45471       else
45472         # Check if the provided tool contains a complete path.
45473         tool_specified="$JTREGEXE"
45474         tool_basename="${tool_specified##*/}"
45475         if test "x$tool_basename" = "x$tool_specified"; then
45476           # A command without a complete path is provided, search $PATH.
45477           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45478 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45479           # Extract the first word of "$tool_basename", so it can be a program name with args.
45480 set dummy $tool_basename; ac_word=$2
45481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45482 $as_echo_n "checking for $ac_word... " >&6; }
45483 if ${ac_cv_path_JTREGEXE+:} false; then :
45484   $as_echo_n "(cached) " >&6
45485 else
45486   case $JTREGEXE in
45487   [\\/]* | ?:[\\/]*)
45488   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45489   ;;
45490   *)
45491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45492 for as_dir in $PATH
45493 do
45494   IFS=$as_save_IFS
45495   test -z "$as_dir" && as_dir=.
45496     for ac_exec_ext in '' $ac_executable_extensions; do
45497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45498     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45500     break 2
45501   fi
45502 done
45503   done
45504 IFS=$as_save_IFS
45505 
45506   ;;
45507 esac
45508 fi
45509 JTREGEXE=$ac_cv_path_JTREGEXE
45510 if test -n "$JTREGEXE"; then
45511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45512 $as_echo "$JTREGEXE" >&6; }
45513 else
45514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45515 $as_echo "no" >&6; }
45516 fi
45517 
45518 
45519           if test "x$JTREGEXE" = x; then
45520             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45521           fi
45522         else
45523           # Otherwise we believe it is a complete path. Use it as it is.
45524           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45525 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45526           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45527 $as_echo_n "checking for JTREGEXE... " >&6; }
45528           if test ! -x "$tool_specified"; then
45529             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45530 $as_echo "not found" >&6; }
45531             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45532           fi
45533           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45534 $as_echo "$tool_specified" >&6; }
45535         fi
45536       fi
45537     fi
45538 
45539   fi
45540 
45541 
45542 
45543   if test "x$JTREGEXE" = x; then
45544     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45545   fi
45546 
45547 
45548       JT_HOME="`$DIRNAME $JTREGEXE`"
45549     fi
45550   fi
45551 
45552 
45553 
45554 
45555 
45556 
45557   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
45558   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
45559   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
45560   #                              commands produced by the link step (currently AIX only)
45561   if test "x$TOOLCHAIN_TYPE" = xxlc; then
45562     COMPILER_TARGET_BITS_FLAG="-q"
45563     COMPILER_COMMAND_FILE_FLAG="-f"
45564     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
45565   else
45566     COMPILER_TARGET_BITS_FLAG="-m"
45567     COMPILER_COMMAND_FILE_FLAG="@"
45568     COMPILER_BINDCMD_FILE_FLAG=""
45569 
45570     # The solstudio linker does not support @-files.
45571     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45572       COMPILER_COMMAND_FILE_FLAG=
45573     fi
45574 
45575     # Check if @file is supported by gcc
45576     if test "x$TOOLCHAIN_TYPE" = xgcc; then
45577       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
45578 $as_echo_n "checking if @file is supported by gcc... " >&6; }
45579       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
45580       $ECHO "" "--version" > command.file
45581       if $CXX @command.file 2>&5 >&5; then
45582         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45583 $as_echo "yes" >&6; }
45584         COMPILER_COMMAND_FILE_FLAG="@"
45585       else
45586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45587 $as_echo "no" >&6; }
45588         COMPILER_COMMAND_FILE_FLAG=
45589       fi
45590       rm -rf command.file
45591     fi
45592   fi
45593 
45594 
45595 
45596 
45597   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45598   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45599     ARFLAGS="-r"
45600   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45601     ARFLAGS="-X64"
45602   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45603     # lib.exe is used as AR to create static libraries.
45604     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45605   else
45606     ARFLAGS=""
45607   fi
45608 
45609 
45610   ## Setup strip.
45611   # FIXME: should this really be per platform, or should it be per toolchain type?
45612   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45613   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45614   if test "x$OPENJDK_TARGET_OS" = xlinux; then
45615     STRIPFLAGS="-g"
45616   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45617     STRIPFLAGS="-x"
45618   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45619     STRIPFLAGS="-S"
45620   elif test "x$OPENJDK_TARGET_OS" = xaix; then
45621     STRIPFLAGS="-X32_64"
45622   fi
45623 
45624 
45625 
45626   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45627     CC_OUT_OPTION=-Fo
45628     EXE_OUT_OPTION=-out:
45629     LD_OUT_OPTION=-out:
45630     AR_OUT_OPTION=-out:
45631   else
45632     # The option used to specify the target .o,.a or .so file.
45633     # When compiling, how to specify the to be created object file.
45634     CC_OUT_OPTION='-o$(SPACE)'
45635     # When linking, how to specify the to be created executable.
45636     EXE_OUT_OPTION='-o$(SPACE)'
45637     # When linking, how to specify the to be created dynamically linkable library.
45638     LD_OUT_OPTION='-o$(SPACE)'
45639     # When archiving, how to specify the to be create static archive for object files.
45640     AR_OUT_OPTION='rcs$(SPACE)'
45641   fi
45642 
45643 
45644 
45645 
45646 
45647   # On Windows, we need to set RC flags.
45648   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45649     RC_FLAGS="-nologo -l0x409"
45650     if test "x$DEBUG_LEVEL" = xrelease; then
45651       RC_FLAGS="$RC_FLAGS -DNDEBUG"
45652     fi
45653 
45654     # The version variables used to create RC_FLAGS may be overridden
45655     # in a custom configure script, or possibly the command line.
45656     # Let those variables be expanded at make time in spec.gmk.
45657     # The \$ are escaped to the shell, and the $(...) variables
45658     # are evaluated by make.
45659     RC_FLAGS="$RC_FLAGS \
45660         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45661         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45662         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45663         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45664         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45665         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45666         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45667   fi
45668 
45669 
45670   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45671     # silence copyright notice and other headers.
45672     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45673   fi
45674 
45675 
45676 # Now we can test some aspects on the target using configure macros.
45677 
45678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45679 $as_echo_n "checking for ANSI C header files... " >&6; }
45680 if ${ac_cv_header_stdc+:} false; then :
45681   $as_echo_n "(cached) " >&6
45682 else
45683   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45684 /* end confdefs.h.  */
45685 #include <stdlib.h>
45686 #include <stdarg.h>
45687 #include <string.h>
45688 #include <float.h>
45689 
45690 int
45691 main ()
45692 {
45693 
45694   ;
45695   return 0;
45696 }
45697 _ACEOF
45698 if ac_fn_cxx_try_compile "$LINENO"; then :
45699   ac_cv_header_stdc=yes
45700 else
45701   ac_cv_header_stdc=no
45702 fi
45703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45704 
45705 if test $ac_cv_header_stdc = yes; then
45706   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45707   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45708 /* end confdefs.h.  */
45709 #include <string.h>
45710 
45711 _ACEOF
45712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45713   $EGREP "memchr" >/dev/null 2>&1; then :
45714 
45715 else
45716   ac_cv_header_stdc=no
45717 fi
45718 rm -f conftest*
45719 
45720 fi
45721 
45722 if test $ac_cv_header_stdc = yes; then
45723   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45725 /* end confdefs.h.  */
45726 #include <stdlib.h>
45727 
45728 _ACEOF
45729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45730   $EGREP "free" >/dev/null 2>&1; then :
45731 
45732 else
45733   ac_cv_header_stdc=no
45734 fi
45735 rm -f conftest*
45736 
45737 fi
45738 
45739 if test $ac_cv_header_stdc = yes; then
45740   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45741   if test "$cross_compiling" = yes; then :
45742   :
45743 else
45744   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45745 /* end confdefs.h.  */
45746 #include <ctype.h>
45747 #include <stdlib.h>
45748 #if ((' ' & 0x0FF) == 0x020)
45749 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45750 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45751 #else
45752 # define ISLOWER(c) \
45753                    (('a' <= (c) && (c) <= 'i') \
45754                      || ('j' <= (c) && (c) <= 'r') \
45755                      || ('s' <= (c) && (c) <= 'z'))
45756 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45757 #endif
45758 
45759 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45760 int
45761 main ()
45762 {
45763   int i;
45764   for (i = 0; i < 256; i++)
45765     if (XOR (islower (i), ISLOWER (i))
45766         || toupper (i) != TOUPPER (i))
45767       return 2;
45768   return 0;
45769 }
45770 _ACEOF
45771 if ac_fn_cxx_try_run "$LINENO"; then :
45772 
45773 else
45774   ac_cv_header_stdc=no
45775 fi
45776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45777   conftest.$ac_objext conftest.beam conftest.$ac_ext
45778 fi
45779 
45780 fi
45781 fi
45782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45783 $as_echo "$ac_cv_header_stdc" >&6; }
45784 if test $ac_cv_header_stdc = yes; then
45785 
45786 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
45787 
45788 fi
45789 
45790 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
45791 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45792                   inttypes.h stdint.h unistd.h
45793 do :
45794   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45795 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45796 "
45797 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45798   cat >>confdefs.h <<_ACEOF
45799 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45800 _ACEOF
45801 
45802 fi
45803 
45804 done
45805 
45806 
45807 
45808   ###############################################################################
45809   #
45810   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45811   # (The JVM can use 32 or 64 bit Java pointers but that decision
45812   # is made at runtime.)
45813   #
45814 
45815   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45816     # Always specify -m flag on Solaris
45817     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45818 
45819   # When we add flags to the "official" CFLAGS etc, we need to
45820   # keep track of these additions in ADDED_CFLAGS etc. These
45821   # will later be checked to make sure only controlled additions
45822   # have been made to CFLAGS etc.
45823   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45824   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45825   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45826 
45827   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45828   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45829   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45830 
45831   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45832   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45833   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45834 
45835   elif test "x$COMPILE_TYPE" = xreduced; then
45836     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45837       # Specify -m if running reduced on unix platforms
45838 
45839   # When we add flags to the "official" CFLAGS etc, we need to
45840   # keep track of these additions in ADDED_CFLAGS etc. These
45841   # will later be checked to make sure only controlled additions
45842   # have been made to CFLAGS etc.
45843   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45844   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45845   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45846 
45847   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45848   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45849   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45850 
45851   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45852   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45853   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45854 
45855     fi
45856   fi
45857 
45858   # Make compilation sanity check
45859   for ac_header in stdio.h
45860 do :
45861   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45862 if test "x$ac_cv_header_stdio_h" = xyes; then :
45863   cat >>confdefs.h <<_ACEOF
45864 #define HAVE_STDIO_H 1
45865 _ACEOF
45866 
45867 else
45868 
45869     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45870 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45871     if test "x$COMPILE_TYPE" = xreduced; then
45872 
45873   # Print a helpful message on how to acquire the necessary build dependency.
45874   # reduced is the help tag: freetype, cups, alsa etc
45875   MISSING_DEPENDENCY=reduced
45876 
45877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45878     cygwin_help $MISSING_DEPENDENCY
45879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45880     msys_help $MISSING_DEPENDENCY
45881   else
45882     PKGHANDLER_COMMAND=
45883 
45884     case $PKGHANDLER in
45885       apt-get)
45886         apt_help     $MISSING_DEPENDENCY ;;
45887       yum)
45888         yum_help     $MISSING_DEPENDENCY ;;
45889       port)
45890         port_help    $MISSING_DEPENDENCY ;;
45891       pkgutil)
45892         pkgutil_help $MISSING_DEPENDENCY ;;
45893       pkgadd)
45894         pkgadd_help  $MISSING_DEPENDENCY ;;
45895     esac
45896 
45897     if test "x$PKGHANDLER_COMMAND" != x; then
45898       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45899     fi
45900   fi
45901 
45902       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45903 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45904     elif test "x$COMPILE_TYPE" = xcross; then
45905       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45906 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45907     fi
45908     as_fn_error $? "Cannot continue." "$LINENO" 5
45909 
45910 fi
45911 
45912 done
45913 
45914 
45915   # The cast to long int works around a bug in the HP C Compiler
45916 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45917 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45918 # This bug is HP SR number 8606223364.
45919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45920 $as_echo_n "checking size of int *... " >&6; }
45921 if ${ac_cv_sizeof_int_p+:} false; then :
45922   $as_echo_n "(cached) " >&6
45923 else
45924   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45925 
45926 else
45927   if test "$ac_cv_type_int_p" = yes; then
45928      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45930 as_fn_error 77 "cannot compute sizeof (int *)
45931 See \`config.log' for more details" "$LINENO" 5; }
45932    else
45933      ac_cv_sizeof_int_p=0
45934    fi
45935 fi
45936 
45937 fi
45938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45939 $as_echo "$ac_cv_sizeof_int_p" >&6; }
45940 
45941 
45942 
45943 cat >>confdefs.h <<_ACEOF
45944 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
45945 _ACEOF
45946 
45947 
45948 
45949   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45950   if test "x$ac_cv_sizeof_int_p" = x; then
45951     # The test failed, lets stick to the assumed value.
45952     { $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
45953 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45954   else
45955     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45956 
45957     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45958       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45959       # Let's try to implicitely set the compilers target architecture and retry the test
45960       { $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
45961 $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;}
45962       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45963 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45964 
45965   # When we add flags to the "official" CFLAGS etc, we need to
45966   # keep track of these additions in ADDED_CFLAGS etc. These
45967   # will later be checked to make sure only controlled additions
45968   # have been made to CFLAGS etc.
45969   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45970   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45971   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45972 
45973   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45974   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45975   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45976 
45977   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45978   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45979   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45980 
45981 
45982       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45983       unset ac_cv_sizeof_int_p
45984       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45985       cat >>confdefs.h <<_ACEOF
45986 #undef SIZEOF_INT_P
45987 _ACEOF
45988 
45989       # The cast to long int works around a bug in the HP C Compiler
45990 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45991 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45992 # This bug is HP SR number 8606223364.
45993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45994 $as_echo_n "checking size of int *... " >&6; }
45995 if ${ac_cv_sizeof_int_p+:} false; then :
45996   $as_echo_n "(cached) " >&6
45997 else
45998   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45999 
46000 else
46001   if test "$ac_cv_type_int_p" = yes; then
46002      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46003 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46004 as_fn_error 77 "cannot compute sizeof (int *)
46005 See \`config.log' for more details" "$LINENO" 5; }
46006    else
46007      ac_cv_sizeof_int_p=0
46008    fi
46009 fi
46010 
46011 fi
46012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46013 $as_echo "$ac_cv_sizeof_int_p" >&6; }
46014 
46015 
46016 
46017 cat >>confdefs.h <<_ACEOF
46018 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
46019 _ACEOF
46020 
46021 
46022 
46023       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46024 
46025       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46026         { $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
46027 $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;}
46028         if test "x$COMPILE_TYPE" = xreduced; then
46029 
46030   # Print a helpful message on how to acquire the necessary build dependency.
46031   # reduced is the help tag: freetype, cups, alsa etc
46032   MISSING_DEPENDENCY=reduced
46033 
46034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46035     cygwin_help $MISSING_DEPENDENCY
46036   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46037     msys_help $MISSING_DEPENDENCY
46038   else
46039     PKGHANDLER_COMMAND=
46040 
46041     case $PKGHANDLER in
46042       apt-get)
46043         apt_help     $MISSING_DEPENDENCY ;;
46044       yum)
46045         yum_help     $MISSING_DEPENDENCY ;;
46046       port)
46047         port_help    $MISSING_DEPENDENCY ;;
46048       pkgutil)
46049         pkgutil_help $MISSING_DEPENDENCY ;;
46050       pkgadd)
46051         pkgadd_help  $MISSING_DEPENDENCY ;;
46052     esac
46053 
46054     if test "x$PKGHANDLER_COMMAND" != x; then
46055       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46056     fi
46057   fi
46058 
46059           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46060 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46061         elif test "x$COMPILE_TYPE" = xcross; then
46062           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46063 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46064         fi
46065         as_fn_error $? "Cannot continue." "$LINENO" 5
46066       fi
46067     fi
46068   fi
46069 
46070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46071 $as_echo_n "checking for target address size... " >&6; }
46072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46073 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46074 
46075 
46076   ###############################################################################
46077   #
46078   # Is the target little of big endian?
46079   #
46080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46081 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46082 if ${ac_cv_c_bigendian+:} false; then :
46083   $as_echo_n "(cached) " >&6
46084 else
46085   ac_cv_c_bigendian=unknown
46086     # See if we're dealing with a universal compiler.
46087     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46088 /* end confdefs.h.  */
46089 #ifndef __APPLE_CC__
46090                not a universal capable compiler
46091              #endif
46092              typedef int dummy;
46093 
46094 _ACEOF
46095 if ac_fn_cxx_try_compile "$LINENO"; then :
46096 
46097         # Check for potential -arch flags.  It is not universal unless
46098         # there are at least two -arch flags with different values.
46099         ac_arch=
46100         ac_prev=
46101         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46102          if test -n "$ac_prev"; then
46103            case $ac_word in
46104              i?86 | x86_64 | ppc | ppc64)
46105                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46106                  ac_arch=$ac_word
46107                else
46108                  ac_cv_c_bigendian=universal
46109                  break
46110                fi
46111                ;;
46112            esac
46113            ac_prev=
46114          elif test "x$ac_word" = "x-arch"; then
46115            ac_prev=arch
46116          fi
46117        done
46118 fi
46119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46120     if test $ac_cv_c_bigendian = unknown; then
46121       # See if sys/param.h defines the BYTE_ORDER macro.
46122       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46123 /* end confdefs.h.  */
46124 #include <sys/types.h>
46125              #include <sys/param.h>
46126 
46127 int
46128 main ()
46129 {
46130 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46131                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46132                      && LITTLE_ENDIAN)
46133               bogus endian macros
46134              #endif
46135 
46136   ;
46137   return 0;
46138 }
46139 _ACEOF
46140 if ac_fn_cxx_try_compile "$LINENO"; then :
46141   # It does; now see whether it defined to BIG_ENDIAN or not.
46142          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46143 /* end confdefs.h.  */
46144 #include <sys/types.h>
46145                 #include <sys/param.h>
46146 
46147 int
46148 main ()
46149 {
46150 #if BYTE_ORDER != BIG_ENDIAN
46151                  not big endian
46152                 #endif
46153 
46154   ;
46155   return 0;
46156 }
46157 _ACEOF
46158 if ac_fn_cxx_try_compile "$LINENO"; then :
46159   ac_cv_c_bigendian=yes
46160 else
46161   ac_cv_c_bigendian=no
46162 fi
46163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46164 fi
46165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46166     fi
46167     if test $ac_cv_c_bigendian = unknown; then
46168       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46169       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46170 /* end confdefs.h.  */
46171 #include <limits.h>
46172 
46173 int
46174 main ()
46175 {
46176 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46177               bogus endian macros
46178              #endif
46179 
46180   ;
46181   return 0;
46182 }
46183 _ACEOF
46184 if ac_fn_cxx_try_compile "$LINENO"; then :
46185   # It does; now see whether it defined to _BIG_ENDIAN or not.
46186          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46187 /* end confdefs.h.  */
46188 #include <limits.h>
46189 
46190 int
46191 main ()
46192 {
46193 #ifndef _BIG_ENDIAN
46194                  not big endian
46195                 #endif
46196 
46197   ;
46198   return 0;
46199 }
46200 _ACEOF
46201 if ac_fn_cxx_try_compile "$LINENO"; then :
46202   ac_cv_c_bigendian=yes
46203 else
46204   ac_cv_c_bigendian=no
46205 fi
46206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46207 fi
46208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46209     fi
46210     if test $ac_cv_c_bigendian = unknown; then
46211       # Compile a test program.
46212       if test "$cross_compiling" = yes; then :
46213   # Try to guess by grepping values from an object file.
46214          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46215 /* end confdefs.h.  */
46216 short int ascii_mm[] =
46217                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46218                 short int ascii_ii[] =
46219                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46220                 int use_ascii (int i) {
46221                   return ascii_mm[i] + ascii_ii[i];
46222                 }
46223                 short int ebcdic_ii[] =
46224                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46225                 short int ebcdic_mm[] =
46226                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46227                 int use_ebcdic (int i) {
46228                   return ebcdic_mm[i] + ebcdic_ii[i];
46229                 }
46230                 extern int foo;
46231 
46232 int
46233 main ()
46234 {
46235 return use_ascii (foo) == use_ebcdic (foo);
46236   ;
46237   return 0;
46238 }
46239 _ACEOF
46240 if ac_fn_cxx_try_compile "$LINENO"; then :
46241   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46242               ac_cv_c_bigendian=yes
46243             fi
46244             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46245               if test "$ac_cv_c_bigendian" = unknown; then
46246                 ac_cv_c_bigendian=no
46247               else
46248                 # finding both strings is unlikely to happen, but who knows?
46249                 ac_cv_c_bigendian=unknown
46250               fi
46251             fi
46252 fi
46253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46254 else
46255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46256 /* end confdefs.h.  */
46257 $ac_includes_default
46258 int
46259 main ()
46260 {
46261 
46262              /* Are we little or big endian?  From Harbison&Steele.  */
46263              union
46264              {
46265                long int l;
46266                char c[sizeof (long int)];
46267              } u;
46268              u.l = 1;
46269              return u.c[sizeof (long int) - 1] == 1;
46270 
46271   ;
46272   return 0;
46273 }
46274 _ACEOF
46275 if ac_fn_cxx_try_run "$LINENO"; then :
46276   ac_cv_c_bigendian=no
46277 else
46278   ac_cv_c_bigendian=yes
46279 fi
46280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46281   conftest.$ac_objext conftest.beam conftest.$ac_ext
46282 fi
46283 
46284     fi
46285 fi
46286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46287 $as_echo "$ac_cv_c_bigendian" >&6; }
46288  case $ac_cv_c_bigendian in #(
46289    yes)
46290      ENDIAN="big";; #(
46291    no)
46292      ENDIAN="little" ;; #(
46293    universal)
46294      ENDIAN="universal_endianness"
46295      ;; #(
46296    *)
46297      ENDIAN="unknown" ;;
46298  esac
46299 
46300 
46301   if test "x$ENDIAN" = xuniversal_endianness; then
46302     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46303   fi
46304   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46305     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
46306   fi
46307 
46308 
46309 # Configure flags for the tools
46310 
46311   ###############################################################################
46312   #
46313   # How to compile shared libraries.
46314   #
46315 
46316   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46317     PICFLAG="-fPIC"
46318     C_FLAG_REORDER=''
46319     CXX_FLAG_REORDER=''
46320 
46321     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46322       # Linking is different on MacOSX
46323       if test "x$STATIC_BUILD" = xtrue; then
46324         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46325       else
46326         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46327       fi
46328       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46329       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46330       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46331       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
46332     else
46333       # Default works for linux, might work on other platforms as well.
46334       SHARED_LIBRARY_FLAGS='-shared'
46335       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46336       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46337       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46338       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46339     fi
46340   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46341     C_FLAG_REORDER=''
46342     CXX_FLAG_REORDER=''
46343 
46344     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46345       # Linking is different on MacOSX
46346       PICFLAG=''
46347       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46348       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46349       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46350       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46351       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
46352     else
46353       # Default works for linux, might work on other platforms as well.
46354       PICFLAG='-fPIC'
46355       SHARED_LIBRARY_FLAGS='-shared'
46356       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46357       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46358       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46359       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46360     fi
46361   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46362     PICFLAG="-KPIC"
46363     C_FLAG_REORDER='-xF'
46364     CXX_FLAG_REORDER='-xF'
46365     SHARED_LIBRARY_FLAGS="-G"
46366     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46367     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46368     SET_SHARED_LIBRARY_NAME='-h $1'
46369     SET_SHARED_LIBRARY_MAPFILE='-M$1'
46370   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46371     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
46372     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
46373     # will have to patch this single instruction with a call to some out-of-order code which
46374     # does the load from the TOC. This is of course slow. But in that case we also would have
46375     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
46376     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
46377     # can be patched directly by the linker and does not require a jump to out-of-order code.
46378     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
46379     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
46380     # loads for accessing a global variable). But there are rumors that this may be seen as a
46381     # 'performance feature' because of improved code locality of the symbols used in a
46382     # compilation unit.
46383     PICFLAG="-qpic"
46384     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
46385     C_FLAG_REORDER=''
46386     CXX_FLAG_REORDER=''
46387     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
46388     SET_EXECUTABLE_ORIGIN=""
46389     SET_SHARED_LIBRARY_ORIGIN=''
46390     SET_SHARED_LIBRARY_NAME=''
46391     SET_SHARED_LIBRARY_MAPFILE=''
46392   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46393     PICFLAG=""
46394     C_FLAG_REORDER=''
46395     CXX_FLAG_REORDER=''
46396     SHARED_LIBRARY_FLAGS="-dll"
46397     SET_EXECUTABLE_ORIGIN=''
46398     SET_SHARED_LIBRARY_ORIGIN=''
46399     SET_SHARED_LIBRARY_NAME=''
46400     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
46401   fi
46402 
46403 
46404 
46405 
46406 
46407 
46408 
46409 
46410 
46411   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46412     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46413     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46414     CFLAGS_JDKLIB_EXTRA='-xstrconst'
46415   fi
46416   # The (cross) compiler is now configured, we can now test capabilities
46417   # of the target platform.
46418 
46419 
46420 
46421   ###############################################################################
46422   #
46423   # Setup the opt flags for different compilers
46424   # and different operating systems.
46425   #
46426 
46427   # FIXME: this was indirectly the old default, but just inherited.
46428   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46429   #   C_FLAG_DEPS="-MMD -MF"
46430   # fi
46431 
46432   # Generate make dependency files
46433   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46434     C_FLAG_DEPS="-MMD -MF"
46435   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46436     C_FLAG_DEPS="-MMD -MF"
46437   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46438     C_FLAG_DEPS="-xMMD -xMF"
46439   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46440     C_FLAG_DEPS="-qmakedep=gcc -MF"
46441   fi
46442   CXX_FLAG_DEPS="$C_FLAG_DEPS"
46443 
46444 
46445 
46446   # Debug symbols
46447   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46448     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46449       # reduce from default "-g2" option to save space
46450       CFLAGS_DEBUG_SYMBOLS="-g1"
46451       CXXFLAGS_DEBUG_SYMBOLS="-g1"
46452     else
46453       CFLAGS_DEBUG_SYMBOLS="-g"
46454       CXXFLAGS_DEBUG_SYMBOLS="-g"
46455     fi
46456   elif test "x$TOOLCHAIN_TYPE" = xclang; then
46457     CFLAGS_DEBUG_SYMBOLS="-g"
46458     CXXFLAGS_DEBUG_SYMBOLS="-g"
46459   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46460     CFLAGS_DEBUG_SYMBOLS="-g -xs"
46461     # -g0 enables debug symbols without disabling inlining.
46462     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46463   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46464     CFLAGS_DEBUG_SYMBOLS="-g"
46465     CXXFLAGS_DEBUG_SYMBOLS="-g"
46466   fi
46467 
46468 
46469 
46470   # bounds, memory and behavior checking options
46471   if test "x$TOOLCHAIN_TYPE" = xgcc; then
46472     case $DEBUG_LEVEL in
46473     release )
46474       # no adjustment
46475       ;;
46476     fastdebug )
46477       # no adjustment
46478       ;;
46479     slowdebug )
46480       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
46481       # get's added conditionally on whether we produce debug symbols or not.
46482       # This is most likely not really correct.
46483 
46484       # Add runtime stack smashing and undefined behavior checks.
46485       # Not all versions of gcc support -fstack-protector
46486       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46487 
46488 
46489 
46490 
46491 
46492 
46493 
46494 
46495 
46496 
46497 
46498 
46499 
46500 
46501 
46502 
46503 
46504 
46505 
46506 
46507 
46508 
46509 
46510 
46511 
46512 
46513 
46514 
46515 
46516 
46517 
46518 
46519 
46520 
46521 
46522 
46523 
46524 
46525 
46526 
46527 
46528 
46529     # Execute function body
46530 
46531 
46532 
46533 
46534 
46535 
46536 
46537 
46538 
46539 
46540 
46541 
46542 
46543 
46544 
46545 
46546 
46547 
46548 
46549 
46550 
46551 
46552 
46553 
46554 
46555 
46556 
46557 
46558 
46559 
46560 
46561 
46562 
46563 
46564 
46565 
46566 
46567 
46568 
46569 
46570 
46571 
46572 
46573 
46574 
46575 
46576 
46577 
46578     # Execute function body
46579 
46580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
46581 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
46582   supports=yes
46583 
46584   saved_cflags="$CFLAGS"
46585   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
46586   ac_ext=c
46587 ac_cpp='$CPP $CPPFLAGS'
46588 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46589 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46590 ac_compiler_gnu=$ac_cv_c_compiler_gnu
46591 
46592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46593 /* end confdefs.h.  */
46594 int i;
46595 _ACEOF
46596 if ac_fn_c_try_compile "$LINENO"; then :
46597 
46598 else
46599   supports=no
46600 fi
46601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46602   ac_ext=cpp
46603 ac_cpp='$CXXCPP $CPPFLAGS'
46604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46605 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46607 
46608   CFLAGS="$saved_cflags"
46609 
46610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46611 $as_echo "$supports" >&6; }
46612   if test "x$supports" = "xyes" ; then
46613     :
46614     C_COMP_SUPPORTS="yes"
46615   else
46616     :
46617     C_COMP_SUPPORTS="no"
46618   fi
46619 
46620 
46621 
46622 
46623 
46624 
46625 
46626 
46627 
46628 
46629 
46630 
46631 
46632 
46633 
46634 
46635 
46636 
46637 
46638 
46639 
46640 
46641 
46642 
46643 
46644 
46645 
46646 
46647 
46648 
46649 
46650 
46651 
46652 
46653 
46654 
46655 
46656 
46657 
46658 
46659 
46660 
46661 
46662 
46663 
46664 
46665 
46666 
46667 
46668 
46669 
46670 
46671 
46672 
46673 
46674 
46675 
46676 
46677 
46678     # Execute function body
46679 
46680   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
46681 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
46682   supports=yes
46683 
46684   saved_cxxflags="$CXXFLAGS"
46685   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
46686   ac_ext=cpp
46687 ac_cpp='$CXXCPP $CPPFLAGS'
46688 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46689 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46690 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46691 
46692   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46693 /* end confdefs.h.  */
46694 int i;
46695 _ACEOF
46696 if ac_fn_cxx_try_compile "$LINENO"; then :
46697 
46698 else
46699   supports=no
46700 fi
46701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46702   ac_ext=cpp
46703 ac_cpp='$CXXCPP $CPPFLAGS'
46704 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46705 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46706 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46707 
46708   CXXFLAGS="$saved_cxxflags"
46709 
46710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46711 $as_echo "$supports" >&6; }
46712   if test "x$supports" = "xyes" ; then
46713     :
46714     CXX_COMP_SUPPORTS="yes"
46715   else
46716     :
46717     CXX_COMP_SUPPORTS="no"
46718   fi
46719 
46720 
46721 
46722 
46723 
46724 
46725 
46726 
46727 
46728 
46729 
46730 
46731 
46732   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
46733 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
46734   supports=no
46735   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46736 
46737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46738 $as_echo "$supports" >&6; }
46739   if test "x$supports" = "xyes" ; then
46740     :
46741 
46742   else
46743     :
46744     STACK_PROTECTOR_CFLAG=""
46745   fi
46746 
46747 
46748 
46749 
46750 
46751 
46752 
46753       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46754       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46755       ;;
46756     esac
46757   fi
46758 
46759   # Optimization levels
46760   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46761     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46762 
46763     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46764       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46765       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46766       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46767       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46768       C_O_FLAG_DEBUG="-xregs=no%frameptr"
46769       C_O_FLAG_NONE="-xregs=no%frameptr"
46770       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46771       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46772       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46773       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46774       CXX_O_FLAG_NONE="-xregs=no%frameptr"
46775       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46776         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46777         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46778       fi
46779     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46780       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46781       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46782       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46783       C_O_FLAG_DEBUG=""
46784       C_O_FLAG_NONE=""
46785       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46786       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46787       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46788       CXX_O_FLAG_DEBUG=""
46789       CXX_O_FLAG_NONE=""
46790     fi
46791   else
46792     # The remaining toolchains share opt flags between CC and CXX;
46793     # setup for C and duplicate afterwards.
46794     if test "x$TOOLCHAIN_TYPE" = xgcc; then
46795       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46796         # On MacOSX we optimize for size, something
46797         # we should do for all platforms?
46798         C_O_FLAG_HIGHEST="-Os"
46799         C_O_FLAG_HI="-Os"
46800         C_O_FLAG_NORM="-Os"
46801       else
46802         C_O_FLAG_HIGHEST="-O3"
46803         C_O_FLAG_HI="-O3"
46804         C_O_FLAG_NORM="-O2"
46805       fi
46806       C_O_FLAG_DEBUG="-O0"
46807       C_O_FLAG_NONE="-O0"
46808     elif test "x$TOOLCHAIN_TYPE" = xclang; then
46809       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46810         # On MacOSX we optimize for size, something
46811         # we should do for all platforms?
46812         C_O_FLAG_HIGHEST="-Os"
46813         C_O_FLAG_HI="-Os"
46814         C_O_FLAG_NORM="-Os"
46815       else
46816         C_O_FLAG_HIGHEST="-O3"
46817         C_O_FLAG_HI="-O3"
46818         C_O_FLAG_NORM="-O2"
46819       fi
46820       C_O_FLAG_DEBUG="-O0"
46821       C_O_FLAG_NONE="-O0"
46822     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46823       C_O_FLAG_HIGHEST="-O3"
46824       C_O_FLAG_HI="-O3 -qstrict"
46825       C_O_FLAG_NORM="-O2"
46826       C_O_FLAG_DEBUG="-qnoopt"
46827       C_O_FLAG_NONE="-qnoopt"
46828     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46829       C_O_FLAG_HIGHEST="-O2"
46830       C_O_FLAG_HI="-O1"
46831       C_O_FLAG_NORM="-O1"
46832       C_O_FLAG_DEBUG="-Od"
46833       C_O_FLAG_NONE="-Od"
46834     fi
46835     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46836     CXX_O_FLAG_HI="$C_O_FLAG_HI"
46837     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46838     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46839     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46840   fi
46841 
46842   # Adjust optimization flags according to debug level.
46843   case $DEBUG_LEVEL in
46844     release )
46845       # no adjustment
46846       ;;
46847     fastdebug )
46848       # Not quite so much optimization
46849       C_O_FLAG_HI="$C_O_FLAG_NORM"
46850       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46851       ;;
46852     slowdebug )
46853       # Disable optimization
46854       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46855       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46856       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46857       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46858       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46859       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46860       ;;
46861   esac
46862 
46863 
46864 
46865 
46866 
46867 
46868 
46869 
46870 
46871 
46872 
46873 
46874 
46875   # Special extras...
46876   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46877     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46878       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46879       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46880     fi
46881     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46882     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46883   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46884     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46885     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46886   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46887     CXXSTD_CXXFLAG="-std=gnu++98"
46888 
46889 
46890 
46891 
46892 
46893 
46894 
46895 
46896 
46897 
46898 
46899 
46900 
46901 
46902 
46903 
46904 
46905 
46906 
46907 
46908 
46909 
46910 
46911 
46912 
46913 
46914 
46915 
46916 
46917 
46918 
46919 
46920 
46921 
46922 
46923 
46924 
46925 
46926 
46927 
46928 
46929 
46930     # Execute function body
46931 
46932   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
46933 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
46934   supports=yes
46935 
46936   saved_cxxflags="$CXXFLAGS"
46937   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
46938   ac_ext=cpp
46939 ac_cpp='$CXXCPP $CPPFLAGS'
46940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46943 
46944   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46945 /* end confdefs.h.  */
46946 int i;
46947 _ACEOF
46948 if ac_fn_cxx_try_compile "$LINENO"; then :
46949 
46950 else
46951   supports=no
46952 fi
46953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46954   ac_ext=cpp
46955 ac_cpp='$CXXCPP $CPPFLAGS'
46956 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46957 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46958 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46959 
46960   CXXFLAGS="$saved_cxxflags"
46961 
46962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46963 $as_echo "$supports" >&6; }
46964   if test "x$supports" = "xyes" ; then
46965     :
46966 
46967   else
46968     :
46969     CXXSTD_CXXFLAG=""
46970   fi
46971 
46972 
46973 
46974 
46975 
46976 
46977 
46978 
46979 
46980 
46981 
46982 
46983     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
46984 
46985   fi
46986 
46987   CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46988   CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46989   LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46990 
46991   ###############################################################################
46992   #
46993   # Now setup the CFLAGS and LDFLAGS for the JDK build.
46994   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46995   #
46996 
46997   # Setup compiler/platform specific flags into
46998   #    CFLAGS_JDK    - C Compiler flags
46999   #    CXXFLAGS_JDK  - C++ Compiler flags
47000   #    COMMON_CCXXFLAGS_JDK - common to C and C++
47001   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47002     if test "x$OPENJDK_TARGET_CPU" = xx86; then
47003       # Force compatibility with i586 on 32 bit intel platforms.
47004       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47005     fi
47006     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47007         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47008     case $OPENJDK_TARGET_CPU_ARCH in
47009       arm )
47010         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47011         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47012         ;;
47013       ppc )
47014         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47015         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47016         ;;
47017       * )
47018         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47019         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47020         ;;
47021     esac
47022     # These flags are required for GCC 6 builds but may not be available on earlier versions
47023     NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
47024 
47025 
47026 
47027 
47028 
47029 
47030 
47031 
47032 
47033 
47034 
47035 
47036 
47037 
47038 
47039 
47040 
47041 
47042 
47043 
47044 
47045 
47046 
47047 
47048 
47049 
47050 
47051 
47052 
47053 
47054 
47055 
47056 
47057 
47058 
47059 
47060 
47061 
47062 
47063 
47064 
47065 
47066     # Execute function body
47067 
47068 
47069 
47070 
47071 
47072 
47073 
47074 
47075 
47076 
47077 
47078 
47079 
47080 
47081 
47082 
47083 
47084 
47085 
47086 
47087 
47088 
47089 
47090 
47091 
47092 
47093 
47094 
47095 
47096 
47097 
47098 
47099 
47100 
47101 
47102 
47103 
47104 
47105 
47106 
47107 
47108 
47109 
47110 
47111 
47112 
47113 
47114 
47115     # Execute function body
47116 
47117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
47118 $as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
47119   supports=yes
47120 
47121   saved_cflags="$CFLAGS"
47122   CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
47123   ac_ext=c
47124 ac_cpp='$CPP $CPPFLAGS'
47125 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47126 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47127 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47128 
47129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47130 /* end confdefs.h.  */
47131 int i;
47132 _ACEOF
47133 if ac_fn_c_try_compile "$LINENO"; then :
47134 
47135 else
47136   supports=no
47137 fi
47138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47139   ac_ext=cpp
47140 ac_cpp='$CXXCPP $CPPFLAGS'
47141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47144 
47145   CFLAGS="$saved_cflags"
47146 
47147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47148 $as_echo "$supports" >&6; }
47149   if test "x$supports" = "xyes" ; then
47150     :
47151     C_COMP_SUPPORTS="yes"
47152   else
47153     :
47154     C_COMP_SUPPORTS="no"
47155   fi
47156 
47157 
47158 
47159 
47160 
47161 
47162 
47163 
47164 
47165 
47166 
47167 
47168 
47169 
47170 
47171 
47172 
47173 
47174 
47175 
47176 
47177 
47178 
47179 
47180 
47181 
47182 
47183 
47184 
47185 
47186 
47187 
47188 
47189 
47190 
47191 
47192 
47193 
47194 
47195 
47196 
47197 
47198 
47199 
47200 
47201 
47202 
47203 
47204 
47205 
47206 
47207 
47208 
47209 
47210 
47211 
47212 
47213 
47214 
47215     # Execute function body
47216 
47217   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
47218 $as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
47219   supports=yes
47220 
47221   saved_cxxflags="$CXXFLAGS"
47222   CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
47223   ac_ext=cpp
47224 ac_cpp='$CXXCPP $CPPFLAGS'
47225 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47226 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47227 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47228 
47229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47230 /* end confdefs.h.  */
47231 int i;
47232 _ACEOF
47233 if ac_fn_cxx_try_compile "$LINENO"; then :
47234 
47235 else
47236   supports=no
47237 fi
47238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47239   ac_ext=cpp
47240 ac_cpp='$CXXCPP $CPPFLAGS'
47241 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47242 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47243 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47244 
47245   CXXFLAGS="$saved_cxxflags"
47246 
47247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47248 $as_echo "$supports" >&6; }
47249   if test "x$supports" = "xyes" ; then
47250     :
47251     CXX_COMP_SUPPORTS="yes"
47252   else
47253     :
47254     CXX_COMP_SUPPORTS="no"
47255   fi
47256 
47257 
47258 
47259 
47260 
47261 
47262 
47263 
47264 
47265 
47266 
47267 
47268 
47269   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
47270 $as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
47271   supports=no
47272   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47273 
47274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47275 $as_echo "$supports" >&6; }
47276   if test "x$supports" = "xyes" ; then
47277     :
47278 
47279   else
47280     :
47281     NO_NULL_POINTER_CHECK_CFLAG=""
47282   fi
47283 
47284 
47285 
47286 
47287 
47288 
47289 
47290     NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse-mother-fucker"
47291 
47292 
47293 
47294 
47295 
47296 
47297 
47298 
47299 
47300 
47301 
47302 
47303 
47304 
47305 
47306 
47307 
47308 
47309 
47310 
47311 
47312 
47313 
47314 
47315 
47316 
47317 
47318 
47319 
47320 
47321 
47322 
47323 
47324 
47325 
47326 
47327 
47328 
47329 
47330 
47331 
47332 
47333     # Execute function body
47334 
47335 
47336 
47337 
47338 
47339 
47340 
47341 
47342 
47343 
47344 
47345 
47346 
47347 
47348 
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     # Execute function body
47383 
47384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
47385 $as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
47386   supports=yes
47387 
47388   saved_cflags="$CFLAGS"
47389   CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
47390   ac_ext=c
47391 ac_cpp='$CPP $CPPFLAGS'
47392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47395 
47396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47397 /* end confdefs.h.  */
47398 int i;
47399 _ACEOF
47400 if ac_fn_c_try_compile "$LINENO"; then :
47401 
47402 else
47403   supports=no
47404 fi
47405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47406   ac_ext=cpp
47407 ac_cpp='$CXXCPP $CPPFLAGS'
47408 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47409 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47410 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47411 
47412   CFLAGS="$saved_cflags"
47413 
47414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47415 $as_echo "$supports" >&6; }
47416   if test "x$supports" = "xyes" ; then
47417     :
47418     C_COMP_SUPPORTS="yes"
47419   else
47420     :
47421     C_COMP_SUPPORTS="no"
47422   fi
47423 
47424 
47425 
47426 
47427 
47428 
47429 
47430 
47431 
47432 
47433 
47434 
47435 
47436 
47437 
47438 
47439 
47440 
47441 
47442 
47443 
47444 
47445 
47446 
47447 
47448 
47449 
47450 
47451 
47452 
47453 
47454 
47455 
47456 
47457 
47458 
47459 
47460 
47461 
47462 
47463 
47464 
47465 
47466 
47467 
47468 
47469 
47470 
47471 
47472 
47473 
47474 
47475 
47476 
47477 
47478 
47479 
47480 
47481 
47482     # Execute function body
47483 
47484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
47485 $as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
47486   supports=yes
47487 
47488   saved_cxxflags="$CXXFLAGS"
47489   CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
47490   ac_ext=cpp
47491 ac_cpp='$CXXCPP $CPPFLAGS'
47492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47495 
47496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47497 /* end confdefs.h.  */
47498 int i;
47499 _ACEOF
47500 if ac_fn_cxx_try_compile "$LINENO"; then :
47501 
47502 else
47503   supports=no
47504 fi
47505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47506   ac_ext=cpp
47507 ac_cpp='$CXXCPP $CPPFLAGS'
47508 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47509 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47510 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47511 
47512   CXXFLAGS="$saved_cxxflags"
47513 
47514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47515 $as_echo "$supports" >&6; }
47516   if test "x$supports" = "xyes" ; then
47517     :
47518     CXX_COMP_SUPPORTS="yes"
47519   else
47520     :
47521     CXX_COMP_SUPPORTS="no"
47522   fi
47523 
47524 
47525 
47526 
47527 
47528 
47529 
47530 
47531 
47532 
47533 
47534 
47535 
47536   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
47537 $as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
47538   supports=no
47539   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47540 
47541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47542 $as_echo "$supports" >&6; }
47543   if test "x$supports" = "xyes" ; then
47544     :
47545 
47546   else
47547     :
47548     NO_LIFETIME_DSE_CFLAG=""
47549   fi
47550 
47551 
47552 
47553 
47554 
47555 
47556     CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
47557 
47558   elif test "x$TOOLCHAIN_TYPE" = xclang; then
47559     if test "x$OPENJDK_TARGET_OS" = xlinux; then
47560       if test "x$OPENJDK_TARGET_CPU" = xx86; then
47561         # Force compatibility with i586 on 32 bit intel platforms.
47562         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47563       fi
47564       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47565           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47566       case $OPENJDK_TARGET_CPU_ARCH in
47567         ppc )
47568           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47569           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47570           ;;
47571         * )
47572           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47573           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47574           ;;
47575       esac
47576     fi
47577   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47578     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47579     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47580       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47581     fi
47582 
47583     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47584     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47585   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47586     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47587     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47588   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47589     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47590         -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47591         -DWIN32_LEAN_AND_MEAN \
47592         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47593         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47594         -DWIN32 -DIAL"
47595     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47596       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47597     else
47598       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47599     fi
47600     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47601     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47602     # studio.
47603     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47604       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47605       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
47606     fi
47607   fi
47608 
47609   ###############################################################################
47610 
47611   # Adjust flags according to debug level.
47612   case $DEBUG_LEVEL in
47613     fastdebug | slowdebug )
47614       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47615       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47616       JAVAC_FLAGS="$JAVAC_FLAGS -g"
47617       ;;
47618     release )
47619       ;;
47620     * )
47621       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47622       ;;
47623   esac
47624 
47625   # Setup LP64
47626   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47627 
47628   # Set some common defines. These works for all compilers, but assume
47629   # -D is universally accepted.
47630 
47631   # Setup endianness
47632   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47633     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47634     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47635     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47636     #   Note: -Dmacro         is the same as    #define macro 1
47637     #         -Dmacro=        is the same as    #define macro
47638     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47639       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47640     else
47641       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47642     fi
47643   else
47644     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47645     # are defined in the system?
47646     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47647       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47648     else
47649       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47650     fi
47651   fi
47652 
47653   # Setup target OS define. Use OS target name but in upper case.
47654   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47655   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47656 
47657   # Setup target CPU
47658   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47659 
47660   # Setup debug/release defines
47661   if test "x$DEBUG_LEVEL" = xrelease; then
47662     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47663     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47664       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47665     fi
47666   else
47667     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47668   fi
47669 
47670   # Set some additional per-OS defines.
47671   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47672     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47673   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47674     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47675   fi
47676 
47677   # Additional macosx handling
47678   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47679     # Setting these parameters makes it an error to link to macosx APIs that are
47680     # newer than the given OS version and makes the linked binaries compatible
47681     # even if built on a newer version of the OS.
47682     # The expected format is X.Y.Z
47683     MACOSX_VERSION_MIN=10.7.0
47684 
47685 
47686     # The macro takes the version with no dots, ex: 1070
47687     # Let the flags variables get resolved in make for easier override on make
47688     # command line.
47689     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47690     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47691   fi
47692 
47693   # Setup some hard coded includes
47694   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47695       -I${JDK_TOPDIR}/src/java.base/share/native/include \
47696       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47697       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47698       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47699       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47700 
47701   # The shared libraries are compiled using the picflag.
47702   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47703   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47704 
47705   # Executable flags
47706   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47707   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47708 
47709 
47710 
47711 
47712 
47713 
47714   # Flags for compiling test libraries
47715   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47716   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47717 
47718   # Flags for compiling test executables
47719   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47720   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47721 
47722 
47723 
47724 
47725 
47726 
47727   # Setup LDFLAGS et al.
47728   #
47729 
47730   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47731     LDFLAGS_MICROSOFT="-nologo -opt:ref"
47732     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
47733     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47734       LDFLAGS_SAFESH="-safeseh"
47735       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
47736     fi
47737     # TODO: make -debug optional "--disable-full-debug-symbols"
47738     LDFLAGS_MICROSOFT_DEBUG="-debug"
47739     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG"
47740   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47741     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47742     # We have previously set HAS_GNU_HASH if this is the case
47743     if test -n "$HAS_GNU_HASH"; then
47744       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
47745       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
47746     fi
47747     if test "x$OPENJDK_TARGET_OS" = xlinux; then
47748       # And since we now know that the linker is gnu, then add -z defs, to forbid
47749       # undefined symbols in object files.
47750       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
47751       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
47752       case $DEBUG_LEVEL in
47753         release )
47754           # tell linker to optimize libraries.
47755           # Should this be supplied to the OSS linker as well?
47756           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
47757           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
47758           ;;
47759         slowdebug )
47760           if test "x$HAS_LINKER_NOW" = "xtrue"; then
47761             # do relocations at load
47762             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47763             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47764           fi
47765           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47766             # mark relocations read only
47767             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47768             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47769           fi
47770           ;;
47771         fastdebug )
47772           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47773             # mark relocations read only
47774             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47775             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47776           fi
47777           ;;
47778         * )
47779           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47780           ;;
47781         esac
47782     fi
47783   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47784     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
47785     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
47786     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
47787     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
47788   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47789     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
47790     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
47791   fi
47792 
47793   # Customize LDFLAGS for executables
47794 
47795   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47796 
47797   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47798     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47799       LDFLAGS_STACK_SIZE=1048576
47800     else
47801       LDFLAGS_STACK_SIZE=327680
47802     fi
47803     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47804   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47805     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
47806   fi
47807 
47808   # Customize LDFLAGS for libs
47809   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47810 
47811   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
47812   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47813     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47814         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47815     JDKLIB_LIBS=""
47816   else
47817     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47818         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47819 
47820     # On some platforms (mac) the linker warns about non existing -L dirs.
47821     # Add server first if available. Linking aginst client does not always produce the same results.
47822     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47823     # Default to server for other variants.
47824     if test "x$JVM_VARIANT_SERVER" = xtrue; then
47825       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47826     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47827       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47828     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47829       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47830     else
47831       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47832     fi
47833 
47834     JDKLIB_LIBS="-ljava -ljvm"
47835     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47836       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47837     fi
47838   fi
47839 
47840 
47841 
47842 
47843 
47844 
47845 
47846 
47847   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47848   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47849 
47850 
47851 
47852 
47853 
47854   # Some Zero and Shark settings.
47855   # ZERO_ARCHFLAG tells the compiler which mode to build for
47856   case "${OPENJDK_TARGET_CPU}" in
47857     s390)
47858       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47859       ;;
47860     *)
47861       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47862   esac
47863 
47864 
47865 
47866 
47867 
47868 
47869 
47870 
47871 
47872 
47873 
47874 
47875 
47876 
47877 
47878 
47879 
47880 
47881 
47882 
47883 
47884 
47885 
47886 
47887 
47888 
47889 
47890 
47891 
47892 
47893 
47894 
47895 
47896 
47897 
47898 
47899 
47900 
47901 
47902 
47903 
47904 
47905     # Execute function body
47906 
47907 
47908 
47909 
47910 
47911 
47912 
47913 
47914 
47915 
47916 
47917 
47918 
47919 
47920 
47921 
47922 
47923 
47924 
47925 
47926 
47927 
47928 
47929 
47930 
47931 
47932 
47933 
47934 
47935 
47936 
47937 
47938 
47939 
47940 
47941 
47942 
47943 
47944 
47945 
47946 
47947 
47948 
47949 
47950 
47951 
47952 
47953 
47954     # Execute function body
47955 
47956   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
47957 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47958   supports=yes
47959 
47960   saved_cflags="$CFLAGS"
47961   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47962   ac_ext=c
47963 ac_cpp='$CPP $CPPFLAGS'
47964 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47965 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47966 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47967 
47968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47969 /* end confdefs.h.  */
47970 int i;
47971 _ACEOF
47972 if ac_fn_c_try_compile "$LINENO"; then :
47973 
47974 else
47975   supports=no
47976 fi
47977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47978   ac_ext=cpp
47979 ac_cpp='$CXXCPP $CPPFLAGS'
47980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47983 
47984   CFLAGS="$saved_cflags"
47985 
47986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47987 $as_echo "$supports" >&6; }
47988   if test "x$supports" = "xyes" ; then
47989     :
47990     C_COMP_SUPPORTS="yes"
47991   else
47992     :
47993     C_COMP_SUPPORTS="no"
47994   fi
47995 
47996 
47997 
47998 
47999 
48000 
48001 
48002 
48003 
48004 
48005 
48006 
48007 
48008 
48009 
48010 
48011 
48012 
48013 
48014 
48015 
48016 
48017 
48018 
48019 
48020 
48021 
48022 
48023 
48024 
48025 
48026 
48027 
48028 
48029 
48030 
48031 
48032 
48033 
48034 
48035 
48036 
48037 
48038 
48039 
48040 
48041 
48042 
48043 
48044 
48045 
48046 
48047 
48048 
48049 
48050 
48051 
48052 
48053 
48054     # Execute function body
48055 
48056   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
48057 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
48058   supports=yes
48059 
48060   saved_cxxflags="$CXXFLAGS"
48061   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
48062   ac_ext=cpp
48063 ac_cpp='$CXXCPP $CPPFLAGS'
48064 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48065 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48066 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48067 
48068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48069 /* end confdefs.h.  */
48070 int i;
48071 _ACEOF
48072 if ac_fn_cxx_try_compile "$LINENO"; then :
48073 
48074 else
48075   supports=no
48076 fi
48077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48078   ac_ext=cpp
48079 ac_cpp='$CXXCPP $CPPFLAGS'
48080 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48081 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48082 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48083 
48084   CXXFLAGS="$saved_cxxflags"
48085 
48086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48087 $as_echo "$supports" >&6; }
48088   if test "x$supports" = "xyes" ; then
48089     :
48090     CXX_COMP_SUPPORTS="yes"
48091   else
48092     :
48093     CXX_COMP_SUPPORTS="no"
48094   fi
48095 
48096 
48097 
48098 
48099 
48100 
48101 
48102 
48103 
48104 
48105 
48106 
48107 
48108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
48109 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
48110   supports=no
48111   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48112 
48113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48114 $as_echo "$supports" >&6; }
48115   if test "x$supports" = "xyes" ; then
48116     :
48117 
48118   else
48119     :
48120     ZERO_ARCHFLAG=""
48121   fi
48122 
48123 
48124 
48125 
48126 
48127 
48128 
48129 
48130   # Check that the compiler supports -mX (or -qX on AIX) flags
48131   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
48132 
48133 
48134 
48135 
48136 
48137 
48138 
48139 
48140 
48141 
48142 
48143 
48144 
48145 
48146 
48147 
48148 
48149 
48150 
48151 
48152 
48153 
48154 
48155 
48156 
48157 
48158 
48159 
48160 
48161 
48162 
48163 
48164 
48165 
48166 
48167 
48168 
48169 
48170 
48171 
48172 
48173 
48174 
48175 
48176 
48177 
48178 
48179     # Execute function body
48180 
48181 
48182 
48183 
48184 
48185 
48186 
48187 
48188 
48189 
48190 
48191 
48192 
48193 
48194 
48195 
48196 
48197 
48198 
48199 
48200 
48201 
48202 
48203 
48204 
48205 
48206 
48207 
48208 
48209 
48210 
48211 
48212 
48213 
48214 
48215 
48216 
48217 
48218 
48219 
48220 
48221 
48222 
48223 
48224 
48225 
48226 
48227 
48228     # Execute function body
48229 
48230   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
48231 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
48232   supports=yes
48233 
48234   saved_cflags="$CFLAGS"
48235   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48236   ac_ext=c
48237 ac_cpp='$CPP $CPPFLAGS'
48238 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48239 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48240 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48241 
48242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48243 /* end confdefs.h.  */
48244 int i;
48245 _ACEOF
48246 if ac_fn_c_try_compile "$LINENO"; then :
48247 
48248 else
48249   supports=no
48250 fi
48251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48252   ac_ext=cpp
48253 ac_cpp='$CXXCPP $CPPFLAGS'
48254 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48255 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48256 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48257 
48258   CFLAGS="$saved_cflags"
48259 
48260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48261 $as_echo "$supports" >&6; }
48262   if test "x$supports" = "xyes" ; then
48263     :
48264     C_COMP_SUPPORTS="yes"
48265   else
48266     :
48267     C_COMP_SUPPORTS="no"
48268   fi
48269 
48270 
48271 
48272 
48273 
48274 
48275 
48276 
48277 
48278 
48279 
48280 
48281 
48282 
48283 
48284 
48285 
48286 
48287 
48288 
48289 
48290 
48291 
48292 
48293 
48294 
48295 
48296 
48297 
48298 
48299 
48300 
48301 
48302 
48303 
48304 
48305 
48306 
48307 
48308 
48309 
48310 
48311 
48312 
48313 
48314 
48315 
48316 
48317 
48318 
48319 
48320 
48321 
48322 
48323 
48324 
48325 
48326 
48327 
48328     # Execute function body
48329 
48330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
48331 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
48332   supports=yes
48333 
48334   saved_cxxflags="$CXXFLAGS"
48335   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48336   ac_ext=cpp
48337 ac_cpp='$CXXCPP $CPPFLAGS'
48338 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48339 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48340 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48341 
48342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48343 /* end confdefs.h.  */
48344 int i;
48345 _ACEOF
48346 if ac_fn_cxx_try_compile "$LINENO"; then :
48347 
48348 else
48349   supports=no
48350 fi
48351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48352   ac_ext=cpp
48353 ac_cpp='$CXXCPP $CPPFLAGS'
48354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48357 
48358   CXXFLAGS="$saved_cxxflags"
48359 
48360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48361 $as_echo "$supports" >&6; }
48362   if test "x$supports" = "xyes" ; then
48363     :
48364     CXX_COMP_SUPPORTS="yes"
48365   else
48366     :
48367     CXX_COMP_SUPPORTS="no"
48368   fi
48369 
48370 
48371 
48372 
48373 
48374 
48375 
48376 
48377 
48378 
48379 
48380 
48381 
48382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
48383 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
48384   supports=no
48385   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48386 
48387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48388 $as_echo "$supports" >&6; }
48389   if test "x$supports" = "xyes" ; then
48390     :
48391     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
48392   else
48393     :
48394     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
48395   fi
48396 
48397 
48398 
48399 
48400 
48401 
48402 
48403 
48404   # Check whether --enable-warnings-as-errors was given.
48405 if test "${enable_warnings_as_errors+set}" = set; then :
48406   enableval=$enable_warnings_as_errors;
48407 fi
48408 
48409 
48410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
48411 $as_echo_n "checking if native warnings are errors... " >&6; }
48412   if test "x$enable_warnings_as_errors" = "xyes"; then
48413     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
48414 $as_echo "yes (explicitely set)" >&6; }
48415     WARNINGS_AS_ERRORS=true
48416   elif test "x$enable_warnings_as_errors" = "xno"; then
48417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48418 $as_echo "no" >&6; }
48419     WARNINGS_AS_ERRORS=false
48420   elif test "x$enable_warnings_as_errors" = "x"; then
48421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
48422 $as_echo "yes (default)" >&6; }
48423     WARNINGS_AS_ERRORS=true
48424   else
48425     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
48426   fi
48427 
48428   if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
48429     # Set legacy hotspot variable
48430     HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
48431   else
48432     HOTSPOT_SET_WARNINGS_AS_ERRORS=""
48433   fi
48434 
48435 
48436 
48437 
48438   case "${TOOLCHAIN_TYPE}" in
48439     microsoft)
48440       DISABLE_WARNING_PREFIX="-wd"
48441       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
48442       ;;
48443     solstudio)
48444       DISABLE_WARNING_PREFIX="-erroff="
48445       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
48446       ;;
48447     gcc)
48448       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
48449 
48450 
48451 
48452 
48453 
48454 
48455 
48456 
48457 
48458 
48459 
48460 
48461 
48462 
48463 
48464 
48465 
48466 
48467 
48468 
48469 
48470 
48471 
48472 
48473 
48474 
48475 
48476 
48477 
48478 
48479 
48480 
48481 
48482 
48483 
48484 
48485 
48486 
48487 
48488 
48489 
48490 
48491 
48492 
48493 
48494 
48495 
48496     # Execute function body
48497 
48498 
48499 
48500 
48501 
48502 
48503 
48504 
48505 
48506 
48507 
48508 
48509 
48510 
48511 
48512 
48513 
48514 
48515 
48516 
48517 
48518 
48519 
48520 
48521 
48522 
48523 
48524 
48525 
48526 
48527 
48528 
48529 
48530 
48531 
48532 
48533 
48534 
48535 
48536 
48537 
48538 
48539 
48540 
48541 
48542 
48543 
48544 
48545     # Execute function body
48546 
48547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48548 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48549   supports=yes
48550 
48551   saved_cflags="$CFLAGS"
48552   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48553   ac_ext=c
48554 ac_cpp='$CPP $CPPFLAGS'
48555 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48556 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48558 
48559   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48560 /* end confdefs.h.  */
48561 int i;
48562 _ACEOF
48563 if ac_fn_c_try_compile "$LINENO"; then :
48564 
48565 else
48566   supports=no
48567 fi
48568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48569   ac_ext=cpp
48570 ac_cpp='$CXXCPP $CPPFLAGS'
48571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48574 
48575   CFLAGS="$saved_cflags"
48576 
48577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48578 $as_echo "$supports" >&6; }
48579   if test "x$supports" = "xyes" ; then
48580     :
48581     C_COMP_SUPPORTS="yes"
48582   else
48583     :
48584     C_COMP_SUPPORTS="no"
48585   fi
48586 
48587 
48588 
48589 
48590 
48591 
48592 
48593 
48594 
48595 
48596 
48597 
48598 
48599 
48600 
48601 
48602 
48603 
48604 
48605 
48606 
48607 
48608 
48609 
48610 
48611 
48612 
48613 
48614 
48615 
48616 
48617 
48618 
48619 
48620 
48621 
48622 
48623 
48624 
48625 
48626 
48627 
48628 
48629 
48630 
48631 
48632 
48633 
48634 
48635 
48636 
48637 
48638 
48639 
48640 
48641 
48642 
48643 
48644 
48645     # Execute function body
48646 
48647   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48648 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48649   supports=yes
48650 
48651   saved_cxxflags="$CXXFLAGS"
48652   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48653   ac_ext=cpp
48654 ac_cpp='$CXXCPP $CPPFLAGS'
48655 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48656 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48657 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48658 
48659   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48660 /* end confdefs.h.  */
48661 int i;
48662 _ACEOF
48663 if ac_fn_cxx_try_compile "$LINENO"; then :
48664 
48665 else
48666   supports=no
48667 fi
48668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48669   ac_ext=cpp
48670 ac_cpp='$CXXCPP $CPPFLAGS'
48671 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48672 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48673 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48674 
48675   CXXFLAGS="$saved_cxxflags"
48676 
48677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48678 $as_echo "$supports" >&6; }
48679   if test "x$supports" = "xyes" ; then
48680     :
48681     CXX_COMP_SUPPORTS="yes"
48682   else
48683     :
48684     CXX_COMP_SUPPORTS="no"
48685   fi
48686 
48687 
48688 
48689 
48690 
48691 
48692 
48693 
48694 
48695 
48696 
48697 
48698 
48699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48700 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48701   supports=no
48702   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48703 
48704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48705 $as_echo "$supports" >&6; }
48706   if test "x$supports" = "xyes" ; then
48707     :
48708     GCC_CAN_DISABLE_WARNINGS=true
48709   else
48710     :
48711     GCC_CAN_DISABLE_WARNINGS=false
48712 
48713   fi
48714 
48715 
48716 
48717 
48718 
48719 
48720       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48721         DISABLE_WARNING_PREFIX="-Wno-"
48722       else
48723         DISABLE_WARNING_PREFIX=
48724       fi
48725       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48726       # Repeate the check for the BUILD_CC
48727       CC_OLD="$CC"
48728       CC="$BUILD_CC"
48729 
48730 
48731 
48732 
48733 
48734 
48735 
48736 
48737 
48738 
48739 
48740 
48741 
48742 
48743 
48744 
48745 
48746 
48747 
48748 
48749 
48750 
48751 
48752 
48753 
48754 
48755 
48756 
48757 
48758 
48759 
48760 
48761 
48762 
48763 
48764 
48765 
48766 
48767 
48768 
48769 
48770 
48771 
48772 
48773 
48774 
48775 
48776     # Execute function body
48777 
48778 
48779 
48780 
48781 
48782 
48783 
48784 
48785 
48786 
48787 
48788 
48789 
48790 
48791 
48792 
48793 
48794 
48795 
48796 
48797 
48798 
48799 
48800 
48801 
48802 
48803 
48804 
48805 
48806 
48807 
48808 
48809 
48810 
48811 
48812 
48813 
48814 
48815 
48816 
48817 
48818 
48819 
48820 
48821 
48822 
48823 
48824 
48825     # Execute function body
48826 
48827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48828 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48829   supports=yes
48830 
48831   saved_cflags="$CFLAGS"
48832   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48833   ac_ext=c
48834 ac_cpp='$CPP $CPPFLAGS'
48835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48838 
48839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48840 /* end confdefs.h.  */
48841 int i;
48842 _ACEOF
48843 if ac_fn_c_try_compile "$LINENO"; then :
48844 
48845 else
48846   supports=no
48847 fi
48848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48849   ac_ext=cpp
48850 ac_cpp='$CXXCPP $CPPFLAGS'
48851 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48852 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48853 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48854 
48855   CFLAGS="$saved_cflags"
48856 
48857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48858 $as_echo "$supports" >&6; }
48859   if test "x$supports" = "xyes" ; then
48860     :
48861     C_COMP_SUPPORTS="yes"
48862   else
48863     :
48864     C_COMP_SUPPORTS="no"
48865   fi
48866 
48867 
48868 
48869 
48870 
48871 
48872 
48873 
48874 
48875 
48876 
48877 
48878 
48879 
48880 
48881 
48882 
48883 
48884 
48885 
48886 
48887 
48888 
48889 
48890 
48891 
48892 
48893 
48894 
48895 
48896 
48897 
48898 
48899 
48900 
48901 
48902 
48903 
48904 
48905 
48906 
48907 
48908 
48909 
48910 
48911 
48912 
48913 
48914 
48915 
48916 
48917 
48918 
48919 
48920 
48921 
48922 
48923 
48924 
48925     # Execute function body
48926 
48927   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48928 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48929   supports=yes
48930 
48931   saved_cxxflags="$CXXFLAGS"
48932   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48933   ac_ext=cpp
48934 ac_cpp='$CXXCPP $CPPFLAGS'
48935 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48936 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48937 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48938 
48939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48940 /* end confdefs.h.  */
48941 int i;
48942 _ACEOF
48943 if ac_fn_cxx_try_compile "$LINENO"; then :
48944 
48945 else
48946   supports=no
48947 fi
48948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48949   ac_ext=cpp
48950 ac_cpp='$CXXCPP $CPPFLAGS'
48951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48954 
48955   CXXFLAGS="$saved_cxxflags"
48956 
48957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48958 $as_echo "$supports" >&6; }
48959   if test "x$supports" = "xyes" ; then
48960     :
48961     CXX_COMP_SUPPORTS="yes"
48962   else
48963     :
48964     CXX_COMP_SUPPORTS="no"
48965   fi
48966 
48967 
48968 
48969 
48970 
48971 
48972 
48973 
48974 
48975 
48976 
48977 
48978 
48979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48980 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48981   supports=no
48982   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48983 
48984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48985 $as_echo "$supports" >&6; }
48986   if test "x$supports" = "xyes" ; then
48987     :
48988     BUILD_CC_CAN_DISABLE_WARNINGS=true
48989   else
48990     :
48991     BUILD_CC_CAN_DISABLE_WARNINGS=false
48992 
48993   fi
48994 
48995 
48996 
48997 
48998 
48999 
49000       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
49001         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
49002       else
49003         BUILD_CC_DISABLE_WARNING_PREFIX=
49004       fi
49005       CC="$CC_OLD"
49006       ;;
49007     clang)
49008       DISABLE_WARNING_PREFIX="-Wno-"
49009       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
49010       ;;
49011     xlc)
49012       DISABLE_WARNING_PREFIX="-qsuppress="
49013       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
49014       ;;
49015   esac
49016 
49017 
49018 
49019 
49020 # Setup debug symbols (need objcopy from the toolchain for that)
49021 
49022   #
49023   # NATIVE_DEBUG_SYMBOLS
49024   # This must be done after the toolchain is setup, since we're looking at objcopy.
49025   #
49026   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
49027 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
49028 
49029 # Check whether --with-native-debug-symbols was given.
49030 if test "${with_native_debug_symbols+set}" = set; then :
49031   withval=$with_native_debug_symbols;
49032         if test "x$OPENJDK_TARGET_OS" = xaix; then
49033           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
49034             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
49035           fi
49036         fi
49037 
49038 else
49039 
49040         if test "x$OPENJDK_TARGET_OS" = xaix; then
49041           # AIX doesn't support 'zipped' so use 'internal' as default
49042           with_native_debug_symbols="internal"
49043         else
49044           if test "x$STATIC_BUILD" = xtrue; then
49045             with_native_debug_symbols="none"
49046           else
49047             with_native_debug_symbols="zipped"
49048           fi
49049         fi
49050 
49051 fi
49052 
49053   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
49054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
49055 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
49056 
49057   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
49058 
49059     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
49060       if test "x$OBJCOPY" = x; then
49061         # enabling of enable-debug-symbols and can't find objcopy
49062         # this is an error
49063         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
49064       fi
49065     fi
49066 
49067     COMPILE_WITH_DEBUG_SYMBOLS=true
49068     COPY_DEBUG_SYMBOLS=true
49069     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
49070 
49071     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
49072     DEBUG_BINARIES=false
49073     STRIP_POLICY=min_strip
49074 
49075   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
49076     COMPILE_WITH_DEBUG_SYMBOLS=false
49077     COPY_DEBUG_SYMBOLS=false
49078     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
49079 
49080     DEBUG_BINARIES=false
49081     STRIP_POLICY=no_strip
49082   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
49083     COMPILE_WITH_DEBUG_SYMBOLS=true
49084     COPY_DEBUG_SYMBOLS=false
49085     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
49086 
49087     # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
49088     DEBUG_BINARIES=true
49089     STRIP_POLICY=no_strip
49090     STRIP=""
49091 
49092   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
49093 
49094     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
49095       if test "x$OBJCOPY" = x; then
49096         # enabling of enable-debug-symbols and can't find objcopy
49097         # this is an error
49098         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
49099       fi
49100     fi
49101 
49102     COMPILE_WITH_DEBUG_SYMBOLS=true
49103     COPY_DEBUG_SYMBOLS=true
49104     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
49105 
49106     # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
49107     DEBUG_BINARIES=false
49108     STRIP_POLICY=min_strip
49109   else
49110     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
49111   fi
49112 
49113   # --enable-debug-symbols is deprecated.
49114   # Please use --with-native-debug-symbols=[internal,external,zipped] .
49115 
49116   # Check whether --enable-debug-symbols was given.
49117 if test "${enable_debug_symbols+set}" = set; then :
49118   enableval=$enable_debug_symbols;
49119 fi
49120 
49121   if test "x$enable_debug_symbols" != x; then
49122     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
49123 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
49124 
49125     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
49126       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
49127 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
49128     fi
49129 
49130   fi
49131 
49132 
49133   # --enable-zip-debug-info is deprecated.
49134   # Please use --with-native-debug-symbols=zipped .
49135 
49136   # Check whether --enable-zip-debug-info was given.
49137 if test "${enable_zip_debug_info+set}" = set; then :
49138   enableval=$enable_zip_debug_info;
49139 fi
49140 
49141   if test "x$enable_zip_debug_info" != x; then
49142     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
49143 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
49144 
49145     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
49146       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
49147 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
49148     fi
49149 
49150   fi
49151 
49152 
49153 
49154 
49155 
49156 
49157   # Legacy values
49158 
49159 
49160 
49161 
49162   # Check whether --enable-native-coverage was given.
49163 if test "${enable_native_coverage+set}" = set; then :
49164   enableval=$enable_native_coverage;
49165 fi
49166 
49167   GCOV_ENABLED="false"
49168   if test "x$enable_native_coverage" = "xyes"; then
49169     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
49170       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
49171 $as_echo_n "checking if native coverage is enabled... " >&6; }
49172       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49173 $as_echo "yes" >&6; }
49174       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
49175       GCOV_LDFLAGS="-fprofile-arcs"
49176       LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
49177       LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
49178       LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
49179       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
49180       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
49181       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
49182       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
49183       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
49184       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
49185       GCOV_ENABLED="true"
49186     else
49187       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
49188     fi
49189   elif test "x$enable_native_coverage" = "xno"; then
49190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
49191 $as_echo_n "checking if native coverage is enabled... " >&6; }
49192     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49193 $as_echo "no" >&6; }
49194   elif test "x$enable_native_coverage" != "x"; then
49195     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
49196   fi
49197 
49198 
49199 
49200 
49201 ###############################################################################
49202 #
49203 # Check dependencies for external and internal libraries.
49204 #
49205 ###############################################################################
49206 
49207 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
49208 
49209   # When using cygwin or msys, we need a wrapper binary that renames
49210   # /cygdrive/c/ arguments into c:/ arguments and peeks into
49211   # @files and rewrites these too! This wrapper binary is
49212   # called fixpath.
49213   FIXPATH=
49214   if test "x$OPENJDK_BUILD_OS" = xwindows; then
49215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
49216 $as_echo_n "checking if fixpath can be created... " >&6; }
49217     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
49218     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
49219     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
49220     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
49221       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
49222       FIXPATH="$FIXPATH_BIN -c"
49223     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
49224       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
49225       # @ was chosen as separator to minimize risk of other tools messing around with it
49226       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
49227           | tr ' ' '\n' | grep '^/./' | sort | uniq`
49228       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
49229       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
49230     fi
49231     FIXPATH_SRC_W="$FIXPATH_SRC"
49232     FIXPATH_BIN_W="$FIXPATH_BIN"
49233 
49234   unix_path="$FIXPATH_SRC_W"
49235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49236     windows_path=`$CYGPATH -m "$unix_path"`
49237     FIXPATH_SRC_W="$windows_path"
49238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49239     windows_path=`cmd //c echo $unix_path`
49240     FIXPATH_SRC_W="$windows_path"
49241   fi
49242 
49243 
49244   unix_path="$FIXPATH_BIN_W"
49245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49246     windows_path=`$CYGPATH -m "$unix_path"`
49247     FIXPATH_BIN_W="$windows_path"
49248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49249     windows_path=`cmd //c echo $unix_path`
49250     FIXPATH_BIN_W="$windows_path"
49251   fi
49252 
49253     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
49254     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
49255     cd $FIXPATH_DIR
49256     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
49257     cd $CURDIR
49258 
49259     if test ! -x $FIXPATH_BIN; then
49260       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49261 $as_echo "no" >&6; }
49262       cat $FIXPATH_DIR/fixpath1.log
49263       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
49264     fi
49265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49266 $as_echo "yes" >&6; }
49267     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
49268 $as_echo_n "checking if fixpath.exe works... " >&6; }
49269     cd $FIXPATH_DIR
49270     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
49271         > $FIXPATH_DIR/fixpath2.log 2>&1
49272     cd $CURDIR
49273     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
49274       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49275 $as_echo "no" >&6; }
49276       cat $FIXPATH_DIR/fixpath2.log
49277       as_fn_error $? "fixpath did not work!" "$LINENO" 5
49278     fi
49279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49280 $as_echo "yes" >&6; }
49281 
49282     FIXPATH_DETACH_FLAG="--detach"
49283   fi
49284 
49285 
49286 
49287 
49288 
49289 
49290   # Check if X11 is needed
49291   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
49292     # No X11 support on windows or macosx
49293     NEEDS_LIB_X11=false
49294   else
49295     if test "x$SUPPORT_HEADFUL" = xno; then
49296       # No X11 support if building headless-only
49297       NEEDS_LIB_X11=false
49298     else
49299       # All other instances need X11
49300       NEEDS_LIB_X11=true
49301     fi
49302   fi
49303 
49304   # Check if cups is needed
49305   if test "x$OPENJDK_TARGET_OS" = xwindows; then
49306     # Windows have a separate print system
49307     NEEDS_LIB_CUPS=false
49308   else
49309     NEEDS_LIB_CUPS=true
49310   fi
49311 
49312   # Check if freetype is needed
49313   if test "x$OPENJDK" = "xtrue"; then
49314     NEEDS_LIB_FREETYPE=true
49315   else
49316     NEEDS_LIB_FREETYPE=false
49317   fi
49318 
49319   # Check if alsa is needed
49320   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49321     NEEDS_LIB_ALSA=true
49322   else
49323     NEEDS_LIB_ALSA=false
49324   fi
49325 
49326   # Check if ffi is needed
49327   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49328     NEEDS_LIB_FFI=true
49329   else
49330     NEEDS_LIB_FFI=false
49331   fi
49332 
49333 
49334   # statically link libstdc++ before C++ ABI is stablized on Linux unless
49335   # dynamic build is configured on command line.
49336 
49337 # Check whether --with-stdc++lib was given.
49338 if test "${with_stdc__lib+set}" = set; then :
49339   withval=$with_stdc__lib;
49340         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49341                 && test "x$with_stdc__lib" != xdefault; then
49342           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49343         fi
49344 
49345 else
49346   with_stdc__lib=default
49347 
49348 fi
49349 
49350 
49351   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49352     # Test if -lstdc++ works.
49353     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49354 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
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     OLD_CXXFLAGS="$CXXFLAGS"
49362     CXXFLAGS="$CXXFLAGS -lstdc++"
49363     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49364 /* end confdefs.h.  */
49365 
49366 int
49367 main ()
49368 {
49369 return 0;
49370   ;
49371   return 0;
49372 }
49373 _ACEOF
49374 if ac_fn_cxx_try_link "$LINENO"; then :
49375   has_dynamic_libstdcxx=yes
49376 else
49377   has_dynamic_libstdcxx=no
49378 fi
49379 rm -f core conftest.err conftest.$ac_objext \
49380     conftest$ac_exeext conftest.$ac_ext
49381     CXXFLAGS="$OLD_CXXFLAGS"
49382     ac_ext=cpp
49383 ac_cpp='$CXXCPP $CPPFLAGS'
49384 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49385 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49386 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49387 
49388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49389 $as_echo "$has_dynamic_libstdcxx" >&6; }
49390 
49391     # Test if stdc++ can be linked statically.
49392     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49393 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49394     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49395     ac_ext=cpp
49396 ac_cpp='$CXXCPP $CPPFLAGS'
49397 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49398 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49399 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49400 
49401     OLD_LIBS="$LIBS"
49402     OLD_CXX="$CXX"
49403     LIBS="$STATIC_STDCXX_FLAGS"
49404     CXX="$CC"
49405     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49406 /* end confdefs.h.  */
49407 
49408 int
49409 main ()
49410 {
49411 return 0;
49412   ;
49413   return 0;
49414 }
49415 _ACEOF
49416 if ac_fn_cxx_try_link "$LINENO"; then :
49417   has_static_libstdcxx=yes
49418 else
49419   has_static_libstdcxx=no
49420 fi
49421 rm -f core conftest.err conftest.$ac_objext \
49422     conftest$ac_exeext conftest.$ac_ext
49423     LIBS="$OLD_LIBS"
49424     CXX="$OLD_CXX"
49425     ac_ext=cpp
49426 ac_cpp='$CXXCPP $CPPFLAGS'
49427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49430 
49431     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49432 $as_echo "$has_static_libstdcxx" >&6; }
49433 
49434     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49435       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49436     fi
49437 
49438     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49439       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49440     fi
49441 
49442     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49443       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49444     fi
49445 
49446     # If dynamic was requested, it's available since it would fail above otherwise.
49447     # If dynamic wasn't requested, go with static unless it isn't available.
49448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49449 $as_echo_n "checking how to link with libstdc++... " >&6; }
49450     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49451       LIBCXX="$LIBCXX -lstdc++"
49452       LDCXX="$CXX"
49453       STATIC_CXX_SETTING="STATIC_CXX=false"
49454       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49455 $as_echo "dynamic" >&6; }
49456     else
49457       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49458       LDCXX="$CC"
49459       STATIC_CXX_SETTING="STATIC_CXX=true"
49460       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49461 $as_echo "static" >&6; }
49462     fi
49463   fi
49464 
49465 
49466   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49467   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49468     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49469   fi
49470 
49471   # TODO better (platform agnostic) test
49472   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49473     LIBCXX="-lstdc++"
49474   fi
49475 
49476 
49477   # Setup Windows runtime dlls
49478   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49479 
49480 
49481 # Check whether --with-msvcr-dll was given.
49482 if test "${with_msvcr_dll+set}" = set; then :
49483   withval=$with_msvcr_dll;
49484 fi
49485 
49486 
49487   if test "x$with_msvcr_dll" != x; then
49488     # If given explicitely by user, do not probe. If not present, fail directly.
49489 
49490   DLL_NAME="$MSVCR_NAME"
49491   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49492   METHOD="--with-msvcr-dll"
49493   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49494     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49495 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49496 
49497     # Need to check if the found msvcr is correct architecture
49498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49499 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49500     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49501     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49502       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49503       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49504       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49505         CORRECT_MSVCR_ARCH="PE32 executable"
49506       else
49507         CORRECT_MSVCR_ARCH="PE32+ executable"
49508       fi
49509     else
49510       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49511         CORRECT_MSVCR_ARCH=386
49512       else
49513         CORRECT_MSVCR_ARCH=x86-64
49514       fi
49515     fi
49516     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49517       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49518 $as_echo "ok" >&6; }
49519       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49520 
49521   # Only process if variable expands to non-empty
49522 
49523   if test "x$MSVC_DLL" != x; then
49524     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49525 
49526   # Input might be given as Windows format, start by converting to
49527   # unix format.
49528   path="$MSVC_DLL"
49529   new_path=`$CYGPATH -u "$path"`
49530 
49531   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49532   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49533   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49534   # "foo.exe" is OK but "foo" is an error.
49535   #
49536   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49537   # It is also a way to make sure we got the proper file name for the real test later on.
49538   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49539   if test "x$test_shortpath" = x; then
49540     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49541 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49542     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49543   fi
49544 
49545   # Call helper function which possibly converts this using DOS-style short mode.
49546   # If so, the updated path is stored in $new_path.
49547 
49548   input_path="$new_path"
49549   # Check if we need to convert this using DOS-style short mode. If the path
49550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49551   # take no chances and rewrite it.
49552   # Note: m4 eats our [], so we need to use [ and ] instead.
49553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49554   if test "x$has_forbidden_chars" != x; then
49555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49556     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49557     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49558     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49559       # Going to short mode and back again did indeed matter. Since short mode is
49560       # case insensitive, let's make it lowercase to improve readability.
49561       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49562       # Now convert it back to Unix-style (cygpath)
49563       input_path=`$CYGPATH -u "$shortmode_path"`
49564       new_path="$input_path"
49565     fi
49566   fi
49567 
49568   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49569   if test "x$test_cygdrive_prefix" = x; then
49570     # As a simple fix, exclude /usr/bin since it's not a real path.
49571     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49572       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49573       # a path prefixed by /cygdrive for fixpath to work.
49574       new_path="$CYGWIN_ROOT_PATH$input_path"
49575     fi
49576   fi
49577 
49578 
49579   if test "x$path" != "x$new_path"; then
49580     MSVC_DLL="$new_path"
49581     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49582 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49583   fi
49584 
49585     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49586 
49587   path="$MSVC_DLL"
49588   has_colon=`$ECHO $path | $GREP ^.:`
49589   new_path="$path"
49590   if test "x$has_colon" = x; then
49591     # Not in mixed or Windows style, start by that.
49592     new_path=`cmd //c echo $path`
49593   fi
49594 
49595 
49596   input_path="$new_path"
49597   # Check if we need to convert this using DOS-style short mode. If the path
49598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49599   # take no chances and rewrite it.
49600   # Note: m4 eats our [], so we need to use [ and ] instead.
49601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49602   if test "x$has_forbidden_chars" != x; then
49603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49604     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49605   fi
49606 
49607 
49608   windows_path="$new_path"
49609   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49610     unix_path=`$CYGPATH -u "$windows_path"`
49611     new_path="$unix_path"
49612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49613     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49614     new_path="$unix_path"
49615   fi
49616 
49617   if test "x$path" != "x$new_path"; then
49618     MSVC_DLL="$new_path"
49619     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49620 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49621   fi
49622 
49623   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49624   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49625 
49626     else
49627       # We're on a unix platform. Hooray! :)
49628       path="$MSVC_DLL"
49629       has_space=`$ECHO "$path" | $GREP " "`
49630       if test "x$has_space" != x; then
49631         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49632 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49633         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49634       fi
49635 
49636       # Use eval to expand a potential ~
49637       eval path="$path"
49638       if test ! -f "$path" && test ! -d "$path"; then
49639         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49640       fi
49641 
49642       if test -d "$path"; then
49643         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49644       else
49645         dir="`$DIRNAME "$path"`"
49646         base="`$BASENAME "$path"`"
49647         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49648       fi
49649     fi
49650   fi
49651 
49652       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49653 $as_echo_n "checking for $DLL_NAME... " >&6; }
49654       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49655 $as_echo "$MSVC_DLL" >&6; }
49656     else
49657       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49658 $as_echo "incorrect, ignoring" >&6; }
49659       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49660 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49661     fi
49662   fi
49663 
49664     if test "x$MSVC_DLL" = x; then
49665       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49666     fi
49667     MSVCR_DLL="$MSVC_DLL"
49668   elif test "x$DEVKIT_MSVCR_DLL" != x; then
49669 
49670   DLL_NAME="$MSVCR_NAME"
49671   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49672   METHOD="devkit"
49673   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49674     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49675 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49676 
49677     # Need to check if the found msvcr is correct architecture
49678     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49679 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49680     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49682       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49683       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49684       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49685         CORRECT_MSVCR_ARCH="PE32 executable"
49686       else
49687         CORRECT_MSVCR_ARCH="PE32+ executable"
49688       fi
49689     else
49690       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49691         CORRECT_MSVCR_ARCH=386
49692       else
49693         CORRECT_MSVCR_ARCH=x86-64
49694       fi
49695     fi
49696     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49697       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49698 $as_echo "ok" >&6; }
49699       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49700 
49701   # Only process if variable expands to non-empty
49702 
49703   if test "x$MSVC_DLL" != x; then
49704     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49705 
49706   # Input might be given as Windows format, start by converting to
49707   # unix format.
49708   path="$MSVC_DLL"
49709   new_path=`$CYGPATH -u "$path"`
49710 
49711   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49712   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49713   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49714   # "foo.exe" is OK but "foo" is an error.
49715   #
49716   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49717   # It is also a way to make sure we got the proper file name for the real test later on.
49718   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49719   if test "x$test_shortpath" = x; then
49720     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49721 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49722     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49723   fi
49724 
49725   # Call helper function which possibly converts this using DOS-style short mode.
49726   # If so, the updated path is stored in $new_path.
49727 
49728   input_path="$new_path"
49729   # Check if we need to convert this using DOS-style short mode. If the path
49730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49731   # take no chances and rewrite it.
49732   # Note: m4 eats our [], so we need to use [ and ] instead.
49733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49734   if test "x$has_forbidden_chars" != x; then
49735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49736     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49737     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49738     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49739       # Going to short mode and back again did indeed matter. Since short mode is
49740       # case insensitive, let's make it lowercase to improve readability.
49741       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49742       # Now convert it back to Unix-style (cygpath)
49743       input_path=`$CYGPATH -u "$shortmode_path"`
49744       new_path="$input_path"
49745     fi
49746   fi
49747 
49748   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49749   if test "x$test_cygdrive_prefix" = x; then
49750     # As a simple fix, exclude /usr/bin since it's not a real path.
49751     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49752       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49753       # a path prefixed by /cygdrive for fixpath to work.
49754       new_path="$CYGWIN_ROOT_PATH$input_path"
49755     fi
49756   fi
49757 
49758 
49759   if test "x$path" != "x$new_path"; then
49760     MSVC_DLL="$new_path"
49761     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49762 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49763   fi
49764 
49765     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49766 
49767   path="$MSVC_DLL"
49768   has_colon=`$ECHO $path | $GREP ^.:`
49769   new_path="$path"
49770   if test "x$has_colon" = x; then
49771     # Not in mixed or Windows style, start by that.
49772     new_path=`cmd //c echo $path`
49773   fi
49774 
49775 
49776   input_path="$new_path"
49777   # Check if we need to convert this using DOS-style short mode. If the path
49778   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49779   # take no chances and rewrite it.
49780   # Note: m4 eats our [], so we need to use [ and ] instead.
49781   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49782   if test "x$has_forbidden_chars" != x; then
49783     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49784     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49785   fi
49786 
49787 
49788   windows_path="$new_path"
49789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49790     unix_path=`$CYGPATH -u "$windows_path"`
49791     new_path="$unix_path"
49792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49794     new_path="$unix_path"
49795   fi
49796 
49797   if test "x$path" != "x$new_path"; then
49798     MSVC_DLL="$new_path"
49799     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49800 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49801   fi
49802 
49803   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49804   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49805 
49806     else
49807       # We're on a unix platform. Hooray! :)
49808       path="$MSVC_DLL"
49809       has_space=`$ECHO "$path" | $GREP " "`
49810       if test "x$has_space" != x; then
49811         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49812 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49813         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49814       fi
49815 
49816       # Use eval to expand a potential ~
49817       eval path="$path"
49818       if test ! -f "$path" && test ! -d "$path"; then
49819         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49820       fi
49821 
49822       if test -d "$path"; then
49823         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49824       else
49825         dir="`$DIRNAME "$path"`"
49826         base="`$BASENAME "$path"`"
49827         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49828       fi
49829     fi
49830   fi
49831 
49832       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49833 $as_echo_n "checking for $DLL_NAME... " >&6; }
49834       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49835 $as_echo "$MSVC_DLL" >&6; }
49836     else
49837       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49838 $as_echo "incorrect, ignoring" >&6; }
49839       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49840 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49841     fi
49842   fi
49843 
49844     if test "x$MSVC_DLL" = x; then
49845       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49846     fi
49847     MSVCR_DLL="$MSVC_DLL"
49848   else
49849 
49850   DLL_NAME="${MSVCR_NAME}"
49851   MSVC_DLL=
49852 
49853   if test "x$MSVC_DLL" = x; then
49854     # Probe: Using well-known location from Visual Studio 10.0
49855     if test "x$VCINSTALLDIR" != x; then
49856       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49857 
49858   windows_path="$CYGWIN_VC_INSTALL_DIR"
49859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49860     unix_path=`$CYGPATH -u "$windows_path"`
49861     CYGWIN_VC_INSTALL_DIR="$unix_path"
49862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49864     CYGWIN_VC_INSTALL_DIR="$unix_path"
49865   fi
49866 
49867       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49868         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49869       else
49870         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49871       fi
49872       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49873 
49874   DLL_NAME="$DLL_NAME"
49875   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49876   METHOD="well-known location in VCINSTALLDIR"
49877   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49878     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49879 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49880 
49881     # Need to check if the found msvcr is correct architecture
49882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49883 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49884     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49885     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49886       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49887       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49888       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49889         CORRECT_MSVCR_ARCH="PE32 executable"
49890       else
49891         CORRECT_MSVCR_ARCH="PE32+ executable"
49892       fi
49893     else
49894       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49895         CORRECT_MSVCR_ARCH=386
49896       else
49897         CORRECT_MSVCR_ARCH=x86-64
49898       fi
49899     fi
49900     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49901       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49902 $as_echo "ok" >&6; }
49903       MSVC_DLL="$POSSIBLE_MSVC_DLL"
49904 
49905   # Only process if variable expands to non-empty
49906 
49907   if test "x$MSVC_DLL" != x; then
49908     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49909 
49910   # Input might be given as Windows format, start by converting to
49911   # unix format.
49912   path="$MSVC_DLL"
49913   new_path=`$CYGPATH -u "$path"`
49914 
49915   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49916   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49917   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49918   # "foo.exe" is OK but "foo" is an error.
49919   #
49920   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49921   # It is also a way to make sure we got the proper file name for the real test later on.
49922   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49923   if test "x$test_shortpath" = x; then
49924     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49925 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49926     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49927   fi
49928 
49929   # Call helper function which possibly converts this using DOS-style short mode.
49930   # If so, the updated path is stored in $new_path.
49931 
49932   input_path="$new_path"
49933   # Check if we need to convert this using DOS-style short mode. If the path
49934   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49935   # take no chances and rewrite it.
49936   # Note: m4 eats our [], so we need to use [ and ] instead.
49937   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49938   if test "x$has_forbidden_chars" != x; then
49939     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49940     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49941     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49942     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49943       # Going to short mode and back again did indeed matter. Since short mode is
49944       # case insensitive, let's make it lowercase to improve readability.
49945       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49946       # Now convert it back to Unix-style (cygpath)
49947       input_path=`$CYGPATH -u "$shortmode_path"`
49948       new_path="$input_path"
49949     fi
49950   fi
49951 
49952   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49953   if test "x$test_cygdrive_prefix" = x; then
49954     # As a simple fix, exclude /usr/bin since it's not a real path.
49955     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49956       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49957       # a path prefixed by /cygdrive for fixpath to work.
49958       new_path="$CYGWIN_ROOT_PATH$input_path"
49959     fi
49960   fi
49961 
49962 
49963   if test "x$path" != "x$new_path"; then
49964     MSVC_DLL="$new_path"
49965     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49966 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49967   fi
49968 
49969     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49970 
49971   path="$MSVC_DLL"
49972   has_colon=`$ECHO $path | $GREP ^.:`
49973   new_path="$path"
49974   if test "x$has_colon" = x; then
49975     # Not in mixed or Windows style, start by that.
49976     new_path=`cmd //c echo $path`
49977   fi
49978 
49979 
49980   input_path="$new_path"
49981   # Check if we need to convert this using DOS-style short mode. If the path
49982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49983   # take no chances and rewrite it.
49984   # Note: m4 eats our [], so we need to use [ and ] instead.
49985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49986   if test "x$has_forbidden_chars" != x; then
49987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49988     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49989   fi
49990 
49991 
49992   windows_path="$new_path"
49993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49994     unix_path=`$CYGPATH -u "$windows_path"`
49995     new_path="$unix_path"
49996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49998     new_path="$unix_path"
49999   fi
50000 
50001   if test "x$path" != "x$new_path"; then
50002     MSVC_DLL="$new_path"
50003     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50004 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50005   fi
50006 
50007   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50008   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50009 
50010     else
50011       # We're on a unix platform. Hooray! :)
50012       path="$MSVC_DLL"
50013       has_space=`$ECHO "$path" | $GREP " "`
50014       if test "x$has_space" != x; then
50015         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50016 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50017         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50018       fi
50019 
50020       # Use eval to expand a potential ~
50021       eval path="$path"
50022       if test ! -f "$path" && test ! -d "$path"; then
50023         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50024       fi
50025 
50026       if test -d "$path"; then
50027         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50028       else
50029         dir="`$DIRNAME "$path"`"
50030         base="`$BASENAME "$path"`"
50031         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50032       fi
50033     fi
50034   fi
50035 
50036       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50037 $as_echo_n "checking for $DLL_NAME... " >&6; }
50038       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50039 $as_echo "$MSVC_DLL" >&6; }
50040     else
50041       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50042 $as_echo "incorrect, ignoring" >&6; }
50043       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50044 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50045     fi
50046   fi
50047 
50048     fi
50049   fi
50050 
50051   if test "x$MSVC_DLL" = x; then
50052     # Probe: Check in the Boot JDK directory.
50053     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50054 
50055   DLL_NAME="$DLL_NAME"
50056   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50057   METHOD="well-known location in Boot JDK"
50058   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50059     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50060 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50061 
50062     # Need to check if the found msvcr is correct architecture
50063     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50064 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50065     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50066     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50067       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50068       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50069       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50070         CORRECT_MSVCR_ARCH="PE32 executable"
50071       else
50072         CORRECT_MSVCR_ARCH="PE32+ executable"
50073       fi
50074     else
50075       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50076         CORRECT_MSVCR_ARCH=386
50077       else
50078         CORRECT_MSVCR_ARCH=x86-64
50079       fi
50080     fi
50081     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50082       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50083 $as_echo "ok" >&6; }
50084       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50085 
50086   # Only process if variable expands to non-empty
50087 
50088   if test "x$MSVC_DLL" != x; then
50089     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50090 
50091   # Input might be given as Windows format, start by converting to
50092   # unix format.
50093   path="$MSVC_DLL"
50094   new_path=`$CYGPATH -u "$path"`
50095 
50096   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50097   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50098   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50099   # "foo.exe" is OK but "foo" is an error.
50100   #
50101   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50102   # It is also a way to make sure we got the proper file name for the real test later on.
50103   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50104   if test "x$test_shortpath" = x; then
50105     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50106 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50107     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50108   fi
50109 
50110   # Call helper function which possibly converts this using DOS-style short mode.
50111   # If so, the updated path is stored in $new_path.
50112 
50113   input_path="$new_path"
50114   # Check if we need to convert this using DOS-style short mode. If the path
50115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50116   # take no chances and rewrite it.
50117   # Note: m4 eats our [], so we need to use [ and ] instead.
50118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50119   if test "x$has_forbidden_chars" != x; then
50120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50121     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50122     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50123     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50124       # Going to short mode and back again did indeed matter. Since short mode is
50125       # case insensitive, let's make it lowercase to improve readability.
50126       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50127       # Now convert it back to Unix-style (cygpath)
50128       input_path=`$CYGPATH -u "$shortmode_path"`
50129       new_path="$input_path"
50130     fi
50131   fi
50132 
50133   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50134   if test "x$test_cygdrive_prefix" = x; then
50135     # As a simple fix, exclude /usr/bin since it's not a real path.
50136     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50137       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50138       # a path prefixed by /cygdrive for fixpath to work.
50139       new_path="$CYGWIN_ROOT_PATH$input_path"
50140     fi
50141   fi
50142 
50143 
50144   if test "x$path" != "x$new_path"; then
50145     MSVC_DLL="$new_path"
50146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50147 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50148   fi
50149 
50150     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50151 
50152   path="$MSVC_DLL"
50153   has_colon=`$ECHO $path | $GREP ^.:`
50154   new_path="$path"
50155   if test "x$has_colon" = x; then
50156     # Not in mixed or Windows style, start by that.
50157     new_path=`cmd //c echo $path`
50158   fi
50159 
50160 
50161   input_path="$new_path"
50162   # Check if we need to convert this using DOS-style short mode. If the path
50163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50164   # take no chances and rewrite it.
50165   # Note: m4 eats our [], so we need to use [ and ] instead.
50166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50167   if test "x$has_forbidden_chars" != x; then
50168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50169     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50170   fi
50171 
50172 
50173   windows_path="$new_path"
50174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50175     unix_path=`$CYGPATH -u "$windows_path"`
50176     new_path="$unix_path"
50177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50179     new_path="$unix_path"
50180   fi
50181 
50182   if test "x$path" != "x$new_path"; then
50183     MSVC_DLL="$new_path"
50184     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50185 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50186   fi
50187 
50188   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50189   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50190 
50191     else
50192       # We're on a unix platform. Hooray! :)
50193       path="$MSVC_DLL"
50194       has_space=`$ECHO "$path" | $GREP " "`
50195       if test "x$has_space" != x; then
50196         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50197 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50198         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50199       fi
50200 
50201       # Use eval to expand a potential ~
50202       eval path="$path"
50203       if test ! -f "$path" && test ! -d "$path"; then
50204         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50205       fi
50206 
50207       if test -d "$path"; then
50208         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50209       else
50210         dir="`$DIRNAME "$path"`"
50211         base="`$BASENAME "$path"`"
50212         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50213       fi
50214     fi
50215   fi
50216 
50217       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50218 $as_echo_n "checking for $DLL_NAME... " >&6; }
50219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50220 $as_echo "$MSVC_DLL" >&6; }
50221     else
50222       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50223 $as_echo "incorrect, ignoring" >&6; }
50224       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50225 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50226     fi
50227   fi
50228 
50229   fi
50230 
50231   if test "x$MSVC_DLL" = x; then
50232     # Probe: Look in the Windows system32 directory
50233     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50234 
50235   windows_path="$CYGWIN_SYSTEMROOT"
50236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50237     unix_path=`$CYGPATH -u "$windows_path"`
50238     CYGWIN_SYSTEMROOT="$unix_path"
50239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50241     CYGWIN_SYSTEMROOT="$unix_path"
50242   fi
50243 
50244     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50245 
50246   DLL_NAME="$DLL_NAME"
50247   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50248   METHOD="well-known location in SYSTEMROOT"
50249   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50250     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50251 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50252 
50253     # Need to check if the found msvcr is correct architecture
50254     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50255 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50256     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50257     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50258       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50259       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50260       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50261         CORRECT_MSVCR_ARCH="PE32 executable"
50262       else
50263         CORRECT_MSVCR_ARCH="PE32+ executable"
50264       fi
50265     else
50266       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50267         CORRECT_MSVCR_ARCH=386
50268       else
50269         CORRECT_MSVCR_ARCH=x86-64
50270       fi
50271     fi
50272     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50273       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50274 $as_echo "ok" >&6; }
50275       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50276 
50277   # Only process if variable expands to non-empty
50278 
50279   if test "x$MSVC_DLL" != x; then
50280     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50281 
50282   # Input might be given as Windows format, start by converting to
50283   # unix format.
50284   path="$MSVC_DLL"
50285   new_path=`$CYGPATH -u "$path"`
50286 
50287   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50288   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50289   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50290   # "foo.exe" is OK but "foo" is an error.
50291   #
50292   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50293   # It is also a way to make sure we got the proper file name for the real test later on.
50294   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50295   if test "x$test_shortpath" = x; then
50296     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50297 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50298     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50299   fi
50300 
50301   # Call helper function which possibly converts this using DOS-style short mode.
50302   # If so, the updated path is stored in $new_path.
50303 
50304   input_path="$new_path"
50305   # Check if we need to convert this using DOS-style short mode. If the path
50306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50307   # take no chances and rewrite it.
50308   # Note: m4 eats our [], so we need to use [ and ] instead.
50309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50310   if test "x$has_forbidden_chars" != x; then
50311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50315       # Going to short mode and back again did indeed matter. Since short mode is
50316       # case insensitive, let's make it lowercase to improve readability.
50317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50318       # Now convert it back to Unix-style (cygpath)
50319       input_path=`$CYGPATH -u "$shortmode_path"`
50320       new_path="$input_path"
50321     fi
50322   fi
50323 
50324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50325   if test "x$test_cygdrive_prefix" = x; then
50326     # As a simple fix, exclude /usr/bin since it's not a real path.
50327     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50329       # a path prefixed by /cygdrive for fixpath to work.
50330       new_path="$CYGWIN_ROOT_PATH$input_path"
50331     fi
50332   fi
50333 
50334 
50335   if test "x$path" != "x$new_path"; then
50336     MSVC_DLL="$new_path"
50337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50338 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50339   fi
50340 
50341     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50342 
50343   path="$MSVC_DLL"
50344   has_colon=`$ECHO $path | $GREP ^.:`
50345   new_path="$path"
50346   if test "x$has_colon" = x; then
50347     # Not in mixed or Windows style, start by that.
50348     new_path=`cmd //c echo $path`
50349   fi
50350 
50351 
50352   input_path="$new_path"
50353   # Check if we need to convert this using DOS-style short mode. If the path
50354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50355   # take no chances and rewrite it.
50356   # Note: m4 eats our [], so we need to use [ and ] instead.
50357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50358   if test "x$has_forbidden_chars" != x; then
50359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50360     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50361   fi
50362 
50363 
50364   windows_path="$new_path"
50365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50366     unix_path=`$CYGPATH -u "$windows_path"`
50367     new_path="$unix_path"
50368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50370     new_path="$unix_path"
50371   fi
50372 
50373   if test "x$path" != "x$new_path"; then
50374     MSVC_DLL="$new_path"
50375     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50376 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50377   fi
50378 
50379   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50380   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50381 
50382     else
50383       # We're on a unix platform. Hooray! :)
50384       path="$MSVC_DLL"
50385       has_space=`$ECHO "$path" | $GREP " "`
50386       if test "x$has_space" != x; then
50387         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50388 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50389         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50390       fi
50391 
50392       # Use eval to expand a potential ~
50393       eval path="$path"
50394       if test ! -f "$path" && test ! -d "$path"; then
50395         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50396       fi
50397 
50398       if test -d "$path"; then
50399         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50400       else
50401         dir="`$DIRNAME "$path"`"
50402         base="`$BASENAME "$path"`"
50403         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50404       fi
50405     fi
50406   fi
50407 
50408       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50409 $as_echo_n "checking for $DLL_NAME... " >&6; }
50410       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50411 $as_echo "$MSVC_DLL" >&6; }
50412     else
50413       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50414 $as_echo "incorrect, ignoring" >&6; }
50415       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50416 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50417     fi
50418   fi
50419 
50420   fi
50421 
50422   if test "x$MSVC_DLL" = x; then
50423     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50424     if test "x$VS100COMNTOOLS" != x; then
50425       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50426 
50427   windows_path="$CYGWIN_VS_TOOLS_DIR"
50428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50429     unix_path=`$CYGPATH -u "$windows_path"`
50430     CYGWIN_VS_TOOLS_DIR="$unix_path"
50431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50433     CYGWIN_VS_TOOLS_DIR="$unix_path"
50434   fi
50435 
50436       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50437         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50438             | $GREP -i /x64/ | $HEAD --lines 1`
50439       else
50440         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50441             | $GREP -i /x86/ | $HEAD --lines 1`
50442       fi
50443 
50444   DLL_NAME="$DLL_NAME"
50445   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50446   METHOD="search of VS100COMNTOOLS"
50447   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50448     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50449 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50450 
50451     # Need to check if the found msvcr is correct architecture
50452     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50453 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50454     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50455     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50456       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50457       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50458       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50459         CORRECT_MSVCR_ARCH="PE32 executable"
50460       else
50461         CORRECT_MSVCR_ARCH="PE32+ executable"
50462       fi
50463     else
50464       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50465         CORRECT_MSVCR_ARCH=386
50466       else
50467         CORRECT_MSVCR_ARCH=x86-64
50468       fi
50469     fi
50470     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50471       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50472 $as_echo "ok" >&6; }
50473       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50474 
50475   # Only process if variable expands to non-empty
50476 
50477   if test "x$MSVC_DLL" != x; then
50478     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50479 
50480   # Input might be given as Windows format, start by converting to
50481   # unix format.
50482   path="$MSVC_DLL"
50483   new_path=`$CYGPATH -u "$path"`
50484 
50485   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50486   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50487   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50488   # "foo.exe" is OK but "foo" is an error.
50489   #
50490   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50491   # It is also a way to make sure we got the proper file name for the real test later on.
50492   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50493   if test "x$test_shortpath" = x; then
50494     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50495 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50496     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50497   fi
50498 
50499   # Call helper function which possibly converts this using DOS-style short mode.
50500   # If so, the updated path is stored in $new_path.
50501 
50502   input_path="$new_path"
50503   # Check if we need to convert this using DOS-style short mode. If the path
50504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50505   # take no chances and rewrite it.
50506   # Note: m4 eats our [], so we need to use [ and ] instead.
50507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50508   if test "x$has_forbidden_chars" != x; then
50509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50513       # Going to short mode and back again did indeed matter. Since short mode is
50514       # case insensitive, let's make it lowercase to improve readability.
50515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50516       # Now convert it back to Unix-style (cygpath)
50517       input_path=`$CYGPATH -u "$shortmode_path"`
50518       new_path="$input_path"
50519     fi
50520   fi
50521 
50522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50523   if test "x$test_cygdrive_prefix" = x; then
50524     # As a simple fix, exclude /usr/bin since it's not a real path.
50525     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50527       # a path prefixed by /cygdrive for fixpath to work.
50528       new_path="$CYGWIN_ROOT_PATH$input_path"
50529     fi
50530   fi
50531 
50532 
50533   if test "x$path" != "x$new_path"; then
50534     MSVC_DLL="$new_path"
50535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50536 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50537   fi
50538 
50539     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50540 
50541   path="$MSVC_DLL"
50542   has_colon=`$ECHO $path | $GREP ^.:`
50543   new_path="$path"
50544   if test "x$has_colon" = x; then
50545     # Not in mixed or Windows style, start by that.
50546     new_path=`cmd //c echo $path`
50547   fi
50548 
50549 
50550   input_path="$new_path"
50551   # Check if we need to convert this using DOS-style short mode. If the path
50552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50553   # take no chances and rewrite it.
50554   # Note: m4 eats our [], so we need to use [ and ] instead.
50555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50556   if test "x$has_forbidden_chars" != x; then
50557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50559   fi
50560 
50561 
50562   windows_path="$new_path"
50563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50564     unix_path=`$CYGPATH -u "$windows_path"`
50565     new_path="$unix_path"
50566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50568     new_path="$unix_path"
50569   fi
50570 
50571   if test "x$path" != "x$new_path"; then
50572     MSVC_DLL="$new_path"
50573     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50574 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50575   fi
50576 
50577   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50578   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50579 
50580     else
50581       # We're on a unix platform. Hooray! :)
50582       path="$MSVC_DLL"
50583       has_space=`$ECHO "$path" | $GREP " "`
50584       if test "x$has_space" != x; then
50585         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50586 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50587         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50588       fi
50589 
50590       # Use eval to expand a potential ~
50591       eval path="$path"
50592       if test ! -f "$path" && test ! -d "$path"; then
50593         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50594       fi
50595 
50596       if test -d "$path"; then
50597         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50598       else
50599         dir="`$DIRNAME "$path"`"
50600         base="`$BASENAME "$path"`"
50601         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50602       fi
50603     fi
50604   fi
50605 
50606       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50607 $as_echo_n "checking for $DLL_NAME... " >&6; }
50608       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50609 $as_echo "$MSVC_DLL" >&6; }
50610     else
50611       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50612 $as_echo "incorrect, ignoring" >&6; }
50613       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50614 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50615     fi
50616   fi
50617 
50618     fi
50619   fi
50620 
50621   if test "x$MSVC_DLL" = x; then
50622     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50623     # (This was the original behaviour; kept since it might turn something up)
50624     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50625       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50626         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50627             | $GREP x64 | $HEAD --lines 1`
50628       else
50629         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50630             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50631         if test "x$POSSIBLE_MSVC_DLL" = x; then
50632           # We're grasping at straws now...
50633           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50634               | $HEAD --lines 1`
50635         fi
50636       fi
50637 
50638 
50639   DLL_NAME="$DLL_NAME"
50640   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50641   METHOD="search of VCINSTALLDIR"
50642   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50643     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50644 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50645 
50646     # Need to check if the found msvcr is correct architecture
50647     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50648 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50649     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50650     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50651       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50652       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50653       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50654         CORRECT_MSVCR_ARCH="PE32 executable"
50655       else
50656         CORRECT_MSVCR_ARCH="PE32+ executable"
50657       fi
50658     else
50659       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50660         CORRECT_MSVCR_ARCH=386
50661       else
50662         CORRECT_MSVCR_ARCH=x86-64
50663       fi
50664     fi
50665     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50666       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50667 $as_echo "ok" >&6; }
50668       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50669 
50670   # Only process if variable expands to non-empty
50671 
50672   if test "x$MSVC_DLL" != x; then
50673     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50674 
50675   # Input might be given as Windows format, start by converting to
50676   # unix format.
50677   path="$MSVC_DLL"
50678   new_path=`$CYGPATH -u "$path"`
50679 
50680   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50681   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50682   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50683   # "foo.exe" is OK but "foo" is an error.
50684   #
50685   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50686   # It is also a way to make sure we got the proper file name for the real test later on.
50687   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50688   if test "x$test_shortpath" = x; then
50689     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50690 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50691     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50692   fi
50693 
50694   # Call helper function which possibly converts this using DOS-style short mode.
50695   # If so, the updated path is stored in $new_path.
50696 
50697   input_path="$new_path"
50698   # Check if we need to convert this using DOS-style short mode. If the path
50699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50700   # take no chances and rewrite it.
50701   # Note: m4 eats our [], so we need to use [ and ] instead.
50702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50703   if test "x$has_forbidden_chars" != x; then
50704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50705     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50706     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50707     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50708       # Going to short mode and back again did indeed matter. Since short mode is
50709       # case insensitive, let's make it lowercase to improve readability.
50710       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50711       # Now convert it back to Unix-style (cygpath)
50712       input_path=`$CYGPATH -u "$shortmode_path"`
50713       new_path="$input_path"
50714     fi
50715   fi
50716 
50717   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50718   if test "x$test_cygdrive_prefix" = x; then
50719     # As a simple fix, exclude /usr/bin since it's not a real path.
50720     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50721       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50722       # a path prefixed by /cygdrive for fixpath to work.
50723       new_path="$CYGWIN_ROOT_PATH$input_path"
50724     fi
50725   fi
50726 
50727 
50728   if test "x$path" != "x$new_path"; then
50729     MSVC_DLL="$new_path"
50730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50731 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50732   fi
50733 
50734     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50735 
50736   path="$MSVC_DLL"
50737   has_colon=`$ECHO $path | $GREP ^.:`
50738   new_path="$path"
50739   if test "x$has_colon" = x; then
50740     # Not in mixed or Windows style, start by that.
50741     new_path=`cmd //c echo $path`
50742   fi
50743 
50744 
50745   input_path="$new_path"
50746   # Check if we need to convert this using DOS-style short mode. If the path
50747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50748   # take no chances and rewrite it.
50749   # Note: m4 eats our [], so we need to use [ and ] instead.
50750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50751   if test "x$has_forbidden_chars" != x; then
50752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50753     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50754   fi
50755 
50756 
50757   windows_path="$new_path"
50758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50759     unix_path=`$CYGPATH -u "$windows_path"`
50760     new_path="$unix_path"
50761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50763     new_path="$unix_path"
50764   fi
50765 
50766   if test "x$path" != "x$new_path"; then
50767     MSVC_DLL="$new_path"
50768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50769 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50770   fi
50771 
50772   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50773   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50774 
50775     else
50776       # We're on a unix platform. Hooray! :)
50777       path="$MSVC_DLL"
50778       has_space=`$ECHO "$path" | $GREP " "`
50779       if test "x$has_space" != x; then
50780         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50781 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50782         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50783       fi
50784 
50785       # Use eval to expand a potential ~
50786       eval path="$path"
50787       if test ! -f "$path" && test ! -d "$path"; then
50788         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50789       fi
50790 
50791       if test -d "$path"; then
50792         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50793       else
50794         dir="`$DIRNAME "$path"`"
50795         base="`$BASENAME "$path"`"
50796         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50797       fi
50798     fi
50799   fi
50800 
50801       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50802 $as_echo_n "checking for $DLL_NAME... " >&6; }
50803       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50804 $as_echo "$MSVC_DLL" >&6; }
50805     else
50806       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50807 $as_echo "incorrect, ignoring" >&6; }
50808       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50809 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50810     fi
50811   fi
50812 
50813     fi
50814   fi
50815 
50816   if test "x$MSVC_DLL" = x; then
50817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50818 $as_echo_n "checking for $DLL_NAME... " >&6; }
50819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50820 $as_echo "no" >&6; }
50821     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50822   fi
50823 
50824     MSVCR_DLL="$MSVC_DLL"
50825   fi
50826 
50827 
50828 
50829 # Check whether --with-msvcp-dll was given.
50830 if test "${with_msvcp_dll+set}" = set; then :
50831   withval=$with_msvcp_dll;
50832 fi
50833 
50834 
50835   if test "x$MSVCP_NAME" != "x"; then
50836     if test "x$with_msvcp_dll" != x; then
50837       # If given explicitely by user, do not probe. If not present, fail directly.
50838 
50839   DLL_NAME="$MSVCP_NAME"
50840   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50841   METHOD="--with-msvcp-dll"
50842   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50843     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50844 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50845 
50846     # Need to check if the found msvcr is correct architecture
50847     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50848 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50849     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50850     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50851       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50852       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50853       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50854         CORRECT_MSVCR_ARCH="PE32 executable"
50855       else
50856         CORRECT_MSVCR_ARCH="PE32+ executable"
50857       fi
50858     else
50859       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50860         CORRECT_MSVCR_ARCH=386
50861       else
50862         CORRECT_MSVCR_ARCH=x86-64
50863       fi
50864     fi
50865     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50866       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50867 $as_echo "ok" >&6; }
50868       MSVC_DLL="$POSSIBLE_MSVC_DLL"
50869 
50870   # Only process if variable expands to non-empty
50871 
50872   if test "x$MSVC_DLL" != x; then
50873     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50874 
50875   # Input might be given as Windows format, start by converting to
50876   # unix format.
50877   path="$MSVC_DLL"
50878   new_path=`$CYGPATH -u "$path"`
50879 
50880   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50881   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50882   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50883   # "foo.exe" is OK but "foo" is an error.
50884   #
50885   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50886   # It is also a way to make sure we got the proper file name for the real test later on.
50887   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50888   if test "x$test_shortpath" = x; then
50889     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50890 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50891     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50892   fi
50893 
50894   # Call helper function which possibly converts this using DOS-style short mode.
50895   # If so, the updated path is stored in $new_path.
50896 
50897   input_path="$new_path"
50898   # Check if we need to convert this using DOS-style short mode. If the path
50899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50900   # take no chances and rewrite it.
50901   # Note: m4 eats our [], so we need to use [ and ] instead.
50902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50903   if test "x$has_forbidden_chars" != x; then
50904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50905     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50906     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50907     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50908       # Going to short mode and back again did indeed matter. Since short mode is
50909       # case insensitive, let's make it lowercase to improve readability.
50910       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50911       # Now convert it back to Unix-style (cygpath)
50912       input_path=`$CYGPATH -u "$shortmode_path"`
50913       new_path="$input_path"
50914     fi
50915   fi
50916 
50917   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50918   if test "x$test_cygdrive_prefix" = x; then
50919     # As a simple fix, exclude /usr/bin since it's not a real path.
50920     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50921       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50922       # a path prefixed by /cygdrive for fixpath to work.
50923       new_path="$CYGWIN_ROOT_PATH$input_path"
50924     fi
50925   fi
50926 
50927 
50928   if test "x$path" != "x$new_path"; then
50929     MSVC_DLL="$new_path"
50930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50931 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50932   fi
50933 
50934     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50935 
50936   path="$MSVC_DLL"
50937   has_colon=`$ECHO $path | $GREP ^.:`
50938   new_path="$path"
50939   if test "x$has_colon" = x; then
50940     # Not in mixed or Windows style, start by that.
50941     new_path=`cmd //c echo $path`
50942   fi
50943 
50944 
50945   input_path="$new_path"
50946   # Check if we need to convert this using DOS-style short mode. If the path
50947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50948   # take no chances and rewrite it.
50949   # Note: m4 eats our [], so we need to use [ and ] instead.
50950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50951   if test "x$has_forbidden_chars" != x; then
50952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50954   fi
50955 
50956 
50957   windows_path="$new_path"
50958   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50959     unix_path=`$CYGPATH -u "$windows_path"`
50960     new_path="$unix_path"
50961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50962     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50963     new_path="$unix_path"
50964   fi
50965 
50966   if test "x$path" != "x$new_path"; then
50967     MSVC_DLL="$new_path"
50968     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50969 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50970   fi
50971 
50972   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50973   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50974 
50975     else
50976       # We're on a unix platform. Hooray! :)
50977       path="$MSVC_DLL"
50978       has_space=`$ECHO "$path" | $GREP " "`
50979       if test "x$has_space" != x; then
50980         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50981 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50982         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50983       fi
50984 
50985       # Use eval to expand a potential ~
50986       eval path="$path"
50987       if test ! -f "$path" && test ! -d "$path"; then
50988         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50989       fi
50990 
50991       if test -d "$path"; then
50992         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50993       else
50994         dir="`$DIRNAME "$path"`"
50995         base="`$BASENAME "$path"`"
50996         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50997       fi
50998     fi
50999   fi
51000 
51001       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51002 $as_echo_n "checking for $DLL_NAME... " >&6; }
51003       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51004 $as_echo "$MSVC_DLL" >&6; }
51005     else
51006       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51007 $as_echo "incorrect, ignoring" >&6; }
51008       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51009 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51010     fi
51011   fi
51012 
51013       if test "x$MSVC_DLL" = x; then
51014         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51015       fi
51016       MSVCP_DLL="$MSVC_DLL"
51017     elif test "x$DEVKIT_MSVCP_DLL" != x; then
51018 
51019   DLL_NAME="$MSVCP_NAME"
51020   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51021   METHOD="devkit"
51022   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51023     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51024 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51025 
51026     # Need to check if the found msvcr is correct architecture
51027     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51028 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51029     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51030     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51031       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51032       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51033       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51034         CORRECT_MSVCR_ARCH="PE32 executable"
51035       else
51036         CORRECT_MSVCR_ARCH="PE32+ executable"
51037       fi
51038     else
51039       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51040         CORRECT_MSVCR_ARCH=386
51041       else
51042         CORRECT_MSVCR_ARCH=x86-64
51043       fi
51044     fi
51045     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51046       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51047 $as_echo "ok" >&6; }
51048       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51049 
51050   # Only process if variable expands to non-empty
51051 
51052   if test "x$MSVC_DLL" != x; then
51053     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51054 
51055   # Input might be given as Windows format, start by converting to
51056   # unix format.
51057   path="$MSVC_DLL"
51058   new_path=`$CYGPATH -u "$path"`
51059 
51060   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51061   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51062   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51063   # "foo.exe" is OK but "foo" is an error.
51064   #
51065   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51066   # It is also a way to make sure we got the proper file name for the real test later on.
51067   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51068   if test "x$test_shortpath" = x; then
51069     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51070 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51071     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51072   fi
51073 
51074   # Call helper function which possibly converts this using DOS-style short mode.
51075   # If so, the updated path is stored in $new_path.
51076 
51077   input_path="$new_path"
51078   # Check if we need to convert this using DOS-style short mode. If the path
51079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51080   # take no chances and rewrite it.
51081   # Note: m4 eats our [], so we need to use [ and ] instead.
51082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51083   if test "x$has_forbidden_chars" != x; then
51084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51085     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51086     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51087     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51088       # Going to short mode and back again did indeed matter. Since short mode is
51089       # case insensitive, let's make it lowercase to improve readability.
51090       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51091       # Now convert it back to Unix-style (cygpath)
51092       input_path=`$CYGPATH -u "$shortmode_path"`
51093       new_path="$input_path"
51094     fi
51095   fi
51096 
51097   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51098   if test "x$test_cygdrive_prefix" = x; then
51099     # As a simple fix, exclude /usr/bin since it's not a real path.
51100     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51101       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51102       # a path prefixed by /cygdrive for fixpath to work.
51103       new_path="$CYGWIN_ROOT_PATH$input_path"
51104     fi
51105   fi
51106 
51107 
51108   if test "x$path" != "x$new_path"; then
51109     MSVC_DLL="$new_path"
51110     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51111 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51112   fi
51113 
51114     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51115 
51116   path="$MSVC_DLL"
51117   has_colon=`$ECHO $path | $GREP ^.:`
51118   new_path="$path"
51119   if test "x$has_colon" = x; then
51120     # Not in mixed or Windows style, start by that.
51121     new_path=`cmd //c echo $path`
51122   fi
51123 
51124 
51125   input_path="$new_path"
51126   # Check if we need to convert this using DOS-style short mode. If the path
51127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51128   # take no chances and rewrite it.
51129   # Note: m4 eats our [], so we need to use [ and ] instead.
51130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51131   if test "x$has_forbidden_chars" != x; then
51132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51133     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51134   fi
51135 
51136 
51137   windows_path="$new_path"
51138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51139     unix_path=`$CYGPATH -u "$windows_path"`
51140     new_path="$unix_path"
51141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51143     new_path="$unix_path"
51144   fi
51145 
51146   if test "x$path" != "x$new_path"; then
51147     MSVC_DLL="$new_path"
51148     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51149 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51150   fi
51151 
51152   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51153   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51154 
51155     else
51156       # We're on a unix platform. Hooray! :)
51157       path="$MSVC_DLL"
51158       has_space=`$ECHO "$path" | $GREP " "`
51159       if test "x$has_space" != x; then
51160         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51161 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51162         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51163       fi
51164 
51165       # Use eval to expand a potential ~
51166       eval path="$path"
51167       if test ! -f "$path" && test ! -d "$path"; then
51168         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51169       fi
51170 
51171       if test -d "$path"; then
51172         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51173       else
51174         dir="`$DIRNAME "$path"`"
51175         base="`$BASENAME "$path"`"
51176         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51177       fi
51178     fi
51179   fi
51180 
51181       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51182 $as_echo_n "checking for $DLL_NAME... " >&6; }
51183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51184 $as_echo "$MSVC_DLL" >&6; }
51185     else
51186       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51187 $as_echo "incorrect, ignoring" >&6; }
51188       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51189 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51190     fi
51191   fi
51192 
51193       if test "x$MSVC_DLL" = x; then
51194         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51195       fi
51196       MSVCP_DLL="$MSVC_DLL"
51197     else
51198 
51199   DLL_NAME="${MSVCP_NAME}"
51200   MSVC_DLL=
51201 
51202   if test "x$MSVC_DLL" = x; then
51203     # Probe: Using well-known location from Visual Studio 10.0
51204     if test "x$VCINSTALLDIR" != x; then
51205       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51206 
51207   windows_path="$CYGWIN_VC_INSTALL_DIR"
51208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51209     unix_path=`$CYGPATH -u "$windows_path"`
51210     CYGWIN_VC_INSTALL_DIR="$unix_path"
51211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51213     CYGWIN_VC_INSTALL_DIR="$unix_path"
51214   fi
51215 
51216       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51217         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51218       else
51219         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51220       fi
51221       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51222 
51223   DLL_NAME="$DLL_NAME"
51224   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51225   METHOD="well-known location in VCINSTALLDIR"
51226   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51227     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51228 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51229 
51230     # Need to check if the found msvcr is correct architecture
51231     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51232 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51233     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51234     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51235       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51236       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51237       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51238         CORRECT_MSVCR_ARCH="PE32 executable"
51239       else
51240         CORRECT_MSVCR_ARCH="PE32+ executable"
51241       fi
51242     else
51243       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51244         CORRECT_MSVCR_ARCH=386
51245       else
51246         CORRECT_MSVCR_ARCH=x86-64
51247       fi
51248     fi
51249     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51250       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51251 $as_echo "ok" >&6; }
51252       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51253 
51254   # Only process if variable expands to non-empty
51255 
51256   if test "x$MSVC_DLL" != x; then
51257     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51258 
51259   # Input might be given as Windows format, start by converting to
51260   # unix format.
51261   path="$MSVC_DLL"
51262   new_path=`$CYGPATH -u "$path"`
51263 
51264   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51265   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51266   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51267   # "foo.exe" is OK but "foo" is an error.
51268   #
51269   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51270   # It is also a way to make sure we got the proper file name for the real test later on.
51271   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51272   if test "x$test_shortpath" = x; then
51273     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51274 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51275     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51276   fi
51277 
51278   # Call helper function which possibly converts this using DOS-style short mode.
51279   # If so, the updated path is stored in $new_path.
51280 
51281   input_path="$new_path"
51282   # Check if we need to convert this using DOS-style short mode. If the path
51283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51284   # take no chances and rewrite it.
51285   # Note: m4 eats our [], so we need to use [ and ] instead.
51286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51287   if test "x$has_forbidden_chars" != x; then
51288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51289     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51290     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51291     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51292       # Going to short mode and back again did indeed matter. Since short mode is
51293       # case insensitive, let's make it lowercase to improve readability.
51294       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51295       # Now convert it back to Unix-style (cygpath)
51296       input_path=`$CYGPATH -u "$shortmode_path"`
51297       new_path="$input_path"
51298     fi
51299   fi
51300 
51301   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51302   if test "x$test_cygdrive_prefix" = x; then
51303     # As a simple fix, exclude /usr/bin since it's not a real path.
51304     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51305       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51306       # a path prefixed by /cygdrive for fixpath to work.
51307       new_path="$CYGWIN_ROOT_PATH$input_path"
51308     fi
51309   fi
51310 
51311 
51312   if test "x$path" != "x$new_path"; then
51313     MSVC_DLL="$new_path"
51314     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51315 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51316   fi
51317 
51318     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51319 
51320   path="$MSVC_DLL"
51321   has_colon=`$ECHO $path | $GREP ^.:`
51322   new_path="$path"
51323   if test "x$has_colon" = x; then
51324     # Not in mixed or Windows style, start by that.
51325     new_path=`cmd //c echo $path`
51326   fi
51327 
51328 
51329   input_path="$new_path"
51330   # Check if we need to convert this using DOS-style short mode. If the path
51331   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51332   # take no chances and rewrite it.
51333   # Note: m4 eats our [], so we need to use [ and ] instead.
51334   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51335   if test "x$has_forbidden_chars" != x; then
51336     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51337     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51338   fi
51339 
51340 
51341   windows_path="$new_path"
51342   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51343     unix_path=`$CYGPATH -u "$windows_path"`
51344     new_path="$unix_path"
51345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51346     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51347     new_path="$unix_path"
51348   fi
51349 
51350   if test "x$path" != "x$new_path"; then
51351     MSVC_DLL="$new_path"
51352     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51353 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51354   fi
51355 
51356   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51357   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51358 
51359     else
51360       # We're on a unix platform. Hooray! :)
51361       path="$MSVC_DLL"
51362       has_space=`$ECHO "$path" | $GREP " "`
51363       if test "x$has_space" != x; then
51364         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51365 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51366         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51367       fi
51368 
51369       # Use eval to expand a potential ~
51370       eval path="$path"
51371       if test ! -f "$path" && test ! -d "$path"; then
51372         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51373       fi
51374 
51375       if test -d "$path"; then
51376         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51377       else
51378         dir="`$DIRNAME "$path"`"
51379         base="`$BASENAME "$path"`"
51380         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51381       fi
51382     fi
51383   fi
51384 
51385       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51386 $as_echo_n "checking for $DLL_NAME... " >&6; }
51387       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51388 $as_echo "$MSVC_DLL" >&6; }
51389     else
51390       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51391 $as_echo "incorrect, ignoring" >&6; }
51392       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51393 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51394     fi
51395   fi
51396 
51397     fi
51398   fi
51399 
51400   if test "x$MSVC_DLL" = x; then
51401     # Probe: Check in the Boot JDK directory.
51402     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51403 
51404   DLL_NAME="$DLL_NAME"
51405   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51406   METHOD="well-known location in Boot JDK"
51407   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51408     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51409 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51410 
51411     # Need to check if the found msvcr is correct architecture
51412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51413 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51414     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51415     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51416       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51417       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51418       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51419         CORRECT_MSVCR_ARCH="PE32 executable"
51420       else
51421         CORRECT_MSVCR_ARCH="PE32+ executable"
51422       fi
51423     else
51424       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51425         CORRECT_MSVCR_ARCH=386
51426       else
51427         CORRECT_MSVCR_ARCH=x86-64
51428       fi
51429     fi
51430     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51431       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51432 $as_echo "ok" >&6; }
51433       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51434 
51435   # Only process if variable expands to non-empty
51436 
51437   if test "x$MSVC_DLL" != x; then
51438     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51439 
51440   # Input might be given as Windows format, start by converting to
51441   # unix format.
51442   path="$MSVC_DLL"
51443   new_path=`$CYGPATH -u "$path"`
51444 
51445   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51446   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51447   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51448   # "foo.exe" is OK but "foo" is an error.
51449   #
51450   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51451   # It is also a way to make sure we got the proper file name for the real test later on.
51452   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51453   if test "x$test_shortpath" = x; then
51454     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51455 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51456     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51457   fi
51458 
51459   # Call helper function which possibly converts this using DOS-style short mode.
51460   # If so, the updated path is stored in $new_path.
51461 
51462   input_path="$new_path"
51463   # Check if we need to convert this using DOS-style short mode. If the path
51464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51465   # take no chances and rewrite it.
51466   # Note: m4 eats our [], so we need to use [ and ] instead.
51467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51468   if test "x$has_forbidden_chars" != x; then
51469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51470     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51471     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51472     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51473       # Going to short mode and back again did indeed matter. Since short mode is
51474       # case insensitive, let's make it lowercase to improve readability.
51475       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51476       # Now convert it back to Unix-style (cygpath)
51477       input_path=`$CYGPATH -u "$shortmode_path"`
51478       new_path="$input_path"
51479     fi
51480   fi
51481 
51482   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51483   if test "x$test_cygdrive_prefix" = x; then
51484     # As a simple fix, exclude /usr/bin since it's not a real path.
51485     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51486       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51487       # a path prefixed by /cygdrive for fixpath to work.
51488       new_path="$CYGWIN_ROOT_PATH$input_path"
51489     fi
51490   fi
51491 
51492 
51493   if test "x$path" != "x$new_path"; then
51494     MSVC_DLL="$new_path"
51495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51496 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51497   fi
51498 
51499     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51500 
51501   path="$MSVC_DLL"
51502   has_colon=`$ECHO $path | $GREP ^.:`
51503   new_path="$path"
51504   if test "x$has_colon" = x; then
51505     # Not in mixed or Windows style, start by that.
51506     new_path=`cmd //c echo $path`
51507   fi
51508 
51509 
51510   input_path="$new_path"
51511   # Check if we need to convert this using DOS-style short mode. If the path
51512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51513   # take no chances and rewrite it.
51514   # Note: m4 eats our [], so we need to use [ and ] instead.
51515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51516   if test "x$has_forbidden_chars" != x; then
51517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51518     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51519   fi
51520 
51521 
51522   windows_path="$new_path"
51523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51524     unix_path=`$CYGPATH -u "$windows_path"`
51525     new_path="$unix_path"
51526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51528     new_path="$unix_path"
51529   fi
51530 
51531   if test "x$path" != "x$new_path"; then
51532     MSVC_DLL="$new_path"
51533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51534 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51535   fi
51536 
51537   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51538   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51539 
51540     else
51541       # We're on a unix platform. Hooray! :)
51542       path="$MSVC_DLL"
51543       has_space=`$ECHO "$path" | $GREP " "`
51544       if test "x$has_space" != x; then
51545         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51546 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51547         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51548       fi
51549 
51550       # Use eval to expand a potential ~
51551       eval path="$path"
51552       if test ! -f "$path" && test ! -d "$path"; then
51553         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51554       fi
51555 
51556       if test -d "$path"; then
51557         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51558       else
51559         dir="`$DIRNAME "$path"`"
51560         base="`$BASENAME "$path"`"
51561         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51562       fi
51563     fi
51564   fi
51565 
51566       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51567 $as_echo_n "checking for $DLL_NAME... " >&6; }
51568       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51569 $as_echo "$MSVC_DLL" >&6; }
51570     else
51571       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51572 $as_echo "incorrect, ignoring" >&6; }
51573       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51574 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51575     fi
51576   fi
51577 
51578   fi
51579 
51580   if test "x$MSVC_DLL" = x; then
51581     # Probe: Look in the Windows system32 directory
51582     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51583 
51584   windows_path="$CYGWIN_SYSTEMROOT"
51585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51586     unix_path=`$CYGPATH -u "$windows_path"`
51587     CYGWIN_SYSTEMROOT="$unix_path"
51588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51590     CYGWIN_SYSTEMROOT="$unix_path"
51591   fi
51592 
51593     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51594 
51595   DLL_NAME="$DLL_NAME"
51596   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51597   METHOD="well-known location in SYSTEMROOT"
51598   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51599     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51600 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51601 
51602     # Need to check if the found msvcr is correct architecture
51603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51604 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51605     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51606     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51607       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51608       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51609       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51610         CORRECT_MSVCR_ARCH="PE32 executable"
51611       else
51612         CORRECT_MSVCR_ARCH="PE32+ executable"
51613       fi
51614     else
51615       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51616         CORRECT_MSVCR_ARCH=386
51617       else
51618         CORRECT_MSVCR_ARCH=x86-64
51619       fi
51620     fi
51621     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51622       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51623 $as_echo "ok" >&6; }
51624       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51625 
51626   # Only process if variable expands to non-empty
51627 
51628   if test "x$MSVC_DLL" != x; then
51629     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51630 
51631   # Input might be given as Windows format, start by converting to
51632   # unix format.
51633   path="$MSVC_DLL"
51634   new_path=`$CYGPATH -u "$path"`
51635 
51636   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51637   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51638   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51639   # "foo.exe" is OK but "foo" is an error.
51640   #
51641   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51642   # It is also a way to make sure we got the proper file name for the real test later on.
51643   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51644   if test "x$test_shortpath" = x; then
51645     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51646 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51647     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51648   fi
51649 
51650   # Call helper function which possibly converts this using DOS-style short mode.
51651   # If so, the updated path is stored in $new_path.
51652 
51653   input_path="$new_path"
51654   # Check if we need to convert this using DOS-style short mode. If the path
51655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51656   # take no chances and rewrite it.
51657   # Note: m4 eats our [], so we need to use [ and ] instead.
51658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51659   if test "x$has_forbidden_chars" != x; then
51660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51661     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51662     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51663     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51664       # Going to short mode and back again did indeed matter. Since short mode is
51665       # case insensitive, let's make it lowercase to improve readability.
51666       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51667       # Now convert it back to Unix-style (cygpath)
51668       input_path=`$CYGPATH -u "$shortmode_path"`
51669       new_path="$input_path"
51670     fi
51671   fi
51672 
51673   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51674   if test "x$test_cygdrive_prefix" = x; then
51675     # As a simple fix, exclude /usr/bin since it's not a real path.
51676     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51677       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51678       # a path prefixed by /cygdrive for fixpath to work.
51679       new_path="$CYGWIN_ROOT_PATH$input_path"
51680     fi
51681   fi
51682 
51683 
51684   if test "x$path" != "x$new_path"; then
51685     MSVC_DLL="$new_path"
51686     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51687 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51688   fi
51689 
51690     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51691 
51692   path="$MSVC_DLL"
51693   has_colon=`$ECHO $path | $GREP ^.:`
51694   new_path="$path"
51695   if test "x$has_colon" = x; then
51696     # Not in mixed or Windows style, start by that.
51697     new_path=`cmd //c echo $path`
51698   fi
51699 
51700 
51701   input_path="$new_path"
51702   # Check if we need to convert this using DOS-style short mode. If the path
51703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51704   # take no chances and rewrite it.
51705   # Note: m4 eats our [], so we need to use [ and ] instead.
51706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51707   if test "x$has_forbidden_chars" != x; then
51708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51709     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51710   fi
51711 
51712 
51713   windows_path="$new_path"
51714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51715     unix_path=`$CYGPATH -u "$windows_path"`
51716     new_path="$unix_path"
51717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51718     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51719     new_path="$unix_path"
51720   fi
51721 
51722   if test "x$path" != "x$new_path"; then
51723     MSVC_DLL="$new_path"
51724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51725 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51726   fi
51727 
51728   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51729   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51730 
51731     else
51732       # We're on a unix platform. Hooray! :)
51733       path="$MSVC_DLL"
51734       has_space=`$ECHO "$path" | $GREP " "`
51735       if test "x$has_space" != x; then
51736         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51737 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51738         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51739       fi
51740 
51741       # Use eval to expand a potential ~
51742       eval path="$path"
51743       if test ! -f "$path" && test ! -d "$path"; then
51744         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51745       fi
51746 
51747       if test -d "$path"; then
51748         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51749       else
51750         dir="`$DIRNAME "$path"`"
51751         base="`$BASENAME "$path"`"
51752         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51753       fi
51754     fi
51755   fi
51756 
51757       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51758 $as_echo_n "checking for $DLL_NAME... " >&6; }
51759       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51760 $as_echo "$MSVC_DLL" >&6; }
51761     else
51762       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51763 $as_echo "incorrect, ignoring" >&6; }
51764       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51765 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51766     fi
51767   fi
51768 
51769   fi
51770 
51771   if test "x$MSVC_DLL" = x; then
51772     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51773     if test "x$VS100COMNTOOLS" != x; then
51774       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51775 
51776   windows_path="$CYGWIN_VS_TOOLS_DIR"
51777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51778     unix_path=`$CYGPATH -u "$windows_path"`
51779     CYGWIN_VS_TOOLS_DIR="$unix_path"
51780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51782     CYGWIN_VS_TOOLS_DIR="$unix_path"
51783   fi
51784 
51785       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51786         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51787             | $GREP -i /x64/ | $HEAD --lines 1`
51788       else
51789         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51790             | $GREP -i /x86/ | $HEAD --lines 1`
51791       fi
51792 
51793   DLL_NAME="$DLL_NAME"
51794   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51795   METHOD="search of VS100COMNTOOLS"
51796   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51797     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51798 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51799 
51800     # Need to check if the found msvcr is correct architecture
51801     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51802 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51803     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51804     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51805       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51806       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51807       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51808         CORRECT_MSVCR_ARCH="PE32 executable"
51809       else
51810         CORRECT_MSVCR_ARCH="PE32+ executable"
51811       fi
51812     else
51813       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51814         CORRECT_MSVCR_ARCH=386
51815       else
51816         CORRECT_MSVCR_ARCH=x86-64
51817       fi
51818     fi
51819     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51820       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51821 $as_echo "ok" >&6; }
51822       MSVC_DLL="$POSSIBLE_MSVC_DLL"
51823 
51824   # Only process if variable expands to non-empty
51825 
51826   if test "x$MSVC_DLL" != x; then
51827     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51828 
51829   # Input might be given as Windows format, start by converting to
51830   # unix format.
51831   path="$MSVC_DLL"
51832   new_path=`$CYGPATH -u "$path"`
51833 
51834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51837   # "foo.exe" is OK but "foo" is an error.
51838   #
51839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
51840   # It is also a way to make sure we got the proper file name for the real test later on.
51841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51842   if test "x$test_shortpath" = x; then
51843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51844 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51845     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51846   fi
51847 
51848   # Call helper function which possibly converts this using DOS-style short mode.
51849   # If so, the updated path is stored in $new_path.
51850 
51851   input_path="$new_path"
51852   # Check if we need to convert this using DOS-style short mode. If the path
51853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51854   # take no chances and rewrite it.
51855   # Note: m4 eats our [], so we need to use [ and ] instead.
51856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51857   if test "x$has_forbidden_chars" != x; then
51858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51862       # Going to short mode and back again did indeed matter. Since short mode is
51863       # case insensitive, let's make it lowercase to improve readability.
51864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51865       # Now convert it back to Unix-style (cygpath)
51866       input_path=`$CYGPATH -u "$shortmode_path"`
51867       new_path="$input_path"
51868     fi
51869   fi
51870 
51871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51872   if test "x$test_cygdrive_prefix" = x; then
51873     # As a simple fix, exclude /usr/bin since it's not a real path.
51874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51876       # a path prefixed by /cygdrive for fixpath to work.
51877       new_path="$CYGWIN_ROOT_PATH$input_path"
51878     fi
51879   fi
51880 
51881 
51882   if test "x$path" != "x$new_path"; then
51883     MSVC_DLL="$new_path"
51884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51885 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51886   fi
51887 
51888     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51889 
51890   path="$MSVC_DLL"
51891   has_colon=`$ECHO $path | $GREP ^.:`
51892   new_path="$path"
51893   if test "x$has_colon" = x; then
51894     # Not in mixed or Windows style, start by that.
51895     new_path=`cmd //c echo $path`
51896   fi
51897 
51898 
51899   input_path="$new_path"
51900   # Check if we need to convert this using DOS-style short mode. If the path
51901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
51902   # take no chances and rewrite it.
51903   # Note: m4 eats our [], so we need to use [ and ] instead.
51904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51905   if test "x$has_forbidden_chars" != x; then
51906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51908   fi
51909 
51910 
51911   windows_path="$new_path"
51912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51913     unix_path=`$CYGPATH -u "$windows_path"`
51914     new_path="$unix_path"
51915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51917     new_path="$unix_path"
51918   fi
51919 
51920   if test "x$path" != "x$new_path"; then
51921     MSVC_DLL="$new_path"
51922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51923 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51924   fi
51925 
51926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
51927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51928 
51929     else
51930       # We're on a unix platform. Hooray! :)
51931       path="$MSVC_DLL"
51932       has_space=`$ECHO "$path" | $GREP " "`
51933       if test "x$has_space" != x; then
51934         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51935 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51936         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51937       fi
51938 
51939       # Use eval to expand a potential ~
51940       eval path="$path"
51941       if test ! -f "$path" && test ! -d "$path"; then
51942         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51943       fi
51944 
51945       if test -d "$path"; then
51946         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51947       else
51948         dir="`$DIRNAME "$path"`"
51949         base="`$BASENAME "$path"`"
51950         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51951       fi
51952     fi
51953   fi
51954 
51955       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51956 $as_echo_n "checking for $DLL_NAME... " >&6; }
51957       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51958 $as_echo "$MSVC_DLL" >&6; }
51959     else
51960       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51961 $as_echo "incorrect, ignoring" >&6; }
51962       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51963 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51964     fi
51965   fi
51966 
51967     fi
51968   fi
51969 
51970   if test "x$MSVC_DLL" = x; then
51971     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51972     # (This was the original behaviour; kept since it might turn something up)
51973     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51974       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51975         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51976             | $GREP x64 | $HEAD --lines 1`
51977       else
51978         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51979             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51980         if test "x$POSSIBLE_MSVC_DLL" = x; then
51981           # We're grasping at straws now...
51982           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51983               | $HEAD --lines 1`
51984         fi
51985       fi
51986 
51987 
51988   DLL_NAME="$DLL_NAME"
51989   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51990   METHOD="search of VCINSTALLDIR"
51991   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51992     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51993 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51994 
51995     # Need to check if the found msvcr is correct architecture
51996     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51997 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51998     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51999     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52000       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52001       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52002       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52003         CORRECT_MSVCR_ARCH="PE32 executable"
52004       else
52005         CORRECT_MSVCR_ARCH="PE32+ executable"
52006       fi
52007     else
52008       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52009         CORRECT_MSVCR_ARCH=386
52010       else
52011         CORRECT_MSVCR_ARCH=x86-64
52012       fi
52013     fi
52014     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52015       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52016 $as_echo "ok" >&6; }
52017       MSVC_DLL="$POSSIBLE_MSVC_DLL"
52018 
52019   # Only process if variable expands to non-empty
52020 
52021   if test "x$MSVC_DLL" != x; then
52022     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52023 
52024   # Input might be given as Windows format, start by converting to
52025   # unix format.
52026   path="$MSVC_DLL"
52027   new_path=`$CYGPATH -u "$path"`
52028 
52029   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52030   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52031   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52032   # "foo.exe" is OK but "foo" is an error.
52033   #
52034   # This test is therefore slightly more accurate than "test -f" to check for file precense.
52035   # It is also a way to make sure we got the proper file name for the real test later on.
52036   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52037   if test "x$test_shortpath" = x; then
52038     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52039 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52040     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52041   fi
52042 
52043   # Call helper function which possibly converts this using DOS-style short mode.
52044   # If so, the updated path is stored in $new_path.
52045 
52046   input_path="$new_path"
52047   # Check if we need to convert this using DOS-style short mode. If the path
52048   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52049   # take no chances and rewrite it.
52050   # Note: m4 eats our [], so we need to use [ and ] instead.
52051   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52052   if test "x$has_forbidden_chars" != x; then
52053     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52054     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52055     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52056     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52057       # Going to short mode and back again did indeed matter. Since short mode is
52058       # case insensitive, let's make it lowercase to improve readability.
52059       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52060       # Now convert it back to Unix-style (cygpath)
52061       input_path=`$CYGPATH -u "$shortmode_path"`
52062       new_path="$input_path"
52063     fi
52064   fi
52065 
52066   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52067   if test "x$test_cygdrive_prefix" = x; then
52068     # As a simple fix, exclude /usr/bin since it's not a real path.
52069     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52070       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52071       # a path prefixed by /cygdrive for fixpath to work.
52072       new_path="$CYGWIN_ROOT_PATH$input_path"
52073     fi
52074   fi
52075 
52076 
52077   if test "x$path" != "x$new_path"; then
52078     MSVC_DLL="$new_path"
52079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52080 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52081   fi
52082 
52083     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52084 
52085   path="$MSVC_DLL"
52086   has_colon=`$ECHO $path | $GREP ^.:`
52087   new_path="$path"
52088   if test "x$has_colon" = x; then
52089     # Not in mixed or Windows style, start by that.
52090     new_path=`cmd //c echo $path`
52091   fi
52092 
52093 
52094   input_path="$new_path"
52095   # Check if we need to convert this using DOS-style short mode. If the path
52096   # contains just simple characters, use it. Otherwise (spaces, weird characters),
52097   # take no chances and rewrite it.
52098   # Note: m4 eats our [], so we need to use [ and ] instead.
52099   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52100   if test "x$has_forbidden_chars" != x; then
52101     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52102     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52103   fi
52104 
52105 
52106   windows_path="$new_path"
52107   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52108     unix_path=`$CYGPATH -u "$windows_path"`
52109     new_path="$unix_path"
52110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52111     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52112     new_path="$unix_path"
52113   fi
52114 
52115   if test "x$path" != "x$new_path"; then
52116     MSVC_DLL="$new_path"
52117     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52118 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52119   fi
52120 
52121   # Save the first 10 bytes of this path to the storage, so fixpath can work.
52122   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52123 
52124     else
52125       # We're on a unix platform. Hooray! :)
52126       path="$MSVC_DLL"
52127       has_space=`$ECHO "$path" | $GREP " "`
52128       if test "x$has_space" != x; then
52129         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52130 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52131         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52132       fi
52133 
52134       # Use eval to expand a potential ~
52135       eval path="$path"
52136       if test ! -f "$path" && test ! -d "$path"; then
52137         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52138       fi
52139 
52140       if test -d "$path"; then
52141         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52142       else
52143         dir="`$DIRNAME "$path"`"
52144         base="`$BASENAME "$path"`"
52145         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
52146       fi
52147     fi
52148   fi
52149 
52150       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52151 $as_echo_n "checking for $DLL_NAME... " >&6; }
52152       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52153 $as_echo "$MSVC_DLL" >&6; }
52154     else
52155       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52156 $as_echo "incorrect, ignoring" >&6; }
52157       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52158 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52159     fi
52160   fi
52161 
52162     fi
52163   fi
52164 
52165   if test "x$MSVC_DLL" = x; then
52166     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52167 $as_echo_n "checking for $DLL_NAME... " >&6; }
52168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52169 $as_echo "no" >&6; }
52170     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52171   fi
52172 
52173       MSVCP_DLL="$MSVC_DLL"
52174     fi
52175 
52176   fi
52177 
52178   fi
52179 
52180 
52181   if test "x$NEEDS_LIB_X11" = xfalse; then
52182     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
52183       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
52184 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
52185     fi
52186     X_CFLAGS=
52187     X_LIBS=
52188   else
52189 
52190     if test "x${with_x}" = xno; then
52191       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
52192     fi
52193 
52194     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
52195       # The user has specified a X11 base directory. Use it for includes and
52196       # libraries, unless explicitely overridden.
52197       if test "x$x_includes" = xNONE; then
52198         x_includes="${with_x}/include"
52199       fi
52200       if test "x$x_libraries" = xNONE; then
52201         x_libraries="${with_x}/lib"
52202       fi
52203     else
52204       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
52205       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
52206       # --x-libraries for the sysroot, if that seems to be correct.
52207       if test "x$SYSROOT" != "x"; then
52208         if test "x$x_includes" = xNONE; then
52209           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
52210             x_includes="$SYSROOT/usr/X11R6/include"
52211           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
52212             x_includes="$SYSROOT/usr/include"
52213           fi
52214         fi
52215         if test "x$x_libraries" = xNONE; then
52216           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
52217             x_libraries="$SYSROOT/usr/X11R6/lib"
52218           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52219             x_libraries="$SYSROOT/usr/lib64"
52220           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
52221             x_libraries="$SYSROOT/usr/lib"
52222           fi
52223         fi
52224       fi
52225     fi
52226 
52227     # Now let autoconf do it's magic
52228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
52229 $as_echo_n "checking for X... " >&6; }
52230 
52231 
52232 # Check whether --with-x was given.
52233 if test "${with_x+set}" = set; then :
52234   withval=$with_x;
52235 fi
52236 
52237 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
52238 if test "x$with_x" = xno; then
52239   # The user explicitly disabled X.
52240   have_x=disabled
52241 else
52242   case $x_includes,$x_libraries in #(
52243     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
52244     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
52245   $as_echo_n "(cached) " >&6
52246 else
52247   # One or both of the vars are not set, and there is no cached value.
52248 ac_x_includes=no ac_x_libraries=no
52249 rm -f -r conftest.dir
52250 if mkdir conftest.dir; then
52251   cd conftest.dir
52252   cat >Imakefile <<'_ACEOF'
52253 incroot:
52254         @echo incroot='${INCROOT}'
52255 usrlibdir:
52256         @echo usrlibdir='${USRLIBDIR}'
52257 libdir:
52258         @echo libdir='${LIBDIR}'
52259 _ACEOF
52260   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
52261     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
52262     for ac_var in incroot usrlibdir libdir; do
52263       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
52264     done
52265     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
52266     for ac_extension in a so sl dylib la dll; do
52267       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
52268          test -f "$ac_im_libdir/libX11.$ac_extension"; then
52269         ac_im_usrlibdir=$ac_im_libdir; break
52270       fi
52271     done
52272     # Screen out bogus values from the imake configuration.  They are
52273     # bogus both because they are the default anyway, and because
52274     # using them would break gcc on systems where it needs fixed includes.
52275     case $ac_im_incroot in
52276         /usr/include) ac_x_includes= ;;
52277         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
52278     esac
52279     case $ac_im_usrlibdir in
52280         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
52281         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
52282     esac
52283   fi
52284   cd ..
52285   rm -f -r conftest.dir
52286 fi
52287 
52288 # Standard set of common directories for X headers.
52289 # Check X11 before X11Rn because it is often a symlink to the current release.
52290 ac_x_header_dirs='
52291 /usr/X11/include
52292 /usr/X11R7/include
52293 /usr/X11R6/include
52294 /usr/X11R5/include
52295 /usr/X11R4/include
52296 
52297 /usr/include/X11
52298 /usr/include/X11R7
52299 /usr/include/X11R6
52300 /usr/include/X11R5
52301 /usr/include/X11R4
52302 
52303 /usr/local/X11/include
52304 /usr/local/X11R7/include
52305 /usr/local/X11R6/include
52306 /usr/local/X11R5/include
52307 /usr/local/X11R4/include
52308 
52309 /usr/local/include/X11
52310 /usr/local/include/X11R7
52311 /usr/local/include/X11R6
52312 /usr/local/include/X11R5
52313 /usr/local/include/X11R4
52314 
52315 /usr/X386/include
52316 /usr/x386/include
52317 /usr/XFree86/include/X11
52318 
52319 /usr/include
52320 /usr/local/include
52321 /usr/unsupported/include
52322 /usr/athena/include
52323 /usr/local/x11r5/include
52324 /usr/lpp/Xamples/include
52325 
52326 /usr/openwin/include
52327 /usr/openwin/share/include'
52328 
52329 if test "$ac_x_includes" = no; then
52330   # Guess where to find include files, by looking for Xlib.h.
52331   # First, try using that file with no special directory specified.
52332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52333 /* end confdefs.h.  */
52334 #include <X11/Xlib.h>
52335 _ACEOF
52336 if ac_fn_cxx_try_cpp "$LINENO"; then :
52337   # We can compile using X headers with no special include directory.
52338 ac_x_includes=
52339 else
52340   for ac_dir in $ac_x_header_dirs; do
52341   if test -r "$ac_dir/X11/Xlib.h"; then
52342     ac_x_includes=$ac_dir
52343     break
52344   fi
52345 done
52346 fi
52347 rm -f conftest.err conftest.i conftest.$ac_ext
52348 fi # $ac_x_includes = no
52349 
52350 if test "$ac_x_libraries" = no; then
52351   # Check for the libraries.
52352   # See if we find them without any special options.
52353   # Don't add to $LIBS permanently.
52354   ac_save_LIBS=$LIBS
52355   LIBS="-lX11 $LIBS"
52356   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52357 /* end confdefs.h.  */
52358 #include <X11/Xlib.h>
52359 int
52360 main ()
52361 {
52362 XrmInitialize ()
52363   ;
52364   return 0;
52365 }
52366 _ACEOF
52367 if ac_fn_cxx_try_link "$LINENO"; then :
52368   LIBS=$ac_save_LIBS
52369 # We can link X programs with no special library path.
52370 ac_x_libraries=
52371 else
52372   LIBS=$ac_save_LIBS
52373 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
52374 do
52375   # Don't even attempt the hair of trying to link an X program!
52376   for ac_extension in a so sl dylib la dll; do
52377     if test -r "$ac_dir/libX11.$ac_extension"; then
52378       ac_x_libraries=$ac_dir
52379       break 2
52380     fi
52381   done
52382 done
52383 fi
52384 rm -f core conftest.err conftest.$ac_objext \
52385     conftest$ac_exeext conftest.$ac_ext
52386 fi # $ac_x_libraries = no
52387 
52388 case $ac_x_includes,$ac_x_libraries in #(
52389   no,* | *,no | *\'*)
52390     # Didn't find X, or a directory has "'" in its name.
52391     ac_cv_have_x="have_x=no";; #(
52392   *)
52393     # Record where we found X for the cache.
52394     ac_cv_have_x="have_x=yes\
52395         ac_x_includes='$ac_x_includes'\
52396         ac_x_libraries='$ac_x_libraries'"
52397 esac
52398 fi
52399 ;; #(
52400     *) have_x=yes;;
52401   esac
52402   eval "$ac_cv_have_x"
52403 fi # $with_x != no
52404 
52405 if test "$have_x" != yes; then
52406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
52407 $as_echo "$have_x" >&6; }
52408   no_x=yes
52409 else
52410   # If each of the values was on the command line, it overrides each guess.
52411   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
52412   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
52413   # Update the cache value to reflect the command line values.
52414   ac_cv_have_x="have_x=yes\
52415         ac_x_includes='$x_includes'\
52416         ac_x_libraries='$x_libraries'"
52417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
52418 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
52419 fi
52420 
52421     if test "$no_x" = yes; then
52422   # Not all programs may use this symbol, but it does not hurt to define it.
52423 
52424 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
52425 
52426   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
52427 else
52428   if test -n "$x_includes"; then
52429     X_CFLAGS="$X_CFLAGS -I$x_includes"
52430   fi
52431 
52432   # It would also be nice to do this for all -L options, not just this one.
52433   if test -n "$x_libraries"; then
52434     X_LIBS="$X_LIBS -L$x_libraries"
52435     # For Solaris; some versions of Sun CC require a space after -R and
52436     # others require no space.  Words are not sufficient . . . .
52437     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
52438 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
52439     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
52440     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
52441     ac_cxx_werror_flag=yes
52442     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52443 /* end confdefs.h.  */
52444 
52445 int
52446 main ()
52447 {
52448 
52449   ;
52450   return 0;
52451 }
52452 _ACEOF
52453 if ac_fn_cxx_try_link "$LINENO"; then :
52454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52455 $as_echo "no" >&6; }
52456        X_LIBS="$X_LIBS -R$x_libraries"
52457 else
52458   LIBS="$ac_xsave_LIBS -R $x_libraries"
52459        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52460 /* end confdefs.h.  */
52461 
52462 int
52463 main ()
52464 {
52465 
52466   ;
52467   return 0;
52468 }
52469 _ACEOF
52470 if ac_fn_cxx_try_link "$LINENO"; then :
52471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52472 $as_echo "yes" >&6; }
52473           X_LIBS="$X_LIBS -R $x_libraries"
52474 else
52475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
52476 $as_echo "neither works" >&6; }
52477 fi
52478 rm -f core conftest.err conftest.$ac_objext \
52479     conftest$ac_exeext conftest.$ac_ext
52480 fi
52481 rm -f core conftest.err conftest.$ac_objext \
52482     conftest$ac_exeext conftest.$ac_ext
52483     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
52484     LIBS=$ac_xsave_LIBS
52485   fi
52486 
52487   # Check for system-dependent libraries X programs must link with.
52488   # Do this before checking for the system-independent R6 libraries
52489   # (-lICE), since we may need -lsocket or whatever for X linking.
52490 
52491   if test "$ISC" = yes; then
52492     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
52493   else
52494     # Martyn Johnson says this is needed for Ultrix, if the X
52495     # libraries were built with DECnet support.  And Karl Berry says
52496     # the Alpha needs dnet_stub (dnet does not exist).
52497     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
52498     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52499 /* end confdefs.h.  */
52500 
52501 /* Override any GCC internal prototype to avoid an error.
52502    Use char because int might match the return type of a GCC
52503    builtin and then its argument prototype would still apply.  */
52504 #ifdef __cplusplus
52505 extern "C"
52506 #endif
52507 char XOpenDisplay ();
52508 int
52509 main ()
52510 {
52511 return XOpenDisplay ();
52512   ;
52513   return 0;
52514 }
52515 _ACEOF
52516 if ac_fn_cxx_try_link "$LINENO"; then :
52517 
52518 else
52519   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
52520 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
52521 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
52522   $as_echo_n "(cached) " >&6
52523 else
52524   ac_check_lib_save_LIBS=$LIBS
52525 LIBS="-ldnet  $LIBS"
52526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52527 /* end confdefs.h.  */
52528 
52529 /* Override any GCC internal prototype to avoid an error.
52530    Use char because int might match the return type of a GCC
52531    builtin and then its argument prototype would still apply.  */
52532 #ifdef __cplusplus
52533 extern "C"
52534 #endif
52535 char dnet_ntoa ();
52536 int
52537 main ()
52538 {
52539 return dnet_ntoa ();
52540   ;
52541   return 0;
52542 }
52543 _ACEOF
52544 if ac_fn_cxx_try_link "$LINENO"; then :
52545   ac_cv_lib_dnet_dnet_ntoa=yes
52546 else
52547   ac_cv_lib_dnet_dnet_ntoa=no
52548 fi
52549 rm -f core conftest.err conftest.$ac_objext \
52550     conftest$ac_exeext conftest.$ac_ext
52551 LIBS=$ac_check_lib_save_LIBS
52552 fi
52553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
52554 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
52555 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
52556   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
52557 fi
52558 
52559     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
52560       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
52561 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
52562 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
52563   $as_echo_n "(cached) " >&6
52564 else
52565   ac_check_lib_save_LIBS=$LIBS
52566 LIBS="-ldnet_stub  $LIBS"
52567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52568 /* end confdefs.h.  */
52569 
52570 /* Override any GCC internal prototype to avoid an error.
52571    Use char because int might match the return type of a GCC
52572    builtin and then its argument prototype would still apply.  */
52573 #ifdef __cplusplus
52574 extern "C"
52575 #endif
52576 char dnet_ntoa ();
52577 int
52578 main ()
52579 {
52580 return dnet_ntoa ();
52581   ;
52582   return 0;
52583 }
52584 _ACEOF
52585 if ac_fn_cxx_try_link "$LINENO"; then :
52586   ac_cv_lib_dnet_stub_dnet_ntoa=yes
52587 else
52588   ac_cv_lib_dnet_stub_dnet_ntoa=no
52589 fi
52590 rm -f core conftest.err conftest.$ac_objext \
52591     conftest$ac_exeext conftest.$ac_ext
52592 LIBS=$ac_check_lib_save_LIBS
52593 fi
52594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
52595 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
52596 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
52597   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
52598 fi
52599 
52600     fi
52601 fi
52602 rm -f core conftest.err conftest.$ac_objext \
52603     conftest$ac_exeext conftest.$ac_ext
52604     LIBS="$ac_xsave_LIBS"
52605 
52606     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
52607     # to get the SysV transport functions.
52608     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
52609     # needs -lnsl.
52610     # The nsl library prevents programs from opening the X display
52611     # on Irix 5.2, according to T.E. Dickey.
52612     # The functions gethostbyname, getservbyname, and inet_addr are
52613     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
52614     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
52615 if test "x$ac_cv_func_gethostbyname" = xyes; then :
52616 
52617 fi
52618 
52619     if test $ac_cv_func_gethostbyname = no; then
52620       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
52621 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
52622 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
52623   $as_echo_n "(cached) " >&6
52624 else
52625   ac_check_lib_save_LIBS=$LIBS
52626 LIBS="-lnsl  $LIBS"
52627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52628 /* end confdefs.h.  */
52629 
52630 /* Override any GCC internal prototype to avoid an error.
52631    Use char because int might match the return type of a GCC
52632    builtin and then its argument prototype would still apply.  */
52633 #ifdef __cplusplus
52634 extern "C"
52635 #endif
52636 char gethostbyname ();
52637 int
52638 main ()
52639 {
52640 return gethostbyname ();
52641   ;
52642   return 0;
52643 }
52644 _ACEOF
52645 if ac_fn_cxx_try_link "$LINENO"; then :
52646   ac_cv_lib_nsl_gethostbyname=yes
52647 else
52648   ac_cv_lib_nsl_gethostbyname=no
52649 fi
52650 rm -f core conftest.err conftest.$ac_objext \
52651     conftest$ac_exeext conftest.$ac_ext
52652 LIBS=$ac_check_lib_save_LIBS
52653 fi
52654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
52655 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
52656 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
52657   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
52658 fi
52659 
52660       if test $ac_cv_lib_nsl_gethostbyname = no; then
52661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
52662 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
52663 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
52664   $as_echo_n "(cached) " >&6
52665 else
52666   ac_check_lib_save_LIBS=$LIBS
52667 LIBS="-lbsd  $LIBS"
52668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52669 /* end confdefs.h.  */
52670 
52671 /* Override any GCC internal prototype to avoid an error.
52672    Use char because int might match the return type of a GCC
52673    builtin and then its argument prototype would still apply.  */
52674 #ifdef __cplusplus
52675 extern "C"
52676 #endif
52677 char gethostbyname ();
52678 int
52679 main ()
52680 {
52681 return gethostbyname ();
52682   ;
52683   return 0;
52684 }
52685 _ACEOF
52686 if ac_fn_cxx_try_link "$LINENO"; then :
52687   ac_cv_lib_bsd_gethostbyname=yes
52688 else
52689   ac_cv_lib_bsd_gethostbyname=no
52690 fi
52691 rm -f core conftest.err conftest.$ac_objext \
52692     conftest$ac_exeext conftest.$ac_ext
52693 LIBS=$ac_check_lib_save_LIBS
52694 fi
52695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
52696 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
52697 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
52698   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
52699 fi
52700 
52701       fi
52702     fi
52703 
52704     # lieder@skyler.mavd.honeywell.com says without -lsocket,
52705     # socket/setsockopt and other routines are undefined under SCO ODT
52706     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
52707     # on later versions), says Simon Leinen: it contains gethostby*
52708     # variants that don't use the name server (or something).  -lsocket
52709     # must be given before -lnsl if both are needed.  We assume that
52710     # if connect needs -lnsl, so does gethostbyname.
52711     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
52712 if test "x$ac_cv_func_connect" = xyes; then :
52713 
52714 fi
52715 
52716     if test $ac_cv_func_connect = no; then
52717       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
52718 $as_echo_n "checking for connect in -lsocket... " >&6; }
52719 if ${ac_cv_lib_socket_connect+:} false; then :
52720   $as_echo_n "(cached) " >&6
52721 else
52722   ac_check_lib_save_LIBS=$LIBS
52723 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
52724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52725 /* end confdefs.h.  */
52726 
52727 /* Override any GCC internal prototype to avoid an error.
52728    Use char because int might match the return type of a GCC
52729    builtin and then its argument prototype would still apply.  */
52730 #ifdef __cplusplus
52731 extern "C"
52732 #endif
52733 char connect ();
52734 int
52735 main ()
52736 {
52737 return connect ();
52738   ;
52739   return 0;
52740 }
52741 _ACEOF
52742 if ac_fn_cxx_try_link "$LINENO"; then :
52743   ac_cv_lib_socket_connect=yes
52744 else
52745   ac_cv_lib_socket_connect=no
52746 fi
52747 rm -f core conftest.err conftest.$ac_objext \
52748     conftest$ac_exeext conftest.$ac_ext
52749 LIBS=$ac_check_lib_save_LIBS
52750 fi
52751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
52752 $as_echo "$ac_cv_lib_socket_connect" >&6; }
52753 if test "x$ac_cv_lib_socket_connect" = xyes; then :
52754   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
52755 fi
52756 
52757     fi
52758 
52759     # Guillermo Gomez says -lposix is necessary on A/UX.
52760     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
52761 if test "x$ac_cv_func_remove" = xyes; then :
52762 
52763 fi
52764 
52765     if test $ac_cv_func_remove = no; then
52766       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
52767 $as_echo_n "checking for remove in -lposix... " >&6; }
52768 if ${ac_cv_lib_posix_remove+:} false; then :
52769   $as_echo_n "(cached) " >&6
52770 else
52771   ac_check_lib_save_LIBS=$LIBS
52772 LIBS="-lposix  $LIBS"
52773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52774 /* end confdefs.h.  */
52775 
52776 /* Override any GCC internal prototype to avoid an error.
52777    Use char because int might match the return type of a GCC
52778    builtin and then its argument prototype would still apply.  */
52779 #ifdef __cplusplus
52780 extern "C"
52781 #endif
52782 char remove ();
52783 int
52784 main ()
52785 {
52786 return remove ();
52787   ;
52788   return 0;
52789 }
52790 _ACEOF
52791 if ac_fn_cxx_try_link "$LINENO"; then :
52792   ac_cv_lib_posix_remove=yes
52793 else
52794   ac_cv_lib_posix_remove=no
52795 fi
52796 rm -f core conftest.err conftest.$ac_objext \
52797     conftest$ac_exeext conftest.$ac_ext
52798 LIBS=$ac_check_lib_save_LIBS
52799 fi
52800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
52801 $as_echo "$ac_cv_lib_posix_remove" >&6; }
52802 if test "x$ac_cv_lib_posix_remove" = xyes; then :
52803   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
52804 fi
52805 
52806     fi
52807 
52808     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
52809     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
52810 if test "x$ac_cv_func_shmat" = xyes; then :
52811 
52812 fi
52813 
52814     if test $ac_cv_func_shmat = no; then
52815       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
52816 $as_echo_n "checking for shmat in -lipc... " >&6; }
52817 if ${ac_cv_lib_ipc_shmat+:} false; then :
52818   $as_echo_n "(cached) " >&6
52819 else
52820   ac_check_lib_save_LIBS=$LIBS
52821 LIBS="-lipc  $LIBS"
52822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52823 /* end confdefs.h.  */
52824 
52825 /* Override any GCC internal prototype to avoid an error.
52826    Use char because int might match the return type of a GCC
52827    builtin and then its argument prototype would still apply.  */
52828 #ifdef __cplusplus
52829 extern "C"
52830 #endif
52831 char shmat ();
52832 int
52833 main ()
52834 {
52835 return shmat ();
52836   ;
52837   return 0;
52838 }
52839 _ACEOF
52840 if ac_fn_cxx_try_link "$LINENO"; then :
52841   ac_cv_lib_ipc_shmat=yes
52842 else
52843   ac_cv_lib_ipc_shmat=no
52844 fi
52845 rm -f core conftest.err conftest.$ac_objext \
52846     conftest$ac_exeext conftest.$ac_ext
52847 LIBS=$ac_check_lib_save_LIBS
52848 fi
52849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
52850 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
52851 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
52852   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
52853 fi
52854 
52855     fi
52856   fi
52857 
52858   # Check for libraries that X11R6 Xt/Xaw programs need.
52859   ac_save_LDFLAGS=$LDFLAGS
52860   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
52861   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
52862   # check for ICE first), but we must link in the order -lSM -lICE or
52863   # we get undefined symbols.  So assume we have SM if we have ICE.
52864   # These have to be linked with before -lX11, unlike the other
52865   # libraries we check for below, so use a different variable.
52866   # John Interrante, Karl Berry
52867   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
52868 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
52869 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
52870   $as_echo_n "(cached) " >&6
52871 else
52872   ac_check_lib_save_LIBS=$LIBS
52873 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
52874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52875 /* end confdefs.h.  */
52876 
52877 /* Override any GCC internal prototype to avoid an error.
52878    Use char because int might match the return type of a GCC
52879    builtin and then its argument prototype would still apply.  */
52880 #ifdef __cplusplus
52881 extern "C"
52882 #endif
52883 char IceConnectionNumber ();
52884 int
52885 main ()
52886 {
52887 return IceConnectionNumber ();
52888   ;
52889   return 0;
52890 }
52891 _ACEOF
52892 if ac_fn_cxx_try_link "$LINENO"; then :
52893   ac_cv_lib_ICE_IceConnectionNumber=yes
52894 else
52895   ac_cv_lib_ICE_IceConnectionNumber=no
52896 fi
52897 rm -f core conftest.err conftest.$ac_objext \
52898     conftest$ac_exeext conftest.$ac_ext
52899 LIBS=$ac_check_lib_save_LIBS
52900 fi
52901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
52902 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
52903 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
52904   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
52905 fi
52906 
52907   LDFLAGS=$ac_save_LDFLAGS
52908 
52909 fi
52910 
52911 
52912     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
52913     # this doesn't make sense so we remove it.
52914     if test "x$COMPILE_TYPE" = xcross; then
52915       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
52916     fi
52917 
52918     if test "x$no_x" = xyes; then
52919 
52920   # Print a helpful message on how to acquire the necessary build dependency.
52921   # x11 is the help tag: freetype, cups, alsa etc
52922   MISSING_DEPENDENCY=x11
52923 
52924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52925     cygwin_help $MISSING_DEPENDENCY
52926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52927     msys_help $MISSING_DEPENDENCY
52928   else
52929     PKGHANDLER_COMMAND=
52930 
52931     case $PKGHANDLER in
52932       apt-get)
52933         apt_help     $MISSING_DEPENDENCY ;;
52934       yum)
52935         yum_help     $MISSING_DEPENDENCY ;;
52936       port)
52937         port_help    $MISSING_DEPENDENCY ;;
52938       pkgutil)
52939         pkgutil_help $MISSING_DEPENDENCY ;;
52940       pkgadd)
52941         pkgadd_help  $MISSING_DEPENDENCY ;;
52942     esac
52943 
52944     if test "x$PKGHANDLER_COMMAND" != x; then
52945       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52946     fi
52947   fi
52948 
52949       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
52950     fi
52951 
52952     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52953       OPENWIN_HOME="/usr/openwin"
52954       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
52955       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52956           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
52957           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52958           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
52959     fi
52960 
52961     ac_ext=c
52962 ac_cpp='$CPP $CPPFLAGS'
52963 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52964 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52965 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52966 
52967     OLD_CFLAGS="$CFLAGS"
52968     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
52969 
52970     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
52971     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
52972 do :
52973   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
52974 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
52975           # include <X11/Xlib.h>
52976           # include <X11/Xutil.h>
52977 
52978 
52979 "
52980 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
52981   cat >>confdefs.h <<_ACEOF
52982 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
52983 _ACEOF
52984  X11_HEADERS_OK=yes
52985 else
52986   X11_HEADERS_OK=no; break
52987 fi
52988 
52989 done
52990 
52991 
52992     if test "x$X11_HEADERS_OK" = xno; then
52993 
52994   # Print a helpful message on how to acquire the necessary build dependency.
52995   # x11 is the help tag: freetype, cups, alsa etc
52996   MISSING_DEPENDENCY=x11
52997 
52998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52999     cygwin_help $MISSING_DEPENDENCY
53000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53001     msys_help $MISSING_DEPENDENCY
53002   else
53003     PKGHANDLER_COMMAND=
53004 
53005     case $PKGHANDLER in
53006       apt-get)
53007         apt_help     $MISSING_DEPENDENCY ;;
53008       yum)
53009         yum_help     $MISSING_DEPENDENCY ;;
53010       port)
53011         port_help    $MISSING_DEPENDENCY ;;
53012       pkgutil)
53013         pkgutil_help $MISSING_DEPENDENCY ;;
53014       pkgadd)
53015         pkgadd_help  $MISSING_DEPENDENCY ;;
53016     esac
53017 
53018     if test "x$PKGHANDLER_COMMAND" != x; then
53019       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53020     fi
53021   fi
53022 
53023       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
53024     fi
53025 
53026     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
53027     # defined in libawt_xawt.
53028     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
53029 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
53030     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53031 /* end confdefs.h.  */
53032 #include <X11/extensions/Xrender.h>
53033 int
53034 main ()
53035 {
53036 XLinearGradient x;
53037   ;
53038   return 0;
53039 }
53040 _ACEOF
53041 if ac_fn_c_try_compile "$LINENO"; then :
53042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53043 $as_echo "yes" >&6; }
53044 else
53045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53046 $as_echo "no" >&6; }
53047          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
53048 fi
53049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53050 
53051     CFLAGS="$OLD_CFLAGS"
53052     ac_ext=cpp
53053 ac_cpp='$CXXCPP $CPPFLAGS'
53054 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53055 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53056 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53057 
53058   fi # NEEDS_LIB_X11
53059 
53060 
53061 
53062 
53063 
53064 
53065 # Check whether --with-cups was given.
53066 if test "${with_cups+set}" = set; then :
53067   withval=$with_cups;
53068 fi
53069 
53070 
53071 # Check whether --with-cups-include was given.
53072 if test "${with_cups_include+set}" = set; then :
53073   withval=$with_cups_include;
53074 fi
53075 
53076 
53077   if test "x$NEEDS_LIB_CUPS" = xfalse; then
53078     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
53079         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
53080       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
53081 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
53082     fi
53083     CUPS_CFLAGS=
53084   else
53085     CUPS_FOUND=no
53086 
53087     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
53088       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
53089     fi
53090 
53091     if test "x${with_cups}" != x; then
53092       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
53093 $as_echo_n "checking for cups headers... " >&6; }
53094       if test -s "${with_cups}/include/cups/cups.h"; then
53095         CUPS_CFLAGS="-I${with_cups}/include"
53096         CUPS_FOUND=yes
53097         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
53098 $as_echo "$CUPS_FOUND" >&6; }
53099       else
53100         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
53101       fi
53102     fi
53103     if test "x${with_cups_include}" != x; then
53104       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
53105 $as_echo_n "checking for cups headers... " >&6; }
53106       if test -s "${with_cups_include}/cups/cups.h"; then
53107         CUPS_CFLAGS="-I${with_cups_include}"
53108         CUPS_FOUND=yes
53109         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
53110 $as_echo "$CUPS_FOUND" >&6; }
53111       else
53112         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
53113       fi
53114     fi
53115     if test "x$CUPS_FOUND" = xno; then
53116       # Are the cups headers installed in the default /usr/include location?
53117       for ac_header in cups/cups.h cups/ppd.h
53118 do :
53119   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
53120 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
53121 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
53122   cat >>confdefs.h <<_ACEOF
53123 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
53124 _ACEOF
53125 
53126           CUPS_FOUND=yes
53127           CUPS_CFLAGS=
53128           DEFAULT_CUPS=yes
53129 
53130 fi
53131 
53132 done
53133 
53134     fi
53135     if test "x$CUPS_FOUND" = xno; then
53136       # Getting nervous now? Lets poke around for standard Solaris third-party
53137       # package installation locations.
53138       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
53139 $as_echo_n "checking for cups headers... " >&6; }
53140       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
53141         # An SFW package seems to be installed!
53142         CUPS_FOUND=yes
53143         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
53144       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
53145         # A CSW package seems to be installed!
53146         CUPS_FOUND=yes
53147         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
53148       fi
53149       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
53150 $as_echo "$CUPS_FOUND" >&6; }
53151     fi
53152     if test "x$CUPS_FOUND" = xno; then
53153 
53154   # Print a helpful message on how to acquire the necessary build dependency.
53155   # cups is the help tag: freetype, cups, alsa etc
53156   MISSING_DEPENDENCY=cups
53157 
53158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53159     cygwin_help $MISSING_DEPENDENCY
53160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53161     msys_help $MISSING_DEPENDENCY
53162   else
53163     PKGHANDLER_COMMAND=
53164 
53165     case $PKGHANDLER in
53166       apt-get)
53167         apt_help     $MISSING_DEPENDENCY ;;
53168       yum)
53169         yum_help     $MISSING_DEPENDENCY ;;
53170       port)
53171         port_help    $MISSING_DEPENDENCY ;;
53172       pkgutil)
53173         pkgutil_help $MISSING_DEPENDENCY ;;
53174       pkgadd)
53175         pkgadd_help  $MISSING_DEPENDENCY ;;
53176     esac
53177 
53178     if test "x$PKGHANDLER_COMMAND" != x; then
53179       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53180     fi
53181   fi
53182 
53183       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
53184     fi
53185   fi
53186 
53187 
53188 
53189 
53190 
53191 # Check whether --with-freetype was given.
53192 if test "${with_freetype+set}" = set; then :
53193   withval=$with_freetype;
53194 fi
53195 
53196 
53197 # Check whether --with-freetype-include was given.
53198 if test "${with_freetype_include+set}" = set; then :
53199   withval=$with_freetype_include;
53200 fi
53201 
53202 
53203 # Check whether --with-freetype-lib was given.
53204 if test "${with_freetype_lib+set}" = set; then :
53205   withval=$with_freetype_lib;
53206 fi
53207 
53208 
53209 # Check whether --with-freetype-src was given.
53210 if test "${with_freetype_src+set}" = set; then :
53211   withval=$with_freetype_src;
53212 fi
53213 
53214   # Check whether --enable-freetype-bundling was given.
53215 if test "${enable_freetype_bundling+set}" = set; then :
53216   enableval=$enable_freetype_bundling;
53217 fi
53218 
53219 
53220   # Need to specify explicitly since it needs to be overridden on some versions of macosx
53221   FREETYPE_BASE_NAME=freetype
53222   FREETYPE_CFLAGS=
53223   FREETYPE_LIBS=
53224   FREETYPE_BUNDLE_LIB_PATH=
53225 
53226   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
53227     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
53228         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
53229         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
53230         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
53231       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
53232 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
53233     fi
53234     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
53235       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
53236 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
53237     fi
53238   else
53239     # freetype is needed to build; go get it!
53240 
53241     BUNDLE_FREETYPE="$enable_freetype_bundling"
53242 
53243     if  test "x$with_freetype_src" != x; then
53244       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53245         # Try to build freetype if --with-freetype-src was given on Windows
53246 
53247   FREETYPE_SRC_PATH="$with_freetype_src"
53248   BUILD_FREETYPE=yes
53249 
53250   # Check if the freetype sources are acessible..
53251   if ! test -d $FREETYPE_SRC_PATH; then
53252     { $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
53253 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
53254     BUILD_FREETYPE=no
53255   fi
53256   # ..and contain a vc2010 project file
53257   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
53258   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
53259     { $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
53260 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
53261     BUILD_FREETYPE=no
53262   fi
53263   # Now check if configure found a version of 'msbuild.exe'
53264   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
53265     { $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
53266 $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;}
53267     BUILD_FREETYPE=no
53268   fi
53269 
53270   # Ready to go..
53271   if test "x$BUILD_FREETYPE" = xyes; then
53272     # msbuild requires trailing slashes for output directories
53273     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
53274     freetype_lib_path_unix="$freetype_lib_path"
53275     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
53276 
53277   unix_path="$vcxproj_path"
53278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53279     windows_path=`$CYGPATH -m "$unix_path"`
53280     vcxproj_path="$windows_path"
53281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53282     windows_path=`cmd //c echo $unix_path`
53283     vcxproj_path="$windows_path"
53284   fi
53285 
53286 
53287   unix_path="$freetype_lib_path"
53288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53289     windows_path=`$CYGPATH -m "$unix_path"`
53290     freetype_lib_path="$windows_path"
53291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53292     windows_path=`cmd //c echo $unix_path`
53293     freetype_lib_path="$windows_path"
53294   fi
53295 
53296 
53297   unix_path="$freetype_obj_path"
53298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53299     windows_path=`$CYGPATH -m "$unix_path"`
53300     freetype_obj_path="$windows_path"
53301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53302     windows_path=`cmd //c echo $unix_path`
53303     freetype_obj_path="$windows_path"
53304   fi
53305 
53306     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53307       freetype_platform=x64
53308     else
53309       freetype_platform=win32
53310     fi
53311 
53312     # The original freetype project file is for VS 2010 (i.e. 'v100'),
53313     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
53314     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
53315     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
53316     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
53317 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
53318 
53319     # First we try to build the freetype.dll
53320     $ECHO -e "@echo off\n"\
53321         "$MSBUILD $vcxproj_path "\
53322         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53323         "/p:Configuration=\"Release Multithreaded\" "\
53324         "/p:Platform=$freetype_platform "\
53325         "/p:ConfigurationType=DynamicLibrary "\
53326         "/p:TargetName=freetype "\
53327         "/p:OutDir=\"$freetype_lib_path\" "\
53328         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
53329     cmd /c freetype.bat
53330 
53331     if test -s "$freetype_lib_path_unix/freetype.dll"; then
53332       # If that succeeds we also build freetype.lib
53333       $ECHO -e "@echo off\n"\
53334           "$MSBUILD $vcxproj_path "\
53335           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
53336           "/p:Configuration=\"Release Multithreaded\" "\
53337           "/p:Platform=$freetype_platform "\
53338           "/p:ConfigurationType=StaticLibrary "\
53339           "/p:TargetName=freetype "\
53340           "/p:OutDir=\"$freetype_lib_path\" "\
53341           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
53342       cmd /c freetype.bat
53343 
53344       if test -s "$freetype_lib_path_unix/freetype.lib"; then
53345         # Once we build both, lib and dll, set freetype lib and include path appropriately
53346         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
53347         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
53348         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
53349 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
53350       else
53351         BUILD_FREETYPE=no
53352       fi
53353     else
53354       BUILD_FREETYPE=no
53355     fi
53356   fi
53357 
53358         if test "x$BUILD_FREETYPE" = xyes; then
53359           # Okay, we built it. Check that it works.
53360 
53361   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53362   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53363   METHOD="--with-freetype-src"
53364 
53365   # Let's start with an optimistic view of the world :-)
53366   FOUND_FREETYPE=yes
53367 
53368   # First look for the canonical freetype main include file ft2build.h.
53369   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53370     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53371     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53372     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53373       # Fail.
53374       FOUND_FREETYPE=no
53375     fi
53376   fi
53377 
53378   if test "x$FOUND_FREETYPE" = xyes; then
53379     # Include file found, let's continue the sanity check.
53380     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53381 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53382 
53383     # Reset to default value
53384     FREETYPE_BASE_NAME=freetype
53385     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53386     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53387       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53388           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53389         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53390         # for the .6 version explicitly.
53391         FREETYPE_BASE_NAME=freetype.6
53392         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53393         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53394 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53395       else
53396         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53397 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53398         FOUND_FREETYPE=no
53399       fi
53400     else
53401       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53402         # On Windows, we will need both .lib and .dll file.
53403         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53404           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53405 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53406           FOUND_FREETYPE=no
53407         fi
53408       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53409           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53410         # Found lib in isa dir, use that instead.
53411         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53412         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53413 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53414       fi
53415     fi
53416   fi
53417 
53418   if test "x$FOUND_FREETYPE" = xyes; then
53419 
53420   # Only process if variable expands to non-empty
53421 
53422   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53423     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53424 
53425   # Input might be given as Windows format, start by converting to
53426   # unix format.
53427   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53428   new_path=`$CYGPATH -u "$path"`
53429 
53430   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53431   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53432   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53433   # "foo.exe" is OK but "foo" is an error.
53434   #
53435   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53436   # It is also a way to make sure we got the proper file name for the real test later on.
53437   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53438   if test "x$test_shortpath" = x; then
53439     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53440 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53441     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53442   fi
53443 
53444   # Call helper function which possibly converts this using DOS-style short mode.
53445   # If so, the updated path is stored in $new_path.
53446 
53447   input_path="$new_path"
53448   # Check if we need to convert this using DOS-style short mode. If the path
53449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53450   # take no chances and rewrite it.
53451   # Note: m4 eats our [], so we need to use [ and ] instead.
53452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53453   if test "x$has_forbidden_chars" != x; then
53454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53455     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53456     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53457     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53458       # Going to short mode and back again did indeed matter. Since short mode is
53459       # case insensitive, let's make it lowercase to improve readability.
53460       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53461       # Now convert it back to Unix-style (cygpath)
53462       input_path=`$CYGPATH -u "$shortmode_path"`
53463       new_path="$input_path"
53464     fi
53465   fi
53466 
53467   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53468   if test "x$test_cygdrive_prefix" = x; then
53469     # As a simple fix, exclude /usr/bin since it's not a real path.
53470     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53471       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53472       # a path prefixed by /cygdrive for fixpath to work.
53473       new_path="$CYGWIN_ROOT_PATH$input_path"
53474     fi
53475   fi
53476 
53477 
53478   if test "x$path" != "x$new_path"; then
53479     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53480     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53481 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53482   fi
53483 
53484     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53485 
53486   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53487   has_colon=`$ECHO $path | $GREP ^.:`
53488   new_path="$path"
53489   if test "x$has_colon" = x; then
53490     # Not in mixed or Windows style, start by that.
53491     new_path=`cmd //c echo $path`
53492   fi
53493 
53494 
53495   input_path="$new_path"
53496   # Check if we need to convert this using DOS-style short mode. If the path
53497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53498   # take no chances and rewrite it.
53499   # Note: m4 eats our [], so we need to use [ and ] instead.
53500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53501   if test "x$has_forbidden_chars" != x; then
53502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53503     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53504   fi
53505 
53506 
53507   windows_path="$new_path"
53508   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53509     unix_path=`$CYGPATH -u "$windows_path"`
53510     new_path="$unix_path"
53511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53512     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53513     new_path="$unix_path"
53514   fi
53515 
53516   if test "x$path" != "x$new_path"; then
53517     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53518     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53519 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53520   fi
53521 
53522   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53523   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53524 
53525     else
53526       # We're on a unix platform. Hooray! :)
53527       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53528       has_space=`$ECHO "$path" | $GREP " "`
53529       if test "x$has_space" != x; then
53530         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53531 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53532         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53533       fi
53534 
53535       # Use eval to expand a potential ~
53536       eval path="$path"
53537       if test ! -f "$path" && test ! -d "$path"; then
53538         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53539       fi
53540 
53541       if test -d "$path"; then
53542         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53543       else
53544         dir="`$DIRNAME "$path"`"
53545         base="`$BASENAME "$path"`"
53546         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53547       fi
53548     fi
53549   fi
53550 
53551 
53552   # Only process if variable expands to non-empty
53553 
53554   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53555     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53556 
53557   # Input might be given as Windows format, start by converting to
53558   # unix format.
53559   path="$POTENTIAL_FREETYPE_LIB_PATH"
53560   new_path=`$CYGPATH -u "$path"`
53561 
53562   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53563   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53564   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53565   # "foo.exe" is OK but "foo" is an error.
53566   #
53567   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53568   # It is also a way to make sure we got the proper file name for the real test later on.
53569   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53570   if test "x$test_shortpath" = x; then
53571     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53572 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53573     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53574   fi
53575 
53576   # Call helper function which possibly converts this using DOS-style short mode.
53577   # If so, the updated path is stored in $new_path.
53578 
53579   input_path="$new_path"
53580   # Check if we need to convert this using DOS-style short mode. If the path
53581   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53582   # take no chances and rewrite it.
53583   # Note: m4 eats our [], so we need to use [ and ] instead.
53584   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53585   if test "x$has_forbidden_chars" != x; then
53586     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53587     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53588     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53589     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53590       # Going to short mode and back again did indeed matter. Since short mode is
53591       # case insensitive, let's make it lowercase to improve readability.
53592       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53593       # Now convert it back to Unix-style (cygpath)
53594       input_path=`$CYGPATH -u "$shortmode_path"`
53595       new_path="$input_path"
53596     fi
53597   fi
53598 
53599   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53600   if test "x$test_cygdrive_prefix" = x; then
53601     # As a simple fix, exclude /usr/bin since it's not a real path.
53602     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53603       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53604       # a path prefixed by /cygdrive for fixpath to work.
53605       new_path="$CYGWIN_ROOT_PATH$input_path"
53606     fi
53607   fi
53608 
53609 
53610   if test "x$path" != "x$new_path"; then
53611     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53613 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53614   fi
53615 
53616     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53617 
53618   path="$POTENTIAL_FREETYPE_LIB_PATH"
53619   has_colon=`$ECHO $path | $GREP ^.:`
53620   new_path="$path"
53621   if test "x$has_colon" = x; then
53622     # Not in mixed or Windows style, start by that.
53623     new_path=`cmd //c echo $path`
53624   fi
53625 
53626 
53627   input_path="$new_path"
53628   # Check if we need to convert this using DOS-style short mode. If the path
53629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53630   # take no chances and rewrite it.
53631   # Note: m4 eats our [], so we need to use [ and ] instead.
53632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53633   if test "x$has_forbidden_chars" != x; then
53634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53635     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53636   fi
53637 
53638 
53639   windows_path="$new_path"
53640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53641     unix_path=`$CYGPATH -u "$windows_path"`
53642     new_path="$unix_path"
53643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53645     new_path="$unix_path"
53646   fi
53647 
53648   if test "x$path" != "x$new_path"; then
53649     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53650     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53651 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53652   fi
53653 
53654   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53655   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53656 
53657     else
53658       # We're on a unix platform. Hooray! :)
53659       path="$POTENTIAL_FREETYPE_LIB_PATH"
53660       has_space=`$ECHO "$path" | $GREP " "`
53661       if test "x$has_space" != x; then
53662         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53663 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53664         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53665       fi
53666 
53667       # Use eval to expand a potential ~
53668       eval path="$path"
53669       if test ! -f "$path" && test ! -d "$path"; then
53670         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53671       fi
53672 
53673       if test -d "$path"; then
53674         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53675       else
53676         dir="`$DIRNAME "$path"`"
53677         base="`$BASENAME "$path"`"
53678         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53679       fi
53680     fi
53681   fi
53682 
53683 
53684     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53685     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53686 $as_echo_n "checking for freetype includes... " >&6; }
53687     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53688 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53689     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53690     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53691 $as_echo_n "checking for freetype libraries... " >&6; }
53692     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53693 $as_echo "$FREETYPE_LIB_PATH" >&6; }
53694   fi
53695 
53696           if test "x$FOUND_FREETYPE" != xyes; then
53697             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
53698           fi
53699         else
53700           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
53701 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
53702           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
53703         fi
53704       else
53705         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
53706 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
53707       fi
53708     fi
53709 
53710     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
53711       # User has specified settings
53712 
53713       if test "x$BUNDLE_FREETYPE" = x; then
53714         # If not specified, default is to bundle freetype
53715         BUNDLE_FREETYPE=yes
53716       fi
53717 
53718       if test "x$with_freetype" != x; then
53719         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
53720         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
53721       fi
53722 
53723       # Allow --with-freetype-lib and --with-freetype-include to override
53724       if test "x$with_freetype_include" != x; then
53725         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
53726       fi
53727       if test "x$with_freetype_lib" != x; then
53728         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
53729       fi
53730 
53731       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53732         # Okay, we got it. Check that it works.
53733 
53734   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53735   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53736   METHOD="--with-freetype"
53737 
53738   # Let's start with an optimistic view of the world :-)
53739   FOUND_FREETYPE=yes
53740 
53741   # First look for the canonical freetype main include file ft2build.h.
53742   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53743     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53744     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53745     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53746       # Fail.
53747       FOUND_FREETYPE=no
53748     fi
53749   fi
53750 
53751   if test "x$FOUND_FREETYPE" = xyes; then
53752     # Include file found, let's continue the sanity check.
53753     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53754 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53755 
53756     # Reset to default value
53757     FREETYPE_BASE_NAME=freetype
53758     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53759     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53760       if test "x$OPENJDK_TARGET_OS" = xmacosx \
53761           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53762         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53763         # for the .6 version explicitly.
53764         FREETYPE_BASE_NAME=freetype.6
53765         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53766         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53767 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53768       else
53769         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53770 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53771         FOUND_FREETYPE=no
53772       fi
53773     else
53774       if test "x$OPENJDK_TARGET_OS" = xwindows; then
53775         # On Windows, we will need both .lib and .dll file.
53776         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53777           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53778 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53779           FOUND_FREETYPE=no
53780         fi
53781       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53782           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53783         # Found lib in isa dir, use that instead.
53784         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53785         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53786 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53787       fi
53788     fi
53789   fi
53790 
53791   if test "x$FOUND_FREETYPE" = xyes; then
53792 
53793   # Only process if variable expands to non-empty
53794 
53795   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53796     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53797 
53798   # Input might be given as Windows format, start by converting to
53799   # unix format.
53800   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53801   new_path=`$CYGPATH -u "$path"`
53802 
53803   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53804   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53805   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53806   # "foo.exe" is OK but "foo" is an error.
53807   #
53808   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53809   # It is also a way to make sure we got the proper file name for the real test later on.
53810   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53811   if test "x$test_shortpath" = x; then
53812     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53813 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53814     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53815   fi
53816 
53817   # Call helper function which possibly converts this using DOS-style short mode.
53818   # If so, the updated path is stored in $new_path.
53819 
53820   input_path="$new_path"
53821   # Check if we need to convert this using DOS-style short mode. If the path
53822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53823   # take no chances and rewrite it.
53824   # Note: m4 eats our [], so we need to use [ and ] instead.
53825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53826   if test "x$has_forbidden_chars" != x; then
53827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53828     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53829     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53830     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53831       # Going to short mode and back again did indeed matter. Since short mode is
53832       # case insensitive, let's make it lowercase to improve readability.
53833       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53834       # Now convert it back to Unix-style (cygpath)
53835       input_path=`$CYGPATH -u "$shortmode_path"`
53836       new_path="$input_path"
53837     fi
53838   fi
53839 
53840   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53841   if test "x$test_cygdrive_prefix" = x; then
53842     # As a simple fix, exclude /usr/bin since it's not a real path.
53843     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53844       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53845       # a path prefixed by /cygdrive for fixpath to work.
53846       new_path="$CYGWIN_ROOT_PATH$input_path"
53847     fi
53848   fi
53849 
53850 
53851   if test "x$path" != "x$new_path"; then
53852     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53854 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53855   fi
53856 
53857     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53858 
53859   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53860   has_colon=`$ECHO $path | $GREP ^.:`
53861   new_path="$path"
53862   if test "x$has_colon" = x; then
53863     # Not in mixed or Windows style, start by that.
53864     new_path=`cmd //c echo $path`
53865   fi
53866 
53867 
53868   input_path="$new_path"
53869   # Check if we need to convert this using DOS-style short mode. If the path
53870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53871   # take no chances and rewrite it.
53872   # Note: m4 eats our [], so we need to use [ and ] instead.
53873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53874   if test "x$has_forbidden_chars" != x; then
53875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53876     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53877   fi
53878 
53879 
53880   windows_path="$new_path"
53881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53882     unix_path=`$CYGPATH -u "$windows_path"`
53883     new_path="$unix_path"
53884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53886     new_path="$unix_path"
53887   fi
53888 
53889   if test "x$path" != "x$new_path"; then
53890     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53892 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53893   fi
53894 
53895   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53896   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53897 
53898     else
53899       # We're on a unix platform. Hooray! :)
53900       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53901       has_space=`$ECHO "$path" | $GREP " "`
53902       if test "x$has_space" != x; then
53903         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53904 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53905         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53906       fi
53907 
53908       # Use eval to expand a potential ~
53909       eval path="$path"
53910       if test ! -f "$path" && test ! -d "$path"; then
53911         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53912       fi
53913 
53914       if test -d "$path"; then
53915         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53916       else
53917         dir="`$DIRNAME "$path"`"
53918         base="`$BASENAME "$path"`"
53919         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53920       fi
53921     fi
53922   fi
53923 
53924 
53925   # Only process if variable expands to non-empty
53926 
53927   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53928     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53929 
53930   # Input might be given as Windows format, start by converting to
53931   # unix format.
53932   path="$POTENTIAL_FREETYPE_LIB_PATH"
53933   new_path=`$CYGPATH -u "$path"`
53934 
53935   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53936   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53937   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53938   # "foo.exe" is OK but "foo" is an error.
53939   #
53940   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53941   # It is also a way to make sure we got the proper file name for the real test later on.
53942   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53943   if test "x$test_shortpath" = x; then
53944     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53945 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53946     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53947   fi
53948 
53949   # Call helper function which possibly converts this using DOS-style short mode.
53950   # If so, the updated path is stored in $new_path.
53951 
53952   input_path="$new_path"
53953   # Check if we need to convert this using DOS-style short mode. If the path
53954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53955   # take no chances and rewrite it.
53956   # Note: m4 eats our [], so we need to use [ and ] instead.
53957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53958   if test "x$has_forbidden_chars" != x; then
53959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53960     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53961     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53962     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53963       # Going to short mode and back again did indeed matter. Since short mode is
53964       # case insensitive, let's make it lowercase to improve readability.
53965       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53966       # Now convert it back to Unix-style (cygpath)
53967       input_path=`$CYGPATH -u "$shortmode_path"`
53968       new_path="$input_path"
53969     fi
53970   fi
53971 
53972   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53973   if test "x$test_cygdrive_prefix" = x; then
53974     # As a simple fix, exclude /usr/bin since it's not a real path.
53975     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53976       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53977       # a path prefixed by /cygdrive for fixpath to work.
53978       new_path="$CYGWIN_ROOT_PATH$input_path"
53979     fi
53980   fi
53981 
53982 
53983   if test "x$path" != "x$new_path"; then
53984     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53985     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53986 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53987   fi
53988 
53989     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53990 
53991   path="$POTENTIAL_FREETYPE_LIB_PATH"
53992   has_colon=`$ECHO $path | $GREP ^.:`
53993   new_path="$path"
53994   if test "x$has_colon" = x; then
53995     # Not in mixed or Windows style, start by that.
53996     new_path=`cmd //c echo $path`
53997   fi
53998 
53999 
54000   input_path="$new_path"
54001   # Check if we need to convert this using DOS-style short mode. If the path
54002   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54003   # take no chances and rewrite it.
54004   # Note: m4 eats our [], so we need to use [ and ] instead.
54005   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54006   if test "x$has_forbidden_chars" != x; then
54007     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54008     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54009   fi
54010 
54011 
54012   windows_path="$new_path"
54013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54014     unix_path=`$CYGPATH -u "$windows_path"`
54015     new_path="$unix_path"
54016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54018     new_path="$unix_path"
54019   fi
54020 
54021   if test "x$path" != "x$new_path"; then
54022     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54023     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54024 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54025   fi
54026 
54027   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54028   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54029 
54030     else
54031       # We're on a unix platform. Hooray! :)
54032       path="$POTENTIAL_FREETYPE_LIB_PATH"
54033       has_space=`$ECHO "$path" | $GREP " "`
54034       if test "x$has_space" != x; then
54035         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54036 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54037         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54038       fi
54039 
54040       # Use eval to expand a potential ~
54041       eval path="$path"
54042       if test ! -f "$path" && test ! -d "$path"; then
54043         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54044       fi
54045 
54046       if test -d "$path"; then
54047         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54048       else
54049         dir="`$DIRNAME "$path"`"
54050         base="`$BASENAME "$path"`"
54051         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54052       fi
54053     fi
54054   fi
54055 
54056 
54057     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54058     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54059 $as_echo_n "checking for freetype includes... " >&6; }
54060     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54061 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54062     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54063     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54064 $as_echo_n "checking for freetype libraries... " >&6; }
54065     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54066 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54067   fi
54068 
54069         if test "x$FOUND_FREETYPE" != xyes; then
54070           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
54071         fi
54072       else
54073         # User specified only one of lib or include. This is an error.
54074         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
54075           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
54076 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
54077           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
54078         else
54079           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
54080 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
54081           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
54082         fi
54083       fi
54084     else
54085       # User did not specify settings, but we need freetype. Try to locate it.
54086 
54087       if test "x$BUNDLE_FREETYPE" = x; then
54088         # If not specified, default is to bundle freetype only on windows
54089         if test "x$OPENJDK_TARGET_OS" = xwindows; then
54090           BUNDLE_FREETYPE=yes
54091         else
54092           BUNDLE_FREETYPE=no
54093         fi
54094       fi
54095 
54096       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
54097       if test "x$SYSROOT" = x; then
54098         if test "x$FOUND_FREETYPE" != xyes; then
54099           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
54100           if test "x$PKG_CONFIG" != x; then
54101 
54102 pkg_failed=no
54103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
54104 $as_echo_n "checking for FREETYPE... " >&6; }
54105 
54106 if test -n "$FREETYPE_CFLAGS"; then
54107     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
54108  elif test -n "$PKG_CONFIG"; then
54109     if test -n "$PKG_CONFIG" && \
54110     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
54111   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
54112   ac_status=$?
54113   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54114   test $ac_status = 0; }; then
54115   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
54116 else
54117   pkg_failed=yes
54118 fi
54119  else
54120     pkg_failed=untried
54121 fi
54122 if test -n "$FREETYPE_LIBS"; then
54123     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
54124  elif test -n "$PKG_CONFIG"; then
54125     if test -n "$PKG_CONFIG" && \
54126     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
54127   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
54128   ac_status=$?
54129   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
54130   test $ac_status = 0; }; then
54131   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
54132 else
54133   pkg_failed=yes
54134 fi
54135  else
54136     pkg_failed=untried
54137 fi
54138 
54139 
54140 
54141 if test $pkg_failed = yes; then
54142 
54143 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
54144         _pkg_short_errors_supported=yes
54145 else
54146         _pkg_short_errors_supported=no
54147 fi
54148         if test $_pkg_short_errors_supported = yes; then
54149                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
54150         else
54151                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
54152         fi
54153         # Put the nasty error message in config.log where it belongs
54154         echo "$FREETYPE_PKG_ERRORS" >&5
54155 
54156         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54157 $as_echo "no" >&6; }
54158                 FOUND_FREETYPE=no
54159 elif test $pkg_failed = untried; then
54160         FOUND_FREETYPE=no
54161 else
54162         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
54163         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
54164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54165 $as_echo "yes" >&6; }
54166         FOUND_FREETYPE=yes
54167 fi
54168             if test "x$FOUND_FREETYPE" = xyes; then
54169               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
54170               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
54171               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
54172               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
54173                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
54174               fi
54175               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
54176               if test "x$BUNDLE_FREETYPE" = xyes; then
54177                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
54178 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
54179                 FOUND_FREETYPE=no
54180               else
54181                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
54182 $as_echo_n "checking for freetype... " >&6; }
54183                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
54184 $as_echo "yes (using pkg-config)" >&6; }
54185               fi
54186             fi
54187           fi
54188         fi
54189       fi
54190 
54191       if test "x$FOUND_FREETYPE" != xyes; then
54192         # Check in well-known locations
54193         if test "x$OPENJDK_TARGET_OS" = xwindows; then
54194           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
54195 
54196   windows_path="$FREETYPE_BASE_DIR"
54197   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54198     unix_path=`$CYGPATH -u "$windows_path"`
54199     FREETYPE_BASE_DIR="$unix_path"
54200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54201     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54202     FREETYPE_BASE_DIR="$unix_path"
54203   fi
54204 
54205 
54206   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54207   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54208   METHOD="well-known location"
54209 
54210   # Let's start with an optimistic view of the world :-)
54211   FOUND_FREETYPE=yes
54212 
54213   # First look for the canonical freetype main include file ft2build.h.
54214   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54215     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54216     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54217     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54218       # Fail.
54219       FOUND_FREETYPE=no
54220     fi
54221   fi
54222 
54223   if test "x$FOUND_FREETYPE" = xyes; then
54224     # Include file found, let's continue the sanity check.
54225     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54226 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54227 
54228     # Reset to default value
54229     FREETYPE_BASE_NAME=freetype
54230     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54231     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54232       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54233           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54234         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54235         # for the .6 version explicitly.
54236         FREETYPE_BASE_NAME=freetype.6
54237         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54238         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54239 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54240       else
54241         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54242 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54243         FOUND_FREETYPE=no
54244       fi
54245     else
54246       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54247         # On Windows, we will need both .lib and .dll file.
54248         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54249           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54250 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54251           FOUND_FREETYPE=no
54252         fi
54253       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54254           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54255         # Found lib in isa dir, use that instead.
54256         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54257         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54258 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54259       fi
54260     fi
54261   fi
54262 
54263   if test "x$FOUND_FREETYPE" = xyes; then
54264 
54265   # Only process if variable expands to non-empty
54266 
54267   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54268     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54269 
54270   # Input might be given as Windows format, start by converting to
54271   # unix format.
54272   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54273   new_path=`$CYGPATH -u "$path"`
54274 
54275   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54276   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54277   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54278   # "foo.exe" is OK but "foo" is an error.
54279   #
54280   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54281   # It is also a way to make sure we got the proper file name for the real test later on.
54282   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54283   if test "x$test_shortpath" = x; then
54284     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54285 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54286     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54287   fi
54288 
54289   # Call helper function which possibly converts this using DOS-style short mode.
54290   # If so, the updated path is stored in $new_path.
54291 
54292   input_path="$new_path"
54293   # Check if we need to convert this using DOS-style short mode. If the path
54294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54295   # take no chances and rewrite it.
54296   # Note: m4 eats our [], so we need to use [ and ] instead.
54297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54298   if test "x$has_forbidden_chars" != x; then
54299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54300     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54301     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54302     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54303       # Going to short mode and back again did indeed matter. Since short mode is
54304       # case insensitive, let's make it lowercase to improve readability.
54305       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54306       # Now convert it back to Unix-style (cygpath)
54307       input_path=`$CYGPATH -u "$shortmode_path"`
54308       new_path="$input_path"
54309     fi
54310   fi
54311 
54312   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54313   if test "x$test_cygdrive_prefix" = x; then
54314     # As a simple fix, exclude /usr/bin since it's not a real path.
54315     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54316       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54317       # a path prefixed by /cygdrive for fixpath to work.
54318       new_path="$CYGWIN_ROOT_PATH$input_path"
54319     fi
54320   fi
54321 
54322 
54323   if test "x$path" != "x$new_path"; then
54324     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54325     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54326 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54327   fi
54328 
54329     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54330 
54331   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54332   has_colon=`$ECHO $path | $GREP ^.:`
54333   new_path="$path"
54334   if test "x$has_colon" = x; then
54335     # Not in mixed or Windows style, start by that.
54336     new_path=`cmd //c echo $path`
54337   fi
54338 
54339 
54340   input_path="$new_path"
54341   # Check if we need to convert this using DOS-style short mode. If the path
54342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54343   # take no chances and rewrite it.
54344   # Note: m4 eats our [], so we need to use [ and ] instead.
54345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54346   if test "x$has_forbidden_chars" != x; then
54347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54348     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54349   fi
54350 
54351 
54352   windows_path="$new_path"
54353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54354     unix_path=`$CYGPATH -u "$windows_path"`
54355     new_path="$unix_path"
54356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54358     new_path="$unix_path"
54359   fi
54360 
54361   if test "x$path" != "x$new_path"; then
54362     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54363     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54364 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54365   fi
54366 
54367   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54368   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54369 
54370     else
54371       # We're on a unix platform. Hooray! :)
54372       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54373       has_space=`$ECHO "$path" | $GREP " "`
54374       if test "x$has_space" != x; then
54375         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54376 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54377         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54378       fi
54379 
54380       # Use eval to expand a potential ~
54381       eval path="$path"
54382       if test ! -f "$path" && test ! -d "$path"; then
54383         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54384       fi
54385 
54386       if test -d "$path"; then
54387         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54388       else
54389         dir="`$DIRNAME "$path"`"
54390         base="`$BASENAME "$path"`"
54391         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54392       fi
54393     fi
54394   fi
54395 
54396 
54397   # Only process if variable expands to non-empty
54398 
54399   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54400     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54401 
54402   # Input might be given as Windows format, start by converting to
54403   # unix format.
54404   path="$POTENTIAL_FREETYPE_LIB_PATH"
54405   new_path=`$CYGPATH -u "$path"`
54406 
54407   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54408   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54409   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54410   # "foo.exe" is OK but "foo" is an error.
54411   #
54412   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54413   # It is also a way to make sure we got the proper file name for the real test later on.
54414   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54415   if test "x$test_shortpath" = x; then
54416     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54417 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54418     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54419   fi
54420 
54421   # Call helper function which possibly converts this using DOS-style short mode.
54422   # If so, the updated path is stored in $new_path.
54423 
54424   input_path="$new_path"
54425   # Check if we need to convert this using DOS-style short mode. If the path
54426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54427   # take no chances and rewrite it.
54428   # Note: m4 eats our [], so we need to use [ and ] instead.
54429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54430   if test "x$has_forbidden_chars" != x; then
54431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54432     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54433     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54434     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54435       # Going to short mode and back again did indeed matter. Since short mode is
54436       # case insensitive, let's make it lowercase to improve readability.
54437       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54438       # Now convert it back to Unix-style (cygpath)
54439       input_path=`$CYGPATH -u "$shortmode_path"`
54440       new_path="$input_path"
54441     fi
54442   fi
54443 
54444   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54445   if test "x$test_cygdrive_prefix" = x; then
54446     # As a simple fix, exclude /usr/bin since it's not a real path.
54447     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54448       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54449       # a path prefixed by /cygdrive for fixpath to work.
54450       new_path="$CYGWIN_ROOT_PATH$input_path"
54451     fi
54452   fi
54453 
54454 
54455   if test "x$path" != "x$new_path"; then
54456     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54457     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54458 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54459   fi
54460 
54461     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54462 
54463   path="$POTENTIAL_FREETYPE_LIB_PATH"
54464   has_colon=`$ECHO $path | $GREP ^.:`
54465   new_path="$path"
54466   if test "x$has_colon" = x; then
54467     # Not in mixed or Windows style, start by that.
54468     new_path=`cmd //c echo $path`
54469   fi
54470 
54471 
54472   input_path="$new_path"
54473   # Check if we need to convert this using DOS-style short mode. If the path
54474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54475   # take no chances and rewrite it.
54476   # Note: m4 eats our [], so we need to use [ and ] instead.
54477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54478   if test "x$has_forbidden_chars" != x; then
54479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54480     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54481   fi
54482 
54483 
54484   windows_path="$new_path"
54485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54486     unix_path=`$CYGPATH -u "$windows_path"`
54487     new_path="$unix_path"
54488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54490     new_path="$unix_path"
54491   fi
54492 
54493   if test "x$path" != "x$new_path"; then
54494     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54496 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54497   fi
54498 
54499   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54500   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54501 
54502     else
54503       # We're on a unix platform. Hooray! :)
54504       path="$POTENTIAL_FREETYPE_LIB_PATH"
54505       has_space=`$ECHO "$path" | $GREP " "`
54506       if test "x$has_space" != x; then
54507         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54508 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54509         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54510       fi
54511 
54512       # Use eval to expand a potential ~
54513       eval path="$path"
54514       if test ! -f "$path" && test ! -d "$path"; then
54515         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54516       fi
54517 
54518       if test -d "$path"; then
54519         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54520       else
54521         dir="`$DIRNAME "$path"`"
54522         base="`$BASENAME "$path"`"
54523         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54524       fi
54525     fi
54526   fi
54527 
54528 
54529     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54530     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54531 $as_echo_n "checking for freetype includes... " >&6; }
54532     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54533 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54534     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54535     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54536 $as_echo_n "checking for freetype libraries... " >&6; }
54537     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54538 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54539   fi
54540 
54541           if test "x$FOUND_FREETYPE" != xyes; then
54542             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
54543 
54544   windows_path="$FREETYPE_BASE_DIR"
54545   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54546     unix_path=`$CYGPATH -u "$windows_path"`
54547     FREETYPE_BASE_DIR="$unix_path"
54548   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54549     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54550     FREETYPE_BASE_DIR="$unix_path"
54551   fi
54552 
54553 
54554   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54555   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54556   METHOD="well-known location"
54557 
54558   # Let's start with an optimistic view of the world :-)
54559   FOUND_FREETYPE=yes
54560 
54561   # First look for the canonical freetype main include file ft2build.h.
54562   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54563     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54564     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54565     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54566       # Fail.
54567       FOUND_FREETYPE=no
54568     fi
54569   fi
54570 
54571   if test "x$FOUND_FREETYPE" = xyes; then
54572     # Include file found, let's continue the sanity check.
54573     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54574 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54575 
54576     # Reset to default value
54577     FREETYPE_BASE_NAME=freetype
54578     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54579     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54580       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54581           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54582         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54583         # for the .6 version explicitly.
54584         FREETYPE_BASE_NAME=freetype.6
54585         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54586         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54587 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54588       else
54589         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54590 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54591         FOUND_FREETYPE=no
54592       fi
54593     else
54594       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54595         # On Windows, we will need both .lib and .dll file.
54596         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54597           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54598 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54599           FOUND_FREETYPE=no
54600         fi
54601       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54602           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54603         # Found lib in isa dir, use that instead.
54604         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54605         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54606 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54607       fi
54608     fi
54609   fi
54610 
54611   if test "x$FOUND_FREETYPE" = xyes; then
54612 
54613   # Only process if variable expands to non-empty
54614 
54615   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54616     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54617 
54618   # Input might be given as Windows format, start by converting to
54619   # unix format.
54620   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54621   new_path=`$CYGPATH -u "$path"`
54622 
54623   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54624   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54625   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54626   # "foo.exe" is OK but "foo" is an error.
54627   #
54628   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54629   # It is also a way to make sure we got the proper file name for the real test later on.
54630   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54631   if test "x$test_shortpath" = x; then
54632     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54633 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54634     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54635   fi
54636 
54637   # Call helper function which possibly converts this using DOS-style short mode.
54638   # If so, the updated path is stored in $new_path.
54639 
54640   input_path="$new_path"
54641   # Check if we need to convert this using DOS-style short mode. If the path
54642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54643   # take no chances and rewrite it.
54644   # Note: m4 eats our [], so we need to use [ and ] instead.
54645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54646   if test "x$has_forbidden_chars" != x; then
54647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54648     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54649     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54650     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54651       # Going to short mode and back again did indeed matter. Since short mode is
54652       # case insensitive, let's make it lowercase to improve readability.
54653       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54654       # Now convert it back to Unix-style (cygpath)
54655       input_path=`$CYGPATH -u "$shortmode_path"`
54656       new_path="$input_path"
54657     fi
54658   fi
54659 
54660   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54661   if test "x$test_cygdrive_prefix" = x; then
54662     # As a simple fix, exclude /usr/bin since it's not a real path.
54663     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54664       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54665       # a path prefixed by /cygdrive for fixpath to work.
54666       new_path="$CYGWIN_ROOT_PATH$input_path"
54667     fi
54668   fi
54669 
54670 
54671   if test "x$path" != "x$new_path"; then
54672     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54674 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54675   fi
54676 
54677     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54678 
54679   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54680   has_colon=`$ECHO $path | $GREP ^.:`
54681   new_path="$path"
54682   if test "x$has_colon" = x; then
54683     # Not in mixed or Windows style, start by that.
54684     new_path=`cmd //c echo $path`
54685   fi
54686 
54687 
54688   input_path="$new_path"
54689   # Check if we need to convert this using DOS-style short mode. If the path
54690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54691   # take no chances and rewrite it.
54692   # Note: m4 eats our [], so we need to use [ and ] instead.
54693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54694   if test "x$has_forbidden_chars" != x; then
54695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54697   fi
54698 
54699 
54700   windows_path="$new_path"
54701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54702     unix_path=`$CYGPATH -u "$windows_path"`
54703     new_path="$unix_path"
54704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54706     new_path="$unix_path"
54707   fi
54708 
54709   if test "x$path" != "x$new_path"; then
54710     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54711     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54712 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54713   fi
54714 
54715   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54716   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54717 
54718     else
54719       # We're on a unix platform. Hooray! :)
54720       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54721       has_space=`$ECHO "$path" | $GREP " "`
54722       if test "x$has_space" != x; then
54723         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54724 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54725         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54726       fi
54727 
54728       # Use eval to expand a potential ~
54729       eval path="$path"
54730       if test ! -f "$path" && test ! -d "$path"; then
54731         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54732       fi
54733 
54734       if test -d "$path"; then
54735         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54736       else
54737         dir="`$DIRNAME "$path"`"
54738         base="`$BASENAME "$path"`"
54739         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54740       fi
54741     fi
54742   fi
54743 
54744 
54745   # Only process if variable expands to non-empty
54746 
54747   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54748     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54749 
54750   # Input might be given as Windows format, start by converting to
54751   # unix format.
54752   path="$POTENTIAL_FREETYPE_LIB_PATH"
54753   new_path=`$CYGPATH -u "$path"`
54754 
54755   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54756   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54757   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54758   # "foo.exe" is OK but "foo" is an error.
54759   #
54760   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54761   # It is also a way to make sure we got the proper file name for the real test later on.
54762   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54763   if test "x$test_shortpath" = x; then
54764     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54765 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54766     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54767   fi
54768 
54769   # Call helper function which possibly converts this using DOS-style short mode.
54770   # If so, the updated path is stored in $new_path.
54771 
54772   input_path="$new_path"
54773   # Check if we need to convert this using DOS-style short mode. If the path
54774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54775   # take no chances and rewrite it.
54776   # Note: m4 eats our [], so we need to use [ and ] instead.
54777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54778   if test "x$has_forbidden_chars" != x; then
54779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54780     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54781     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54782     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54783       # Going to short mode and back again did indeed matter. Since short mode is
54784       # case insensitive, let's make it lowercase to improve readability.
54785       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54786       # Now convert it back to Unix-style (cygpath)
54787       input_path=`$CYGPATH -u "$shortmode_path"`
54788       new_path="$input_path"
54789     fi
54790   fi
54791 
54792   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54793   if test "x$test_cygdrive_prefix" = x; then
54794     # As a simple fix, exclude /usr/bin since it's not a real path.
54795     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54796       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54797       # a path prefixed by /cygdrive for fixpath to work.
54798       new_path="$CYGWIN_ROOT_PATH$input_path"
54799     fi
54800   fi
54801 
54802 
54803   if test "x$path" != "x$new_path"; then
54804     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54805     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54806 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54807   fi
54808 
54809     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54810 
54811   path="$POTENTIAL_FREETYPE_LIB_PATH"
54812   has_colon=`$ECHO $path | $GREP ^.:`
54813   new_path="$path"
54814   if test "x$has_colon" = x; then
54815     # Not in mixed or Windows style, start by that.
54816     new_path=`cmd //c echo $path`
54817   fi
54818 
54819 
54820   input_path="$new_path"
54821   # Check if we need to convert this using DOS-style short mode. If the path
54822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54823   # take no chances and rewrite it.
54824   # Note: m4 eats our [], so we need to use [ and ] instead.
54825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54826   if test "x$has_forbidden_chars" != x; then
54827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54828     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54829   fi
54830 
54831 
54832   windows_path="$new_path"
54833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54834     unix_path=`$CYGPATH -u "$windows_path"`
54835     new_path="$unix_path"
54836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54838     new_path="$unix_path"
54839   fi
54840 
54841   if test "x$path" != "x$new_path"; then
54842     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54843     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54844 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54845   fi
54846 
54847   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54848   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54849 
54850     else
54851       # We're on a unix platform. Hooray! :)
54852       path="$POTENTIAL_FREETYPE_LIB_PATH"
54853       has_space=`$ECHO "$path" | $GREP " "`
54854       if test "x$has_space" != x; then
54855         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54856 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54857         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54858       fi
54859 
54860       # Use eval to expand a potential ~
54861       eval path="$path"
54862       if test ! -f "$path" && test ! -d "$path"; then
54863         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54864       fi
54865 
54866       if test -d "$path"; then
54867         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54868       else
54869         dir="`$DIRNAME "$path"`"
54870         base="`$BASENAME "$path"`"
54871         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54872       fi
54873     fi
54874   fi
54875 
54876 
54877     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54878     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54879 $as_echo_n "checking for freetype includes... " >&6; }
54880     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54881 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54882     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54884 $as_echo_n "checking for freetype libraries... " >&6; }
54885     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54886 $as_echo "$FREETYPE_LIB_PATH" >&6; }
54887   fi
54888 
54889           fi
54890           if test "x$FOUND_FREETYPE" != xyes; then
54891             FREETYPE_BASE_DIR="$HOME/freetype"
54892 
54893   windows_path="$FREETYPE_BASE_DIR"
54894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54895     unix_path=`$CYGPATH -u "$windows_path"`
54896     FREETYPE_BASE_DIR="$unix_path"
54897   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54898     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54899     FREETYPE_BASE_DIR="$unix_path"
54900   fi
54901 
54902             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54903 
54904   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54905   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54906   METHOD="well-known location"
54907 
54908   # Let's start with an optimistic view of the world :-)
54909   FOUND_FREETYPE=yes
54910 
54911   # First look for the canonical freetype main include file ft2build.h.
54912   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54913     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54914     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54915     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54916       # Fail.
54917       FOUND_FREETYPE=no
54918     fi
54919   fi
54920 
54921   if test "x$FOUND_FREETYPE" = xyes; then
54922     # Include file found, let's continue the sanity check.
54923     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54924 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54925 
54926     # Reset to default value
54927     FREETYPE_BASE_NAME=freetype
54928     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54929     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54930       if test "x$OPENJDK_TARGET_OS" = xmacosx \
54931           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54932         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54933         # for the .6 version explicitly.
54934         FREETYPE_BASE_NAME=freetype.6
54935         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54936         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54937 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54938       else
54939         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54940 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54941         FOUND_FREETYPE=no
54942       fi
54943     else
54944       if test "x$OPENJDK_TARGET_OS" = xwindows; then
54945         # On Windows, we will need both .lib and .dll file.
54946         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54947           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54948 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54949           FOUND_FREETYPE=no
54950         fi
54951       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54952           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54953         # Found lib in isa dir, use that instead.
54954         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54955         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54956 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54957       fi
54958     fi
54959   fi
54960 
54961   if test "x$FOUND_FREETYPE" = xyes; then
54962 
54963   # Only process if variable expands to non-empty
54964 
54965   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54966     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54967 
54968   # Input might be given as Windows format, start by converting to
54969   # unix format.
54970   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54971   new_path=`$CYGPATH -u "$path"`
54972 
54973   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54974   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54975   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54976   # "foo.exe" is OK but "foo" is an error.
54977   #
54978   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54979   # It is also a way to make sure we got the proper file name for the real test later on.
54980   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54981   if test "x$test_shortpath" = x; then
54982     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54983 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54984     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54985   fi
54986 
54987   # Call helper function which possibly converts this using DOS-style short mode.
54988   # If so, the updated path is stored in $new_path.
54989 
54990   input_path="$new_path"
54991   # Check if we need to convert this using DOS-style short mode. If the path
54992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54993   # take no chances and rewrite it.
54994   # Note: m4 eats our [], so we need to use [ and ] instead.
54995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54996   if test "x$has_forbidden_chars" != x; then
54997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55001       # Going to short mode and back again did indeed matter. Since short mode is
55002       # case insensitive, let's make it lowercase to improve readability.
55003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55004       # Now convert it back to Unix-style (cygpath)
55005       input_path=`$CYGPATH -u "$shortmode_path"`
55006       new_path="$input_path"
55007     fi
55008   fi
55009 
55010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55011   if test "x$test_cygdrive_prefix" = x; then
55012     # As a simple fix, exclude /usr/bin since it's not a real path.
55013     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55015       # a path prefixed by /cygdrive for fixpath to work.
55016       new_path="$CYGWIN_ROOT_PATH$input_path"
55017     fi
55018   fi
55019 
55020 
55021   if test "x$path" != "x$new_path"; then
55022     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55023     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55024 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55025   fi
55026 
55027     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55028 
55029   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55030   has_colon=`$ECHO $path | $GREP ^.:`
55031   new_path="$path"
55032   if test "x$has_colon" = x; then
55033     # Not in mixed or Windows style, start by that.
55034     new_path=`cmd //c echo $path`
55035   fi
55036 
55037 
55038   input_path="$new_path"
55039   # Check if we need to convert this using DOS-style short mode. If the path
55040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55041   # take no chances and rewrite it.
55042   # Note: m4 eats our [], so we need to use [ and ] instead.
55043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55044   if test "x$has_forbidden_chars" != x; then
55045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55046     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55047   fi
55048 
55049 
55050   windows_path="$new_path"
55051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55052     unix_path=`$CYGPATH -u "$windows_path"`
55053     new_path="$unix_path"
55054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55055     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55056     new_path="$unix_path"
55057   fi
55058 
55059   if test "x$path" != "x$new_path"; then
55060     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55061     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55062 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55063   fi
55064 
55065   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55066   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55067 
55068     else
55069       # We're on a unix platform. Hooray! :)
55070       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55071       has_space=`$ECHO "$path" | $GREP " "`
55072       if test "x$has_space" != x; then
55073         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55074 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55075         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55076       fi
55077 
55078       # Use eval to expand a potential ~
55079       eval path="$path"
55080       if test ! -f "$path" && test ! -d "$path"; then
55081         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55082       fi
55083 
55084       if test -d "$path"; then
55085         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55086       else
55087         dir="`$DIRNAME "$path"`"
55088         base="`$BASENAME "$path"`"
55089         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55090       fi
55091     fi
55092   fi
55093 
55094 
55095   # Only process if variable expands to non-empty
55096 
55097   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55098     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55099 
55100   # Input might be given as Windows format, start by converting to
55101   # unix format.
55102   path="$POTENTIAL_FREETYPE_LIB_PATH"
55103   new_path=`$CYGPATH -u "$path"`
55104 
55105   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55106   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55107   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55108   # "foo.exe" is OK but "foo" is an error.
55109   #
55110   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55111   # It is also a way to make sure we got the proper file name for the real test later on.
55112   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55113   if test "x$test_shortpath" = x; then
55114     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55115 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55116     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55117   fi
55118 
55119   # Call helper function which possibly converts this using DOS-style short mode.
55120   # If so, the updated path is stored in $new_path.
55121 
55122   input_path="$new_path"
55123   # Check if we need to convert this using DOS-style short mode. If the path
55124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55125   # take no chances and rewrite it.
55126   # Note: m4 eats our [], so we need to use [ and ] instead.
55127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55128   if test "x$has_forbidden_chars" != x; then
55129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55130     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55131     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55132     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55133       # Going to short mode and back again did indeed matter. Since short mode is
55134       # case insensitive, let's make it lowercase to improve readability.
55135       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55136       # Now convert it back to Unix-style (cygpath)
55137       input_path=`$CYGPATH -u "$shortmode_path"`
55138       new_path="$input_path"
55139     fi
55140   fi
55141 
55142   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55143   if test "x$test_cygdrive_prefix" = x; then
55144     # As a simple fix, exclude /usr/bin since it's not a real path.
55145     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55146       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55147       # a path prefixed by /cygdrive for fixpath to work.
55148       new_path="$CYGWIN_ROOT_PATH$input_path"
55149     fi
55150   fi
55151 
55152 
55153   if test "x$path" != "x$new_path"; then
55154     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55155     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55156 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55157   fi
55158 
55159     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55160 
55161   path="$POTENTIAL_FREETYPE_LIB_PATH"
55162   has_colon=`$ECHO $path | $GREP ^.:`
55163   new_path="$path"
55164   if test "x$has_colon" = x; then
55165     # Not in mixed or Windows style, start by that.
55166     new_path=`cmd //c echo $path`
55167   fi
55168 
55169 
55170   input_path="$new_path"
55171   # Check if we need to convert this using DOS-style short mode. If the path
55172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55173   # take no chances and rewrite it.
55174   # Note: m4 eats our [], so we need to use [ and ] instead.
55175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55176   if test "x$has_forbidden_chars" != x; then
55177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55178     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55179   fi
55180 
55181 
55182   windows_path="$new_path"
55183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55184     unix_path=`$CYGPATH -u "$windows_path"`
55185     new_path="$unix_path"
55186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55188     new_path="$unix_path"
55189   fi
55190 
55191   if test "x$path" != "x$new_path"; then
55192     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55194 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55195   fi
55196 
55197   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55198   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55199 
55200     else
55201       # We're on a unix platform. Hooray! :)
55202       path="$POTENTIAL_FREETYPE_LIB_PATH"
55203       has_space=`$ECHO "$path" | $GREP " "`
55204       if test "x$has_space" != x; then
55205         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55206 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55207         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55208       fi
55209 
55210       # Use eval to expand a potential ~
55211       eval path="$path"
55212       if test ! -f "$path" && test ! -d "$path"; then
55213         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55214       fi
55215 
55216       if test -d "$path"; then
55217         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55218       else
55219         dir="`$DIRNAME "$path"`"
55220         base="`$BASENAME "$path"`"
55221         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55222       fi
55223     fi
55224   fi
55225 
55226 
55227     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55229 $as_echo_n "checking for freetype includes... " >&6; }
55230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55231 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55232     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55234 $as_echo_n "checking for freetype libraries... " >&6; }
55235     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55236 $as_echo "$FREETYPE_LIB_PATH" >&6; }
55237   fi
55238 
55239             else
55240 
55241   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55242   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
55243   METHOD="well-known location"
55244 
55245   # Let's start with an optimistic view of the world :-)
55246   FOUND_FREETYPE=yes
55247 
55248   # First look for the canonical freetype main include file ft2build.h.
55249   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55250     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55251     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55252     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55253       # Fail.
55254       FOUND_FREETYPE=no
55255     fi
55256   fi
55257 
55258   if test "x$FOUND_FREETYPE" = xyes; then
55259     # Include file found, let's continue the sanity check.
55260     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55261 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55262 
55263     # Reset to default value
55264     FREETYPE_BASE_NAME=freetype
55265     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55266     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55267       if test "x$OPENJDK_TARGET_OS" = xmacosx \
55268           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55269         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55270         # for the .6 version explicitly.
55271         FREETYPE_BASE_NAME=freetype.6
55272         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55273         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55274 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55275       else
55276         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55277 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55278         FOUND_FREETYPE=no
55279       fi
55280     else
55281       if test "x$OPENJDK_TARGET_OS" = xwindows; then
55282         # On Windows, we will need both .lib and .dll file.
55283         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55284           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55285 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55286           FOUND_FREETYPE=no
55287         fi
55288       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55289           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55290         # Found lib in isa dir, use that instead.
55291         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55292         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55293 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55294       fi
55295     fi
55296   fi
55297 
55298   if test "x$FOUND_FREETYPE" = xyes; then
55299 
55300   # Only process if variable expands to non-empty
55301 
55302   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55303     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55304 
55305   # Input might be given as Windows format, start by converting to
55306   # unix format.
55307   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55308   new_path=`$CYGPATH -u "$path"`
55309 
55310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55313   # "foo.exe" is OK but "foo" is an error.
55314   #
55315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55316   # It is also a way to make sure we got the proper file name for the real test later on.
55317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55318   if test "x$test_shortpath" = x; then
55319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55320 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55321     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55322   fi
55323 
55324   # Call helper function which possibly converts this using DOS-style short mode.
55325   # If so, the updated path is stored in $new_path.
55326 
55327   input_path="$new_path"
55328   # Check if we need to convert this using DOS-style short mode. If the path
55329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55330   # take no chances and rewrite it.
55331   # Note: m4 eats our [], so we need to use [ and ] instead.
55332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55333   if test "x$has_forbidden_chars" != x; then
55334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55338       # Going to short mode and back again did indeed matter. Since short mode is
55339       # case insensitive, let's make it lowercase to improve readability.
55340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55341       # Now convert it back to Unix-style (cygpath)
55342       input_path=`$CYGPATH -u "$shortmode_path"`
55343       new_path="$input_path"
55344     fi
55345   fi
55346 
55347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55348   if test "x$test_cygdrive_prefix" = x; then
55349     # As a simple fix, exclude /usr/bin since it's not a real path.
55350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55352       # a path prefixed by /cygdrive for fixpath to work.
55353       new_path="$CYGWIN_ROOT_PATH$input_path"
55354     fi
55355   fi
55356 
55357 
55358   if test "x$path" != "x$new_path"; then
55359     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55361 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55362   fi
55363 
55364     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55365 
55366   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55367   has_colon=`$ECHO $path | $GREP ^.:`
55368   new_path="$path"
55369   if test "x$has_colon" = x; then
55370     # Not in mixed or Windows style, start by that.
55371     new_path=`cmd //c echo $path`
55372   fi
55373 
55374 
55375   input_path="$new_path"
55376   # Check if we need to convert this using DOS-style short mode. If the path
55377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55378   # take no chances and rewrite it.
55379   # Note: m4 eats our [], so we need to use [ and ] instead.
55380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55381   if test "x$has_forbidden_chars" != x; then
55382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55384   fi
55385 
55386 
55387   windows_path="$new_path"
55388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55389     unix_path=`$CYGPATH -u "$windows_path"`
55390     new_path="$unix_path"
55391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55393     new_path="$unix_path"
55394   fi
55395 
55396   if test "x$path" != "x$new_path"; then
55397     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55399 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55400   fi
55401 
55402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55404 
55405     else
55406       # We're on a unix platform. Hooray! :)
55407       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55408       has_space=`$ECHO "$path" | $GREP " "`
55409       if test "x$has_space" != x; then
55410         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55411 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55412         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55413       fi
55414 
55415       # Use eval to expand a potential ~
55416       eval path="$path"
55417       if test ! -f "$path" && test ! -d "$path"; then
55418         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55419       fi
55420 
55421       if test -d "$path"; then
55422         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55423       else
55424         dir="`$DIRNAME "$path"`"
55425         base="`$BASENAME "$path"`"
55426         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55427       fi
55428     fi
55429   fi
55430 
55431 
55432   # Only process if variable expands to non-empty
55433 
55434   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55435     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55436 
55437   # Input might be given as Windows format, start by converting to
55438   # unix format.
55439   path="$POTENTIAL_FREETYPE_LIB_PATH"
55440   new_path=`$CYGPATH -u "$path"`
55441 
55442   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55443   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55444   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55445   # "foo.exe" is OK but "foo" is an error.
55446   #
55447   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55448   # It is also a way to make sure we got the proper file name for the real test later on.
55449   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55450   if test "x$test_shortpath" = x; then
55451     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55452 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55453     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55454   fi
55455 
55456   # Call helper function which possibly converts this using DOS-style short mode.
55457   # If so, the updated path is stored in $new_path.
55458 
55459   input_path="$new_path"
55460   # Check if we need to convert this using DOS-style short mode. If the path
55461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55462   # take no chances and rewrite it.
55463   # Note: m4 eats our [], so we need to use [ and ] instead.
55464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55465   if test "x$has_forbidden_chars" != x; then
55466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55467     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55468     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55469     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55470       # Going to short mode and back again did indeed matter. Since short mode is
55471       # case insensitive, let's make it lowercase to improve readability.
55472       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55473       # Now convert it back to Unix-style (cygpath)
55474       input_path=`$CYGPATH -u "$shortmode_path"`
55475       new_path="$input_path"
55476     fi
55477   fi
55478 
55479   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55480   if test "x$test_cygdrive_prefix" = x; then
55481     # As a simple fix, exclude /usr/bin since it's not a real path.
55482     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55483       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55484       # a path prefixed by /cygdrive for fixpath to work.
55485       new_path="$CYGWIN_ROOT_PATH$input_path"
55486     fi
55487   fi
55488 
55489 
55490   if test "x$path" != "x$new_path"; then
55491     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55492     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55493 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55494   fi
55495 
55496     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55497 
55498   path="$POTENTIAL_FREETYPE_LIB_PATH"
55499   has_colon=`$ECHO $path | $GREP ^.:`
55500   new_path="$path"
55501   if test "x$has_colon" = x; then
55502     # Not in mixed or Windows style, start by that.
55503     new_path=`cmd //c echo $path`
55504   fi
55505 
55506 
55507   input_path="$new_path"
55508   # Check if we need to convert this using DOS-style short mode. If the path
55509   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55510   # take no chances and rewrite it.
55511   # Note: m4 eats our [], so we need to use [ and ] instead.
55512   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55513   if test "x$has_forbidden_chars" != x; then
55514     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55515     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55516   fi
55517 
55518 
55519   windows_path="$new_path"
55520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55521     unix_path=`$CYGPATH -u "$windows_path"`
55522     new_path="$unix_path"
55523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55525     new_path="$unix_path"
55526   fi
55527 
55528   if test "x$path" != "x$new_path"; then
55529     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55530     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55531 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55532   fi
55533 
55534   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55535   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55536 
55537     else
55538       # We're on a unix platform. Hooray! :)
55539       path="$POTENTIAL_FREETYPE_LIB_PATH"
55540       has_space=`$ECHO "$path" | $GREP " "`
55541       if test "x$has_space" != x; then
55542         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55543 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55544         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55545       fi
55546 
55547       # Use eval to expand a potential ~
55548       eval path="$path"
55549       if test ! -f "$path" && test ! -d "$path"; then
55550         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55551       fi
55552 
55553       if test -d "$path"; then
55554         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55555       else
55556         dir="`$DIRNAME "$path"`"
55557         base="`$BASENAME "$path"`"
55558         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55559       fi
55560     fi
55561   fi
55562 
55563 
55564     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55565     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55566 $as_echo_n "checking for freetype includes... " >&6; }
55567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55568 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55569     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55571 $as_echo_n "checking for freetype libraries... " >&6; }
55572     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55573 $as_echo "$FREETYPE_LIB_PATH" >&6; }
55574   fi
55575 
55576             fi
55577             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
55578                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
55579               # Source is available, as a last resort try to build freetype in default location
55580 
55581   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
55582   BUILD_FREETYPE=yes
55583 
55584   # Check if the freetype sources are acessible..
55585   if ! test -d $FREETYPE_SRC_PATH; then
55586     { $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
55587 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
55588     BUILD_FREETYPE=no
55589   fi
55590   # ..and contain a vc2010 project file
55591   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
55592   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
55593     { $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
55594 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
55595     BUILD_FREETYPE=no
55596   fi
55597   # Now check if configure found a version of 'msbuild.exe'
55598   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
55599     { $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
55600 $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;}
55601     BUILD_FREETYPE=no
55602   fi
55603 
55604   # Ready to go..
55605   if test "x$BUILD_FREETYPE" = xyes; then
55606     # msbuild requires trailing slashes for output directories
55607     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
55608     freetype_lib_path_unix="$freetype_lib_path"
55609     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
55610 
55611   unix_path="$vcxproj_path"
55612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55613     windows_path=`$CYGPATH -m "$unix_path"`
55614     vcxproj_path="$windows_path"
55615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55616     windows_path=`cmd //c echo $unix_path`
55617     vcxproj_path="$windows_path"
55618   fi
55619 
55620 
55621   unix_path="$freetype_lib_path"
55622   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55623     windows_path=`$CYGPATH -m "$unix_path"`
55624     freetype_lib_path="$windows_path"
55625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55626     windows_path=`cmd //c echo $unix_path`
55627     freetype_lib_path="$windows_path"
55628   fi
55629 
55630 
55631   unix_path="$freetype_obj_path"
55632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55633     windows_path=`$CYGPATH -m "$unix_path"`
55634     freetype_obj_path="$windows_path"
55635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55636     windows_path=`cmd //c echo $unix_path`
55637     freetype_obj_path="$windows_path"
55638   fi
55639 
55640     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55641       freetype_platform=x64
55642     else
55643       freetype_platform=win32
55644     fi
55645 
55646     # The original freetype project file is for VS 2010 (i.e. 'v100'),
55647     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
55648     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
55649     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
55650     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
55651 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
55652 
55653     # First we try to build the freetype.dll
55654     $ECHO -e "@echo off\n"\
55655         "$MSBUILD $vcxproj_path "\
55656         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55657         "/p:Configuration=\"Release Multithreaded\" "\
55658         "/p:Platform=$freetype_platform "\
55659         "/p:ConfigurationType=DynamicLibrary "\
55660         "/p:TargetName=freetype "\
55661         "/p:OutDir=\"$freetype_lib_path\" "\
55662         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
55663     cmd /c freetype.bat
55664 
55665     if test -s "$freetype_lib_path_unix/freetype.dll"; then
55666       # If that succeeds we also build freetype.lib
55667       $ECHO -e "@echo off\n"\
55668           "$MSBUILD $vcxproj_path "\
55669           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
55670           "/p:Configuration=\"Release Multithreaded\" "\
55671           "/p:Platform=$freetype_platform "\
55672           "/p:ConfigurationType=StaticLibrary "\
55673           "/p:TargetName=freetype "\
55674           "/p:OutDir=\"$freetype_lib_path\" "\
55675           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
55676       cmd /c freetype.bat
55677 
55678       if test -s "$freetype_lib_path_unix/freetype.lib"; then
55679         # Once we build both, lib and dll, set freetype lib and include path appropriately
55680         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
55681         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
55682         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
55683 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
55684       else
55685         BUILD_FREETYPE=no
55686       fi
55687     else
55688       BUILD_FREETYPE=no
55689     fi
55690   fi
55691 
55692               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55693 
55694   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55695   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
55696   METHOD="well-known location"
55697 
55698   # Let's start with an optimistic view of the world :-)
55699   FOUND_FREETYPE=yes
55700 
55701   # First look for the canonical freetype main include file ft2build.h.
55702   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55703     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55704     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55705     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55706       # Fail.
55707       FOUND_FREETYPE=no
55708     fi
55709   fi
55710 
55711   if test "x$FOUND_FREETYPE" = xyes; then
55712     # Include file found, let's continue the sanity check.
55713     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55714 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55715 
55716     # Reset to default value
55717     FREETYPE_BASE_NAME=freetype
55718     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55719     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55720       if test "x$OPENJDK_TARGET_OS" = xmacosx \
55721           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55722         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55723         # for the .6 version explicitly.
55724         FREETYPE_BASE_NAME=freetype.6
55725         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55726         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55727 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55728       else
55729         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55730 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55731         FOUND_FREETYPE=no
55732       fi
55733     else
55734       if test "x$OPENJDK_TARGET_OS" = xwindows; then
55735         # On Windows, we will need both .lib and .dll file.
55736         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55737           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55738 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55739           FOUND_FREETYPE=no
55740         fi
55741       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55742           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55743         # Found lib in isa dir, use that instead.
55744         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55745         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55746 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55747       fi
55748     fi
55749   fi
55750 
55751   if test "x$FOUND_FREETYPE" = xyes; then
55752 
55753   # Only process if variable expands to non-empty
55754 
55755   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55756     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55757 
55758   # Input might be given as Windows format, start by converting to
55759   # unix format.
55760   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55761   new_path=`$CYGPATH -u "$path"`
55762 
55763   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55764   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55765   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55766   # "foo.exe" is OK but "foo" is an error.
55767   #
55768   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55769   # It is also a way to make sure we got the proper file name for the real test later on.
55770   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55771   if test "x$test_shortpath" = x; then
55772     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55773 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55774     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55775   fi
55776 
55777   # Call helper function which possibly converts this using DOS-style short mode.
55778   # If so, the updated path is stored in $new_path.
55779 
55780   input_path="$new_path"
55781   # Check if we need to convert this using DOS-style short mode. If the path
55782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55783   # take no chances and rewrite it.
55784   # Note: m4 eats our [], so we need to use [ and ] instead.
55785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55786   if test "x$has_forbidden_chars" != x; then
55787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55788     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55789     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55790     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55791       # Going to short mode and back again did indeed matter. Since short mode is
55792       # case insensitive, let's make it lowercase to improve readability.
55793       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55794       # Now convert it back to Unix-style (cygpath)
55795       input_path=`$CYGPATH -u "$shortmode_path"`
55796       new_path="$input_path"
55797     fi
55798   fi
55799 
55800   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55801   if test "x$test_cygdrive_prefix" = x; then
55802     # As a simple fix, exclude /usr/bin since it's not a real path.
55803     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55804       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55805       # a path prefixed by /cygdrive for fixpath to work.
55806       new_path="$CYGWIN_ROOT_PATH$input_path"
55807     fi
55808   fi
55809 
55810 
55811   if test "x$path" != "x$new_path"; then
55812     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55813     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55814 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55815   fi
55816 
55817     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55818 
55819   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55820   has_colon=`$ECHO $path | $GREP ^.:`
55821   new_path="$path"
55822   if test "x$has_colon" = x; then
55823     # Not in mixed or Windows style, start by that.
55824     new_path=`cmd //c echo $path`
55825   fi
55826 
55827 
55828   input_path="$new_path"
55829   # Check if we need to convert this using DOS-style short mode. If the path
55830   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55831   # take no chances and rewrite it.
55832   # Note: m4 eats our [], so we need to use [ and ] instead.
55833   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55834   if test "x$has_forbidden_chars" != x; then
55835     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55836     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55837   fi
55838 
55839 
55840   windows_path="$new_path"
55841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55842     unix_path=`$CYGPATH -u "$windows_path"`
55843     new_path="$unix_path"
55844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55846     new_path="$unix_path"
55847   fi
55848 
55849   if test "x$path" != "x$new_path"; then
55850     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55852 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55853   fi
55854 
55855   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55856   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55857 
55858     else
55859       # We're on a unix platform. Hooray! :)
55860       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55861       has_space=`$ECHO "$path" | $GREP " "`
55862       if test "x$has_space" != x; then
55863         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55864 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55865         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55866       fi
55867 
55868       # Use eval to expand a potential ~
55869       eval path="$path"
55870       if test ! -f "$path" && test ! -d "$path"; then
55871         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55872       fi
55873 
55874       if test -d "$path"; then
55875         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55876       else
55877         dir="`$DIRNAME "$path"`"
55878         base="`$BASENAME "$path"`"
55879         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55880       fi
55881     fi
55882   fi
55883 
55884 
55885   # Only process if variable expands to non-empty
55886 
55887   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55888     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55889 
55890   # Input might be given as Windows format, start by converting to
55891   # unix format.
55892   path="$POTENTIAL_FREETYPE_LIB_PATH"
55893   new_path=`$CYGPATH -u "$path"`
55894 
55895   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55896   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55897   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55898   # "foo.exe" is OK but "foo" is an error.
55899   #
55900   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55901   # It is also a way to make sure we got the proper file name for the real test later on.
55902   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55903   if test "x$test_shortpath" = x; then
55904     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55905 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55906     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55907   fi
55908 
55909   # Call helper function which possibly converts this using DOS-style short mode.
55910   # If so, the updated path is stored in $new_path.
55911 
55912   input_path="$new_path"
55913   # Check if we need to convert this using DOS-style short mode. If the path
55914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55915   # take no chances and rewrite it.
55916   # Note: m4 eats our [], so we need to use [ and ] instead.
55917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55918   if test "x$has_forbidden_chars" != x; then
55919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55920     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55921     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55922     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55923       # Going to short mode and back again did indeed matter. Since short mode is
55924       # case insensitive, let's make it lowercase to improve readability.
55925       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55926       # Now convert it back to Unix-style (cygpath)
55927       input_path=`$CYGPATH -u "$shortmode_path"`
55928       new_path="$input_path"
55929     fi
55930   fi
55931 
55932   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55933   if test "x$test_cygdrive_prefix" = x; then
55934     # As a simple fix, exclude /usr/bin since it's not a real path.
55935     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55936       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55937       # a path prefixed by /cygdrive for fixpath to work.
55938       new_path="$CYGWIN_ROOT_PATH$input_path"
55939     fi
55940   fi
55941 
55942 
55943   if test "x$path" != "x$new_path"; then
55944     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55946 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55947   fi
55948 
55949     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55950 
55951   path="$POTENTIAL_FREETYPE_LIB_PATH"
55952   has_colon=`$ECHO $path | $GREP ^.:`
55953   new_path="$path"
55954   if test "x$has_colon" = x; then
55955     # Not in mixed or Windows style, start by that.
55956     new_path=`cmd //c echo $path`
55957   fi
55958 
55959 
55960   input_path="$new_path"
55961   # Check if we need to convert this using DOS-style short mode. If the path
55962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55963   # take no chances and rewrite it.
55964   # Note: m4 eats our [], so we need to use [ and ] instead.
55965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55966   if test "x$has_forbidden_chars" != x; then
55967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55968     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55969   fi
55970 
55971 
55972   windows_path="$new_path"
55973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55974     unix_path=`$CYGPATH -u "$windows_path"`
55975     new_path="$unix_path"
55976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55978     new_path="$unix_path"
55979   fi
55980 
55981   if test "x$path" != "x$new_path"; then
55982     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55983     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55984 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55985   fi
55986 
55987   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55988   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55989 
55990     else
55991       # We're on a unix platform. Hooray! :)
55992       path="$POTENTIAL_FREETYPE_LIB_PATH"
55993       has_space=`$ECHO "$path" | $GREP " "`
55994       if test "x$has_space" != x; then
55995         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55996 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55997         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55998       fi
55999 
56000       # Use eval to expand a potential ~
56001       eval path="$path"
56002       if test ! -f "$path" && test ! -d "$path"; then
56003         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56004       fi
56005 
56006       if test -d "$path"; then
56007         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56008       else
56009         dir="`$DIRNAME "$path"`"
56010         base="`$BASENAME "$path"`"
56011         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56012       fi
56013     fi
56014   fi
56015 
56016 
56017     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56018     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56019 $as_echo_n "checking for freetype includes... " >&6; }
56020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56021 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56022     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56023     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56024 $as_echo_n "checking for freetype libraries... " >&6; }
56025     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56026 $as_echo "$FREETYPE_LIB_PATH" >&6; }
56027   fi
56028 
56029               else
56030 
56031   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56032   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
56033   METHOD="well-known location"
56034 
56035   # Let's start with an optimistic view of the world :-)
56036   FOUND_FREETYPE=yes
56037 
56038   # First look for the canonical freetype main include file ft2build.h.
56039   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56040     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56041     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56042     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56043       # Fail.
56044       FOUND_FREETYPE=no
56045     fi
56046   fi
56047 
56048   if test "x$FOUND_FREETYPE" = xyes; then
56049     # Include file found, let's continue the sanity check.
56050     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56051 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56052 
56053     # Reset to default value
56054     FREETYPE_BASE_NAME=freetype
56055     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56056     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56057       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56058           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56059         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56060         # for the .6 version explicitly.
56061         FREETYPE_BASE_NAME=freetype.6
56062         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56063         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56064 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56065       else
56066         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56067 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56068         FOUND_FREETYPE=no
56069       fi
56070     else
56071       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56072         # On Windows, we will need both .lib and .dll file.
56073         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56074           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56075 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56076           FOUND_FREETYPE=no
56077         fi
56078       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56079           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56080         # Found lib in isa dir, use that instead.
56081         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56082         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56083 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56084       fi
56085     fi
56086   fi
56087 
56088   if test "x$FOUND_FREETYPE" = xyes; then
56089 
56090   # Only process if variable expands to non-empty
56091 
56092   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56093     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56094 
56095   # Input might be given as Windows format, start by converting to
56096   # unix format.
56097   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56098   new_path=`$CYGPATH -u "$path"`
56099 
56100   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56101   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56102   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56103   # "foo.exe" is OK but "foo" is an error.
56104   #
56105   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56106   # It is also a way to make sure we got the proper file name for the real test later on.
56107   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56108   if test "x$test_shortpath" = x; then
56109     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56110 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56111     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56112   fi
56113 
56114   # Call helper function which possibly converts this using DOS-style short mode.
56115   # If so, the updated path is stored in $new_path.
56116 
56117   input_path="$new_path"
56118   # Check if we need to convert this using DOS-style short mode. If the path
56119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56120   # take no chances and rewrite it.
56121   # Note: m4 eats our [], so we need to use [ and ] instead.
56122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56123   if test "x$has_forbidden_chars" != x; then
56124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56125     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56126     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56127     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56128       # Going to short mode and back again did indeed matter. Since short mode is
56129       # case insensitive, let's make it lowercase to improve readability.
56130       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56131       # Now convert it back to Unix-style (cygpath)
56132       input_path=`$CYGPATH -u "$shortmode_path"`
56133       new_path="$input_path"
56134     fi
56135   fi
56136 
56137   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56138   if test "x$test_cygdrive_prefix" = x; then
56139     # As a simple fix, exclude /usr/bin since it's not a real path.
56140     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56141       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56142       # a path prefixed by /cygdrive for fixpath to work.
56143       new_path="$CYGWIN_ROOT_PATH$input_path"
56144     fi
56145   fi
56146 
56147 
56148   if test "x$path" != "x$new_path"; then
56149     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56151 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56152   fi
56153 
56154     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56155 
56156   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56157   has_colon=`$ECHO $path | $GREP ^.:`
56158   new_path="$path"
56159   if test "x$has_colon" = x; then
56160     # Not in mixed or Windows style, start by that.
56161     new_path=`cmd //c echo $path`
56162   fi
56163 
56164 
56165   input_path="$new_path"
56166   # Check if we need to convert this using DOS-style short mode. If the path
56167   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56168   # take no chances and rewrite it.
56169   # Note: m4 eats our [], so we need to use [ and ] instead.
56170   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56171   if test "x$has_forbidden_chars" != x; then
56172     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56173     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56174   fi
56175 
56176 
56177   windows_path="$new_path"
56178   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56179     unix_path=`$CYGPATH -u "$windows_path"`
56180     new_path="$unix_path"
56181   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56182     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56183     new_path="$unix_path"
56184   fi
56185 
56186   if test "x$path" != "x$new_path"; then
56187     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56188     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56189 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56190   fi
56191 
56192   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56193   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56194 
56195     else
56196       # We're on a unix platform. Hooray! :)
56197       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56198       has_space=`$ECHO "$path" | $GREP " "`
56199       if test "x$has_space" != x; then
56200         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56201 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56202         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56203       fi
56204 
56205       # Use eval to expand a potential ~
56206       eval path="$path"
56207       if test ! -f "$path" && test ! -d "$path"; then
56208         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56209       fi
56210 
56211       if test -d "$path"; then
56212         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56213       else
56214         dir="`$DIRNAME "$path"`"
56215         base="`$BASENAME "$path"`"
56216         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56217       fi
56218     fi
56219   fi
56220 
56221 
56222   # Only process if variable expands to non-empty
56223 
56224   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56225     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56226 
56227   # Input might be given as Windows format, start by converting to
56228   # unix format.
56229   path="$POTENTIAL_FREETYPE_LIB_PATH"
56230   new_path=`$CYGPATH -u "$path"`
56231 
56232   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56233   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56234   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56235   # "foo.exe" is OK but "foo" is an error.
56236   #
56237   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56238   # It is also a way to make sure we got the proper file name for the real test later on.
56239   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56240   if test "x$test_shortpath" = x; then
56241     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56242 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56243     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56244   fi
56245 
56246   # Call helper function which possibly converts this using DOS-style short mode.
56247   # If so, the updated path is stored in $new_path.
56248 
56249   input_path="$new_path"
56250   # Check if we need to convert this using DOS-style short mode. If the path
56251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56252   # take no chances and rewrite it.
56253   # Note: m4 eats our [], so we need to use [ and ] instead.
56254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56255   if test "x$has_forbidden_chars" != x; then
56256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56257     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56258     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56259     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56260       # Going to short mode and back again did indeed matter. Since short mode is
56261       # case insensitive, let's make it lowercase to improve readability.
56262       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56263       # Now convert it back to Unix-style (cygpath)
56264       input_path=`$CYGPATH -u "$shortmode_path"`
56265       new_path="$input_path"
56266     fi
56267   fi
56268 
56269   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56270   if test "x$test_cygdrive_prefix" = x; then
56271     # As a simple fix, exclude /usr/bin since it's not a real path.
56272     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56273       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56274       # a path prefixed by /cygdrive for fixpath to work.
56275       new_path="$CYGWIN_ROOT_PATH$input_path"
56276     fi
56277   fi
56278 
56279 
56280   if test "x$path" != "x$new_path"; then
56281     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56283 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56284   fi
56285 
56286     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56287 
56288   path="$POTENTIAL_FREETYPE_LIB_PATH"
56289   has_colon=`$ECHO $path | $GREP ^.:`
56290   new_path="$path"
56291   if test "x$has_colon" = x; then
56292     # Not in mixed or Windows style, start by that.
56293     new_path=`cmd //c echo $path`
56294   fi
56295 
56296 
56297   input_path="$new_path"
56298   # Check if we need to convert this using DOS-style short mode. If the path
56299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56300   # take no chances and rewrite it.
56301   # Note: m4 eats our [], so we need to use [ and ] instead.
56302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56303   if test "x$has_forbidden_chars" != x; then
56304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56305     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56306   fi
56307 
56308 
56309   windows_path="$new_path"
56310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56311     unix_path=`$CYGPATH -u "$windows_path"`
56312     new_path="$unix_path"
56313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56315     new_path="$unix_path"
56316   fi
56317 
56318   if test "x$path" != "x$new_path"; then
56319     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56321 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56322   fi
56323 
56324   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56325   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56326 
56327     else
56328       # We're on a unix platform. Hooray! :)
56329       path="$POTENTIAL_FREETYPE_LIB_PATH"
56330       has_space=`$ECHO "$path" | $GREP " "`
56331       if test "x$has_space" != x; then
56332         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56333 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56334         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56335       fi
56336 
56337       # Use eval to expand a potential ~
56338       eval path="$path"
56339       if test ! -f "$path" && test ! -d "$path"; then
56340         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56341       fi
56342 
56343       if test -d "$path"; then
56344         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56345       else
56346         dir="`$DIRNAME "$path"`"
56347         base="`$BASENAME "$path"`"
56348         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56349       fi
56350     fi
56351   fi
56352 
56353 
56354     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56355     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56356 $as_echo_n "checking for freetype includes... " >&6; }
56357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56358 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56359     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56360     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56361 $as_echo_n "checking for freetype libraries... " >&6; }
56362     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56363 $as_echo "$FREETYPE_LIB_PATH" >&6; }
56364   fi
56365 
56366               fi
56367             fi
56368           fi
56369         else
56370           FREETYPE_BASE_DIR="$SYSROOT/usr"
56371 
56372   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56373   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56374   METHOD="well-known location"
56375 
56376   # Let's start with an optimistic view of the world :-)
56377   FOUND_FREETYPE=yes
56378 
56379   # First look for the canonical freetype main include file ft2build.h.
56380   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56381     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56382     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56383     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56384       # Fail.
56385       FOUND_FREETYPE=no
56386     fi
56387   fi
56388 
56389   if test "x$FOUND_FREETYPE" = xyes; then
56390     # Include file found, let's continue the sanity check.
56391     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56392 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56393 
56394     # Reset to default value
56395     FREETYPE_BASE_NAME=freetype
56396     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56397     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56398       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56399           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56400         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56401         # for the .6 version explicitly.
56402         FREETYPE_BASE_NAME=freetype.6
56403         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56404         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56405 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56406       else
56407         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56408 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56409         FOUND_FREETYPE=no
56410       fi
56411     else
56412       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56413         # On Windows, we will need both .lib and .dll file.
56414         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56415           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56416 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56417           FOUND_FREETYPE=no
56418         fi
56419       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56420           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56421         # Found lib in isa dir, use that instead.
56422         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56423         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56424 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56425       fi
56426     fi
56427   fi
56428 
56429   if test "x$FOUND_FREETYPE" = xyes; then
56430 
56431   # Only process if variable expands to non-empty
56432 
56433   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56434     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56435 
56436   # Input might be given as Windows format, start by converting to
56437   # unix format.
56438   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56439   new_path=`$CYGPATH -u "$path"`
56440 
56441   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56442   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56443   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56444   # "foo.exe" is OK but "foo" is an error.
56445   #
56446   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56447   # It is also a way to make sure we got the proper file name for the real test later on.
56448   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56449   if test "x$test_shortpath" = x; then
56450     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56451 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56452     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56453   fi
56454 
56455   # Call helper function which possibly converts this using DOS-style short mode.
56456   # If so, the updated path is stored in $new_path.
56457 
56458   input_path="$new_path"
56459   # Check if we need to convert this using DOS-style short mode. If the path
56460   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56461   # take no chances and rewrite it.
56462   # Note: m4 eats our [], so we need to use [ and ] instead.
56463   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56464   if test "x$has_forbidden_chars" != x; then
56465     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56466     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56467     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56468     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56469       # Going to short mode and back again did indeed matter. Since short mode is
56470       # case insensitive, let's make it lowercase to improve readability.
56471       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56472       # Now convert it back to Unix-style (cygpath)
56473       input_path=`$CYGPATH -u "$shortmode_path"`
56474       new_path="$input_path"
56475     fi
56476   fi
56477 
56478   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56479   if test "x$test_cygdrive_prefix" = x; then
56480     # As a simple fix, exclude /usr/bin since it's not a real path.
56481     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56482       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56483       # a path prefixed by /cygdrive for fixpath to work.
56484       new_path="$CYGWIN_ROOT_PATH$input_path"
56485     fi
56486   fi
56487 
56488 
56489   if test "x$path" != "x$new_path"; then
56490     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56491     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56492 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56493   fi
56494 
56495     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56496 
56497   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56498   has_colon=`$ECHO $path | $GREP ^.:`
56499   new_path="$path"
56500   if test "x$has_colon" = x; then
56501     # Not in mixed or Windows style, start by that.
56502     new_path=`cmd //c echo $path`
56503   fi
56504 
56505 
56506   input_path="$new_path"
56507   # Check if we need to convert this using DOS-style short mode. If the path
56508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56509   # take no chances and rewrite it.
56510   # Note: m4 eats our [], so we need to use [ and ] instead.
56511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56512   if test "x$has_forbidden_chars" != x; then
56513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56514     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56515   fi
56516 
56517 
56518   windows_path="$new_path"
56519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56520     unix_path=`$CYGPATH -u "$windows_path"`
56521     new_path="$unix_path"
56522   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56523     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56524     new_path="$unix_path"
56525   fi
56526 
56527   if test "x$path" != "x$new_path"; then
56528     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56530 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56531   fi
56532 
56533   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56534   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56535 
56536     else
56537       # We're on a unix platform. Hooray! :)
56538       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56539       has_space=`$ECHO "$path" | $GREP " "`
56540       if test "x$has_space" != x; then
56541         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56542 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56543         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56544       fi
56545 
56546       # Use eval to expand a potential ~
56547       eval path="$path"
56548       if test ! -f "$path" && test ! -d "$path"; then
56549         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56550       fi
56551 
56552       if test -d "$path"; then
56553         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56554       else
56555         dir="`$DIRNAME "$path"`"
56556         base="`$BASENAME "$path"`"
56557         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56558       fi
56559     fi
56560   fi
56561 
56562 
56563   # Only process if variable expands to non-empty
56564 
56565   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56566     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56567 
56568   # Input might be given as Windows format, start by converting to
56569   # unix format.
56570   path="$POTENTIAL_FREETYPE_LIB_PATH"
56571   new_path=`$CYGPATH -u "$path"`
56572 
56573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56576   # "foo.exe" is OK but "foo" is an error.
56577   #
56578   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56579   # It is also a way to make sure we got the proper file name for the real test later on.
56580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56581   if test "x$test_shortpath" = x; then
56582     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56583 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56584     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56585   fi
56586 
56587   # Call helper function which possibly converts this using DOS-style short mode.
56588   # If so, the updated path is stored in $new_path.
56589 
56590   input_path="$new_path"
56591   # Check if we need to convert this using DOS-style short mode. If the path
56592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56593   # take no chances and rewrite it.
56594   # Note: m4 eats our [], so we need to use [ and ] instead.
56595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56596   if test "x$has_forbidden_chars" != x; then
56597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56601       # Going to short mode and back again did indeed matter. Since short mode is
56602       # case insensitive, let's make it lowercase to improve readability.
56603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56604       # Now convert it back to Unix-style (cygpath)
56605       input_path=`$CYGPATH -u "$shortmode_path"`
56606       new_path="$input_path"
56607     fi
56608   fi
56609 
56610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56611   if test "x$test_cygdrive_prefix" = x; then
56612     # As a simple fix, exclude /usr/bin since it's not a real path.
56613     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56615       # a path prefixed by /cygdrive for fixpath to work.
56616       new_path="$CYGWIN_ROOT_PATH$input_path"
56617     fi
56618   fi
56619 
56620 
56621   if test "x$path" != "x$new_path"; then
56622     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56623     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56624 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56625   fi
56626 
56627     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56628 
56629   path="$POTENTIAL_FREETYPE_LIB_PATH"
56630   has_colon=`$ECHO $path | $GREP ^.:`
56631   new_path="$path"
56632   if test "x$has_colon" = x; then
56633     # Not in mixed or Windows style, start by that.
56634     new_path=`cmd //c echo $path`
56635   fi
56636 
56637 
56638   input_path="$new_path"
56639   # Check if we need to convert this using DOS-style short mode. If the path
56640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56641   # take no chances and rewrite it.
56642   # Note: m4 eats our [], so we need to use [ and ] instead.
56643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56644   if test "x$has_forbidden_chars" != x; then
56645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56646     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56647   fi
56648 
56649 
56650   windows_path="$new_path"
56651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56652     unix_path=`$CYGPATH -u "$windows_path"`
56653     new_path="$unix_path"
56654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56656     new_path="$unix_path"
56657   fi
56658 
56659   if test "x$path" != "x$new_path"; then
56660     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56661     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56662 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56663   fi
56664 
56665   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56666   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56667 
56668     else
56669       # We're on a unix platform. Hooray! :)
56670       path="$POTENTIAL_FREETYPE_LIB_PATH"
56671       has_space=`$ECHO "$path" | $GREP " "`
56672       if test "x$has_space" != x; then
56673         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56674 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56675         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56676       fi
56677 
56678       # Use eval to expand a potential ~
56679       eval path="$path"
56680       if test ! -f "$path" && test ! -d "$path"; then
56681         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56682       fi
56683 
56684       if test -d "$path"; then
56685         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56686       else
56687         dir="`$DIRNAME "$path"`"
56688         base="`$BASENAME "$path"`"
56689         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56690       fi
56691     fi
56692   fi
56693 
56694 
56695     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56696     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56697 $as_echo_n "checking for freetype includes... " >&6; }
56698     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56699 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56700     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56701     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56702 $as_echo_n "checking for freetype libraries... " >&6; }
56703     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56704 $as_echo "$FREETYPE_LIB_PATH" >&6; }
56705   fi
56706 
56707 
56708           if test "x$FOUND_FREETYPE" != xyes; then
56709             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
56710 
56711   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56712   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56713   METHOD="well-known location"
56714 
56715   # Let's start with an optimistic view of the world :-)
56716   FOUND_FREETYPE=yes
56717 
56718   # First look for the canonical freetype main include file ft2build.h.
56719   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56720     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56721     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56722     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56723       # Fail.
56724       FOUND_FREETYPE=no
56725     fi
56726   fi
56727 
56728   if test "x$FOUND_FREETYPE" = xyes; then
56729     # Include file found, let's continue the sanity check.
56730     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56731 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56732 
56733     # Reset to default value
56734     FREETYPE_BASE_NAME=freetype
56735     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56736     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56737       if test "x$OPENJDK_TARGET_OS" = xmacosx \
56738           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56739         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56740         # for the .6 version explicitly.
56741         FREETYPE_BASE_NAME=freetype.6
56742         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56743         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56744 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56745       else
56746         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56747 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56748         FOUND_FREETYPE=no
56749       fi
56750     else
56751       if test "x$OPENJDK_TARGET_OS" = xwindows; then
56752         # On Windows, we will need both .lib and .dll file.
56753         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56754           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56755 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56756           FOUND_FREETYPE=no
56757         fi
56758       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56759           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56760         # Found lib in isa dir, use that instead.
56761         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56762         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56763 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56764       fi
56765     fi
56766   fi
56767 
56768   if test "x$FOUND_FREETYPE" = xyes; then
56769 
56770   # Only process if variable expands to non-empty
56771 
56772   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56773     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56774 
56775   # Input might be given as Windows format, start by converting to
56776   # unix format.
56777   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56778   new_path=`$CYGPATH -u "$path"`
56779 
56780   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56781   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56782   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56783   # "foo.exe" is OK but "foo" is an error.
56784   #
56785   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56786   # It is also a way to make sure we got the proper file name for the real test later on.
56787   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56788   if test "x$test_shortpath" = x; then
56789     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56790 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56791     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56792   fi
56793 
56794   # Call helper function which possibly converts this using DOS-style short mode.
56795   # If so, the updated path is stored in $new_path.
56796 
56797   input_path="$new_path"
56798   # Check if we need to convert this using DOS-style short mode. If the path
56799   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56800   # take no chances and rewrite it.
56801   # Note: m4 eats our [], so we need to use [ and ] instead.
56802   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56803   if test "x$has_forbidden_chars" != x; then
56804     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56805     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56806     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56807     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56808       # Going to short mode and back again did indeed matter. Since short mode is
56809       # case insensitive, let's make it lowercase to improve readability.
56810       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56811       # Now convert it back to Unix-style (cygpath)
56812       input_path=`$CYGPATH -u "$shortmode_path"`
56813       new_path="$input_path"
56814     fi
56815   fi
56816 
56817   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56818   if test "x$test_cygdrive_prefix" = x; then
56819     # As a simple fix, exclude /usr/bin since it's not a real path.
56820     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56821       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56822       # a path prefixed by /cygdrive for fixpath to work.
56823       new_path="$CYGWIN_ROOT_PATH$input_path"
56824     fi
56825   fi
56826 
56827 
56828   if test "x$path" != "x$new_path"; then
56829     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56831 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56832   fi
56833 
56834     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56835 
56836   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56837   has_colon=`$ECHO $path | $GREP ^.:`
56838   new_path="$path"
56839   if test "x$has_colon" = x; then
56840     # Not in mixed or Windows style, start by that.
56841     new_path=`cmd //c echo $path`
56842   fi
56843 
56844 
56845   input_path="$new_path"
56846   # Check if we need to convert this using DOS-style short mode. If the path
56847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56848   # take no chances and rewrite it.
56849   # Note: m4 eats our [], so we need to use [ and ] instead.
56850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56851   if test "x$has_forbidden_chars" != x; then
56852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56853     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56854   fi
56855 
56856 
56857   windows_path="$new_path"
56858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56859     unix_path=`$CYGPATH -u "$windows_path"`
56860     new_path="$unix_path"
56861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56862     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56863     new_path="$unix_path"
56864   fi
56865 
56866   if test "x$path" != "x$new_path"; then
56867     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56868     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56869 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56870   fi
56871 
56872   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56873   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56874 
56875     else
56876       # We're on a unix platform. Hooray! :)
56877       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56878       has_space=`$ECHO "$path" | $GREP " "`
56879       if test "x$has_space" != x; then
56880         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56881 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56882         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56883       fi
56884 
56885       # Use eval to expand a potential ~
56886       eval path="$path"
56887       if test ! -f "$path" && test ! -d "$path"; then
56888         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56889       fi
56890 
56891       if test -d "$path"; then
56892         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56893       else
56894         dir="`$DIRNAME "$path"`"
56895         base="`$BASENAME "$path"`"
56896         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56897       fi
56898     fi
56899   fi
56900 
56901 
56902   # Only process if variable expands to non-empty
56903 
56904   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56905     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56906 
56907   # Input might be given as Windows format, start by converting to
56908   # unix format.
56909   path="$POTENTIAL_FREETYPE_LIB_PATH"
56910   new_path=`$CYGPATH -u "$path"`
56911 
56912   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56913   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56914   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56915   # "foo.exe" is OK but "foo" is an error.
56916   #
56917   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56918   # It is also a way to make sure we got the proper file name for the real test later on.
56919   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56920   if test "x$test_shortpath" = x; then
56921     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56922 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56923     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56924   fi
56925 
56926   # Call helper function which possibly converts this using DOS-style short mode.
56927   # If so, the updated path is stored in $new_path.
56928 
56929   input_path="$new_path"
56930   # Check if we need to convert this using DOS-style short mode. If the path
56931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56932   # take no chances and rewrite it.
56933   # Note: m4 eats our [], so we need to use [ and ] instead.
56934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56935   if test "x$has_forbidden_chars" != x; then
56936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56940       # Going to short mode and back again did indeed matter. Since short mode is
56941       # case insensitive, let's make it lowercase to improve readability.
56942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56943       # Now convert it back to Unix-style (cygpath)
56944       input_path=`$CYGPATH -u "$shortmode_path"`
56945       new_path="$input_path"
56946     fi
56947   fi
56948 
56949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56950   if test "x$test_cygdrive_prefix" = x; then
56951     # As a simple fix, exclude /usr/bin since it's not a real path.
56952     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56954       # a path prefixed by /cygdrive for fixpath to work.
56955       new_path="$CYGWIN_ROOT_PATH$input_path"
56956     fi
56957   fi
56958 
56959 
56960   if test "x$path" != "x$new_path"; then
56961     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56963 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56964   fi
56965 
56966     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56967 
56968   path="$POTENTIAL_FREETYPE_LIB_PATH"
56969   has_colon=`$ECHO $path | $GREP ^.:`
56970   new_path="$path"
56971   if test "x$has_colon" = x; then
56972     # Not in mixed or Windows style, start by that.
56973     new_path=`cmd //c echo $path`
56974   fi
56975 
56976 
56977   input_path="$new_path"
56978   # Check if we need to convert this using DOS-style short mode. If the path
56979   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56980   # take no chances and rewrite it.
56981   # Note: m4 eats our [], so we need to use [ and ] instead.
56982   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56983   if test "x$has_forbidden_chars" != x; then
56984     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56985     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56986   fi
56987 
56988 
56989   windows_path="$new_path"
56990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56991     unix_path=`$CYGPATH -u "$windows_path"`
56992     new_path="$unix_path"
56993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56994     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56995     new_path="$unix_path"
56996   fi
56997 
56998   if test "x$path" != "x$new_path"; then
56999     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57000     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57001 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57002   fi
57003 
57004   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57005   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57006 
57007     else
57008       # We're on a unix platform. Hooray! :)
57009       path="$POTENTIAL_FREETYPE_LIB_PATH"
57010       has_space=`$ECHO "$path" | $GREP " "`
57011       if test "x$has_space" != x; then
57012         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57013 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57014         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57015       fi
57016 
57017       # Use eval to expand a potential ~
57018       eval path="$path"
57019       if test ! -f "$path" && test ! -d "$path"; then
57020         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57021       fi
57022 
57023       if test -d "$path"; then
57024         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57025       else
57026         dir="`$DIRNAME "$path"`"
57027         base="`$BASENAME "$path"`"
57028         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57029       fi
57030     fi
57031   fi
57032 
57033 
57034     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57036 $as_echo_n "checking for freetype includes... " >&6; }
57037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57038 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57039     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57041 $as_echo_n "checking for freetype libraries... " >&6; }
57042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57043 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57044   fi
57045 
57046           fi
57047 
57048           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
57049             if test "x$FOUND_FREETYPE" != xyes; then
57050               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
57051               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
57052 
57053   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57054   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57055   METHOD="well-known location"
57056 
57057   # Let's start with an optimistic view of the world :-)
57058   FOUND_FREETYPE=yes
57059 
57060   # First look for the canonical freetype main include file ft2build.h.
57061   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57062     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57063     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57064     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57065       # Fail.
57066       FOUND_FREETYPE=no
57067     fi
57068   fi
57069 
57070   if test "x$FOUND_FREETYPE" = xyes; then
57071     # Include file found, let's continue the sanity check.
57072     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57073 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57074 
57075     # Reset to default value
57076     FREETYPE_BASE_NAME=freetype
57077     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57078     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57079       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57080           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57081         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57082         # for the .6 version explicitly.
57083         FREETYPE_BASE_NAME=freetype.6
57084         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57085         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57086 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57087       else
57088         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57089 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57090         FOUND_FREETYPE=no
57091       fi
57092     else
57093       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57094         # On Windows, we will need both .lib and .dll file.
57095         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57096           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57097 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57098           FOUND_FREETYPE=no
57099         fi
57100       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57101           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57102         # Found lib in isa dir, use that instead.
57103         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57104         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57105 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57106       fi
57107     fi
57108   fi
57109 
57110   if test "x$FOUND_FREETYPE" = xyes; then
57111 
57112   # Only process if variable expands to non-empty
57113 
57114   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57115     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57116 
57117   # Input might be given as Windows format, start by converting to
57118   # unix format.
57119   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57120   new_path=`$CYGPATH -u "$path"`
57121 
57122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57125   # "foo.exe" is OK but "foo" is an error.
57126   #
57127   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57128   # It is also a way to make sure we got the proper file name for the real test later on.
57129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57130   if test "x$test_shortpath" = x; then
57131     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57132 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57133     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57134   fi
57135 
57136   # Call helper function which possibly converts this using DOS-style short mode.
57137   # If so, the updated path is stored in $new_path.
57138 
57139   input_path="$new_path"
57140   # Check if we need to convert this using DOS-style short mode. If the path
57141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57142   # take no chances and rewrite it.
57143   # Note: m4 eats our [], so we need to use [ and ] instead.
57144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57145   if test "x$has_forbidden_chars" != x; then
57146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57150       # Going to short mode and back again did indeed matter. Since short mode is
57151       # case insensitive, let's make it lowercase to improve readability.
57152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57153       # Now convert it back to Unix-style (cygpath)
57154       input_path=`$CYGPATH -u "$shortmode_path"`
57155       new_path="$input_path"
57156     fi
57157   fi
57158 
57159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57160   if test "x$test_cygdrive_prefix" = x; then
57161     # As a simple fix, exclude /usr/bin since it's not a real path.
57162     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57164       # a path prefixed by /cygdrive for fixpath to work.
57165       new_path="$CYGWIN_ROOT_PATH$input_path"
57166     fi
57167   fi
57168 
57169 
57170   if test "x$path" != "x$new_path"; then
57171     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57173 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57174   fi
57175 
57176     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57177 
57178   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57179   has_colon=`$ECHO $path | $GREP ^.:`
57180   new_path="$path"
57181   if test "x$has_colon" = x; then
57182     # Not in mixed or Windows style, start by that.
57183     new_path=`cmd //c echo $path`
57184   fi
57185 
57186 
57187   input_path="$new_path"
57188   # Check if we need to convert this using DOS-style short mode. If the path
57189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57190   # take no chances and rewrite it.
57191   # Note: m4 eats our [], so we need to use [ and ] instead.
57192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57193   if test "x$has_forbidden_chars" != x; then
57194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57196   fi
57197 
57198 
57199   windows_path="$new_path"
57200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57201     unix_path=`$CYGPATH -u "$windows_path"`
57202     new_path="$unix_path"
57203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57205     new_path="$unix_path"
57206   fi
57207 
57208   if test "x$path" != "x$new_path"; then
57209     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57211 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57212   fi
57213 
57214   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57215   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57216 
57217     else
57218       # We're on a unix platform. Hooray! :)
57219       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57220       has_space=`$ECHO "$path" | $GREP " "`
57221       if test "x$has_space" != x; then
57222         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57223 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57224         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57225       fi
57226 
57227       # Use eval to expand a potential ~
57228       eval path="$path"
57229       if test ! -f "$path" && test ! -d "$path"; then
57230         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57231       fi
57232 
57233       if test -d "$path"; then
57234         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57235       else
57236         dir="`$DIRNAME "$path"`"
57237         base="`$BASENAME "$path"`"
57238         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57239       fi
57240     fi
57241   fi
57242 
57243 
57244   # Only process if variable expands to non-empty
57245 
57246   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57247     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57248 
57249   # Input might be given as Windows format, start by converting to
57250   # unix format.
57251   path="$POTENTIAL_FREETYPE_LIB_PATH"
57252   new_path=`$CYGPATH -u "$path"`
57253 
57254   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57255   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57256   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57257   # "foo.exe" is OK but "foo" is an error.
57258   #
57259   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57260   # It is also a way to make sure we got the proper file name for the real test later on.
57261   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57262   if test "x$test_shortpath" = x; then
57263     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57264 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57265     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57266   fi
57267 
57268   # Call helper function which possibly converts this using DOS-style short mode.
57269   # If so, the updated path is stored in $new_path.
57270 
57271   input_path="$new_path"
57272   # Check if we need to convert this using DOS-style short mode. If the path
57273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57274   # take no chances and rewrite it.
57275   # Note: m4 eats our [], so we need to use [ and ] instead.
57276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57277   if test "x$has_forbidden_chars" != x; then
57278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57279     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57280     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57281     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57282       # Going to short mode and back again did indeed matter. Since short mode is
57283       # case insensitive, let's make it lowercase to improve readability.
57284       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57285       # Now convert it back to Unix-style (cygpath)
57286       input_path=`$CYGPATH -u "$shortmode_path"`
57287       new_path="$input_path"
57288     fi
57289   fi
57290 
57291   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57292   if test "x$test_cygdrive_prefix" = x; then
57293     # As a simple fix, exclude /usr/bin since it's not a real path.
57294     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57295       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57296       # a path prefixed by /cygdrive for fixpath to work.
57297       new_path="$CYGWIN_ROOT_PATH$input_path"
57298     fi
57299   fi
57300 
57301 
57302   if test "x$path" != "x$new_path"; then
57303     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57305 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57306   fi
57307 
57308     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57309 
57310   path="$POTENTIAL_FREETYPE_LIB_PATH"
57311   has_colon=`$ECHO $path | $GREP ^.:`
57312   new_path="$path"
57313   if test "x$has_colon" = x; then
57314     # Not in mixed or Windows style, start by that.
57315     new_path=`cmd //c echo $path`
57316   fi
57317 
57318 
57319   input_path="$new_path"
57320   # Check if we need to convert this using DOS-style short mode. If the path
57321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57322   # take no chances and rewrite it.
57323   # Note: m4 eats our [], so we need to use [ and ] instead.
57324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57325   if test "x$has_forbidden_chars" != x; then
57326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57327     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57328   fi
57329 
57330 
57331   windows_path="$new_path"
57332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57333     unix_path=`$CYGPATH -u "$windows_path"`
57334     new_path="$unix_path"
57335   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57336     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57337     new_path="$unix_path"
57338   fi
57339 
57340   if test "x$path" != "x$new_path"; then
57341     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57342     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57343 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57344   fi
57345 
57346   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57347   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57348 
57349     else
57350       # We're on a unix platform. Hooray! :)
57351       path="$POTENTIAL_FREETYPE_LIB_PATH"
57352       has_space=`$ECHO "$path" | $GREP " "`
57353       if test "x$has_space" != x; then
57354         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57355 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57356         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57357       fi
57358 
57359       # Use eval to expand a potential ~
57360       eval path="$path"
57361       if test ! -f "$path" && test ! -d "$path"; then
57362         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57363       fi
57364 
57365       if test -d "$path"; then
57366         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57367       else
57368         dir="`$DIRNAME "$path"`"
57369         base="`$BASENAME "$path"`"
57370         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57371       fi
57372     fi
57373   fi
57374 
57375 
57376     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57377     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57378 $as_echo_n "checking for freetype includes... " >&6; }
57379     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57380 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57381     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57382     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57383 $as_echo_n "checking for freetype libraries... " >&6; }
57384     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57385 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57386   fi
57387 
57388             fi
57389           fi
57390 
57391           if test "x$FOUND_FREETYPE" != xyes; then
57392             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
57393 
57394   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57395   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57396   METHOD="well-known location"
57397 
57398   # Let's start with an optimistic view of the world :-)
57399   FOUND_FREETYPE=yes
57400 
57401   # First look for the canonical freetype main include file ft2build.h.
57402   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57403     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57404     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57405     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57406       # Fail.
57407       FOUND_FREETYPE=no
57408     fi
57409   fi
57410 
57411   if test "x$FOUND_FREETYPE" = xyes; then
57412     # Include file found, let's continue the sanity check.
57413     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57414 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57415 
57416     # Reset to default value
57417     FREETYPE_BASE_NAME=freetype
57418     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57419     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57420       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57421           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57422         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57423         # for the .6 version explicitly.
57424         FREETYPE_BASE_NAME=freetype.6
57425         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57426         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57427 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57428       else
57429         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57430 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57431         FOUND_FREETYPE=no
57432       fi
57433     else
57434       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57435         # On Windows, we will need both .lib and .dll file.
57436         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57437           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57438 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57439           FOUND_FREETYPE=no
57440         fi
57441       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57442           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57443         # Found lib in isa dir, use that instead.
57444         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57445         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57446 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57447       fi
57448     fi
57449   fi
57450 
57451   if test "x$FOUND_FREETYPE" = xyes; then
57452 
57453   # Only process if variable expands to non-empty
57454 
57455   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57456     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57457 
57458   # Input might be given as Windows format, start by converting to
57459   # unix format.
57460   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57461   new_path=`$CYGPATH -u "$path"`
57462 
57463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57466   # "foo.exe" is OK but "foo" is an error.
57467   #
57468   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57469   # It is also a way to make sure we got the proper file name for the real test later on.
57470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57471   if test "x$test_shortpath" = x; then
57472     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57473 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57474     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57475   fi
57476 
57477   # Call helper function which possibly converts this using DOS-style short mode.
57478   # If so, the updated path is stored in $new_path.
57479 
57480   input_path="$new_path"
57481   # Check if we need to convert this using DOS-style short mode. If the path
57482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57483   # take no chances and rewrite it.
57484   # Note: m4 eats our [], so we need to use [ and ] instead.
57485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57486   if test "x$has_forbidden_chars" != x; then
57487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57488     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57489     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57490     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57491       # Going to short mode and back again did indeed matter. Since short mode is
57492       # case insensitive, let's make it lowercase to improve readability.
57493       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57494       # Now convert it back to Unix-style (cygpath)
57495       input_path=`$CYGPATH -u "$shortmode_path"`
57496       new_path="$input_path"
57497     fi
57498   fi
57499 
57500   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57501   if test "x$test_cygdrive_prefix" = x; then
57502     # As a simple fix, exclude /usr/bin since it's not a real path.
57503     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57504       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57505       # a path prefixed by /cygdrive for fixpath to work.
57506       new_path="$CYGWIN_ROOT_PATH$input_path"
57507     fi
57508   fi
57509 
57510 
57511   if test "x$path" != "x$new_path"; then
57512     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57514 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57515   fi
57516 
57517     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57518 
57519   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57520   has_colon=`$ECHO $path | $GREP ^.:`
57521   new_path="$path"
57522   if test "x$has_colon" = x; then
57523     # Not in mixed or Windows style, start by that.
57524     new_path=`cmd //c echo $path`
57525   fi
57526 
57527 
57528   input_path="$new_path"
57529   # Check if we need to convert this using DOS-style short mode. If the path
57530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57531   # take no chances and rewrite it.
57532   # Note: m4 eats our [], so we need to use [ and ] instead.
57533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57534   if test "x$has_forbidden_chars" != x; then
57535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57536     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57537   fi
57538 
57539 
57540   windows_path="$new_path"
57541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57542     unix_path=`$CYGPATH -u "$windows_path"`
57543     new_path="$unix_path"
57544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57546     new_path="$unix_path"
57547   fi
57548 
57549   if test "x$path" != "x$new_path"; then
57550     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57552 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57553   fi
57554 
57555   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57556   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57557 
57558     else
57559       # We're on a unix platform. Hooray! :)
57560       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57561       has_space=`$ECHO "$path" | $GREP " "`
57562       if test "x$has_space" != x; then
57563         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57564 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57565         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57566       fi
57567 
57568       # Use eval to expand a potential ~
57569       eval path="$path"
57570       if test ! -f "$path" && test ! -d "$path"; then
57571         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57572       fi
57573 
57574       if test -d "$path"; then
57575         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57576       else
57577         dir="`$DIRNAME "$path"`"
57578         base="`$BASENAME "$path"`"
57579         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57580       fi
57581     fi
57582   fi
57583 
57584 
57585   # Only process if variable expands to non-empty
57586 
57587   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57588     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57589 
57590   # Input might be given as Windows format, start by converting to
57591   # unix format.
57592   path="$POTENTIAL_FREETYPE_LIB_PATH"
57593   new_path=`$CYGPATH -u "$path"`
57594 
57595   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57596   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57597   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57598   # "foo.exe" is OK but "foo" is an error.
57599   #
57600   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57601   # It is also a way to make sure we got the proper file name for the real test later on.
57602   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57603   if test "x$test_shortpath" = x; then
57604     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57605 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57606     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57607   fi
57608 
57609   # Call helper function which possibly converts this using DOS-style short mode.
57610   # If so, the updated path is stored in $new_path.
57611 
57612   input_path="$new_path"
57613   # Check if we need to convert this using DOS-style short mode. If the path
57614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57615   # take no chances and rewrite it.
57616   # Note: m4 eats our [], so we need to use [ and ] instead.
57617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57618   if test "x$has_forbidden_chars" != x; then
57619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57620     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57621     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57622     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57623       # Going to short mode and back again did indeed matter. Since short mode is
57624       # case insensitive, let's make it lowercase to improve readability.
57625       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57626       # Now convert it back to Unix-style (cygpath)
57627       input_path=`$CYGPATH -u "$shortmode_path"`
57628       new_path="$input_path"
57629     fi
57630   fi
57631 
57632   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57633   if test "x$test_cygdrive_prefix" = x; then
57634     # As a simple fix, exclude /usr/bin since it's not a real path.
57635     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57636       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57637       # a path prefixed by /cygdrive for fixpath to work.
57638       new_path="$CYGWIN_ROOT_PATH$input_path"
57639     fi
57640   fi
57641 
57642 
57643   if test "x$path" != "x$new_path"; then
57644     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57646 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57647   fi
57648 
57649     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57650 
57651   path="$POTENTIAL_FREETYPE_LIB_PATH"
57652   has_colon=`$ECHO $path | $GREP ^.:`
57653   new_path="$path"
57654   if test "x$has_colon" = x; then
57655     # Not in mixed or Windows style, start by that.
57656     new_path=`cmd //c echo $path`
57657   fi
57658 
57659 
57660   input_path="$new_path"
57661   # Check if we need to convert this using DOS-style short mode. If the path
57662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57663   # take no chances and rewrite it.
57664   # Note: m4 eats our [], so we need to use [ and ] instead.
57665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57666   if test "x$has_forbidden_chars" != x; then
57667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57669   fi
57670 
57671 
57672   windows_path="$new_path"
57673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57674     unix_path=`$CYGPATH -u "$windows_path"`
57675     new_path="$unix_path"
57676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57678     new_path="$unix_path"
57679   fi
57680 
57681   if test "x$path" != "x$new_path"; then
57682     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57683     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57684 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57685   fi
57686 
57687   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57688   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57689 
57690     else
57691       # We're on a unix platform. Hooray! :)
57692       path="$POTENTIAL_FREETYPE_LIB_PATH"
57693       has_space=`$ECHO "$path" | $GREP " "`
57694       if test "x$has_space" != x; then
57695         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57696 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57697         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57698       fi
57699 
57700       # Use eval to expand a potential ~
57701       eval path="$path"
57702       if test ! -f "$path" && test ! -d "$path"; then
57703         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57704       fi
57705 
57706       if test -d "$path"; then
57707         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57708       else
57709         dir="`$DIRNAME "$path"`"
57710         base="`$BASENAME "$path"`"
57711         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57712       fi
57713     fi
57714   fi
57715 
57716 
57717     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57719 $as_echo_n "checking for freetype includes... " >&6; }
57720     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57721 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57722     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57723     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57724 $as_echo_n "checking for freetype libraries... " >&6; }
57725     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57726 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57727   fi
57728 
57729           fi
57730 
57731           if test "x$FOUND_FREETYPE" != xyes; then
57732             FREETYPE_BASE_DIR="$SYSROOT/usr"
57733             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57734 
57735   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57736   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
57737   METHOD="well-known location"
57738 
57739   # Let's start with an optimistic view of the world :-)
57740   FOUND_FREETYPE=yes
57741 
57742   # First look for the canonical freetype main include file ft2build.h.
57743   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57744     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57745     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57746     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57747       # Fail.
57748       FOUND_FREETYPE=no
57749     fi
57750   fi
57751 
57752   if test "x$FOUND_FREETYPE" = xyes; then
57753     # Include file found, let's continue the sanity check.
57754     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57755 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57756 
57757     # Reset to default value
57758     FREETYPE_BASE_NAME=freetype
57759     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57760     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57761       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57762           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57763         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57764         # for the .6 version explicitly.
57765         FREETYPE_BASE_NAME=freetype.6
57766         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57767         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57768 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57769       else
57770         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57771 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57772         FOUND_FREETYPE=no
57773       fi
57774     else
57775       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57776         # On Windows, we will need both .lib and .dll file.
57777         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57778           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57779 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57780           FOUND_FREETYPE=no
57781         fi
57782       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57783           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57784         # Found lib in isa dir, use that instead.
57785         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57786         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57787 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57788       fi
57789     fi
57790   fi
57791 
57792   if test "x$FOUND_FREETYPE" = xyes; then
57793 
57794   # Only process if variable expands to non-empty
57795 
57796   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57797     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57798 
57799   # Input might be given as Windows format, start by converting to
57800   # unix format.
57801   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57802   new_path=`$CYGPATH -u "$path"`
57803 
57804   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57805   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57806   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57807   # "foo.exe" is OK but "foo" is an error.
57808   #
57809   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57810   # It is also a way to make sure we got the proper file name for the real test later on.
57811   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57812   if test "x$test_shortpath" = x; then
57813     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57814 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57815     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57816   fi
57817 
57818   # Call helper function which possibly converts this using DOS-style short mode.
57819   # If so, the updated path is stored in $new_path.
57820 
57821   input_path="$new_path"
57822   # Check if we need to convert this using DOS-style short mode. If the path
57823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57824   # take no chances and rewrite it.
57825   # Note: m4 eats our [], so we need to use [ and ] instead.
57826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57827   if test "x$has_forbidden_chars" != x; then
57828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57829     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57830     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57831     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57832       # Going to short mode and back again did indeed matter. Since short mode is
57833       # case insensitive, let's make it lowercase to improve readability.
57834       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57835       # Now convert it back to Unix-style (cygpath)
57836       input_path=`$CYGPATH -u "$shortmode_path"`
57837       new_path="$input_path"
57838     fi
57839   fi
57840 
57841   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57842   if test "x$test_cygdrive_prefix" = x; then
57843     # As a simple fix, exclude /usr/bin since it's not a real path.
57844     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57845       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57846       # a path prefixed by /cygdrive for fixpath to work.
57847       new_path="$CYGWIN_ROOT_PATH$input_path"
57848     fi
57849   fi
57850 
57851 
57852   if test "x$path" != "x$new_path"; then
57853     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57854     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57855 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57856   fi
57857 
57858     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57859 
57860   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57861   has_colon=`$ECHO $path | $GREP ^.:`
57862   new_path="$path"
57863   if test "x$has_colon" = x; then
57864     # Not in mixed or Windows style, start by that.
57865     new_path=`cmd //c echo $path`
57866   fi
57867 
57868 
57869   input_path="$new_path"
57870   # Check if we need to convert this using DOS-style short mode. If the path
57871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57872   # take no chances and rewrite it.
57873   # Note: m4 eats our [], so we need to use [ and ] instead.
57874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57875   if test "x$has_forbidden_chars" != x; then
57876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57877     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57878   fi
57879 
57880 
57881   windows_path="$new_path"
57882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57883     unix_path=`$CYGPATH -u "$windows_path"`
57884     new_path="$unix_path"
57885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57887     new_path="$unix_path"
57888   fi
57889 
57890   if test "x$path" != "x$new_path"; then
57891     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57893 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57894   fi
57895 
57896   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57897   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57898 
57899     else
57900       # We're on a unix platform. Hooray! :)
57901       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57902       has_space=`$ECHO "$path" | $GREP " "`
57903       if test "x$has_space" != x; then
57904         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57905 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57906         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57907       fi
57908 
57909       # Use eval to expand a potential ~
57910       eval path="$path"
57911       if test ! -f "$path" && test ! -d "$path"; then
57912         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57913       fi
57914 
57915       if test -d "$path"; then
57916         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57917       else
57918         dir="`$DIRNAME "$path"`"
57919         base="`$BASENAME "$path"`"
57920         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57921       fi
57922     fi
57923   fi
57924 
57925 
57926   # Only process if variable expands to non-empty
57927 
57928   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57929     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57930 
57931   # Input might be given as Windows format, start by converting to
57932   # unix format.
57933   path="$POTENTIAL_FREETYPE_LIB_PATH"
57934   new_path=`$CYGPATH -u "$path"`
57935 
57936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57939   # "foo.exe" is OK but "foo" is an error.
57940   #
57941   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57942   # It is also a way to make sure we got the proper file name for the real test later on.
57943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57944   if test "x$test_shortpath" = x; then
57945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57946 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57947     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57948   fi
57949 
57950   # Call helper function which possibly converts this using DOS-style short mode.
57951   # If so, the updated path is stored in $new_path.
57952 
57953   input_path="$new_path"
57954   # Check if we need to convert this using DOS-style short mode. If the path
57955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57956   # take no chances and rewrite it.
57957   # Note: m4 eats our [], so we need to use [ and ] instead.
57958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57959   if test "x$has_forbidden_chars" != x; then
57960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57961     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57962     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57963     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57964       # Going to short mode and back again did indeed matter. Since short mode is
57965       # case insensitive, let's make it lowercase to improve readability.
57966       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57967       # Now convert it back to Unix-style (cygpath)
57968       input_path=`$CYGPATH -u "$shortmode_path"`
57969       new_path="$input_path"
57970     fi
57971   fi
57972 
57973   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57974   if test "x$test_cygdrive_prefix" = x; then
57975     # As a simple fix, exclude /usr/bin since it's not a real path.
57976     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57977       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57978       # a path prefixed by /cygdrive for fixpath to work.
57979       new_path="$CYGWIN_ROOT_PATH$input_path"
57980     fi
57981   fi
57982 
57983 
57984   if test "x$path" != "x$new_path"; then
57985     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57987 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57988   fi
57989 
57990     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57991 
57992   path="$POTENTIAL_FREETYPE_LIB_PATH"
57993   has_colon=`$ECHO $path | $GREP ^.:`
57994   new_path="$path"
57995   if test "x$has_colon" = x; then
57996     # Not in mixed or Windows style, start by that.
57997     new_path=`cmd //c echo $path`
57998   fi
57999 
58000 
58001   input_path="$new_path"
58002   # Check if we need to convert this using DOS-style short mode. If the path
58003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58004   # take no chances and rewrite it.
58005   # Note: m4 eats our [], so we need to use [ and ] instead.
58006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58007   if test "x$has_forbidden_chars" != x; then
58008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58010   fi
58011 
58012 
58013   windows_path="$new_path"
58014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58015     unix_path=`$CYGPATH -u "$windows_path"`
58016     new_path="$unix_path"
58017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58019     new_path="$unix_path"
58020   fi
58021 
58022   if test "x$path" != "x$new_path"; then
58023     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58025 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58026   fi
58027 
58028   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58029   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58030 
58031     else
58032       # We're on a unix platform. Hooray! :)
58033       path="$POTENTIAL_FREETYPE_LIB_PATH"
58034       has_space=`$ECHO "$path" | $GREP " "`
58035       if test "x$has_space" != x; then
58036         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58037 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58038         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58039       fi
58040 
58041       # Use eval to expand a potential ~
58042       eval path="$path"
58043       if test ! -f "$path" && test ! -d "$path"; then
58044         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58045       fi
58046 
58047       if test -d "$path"; then
58048         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58049       else
58050         dir="`$DIRNAME "$path"`"
58051         base="`$BASENAME "$path"`"
58052         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58053       fi
58054     fi
58055   fi
58056 
58057 
58058     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58059     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58060 $as_echo_n "checking for freetype includes... " >&6; }
58061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58062 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58063     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58064     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58065 $as_echo_n "checking for freetype libraries... " >&6; }
58066     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58067 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58068   fi
58069 
58070             else
58071 
58072   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58073   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
58074   METHOD="well-known location"
58075 
58076   # Let's start with an optimistic view of the world :-)
58077   FOUND_FREETYPE=yes
58078 
58079   # First look for the canonical freetype main include file ft2build.h.
58080   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58081     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58082     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58083     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58084       # Fail.
58085       FOUND_FREETYPE=no
58086     fi
58087   fi
58088 
58089   if test "x$FOUND_FREETYPE" = xyes; then
58090     # Include file found, let's continue the sanity check.
58091     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58092 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58093 
58094     # Reset to default value
58095     FREETYPE_BASE_NAME=freetype
58096     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58097     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58098       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58099           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58100         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58101         # for the .6 version explicitly.
58102         FREETYPE_BASE_NAME=freetype.6
58103         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58104         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58105 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58106       else
58107         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58108 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58109         FOUND_FREETYPE=no
58110       fi
58111     else
58112       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58113         # On Windows, we will need both .lib and .dll file.
58114         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58115           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58116 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58117           FOUND_FREETYPE=no
58118         fi
58119       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58120           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58121         # Found lib in isa dir, use that instead.
58122         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58123         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58124 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58125       fi
58126     fi
58127   fi
58128 
58129   if test "x$FOUND_FREETYPE" = xyes; then
58130 
58131   # Only process if variable expands to non-empty
58132 
58133   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58134     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58135 
58136   # Input might be given as Windows format, start by converting to
58137   # unix format.
58138   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58139   new_path=`$CYGPATH -u "$path"`
58140 
58141   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58142   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58143   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58144   # "foo.exe" is OK but "foo" is an error.
58145   #
58146   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58147   # It is also a way to make sure we got the proper file name for the real test later on.
58148   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58149   if test "x$test_shortpath" = x; then
58150     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58151 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58152     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58153   fi
58154 
58155   # Call helper function which possibly converts this using DOS-style short mode.
58156   # If so, the updated path is stored in $new_path.
58157 
58158   input_path="$new_path"
58159   # Check if we need to convert this using DOS-style short mode. If the path
58160   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58161   # take no chances and rewrite it.
58162   # Note: m4 eats our [], so we need to use [ and ] instead.
58163   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58164   if test "x$has_forbidden_chars" != x; then
58165     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58166     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58167     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58168     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58169       # Going to short mode and back again did indeed matter. Since short mode is
58170       # case insensitive, let's make it lowercase to improve readability.
58171       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58172       # Now convert it back to Unix-style (cygpath)
58173       input_path=`$CYGPATH -u "$shortmode_path"`
58174       new_path="$input_path"
58175     fi
58176   fi
58177 
58178   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58179   if test "x$test_cygdrive_prefix" = x; then
58180     # As a simple fix, exclude /usr/bin since it's not a real path.
58181     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58182       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58183       # a path prefixed by /cygdrive for fixpath to work.
58184       new_path="$CYGWIN_ROOT_PATH$input_path"
58185     fi
58186   fi
58187 
58188 
58189   if test "x$path" != "x$new_path"; then
58190     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58191     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58192 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58193   fi
58194 
58195     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58196 
58197   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58198   has_colon=`$ECHO $path | $GREP ^.:`
58199   new_path="$path"
58200   if test "x$has_colon" = x; then
58201     # Not in mixed or Windows style, start by that.
58202     new_path=`cmd //c echo $path`
58203   fi
58204 
58205 
58206   input_path="$new_path"
58207   # Check if we need to convert this using DOS-style short mode. If the path
58208   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58209   # take no chances and rewrite it.
58210   # Note: m4 eats our [], so we need to use [ and ] instead.
58211   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58212   if test "x$has_forbidden_chars" != x; then
58213     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58214     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58215   fi
58216 
58217 
58218   windows_path="$new_path"
58219   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58220     unix_path=`$CYGPATH -u "$windows_path"`
58221     new_path="$unix_path"
58222   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58223     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58224     new_path="$unix_path"
58225   fi
58226 
58227   if test "x$path" != "x$new_path"; then
58228     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58229     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58230 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58231   fi
58232 
58233   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58234   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58235 
58236     else
58237       # We're on a unix platform. Hooray! :)
58238       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58239       has_space=`$ECHO "$path" | $GREP " "`
58240       if test "x$has_space" != x; then
58241         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58242 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58243         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58244       fi
58245 
58246       # Use eval to expand a potential ~
58247       eval path="$path"
58248       if test ! -f "$path" && test ! -d "$path"; then
58249         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58250       fi
58251 
58252       if test -d "$path"; then
58253         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58254       else
58255         dir="`$DIRNAME "$path"`"
58256         base="`$BASENAME "$path"`"
58257         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58258       fi
58259     fi
58260   fi
58261 
58262 
58263   # Only process if variable expands to non-empty
58264 
58265   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58266     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58267 
58268   # Input might be given as Windows format, start by converting to
58269   # unix format.
58270   path="$POTENTIAL_FREETYPE_LIB_PATH"
58271   new_path=`$CYGPATH -u "$path"`
58272 
58273   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58274   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58275   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58276   # "foo.exe" is OK but "foo" is an error.
58277   #
58278   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58279   # It is also a way to make sure we got the proper file name for the real test later on.
58280   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58281   if test "x$test_shortpath" = x; then
58282     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58283 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58284     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58285   fi
58286 
58287   # Call helper function which possibly converts this using DOS-style short mode.
58288   # If so, the updated path is stored in $new_path.
58289 
58290   input_path="$new_path"
58291   # Check if we need to convert this using DOS-style short mode. If the path
58292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58293   # take no chances and rewrite it.
58294   # Note: m4 eats our [], so we need to use [ and ] instead.
58295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58296   if test "x$has_forbidden_chars" != x; then
58297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58298     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58299     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58300     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58301       # Going to short mode and back again did indeed matter. Since short mode is
58302       # case insensitive, let's make it lowercase to improve readability.
58303       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58304       # Now convert it back to Unix-style (cygpath)
58305       input_path=`$CYGPATH -u "$shortmode_path"`
58306       new_path="$input_path"
58307     fi
58308   fi
58309 
58310   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58311   if test "x$test_cygdrive_prefix" = x; then
58312     # As a simple fix, exclude /usr/bin since it's not a real path.
58313     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58314       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58315       # a path prefixed by /cygdrive for fixpath to work.
58316       new_path="$CYGWIN_ROOT_PATH$input_path"
58317     fi
58318   fi
58319 
58320 
58321   if test "x$path" != "x$new_path"; then
58322     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58323     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58324 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58325   fi
58326 
58327     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58328 
58329   path="$POTENTIAL_FREETYPE_LIB_PATH"
58330   has_colon=`$ECHO $path | $GREP ^.:`
58331   new_path="$path"
58332   if test "x$has_colon" = x; then
58333     # Not in mixed or Windows style, start by that.
58334     new_path=`cmd //c echo $path`
58335   fi
58336 
58337 
58338   input_path="$new_path"
58339   # Check if we need to convert this using DOS-style short mode. If the path
58340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58341   # take no chances and rewrite it.
58342   # Note: m4 eats our [], so we need to use [ and ] instead.
58343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58344   if test "x$has_forbidden_chars" != x; then
58345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58346     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58347   fi
58348 
58349 
58350   windows_path="$new_path"
58351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58352     unix_path=`$CYGPATH -u "$windows_path"`
58353     new_path="$unix_path"
58354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58356     new_path="$unix_path"
58357   fi
58358 
58359   if test "x$path" != "x$new_path"; then
58360     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58361     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58362 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58363   fi
58364 
58365   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58366   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58367 
58368     else
58369       # We're on a unix platform. Hooray! :)
58370       path="$POTENTIAL_FREETYPE_LIB_PATH"
58371       has_space=`$ECHO "$path" | $GREP " "`
58372       if test "x$has_space" != x; then
58373         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58374 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58375         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58376       fi
58377 
58378       # Use eval to expand a potential ~
58379       eval path="$path"
58380       if test ! -f "$path" && test ! -d "$path"; then
58381         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58382       fi
58383 
58384       if test -d "$path"; then
58385         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58386       else
58387         dir="`$DIRNAME "$path"`"
58388         base="`$BASENAME "$path"`"
58389         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58390       fi
58391     fi
58392   fi
58393 
58394 
58395     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58396     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58397 $as_echo_n "checking for freetype includes... " >&6; }
58398     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58399 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58400     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58401     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58402 $as_echo_n "checking for freetype libraries... " >&6; }
58403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58404 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58405   fi
58406 
58407               if test "x$FOUND_FREETYPE" != xyes; then
58408 
58409   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58410   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58411   METHOD="well-known location"
58412 
58413   # Let's start with an optimistic view of the world :-)
58414   FOUND_FREETYPE=yes
58415 
58416   # First look for the canonical freetype main include file ft2build.h.
58417   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58418     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58419     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58420     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58421       # Fail.
58422       FOUND_FREETYPE=no
58423     fi
58424   fi
58425 
58426   if test "x$FOUND_FREETYPE" = xyes; then
58427     # Include file found, let's continue the sanity check.
58428     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58429 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58430 
58431     # Reset to default value
58432     FREETYPE_BASE_NAME=freetype
58433     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58434     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58435       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58436           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58437         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58438         # for the .6 version explicitly.
58439         FREETYPE_BASE_NAME=freetype.6
58440         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58441         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58442 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58443       else
58444         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58445 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58446         FOUND_FREETYPE=no
58447       fi
58448     else
58449       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58450         # On Windows, we will need both .lib and .dll file.
58451         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58452           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58453 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58454           FOUND_FREETYPE=no
58455         fi
58456       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58457           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58458         # Found lib in isa dir, use that instead.
58459         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58460         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58461 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58462       fi
58463     fi
58464   fi
58465 
58466   if test "x$FOUND_FREETYPE" = xyes; then
58467 
58468   # Only process if variable expands to non-empty
58469 
58470   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58471     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58472 
58473   # Input might be given as Windows format, start by converting to
58474   # unix format.
58475   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58476   new_path=`$CYGPATH -u "$path"`
58477 
58478   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58479   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58480   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58481   # "foo.exe" is OK but "foo" is an error.
58482   #
58483   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58484   # It is also a way to make sure we got the proper file name for the real test later on.
58485   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58486   if test "x$test_shortpath" = x; then
58487     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58488 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58489     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58490   fi
58491 
58492   # Call helper function which possibly converts this using DOS-style short mode.
58493   # If so, the updated path is stored in $new_path.
58494 
58495   input_path="$new_path"
58496   # Check if we need to convert this using DOS-style short mode. If the path
58497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58498   # take no chances and rewrite it.
58499   # Note: m4 eats our [], so we need to use [ and ] instead.
58500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58501   if test "x$has_forbidden_chars" != x; then
58502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58503     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58504     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58505     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58506       # Going to short mode and back again did indeed matter. Since short mode is
58507       # case insensitive, let's make it lowercase to improve readability.
58508       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58509       # Now convert it back to Unix-style (cygpath)
58510       input_path=`$CYGPATH -u "$shortmode_path"`
58511       new_path="$input_path"
58512     fi
58513   fi
58514 
58515   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58516   if test "x$test_cygdrive_prefix" = x; then
58517     # As a simple fix, exclude /usr/bin since it's not a real path.
58518     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58519       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58520       # a path prefixed by /cygdrive for fixpath to work.
58521       new_path="$CYGWIN_ROOT_PATH$input_path"
58522     fi
58523   fi
58524 
58525 
58526   if test "x$path" != "x$new_path"; then
58527     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58528     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58529 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58530   fi
58531 
58532     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58533 
58534   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58535   has_colon=`$ECHO $path | $GREP ^.:`
58536   new_path="$path"
58537   if test "x$has_colon" = x; then
58538     # Not in mixed or Windows style, start by that.
58539     new_path=`cmd //c echo $path`
58540   fi
58541 
58542 
58543   input_path="$new_path"
58544   # Check if we need to convert this using DOS-style short mode. If the path
58545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58546   # take no chances and rewrite it.
58547   # Note: m4 eats our [], so we need to use [ and ] instead.
58548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58549   if test "x$has_forbidden_chars" != x; then
58550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58551     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58552   fi
58553 
58554 
58555   windows_path="$new_path"
58556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58557     unix_path=`$CYGPATH -u "$windows_path"`
58558     new_path="$unix_path"
58559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58561     new_path="$unix_path"
58562   fi
58563 
58564   if test "x$path" != "x$new_path"; then
58565     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58566     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58567 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58568   fi
58569 
58570   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58571   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58572 
58573     else
58574       # We're on a unix platform. Hooray! :)
58575       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58576       has_space=`$ECHO "$path" | $GREP " "`
58577       if test "x$has_space" != x; then
58578         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58579 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58580         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58581       fi
58582 
58583       # Use eval to expand a potential ~
58584       eval path="$path"
58585       if test ! -f "$path" && test ! -d "$path"; then
58586         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58587       fi
58588 
58589       if test -d "$path"; then
58590         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58591       else
58592         dir="`$DIRNAME "$path"`"
58593         base="`$BASENAME "$path"`"
58594         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58595       fi
58596     fi
58597   fi
58598 
58599 
58600   # Only process if variable expands to non-empty
58601 
58602   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58603     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58604 
58605   # Input might be given as Windows format, start by converting to
58606   # unix format.
58607   path="$POTENTIAL_FREETYPE_LIB_PATH"
58608   new_path=`$CYGPATH -u "$path"`
58609 
58610   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58611   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58612   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58613   # "foo.exe" is OK but "foo" is an error.
58614   #
58615   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58616   # It is also a way to make sure we got the proper file name for the real test later on.
58617   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58618   if test "x$test_shortpath" = x; then
58619     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58620 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58621     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58622   fi
58623 
58624   # Call helper function which possibly converts this using DOS-style short mode.
58625   # If so, the updated path is stored in $new_path.
58626 
58627   input_path="$new_path"
58628   # Check if we need to convert this using DOS-style short mode. If the path
58629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58630   # take no chances and rewrite it.
58631   # Note: m4 eats our [], so we need to use [ and ] instead.
58632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58633   if test "x$has_forbidden_chars" != x; then
58634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58635     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58636     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58637     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58638       # Going to short mode and back again did indeed matter. Since short mode is
58639       # case insensitive, let's make it lowercase to improve readability.
58640       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58641       # Now convert it back to Unix-style (cygpath)
58642       input_path=`$CYGPATH -u "$shortmode_path"`
58643       new_path="$input_path"
58644     fi
58645   fi
58646 
58647   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58648   if test "x$test_cygdrive_prefix" = x; then
58649     # As a simple fix, exclude /usr/bin since it's not a real path.
58650     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58651       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58652       # a path prefixed by /cygdrive for fixpath to work.
58653       new_path="$CYGWIN_ROOT_PATH$input_path"
58654     fi
58655   fi
58656 
58657 
58658   if test "x$path" != "x$new_path"; then
58659     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58660     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58661 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58662   fi
58663 
58664     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58665 
58666   path="$POTENTIAL_FREETYPE_LIB_PATH"
58667   has_colon=`$ECHO $path | $GREP ^.:`
58668   new_path="$path"
58669   if test "x$has_colon" = x; then
58670     # Not in mixed or Windows style, start by that.
58671     new_path=`cmd //c echo $path`
58672   fi
58673 
58674 
58675   input_path="$new_path"
58676   # Check if we need to convert this using DOS-style short mode. If the path
58677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58678   # take no chances and rewrite it.
58679   # Note: m4 eats our [], so we need to use [ and ] instead.
58680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58681   if test "x$has_forbidden_chars" != x; then
58682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58683     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58684   fi
58685 
58686 
58687   windows_path="$new_path"
58688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58689     unix_path=`$CYGPATH -u "$windows_path"`
58690     new_path="$unix_path"
58691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58693     new_path="$unix_path"
58694   fi
58695 
58696   if test "x$path" != "x$new_path"; then
58697     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58699 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58700   fi
58701 
58702   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58703   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58704 
58705     else
58706       # We're on a unix platform. Hooray! :)
58707       path="$POTENTIAL_FREETYPE_LIB_PATH"
58708       has_space=`$ECHO "$path" | $GREP " "`
58709       if test "x$has_space" != x; then
58710         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58711 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58712         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58713       fi
58714 
58715       # Use eval to expand a potential ~
58716       eval path="$path"
58717       if test ! -f "$path" && test ! -d "$path"; then
58718         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58719       fi
58720 
58721       if test -d "$path"; then
58722         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58723       else
58724         dir="`$DIRNAME "$path"`"
58725         base="`$BASENAME "$path"`"
58726         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58727       fi
58728     fi
58729   fi
58730 
58731 
58732     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58733     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58734 $as_echo_n "checking for freetype includes... " >&6; }
58735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58736 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58737     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58738     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58739 $as_echo_n "checking for freetype libraries... " >&6; }
58740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58741 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58742   fi
58743 
58744               fi
58745             fi
58746           fi
58747         fi
58748       fi # end check in well-known locations
58749 
58750       if test "x$FOUND_FREETYPE" != xyes; then
58751 
58752   # Print a helpful message on how to acquire the necessary build dependency.
58753   # freetype is the help tag: freetype, cups, alsa etc
58754   MISSING_DEPENDENCY=freetype
58755 
58756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58757     cygwin_help $MISSING_DEPENDENCY
58758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58759     msys_help $MISSING_DEPENDENCY
58760   else
58761     PKGHANDLER_COMMAND=
58762 
58763     case $PKGHANDLER in
58764       apt-get)
58765         apt_help     $MISSING_DEPENDENCY ;;
58766       yum)
58767         yum_help     $MISSING_DEPENDENCY ;;
58768       port)
58769         port_help    $MISSING_DEPENDENCY ;;
58770       pkgutil)
58771         pkgutil_help $MISSING_DEPENDENCY ;;
58772       pkgadd)
58773         pkgadd_help  $MISSING_DEPENDENCY ;;
58774     esac
58775 
58776     if test "x$PKGHANDLER_COMMAND" != x; then
58777       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58778     fi
58779   fi
58780 
58781         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
58782       fi
58783     fi # end user specified settings
58784 
58785     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
58786     if test "x$FREETYPE_CFLAGS" = x; then
58787 
58788   # Only process if variable expands to non-empty
58789 
58790   if test "x$FREETYPE_INCLUDE_PATH" != x; then
58791     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58792 
58793   # Input might be given as Windows format, start by converting to
58794   # unix format.
58795   path="$FREETYPE_INCLUDE_PATH"
58796   new_path=`$CYGPATH -u "$path"`
58797 
58798   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58799   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58800   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58801   # "foo.exe" is OK but "foo" is an error.
58802   #
58803   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58804   # It is also a way to make sure we got the proper file name for the real test later on.
58805   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58806   if test "x$test_shortpath" = x; then
58807     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58808 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58809     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
58810   fi
58811 
58812   # Call helper function which possibly converts this using DOS-style short mode.
58813   # If so, the updated path is stored in $new_path.
58814 
58815   input_path="$new_path"
58816   # Check if we need to convert this using DOS-style short mode. If the path
58817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58818   # take no chances and rewrite it.
58819   # Note: m4 eats our [], so we need to use [ and ] instead.
58820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58821   if test "x$has_forbidden_chars" != x; then
58822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58826       # Going to short mode and back again did indeed matter. Since short mode is
58827       # case insensitive, let's make it lowercase to improve readability.
58828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58829       # Now convert it back to Unix-style (cygpath)
58830       input_path=`$CYGPATH -u "$shortmode_path"`
58831       new_path="$input_path"
58832     fi
58833   fi
58834 
58835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58836   if test "x$test_cygdrive_prefix" = x; then
58837     # As a simple fix, exclude /usr/bin since it's not a real path.
58838     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58840       # a path prefixed by /cygdrive for fixpath to work.
58841       new_path="$CYGWIN_ROOT_PATH$input_path"
58842     fi
58843   fi
58844 
58845 
58846   if test "x$path" != "x$new_path"; then
58847     FREETYPE_INCLUDE_PATH="$new_path"
58848     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58849 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58850   fi
58851 
58852     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58853 
58854   path="$FREETYPE_INCLUDE_PATH"
58855   has_colon=`$ECHO $path | $GREP ^.:`
58856   new_path="$path"
58857   if test "x$has_colon" = x; then
58858     # Not in mixed or Windows style, start by that.
58859     new_path=`cmd //c echo $path`
58860   fi
58861 
58862 
58863   input_path="$new_path"
58864   # Check if we need to convert this using DOS-style short mode. If the path
58865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58866   # take no chances and rewrite it.
58867   # Note: m4 eats our [], so we need to use [ and ] instead.
58868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58869   if test "x$has_forbidden_chars" != x; then
58870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58871     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58872   fi
58873 
58874 
58875   windows_path="$new_path"
58876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58877     unix_path=`$CYGPATH -u "$windows_path"`
58878     new_path="$unix_path"
58879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58881     new_path="$unix_path"
58882   fi
58883 
58884   if test "x$path" != "x$new_path"; then
58885     FREETYPE_INCLUDE_PATH="$new_path"
58886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58887 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58888   fi
58889 
58890   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58891   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58892 
58893     else
58894       # We're on a unix platform. Hooray! :)
58895       path="$FREETYPE_INCLUDE_PATH"
58896       has_space=`$ECHO "$path" | $GREP " "`
58897       if test "x$has_space" != x; then
58898         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58899 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58900         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58901       fi
58902 
58903       # Use eval to expand a potential ~
58904       eval path="$path"
58905       if test ! -f "$path" && test ! -d "$path"; then
58906         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58907       fi
58908 
58909       if test -d "$path"; then
58910         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58911       else
58912         dir="`$DIRNAME "$path"`"
58913         base="`$BASENAME "$path"`"
58914         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58915       fi
58916     fi
58917   fi
58918 
58919       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
58920         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
58921       else
58922         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
58923       fi
58924     fi
58925 
58926     if test "x$FREETYPE_LIBS" = x; then
58927 
58928   # Only process if variable expands to non-empty
58929 
58930   if test "x$FREETYPE_LIB_PATH" != x; then
58931     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58932 
58933   # Input might be given as Windows format, start by converting to
58934   # unix format.
58935   path="$FREETYPE_LIB_PATH"
58936   new_path=`$CYGPATH -u "$path"`
58937 
58938   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58939   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58940   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58941   # "foo.exe" is OK but "foo" is an error.
58942   #
58943   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58944   # It is also a way to make sure we got the proper file name for the real test later on.
58945   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58946   if test "x$test_shortpath" = x; then
58947     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58948 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58949     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
58950   fi
58951 
58952   # Call helper function which possibly converts this using DOS-style short mode.
58953   # If so, the updated path is stored in $new_path.
58954 
58955   input_path="$new_path"
58956   # Check if we need to convert this using DOS-style short mode. If the path
58957   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58958   # take no chances and rewrite it.
58959   # Note: m4 eats our [], so we need to use [ and ] instead.
58960   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58961   if test "x$has_forbidden_chars" != x; then
58962     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58963     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58964     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58965     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58966       # Going to short mode and back again did indeed matter. Since short mode is
58967       # case insensitive, let's make it lowercase to improve readability.
58968       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58969       # Now convert it back to Unix-style (cygpath)
58970       input_path=`$CYGPATH -u "$shortmode_path"`
58971       new_path="$input_path"
58972     fi
58973   fi
58974 
58975   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58976   if test "x$test_cygdrive_prefix" = x; then
58977     # As a simple fix, exclude /usr/bin since it's not a real path.
58978     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58979       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58980       # a path prefixed by /cygdrive for fixpath to work.
58981       new_path="$CYGWIN_ROOT_PATH$input_path"
58982     fi
58983   fi
58984 
58985 
58986   if test "x$path" != "x$new_path"; then
58987     FREETYPE_LIB_PATH="$new_path"
58988     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
58989 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58990   fi
58991 
58992     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58993 
58994   path="$FREETYPE_LIB_PATH"
58995   has_colon=`$ECHO $path | $GREP ^.:`
58996   new_path="$path"
58997   if test "x$has_colon" = x; then
58998     # Not in mixed or Windows style, start by that.
58999     new_path=`cmd //c echo $path`
59000   fi
59001 
59002 
59003   input_path="$new_path"
59004   # Check if we need to convert this using DOS-style short mode. If the path
59005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59006   # take no chances and rewrite it.
59007   # Note: m4 eats our [], so we need to use [ and ] instead.
59008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59009   if test "x$has_forbidden_chars" != x; then
59010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59011     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59012   fi
59013 
59014 
59015   windows_path="$new_path"
59016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59017     unix_path=`$CYGPATH -u "$windows_path"`
59018     new_path="$unix_path"
59019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59021     new_path="$unix_path"
59022   fi
59023 
59024   if test "x$path" != "x$new_path"; then
59025     FREETYPE_LIB_PATH="$new_path"
59026     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
59027 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59028   fi
59029 
59030   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59031   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59032 
59033     else
59034       # We're on a unix platform. Hooray! :)
59035       path="$FREETYPE_LIB_PATH"
59036       has_space=`$ECHO "$path" | $GREP " "`
59037       if test "x$has_space" != x; then
59038         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59039 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59040         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59041       fi
59042 
59043       # Use eval to expand a potential ~
59044       eval path="$path"
59045       if test ! -f "$path" && test ! -d "$path"; then
59046         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59047       fi
59048 
59049       if test -d "$path"; then
59050         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59051       else
59052         dir="`$DIRNAME "$path"`"
59053         base="`$BASENAME "$path"`"
59054         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59055       fi
59056     fi
59057   fi
59058 
59059       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59060         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
59061       else
59062         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
59063       fi
59064     fi
59065 
59066     # Try to compile it
59067     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
59068 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
59069     ac_ext=cpp
59070 ac_cpp='$CXXCPP $CPPFLAGS'
59071 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59072 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59073 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59074 
59075     PREV_CXXCFLAGS="$CXXFLAGS"
59076     PREV_LIBS="$LIBS"
59077     PREV_CXX="$CXX"
59078     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
59079     LIBS="$LIBS $FREETYPE_LIBS"
59080     CXX="$FIXPATH $CXX"
59081     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59082 /* end confdefs.h.  */
59083 
59084           #include<ft2build.h>
59085           #include FT_FREETYPE_H
59086           int main () {
59087             FT_Init_FreeType(NULL);
59088             return 0;
59089           }
59090 
59091 _ACEOF
59092 if ac_fn_cxx_try_link "$LINENO"; then :
59093 
59094           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59095 $as_echo "yes" >&6; }
59096 
59097 else
59098 
59099           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59100 $as_echo "no" >&6; }
59101           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
59102 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
59103           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
59104 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
59105 
59106 
59107   # Print a helpful message on how to acquire the necessary build dependency.
59108   # freetype is the help tag: freetype, cups, alsa etc
59109   MISSING_DEPENDENCY=freetype
59110 
59111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59112     cygwin_help $MISSING_DEPENDENCY
59113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59114     msys_help $MISSING_DEPENDENCY
59115   else
59116     PKGHANDLER_COMMAND=
59117 
59118     case $PKGHANDLER in
59119       apt-get)
59120         apt_help     $MISSING_DEPENDENCY ;;
59121       yum)
59122         yum_help     $MISSING_DEPENDENCY ;;
59123       port)
59124         port_help    $MISSING_DEPENDENCY ;;
59125       pkgutil)
59126         pkgutil_help $MISSING_DEPENDENCY ;;
59127       pkgadd)
59128         pkgadd_help  $MISSING_DEPENDENCY ;;
59129     esac
59130 
59131     if test "x$PKGHANDLER_COMMAND" != x; then
59132       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59133     fi
59134   fi
59135 
59136 
59137           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
59138 
59139 
59140 fi
59141 rm -f core conftest.err conftest.$ac_objext \
59142     conftest$ac_exeext conftest.$ac_ext
59143     CXXCFLAGS="$PREV_CXXFLAGS"
59144     LIBS="$PREV_LIBS"
59145     CXX="$PREV_CXX"
59146     ac_ext=cpp
59147 ac_cpp='$CXXCPP $CPPFLAGS'
59148 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59149 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59150 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59151 
59152 
59153     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
59154 $as_echo_n "checking if we should bundle freetype... " >&6; }
59155     if test "x$BUNDLE_FREETYPE" = xyes; then
59156       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
59157     fi
59158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
59159 $as_echo "$BUNDLE_FREETYPE" >&6; }
59160 
59161   fi # end freetype needed
59162 
59163 
59164 
59165 
59166 
59167 
59168 
59169 # Check whether --with-alsa was given.
59170 if test "${with_alsa+set}" = set; then :
59171   withval=$with_alsa;
59172 fi
59173 
59174 
59175 # Check whether --with-alsa-include was given.
59176 if test "${with_alsa_include+set}" = set; then :
59177   withval=$with_alsa_include;
59178 fi
59179 
59180 
59181 # Check whether --with-alsa-lib was given.
59182 if test "${with_alsa_lib+set}" = set; then :
59183   withval=$with_alsa_lib;
59184 fi
59185 
59186 
59187   if test "x$NEEDS_LIB_ALSA" = xfalse; then
59188     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
59189         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
59190         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
59191       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
59192 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
59193     fi
59194     ALSA_CFLAGS=
59195     ALSA_LIBS=
59196   else
59197     ALSA_FOUND=no
59198 
59199     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
59200       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
59201     fi
59202 
59203     if test "x${with_alsa}" != x; then
59204       ALSA_LIBS="-L${with_alsa}/lib -lasound"
59205       ALSA_CFLAGS="-I${with_alsa}/include"
59206       ALSA_FOUND=yes
59207     fi
59208     if test "x${with_alsa_include}" != x; then
59209       ALSA_CFLAGS="-I${with_alsa_include}"
59210       ALSA_FOUND=yes
59211     fi
59212     if test "x${with_alsa_lib}" != x; then
59213       ALSA_LIBS="-L${with_alsa_lib} -lasound"
59214       ALSA_FOUND=yes
59215     fi
59216     # Do not try pkg-config if we have a sysroot set.
59217     if test "x$SYSROOT" = x; then
59218       if test "x$ALSA_FOUND" = xno; then
59219 
59220 pkg_failed=no
59221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
59222 $as_echo_n "checking for ALSA... " >&6; }
59223 
59224 if test -n "$ALSA_CFLAGS"; then
59225     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
59226  elif test -n "$PKG_CONFIG"; then
59227     if test -n "$PKG_CONFIG" && \
59228     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
59229   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
59230   ac_status=$?
59231   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59232   test $ac_status = 0; }; then
59233   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
59234 else
59235   pkg_failed=yes
59236 fi
59237  else
59238     pkg_failed=untried
59239 fi
59240 if test -n "$ALSA_LIBS"; then
59241     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
59242  elif test -n "$PKG_CONFIG"; then
59243     if test -n "$PKG_CONFIG" && \
59244     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
59245   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
59246   ac_status=$?
59247   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59248   test $ac_status = 0; }; then
59249   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
59250 else
59251   pkg_failed=yes
59252 fi
59253  else
59254     pkg_failed=untried
59255 fi
59256 
59257 
59258 
59259 if test $pkg_failed = yes; then
59260 
59261 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59262         _pkg_short_errors_supported=yes
59263 else
59264         _pkg_short_errors_supported=no
59265 fi
59266         if test $_pkg_short_errors_supported = yes; then
59267                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
59268         else
59269                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
59270         fi
59271         # Put the nasty error message in config.log where it belongs
59272         echo "$ALSA_PKG_ERRORS" >&5
59273 
59274         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59275 $as_echo "no" >&6; }
59276                 ALSA_FOUND=no
59277 elif test $pkg_failed = untried; then
59278         ALSA_FOUND=no
59279 else
59280         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
59281         ALSA_LIBS=$pkg_cv_ALSA_LIBS
59282         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59283 $as_echo "yes" >&6; }
59284         ALSA_FOUND=yes
59285 fi
59286       fi
59287     fi
59288     if test "x$ALSA_FOUND" = xno; then
59289       for ac_header in alsa/asoundlib.h
59290 do :
59291   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
59292 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
59293   cat >>confdefs.h <<_ACEOF
59294 #define HAVE_ALSA_ASOUNDLIB_H 1
59295 _ACEOF
59296 
59297             ALSA_FOUND=yes
59298             ALSA_CFLAGS=-Iignoreme
59299             ALSA_LIBS=-lasound
59300             DEFAULT_ALSA=yes
59301 
59302 else
59303   ALSA_FOUND=no
59304 
59305 fi
59306 
59307 done
59308 
59309     fi
59310     if test "x$ALSA_FOUND" = xno; then
59311 
59312   # Print a helpful message on how to acquire the necessary build dependency.
59313   # alsa is the help tag: freetype, cups, alsa etc
59314   MISSING_DEPENDENCY=alsa
59315 
59316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59317     cygwin_help $MISSING_DEPENDENCY
59318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59319     msys_help $MISSING_DEPENDENCY
59320   else
59321     PKGHANDLER_COMMAND=
59322 
59323     case $PKGHANDLER in
59324       apt-get)
59325         apt_help     $MISSING_DEPENDENCY ;;
59326       yum)
59327         yum_help     $MISSING_DEPENDENCY ;;
59328       port)
59329         port_help    $MISSING_DEPENDENCY ;;
59330       pkgutil)
59331         pkgutil_help $MISSING_DEPENDENCY ;;
59332       pkgadd)
59333         pkgadd_help  $MISSING_DEPENDENCY ;;
59334     esac
59335 
59336     if test "x$PKGHANDLER_COMMAND" != x; then
59337       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59338     fi
59339   fi
59340 
59341       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
59342     fi
59343   fi
59344 
59345 
59346 
59347 
59348 
59349 
59350 # Check whether --with-libffi was given.
59351 if test "${with_libffi+set}" = set; then :
59352   withval=$with_libffi;
59353 fi
59354 
59355 
59356 # Check whether --with-libffi-include was given.
59357 if test "${with_libffi_include+set}" = set; then :
59358   withval=$with_libffi_include;
59359 fi
59360 
59361 
59362 # Check whether --with-libffi-lib was given.
59363 if test "${with_libffi_lib+set}" = set; then :
59364   withval=$with_libffi_lib;
59365 fi
59366 
59367 
59368   if test "x$NEEDS_LIB_FFI" = xfalse; then
59369     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
59370         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
59371         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
59372       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
59373 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
59374     fi
59375     LIBFFI_CFLAGS=
59376     LIBFFI_LIBS=
59377   else
59378     LIBFFI_FOUND=no
59379 
59380     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
59381       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
59382     fi
59383 
59384     if test "x${with_libffi}" != x; then
59385       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
59386       LIBFFI_CFLAGS="-I${with_libffi}/include"
59387       LIBFFI_FOUND=yes
59388     fi
59389     if test "x${with_libffi_include}" != x; then
59390       LIBFFI_CFLAGS="-I${with_libffi_include}"
59391       LIBFFI_FOUND=yes
59392     fi
59393     if test "x${with_libffi_lib}" != x; then
59394       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
59395       LIBFFI_FOUND=yes
59396     fi
59397     # Do not try pkg-config if we have a sysroot set.
59398     if test "x$SYSROOT" = x; then
59399       if test "x$LIBFFI_FOUND" = xno; then
59400         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
59401 
59402 pkg_failed=no
59403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
59404 $as_echo_n "checking for LIBFFI... " >&6; }
59405 
59406 if test -n "$LIBFFI_CFLAGS"; then
59407     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
59408  elif test -n "$PKG_CONFIG"; then
59409     if test -n "$PKG_CONFIG" && \
59410     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
59411   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
59412   ac_status=$?
59413   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59414   test $ac_status = 0; }; then
59415   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
59416 else
59417   pkg_failed=yes
59418 fi
59419  else
59420     pkg_failed=untried
59421 fi
59422 if test -n "$LIBFFI_LIBS"; then
59423     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
59424  elif test -n "$PKG_CONFIG"; then
59425     if test -n "$PKG_CONFIG" && \
59426     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
59427   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
59428   ac_status=$?
59429   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59430   test $ac_status = 0; }; then
59431   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
59432 else
59433   pkg_failed=yes
59434 fi
59435  else
59436     pkg_failed=untried
59437 fi
59438 
59439 
59440 
59441 if test $pkg_failed = yes; then
59442 
59443 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59444         _pkg_short_errors_supported=yes
59445 else
59446         _pkg_short_errors_supported=no
59447 fi
59448         if test $_pkg_short_errors_supported = yes; then
59449                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
59450         else
59451                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
59452         fi
59453         # Put the nasty error message in config.log where it belongs
59454         echo "$LIBFFI_PKG_ERRORS" >&5
59455 
59456         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59457 $as_echo "no" >&6; }
59458                 LIBFFI_FOUND=no
59459 elif test $pkg_failed = untried; then
59460         LIBFFI_FOUND=no
59461 else
59462         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
59463         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
59464         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59465 $as_echo "yes" >&6; }
59466         LIBFFI_FOUND=yes
59467 fi
59468       fi
59469     fi
59470     if test "x$LIBFFI_FOUND" = xno; then
59471       for ac_header in ffi.h
59472 do :
59473   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
59474 if test "x$ac_cv_header_ffi_h" = xyes; then :
59475   cat >>confdefs.h <<_ACEOF
59476 #define HAVE_FFI_H 1
59477 _ACEOF
59478 
59479             LIBFFI_FOUND=yes
59480             LIBFFI_CFLAGS=
59481             LIBFFI_LIBS=-lffi
59482 
59483 else
59484   LIBFFI_FOUND=no
59485 
59486 fi
59487 
59488 done
59489 
59490     fi
59491     if test "x$LIBFFI_FOUND" = xno; then
59492 
59493   # Print a helpful message on how to acquire the necessary build dependency.
59494   # ffi is the help tag: freetype, cups, alsa etc
59495   MISSING_DEPENDENCY=ffi
59496 
59497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59498     cygwin_help $MISSING_DEPENDENCY
59499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59500     msys_help $MISSING_DEPENDENCY
59501   else
59502     PKGHANDLER_COMMAND=
59503 
59504     case $PKGHANDLER in
59505       apt-get)
59506         apt_help     $MISSING_DEPENDENCY ;;
59507       yum)
59508         yum_help     $MISSING_DEPENDENCY ;;
59509       port)
59510         port_help    $MISSING_DEPENDENCY ;;
59511       pkgutil)
59512         pkgutil_help $MISSING_DEPENDENCY ;;
59513       pkgadd)
59514         pkgadd_help  $MISSING_DEPENDENCY ;;
59515     esac
59516 
59517     if test "x$PKGHANDLER_COMMAND" != x; then
59518       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59519     fi
59520   fi
59521 
59522       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
59523     fi
59524 
59525     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
59526 $as_echo_n "checking if libffi works... " >&6; }
59527     ac_ext=c
59528 ac_cpp='$CPP $CPPFLAGS'
59529 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59530 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59531 ac_compiler_gnu=$ac_cv_c_compiler_gnu
59532 
59533     OLD_CFLAGS="$CFLAGS"
59534     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
59535     OLD_LIBS="$LIBS"
59536     LIBS="$LIBS $LIBFFI_LIBS"
59537     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59538 /* end confdefs.h.  */
59539 #include <ffi.h>
59540 int
59541 main ()
59542 {
59543 
59544           ffi_call(NULL, NULL, NULL, NULL);
59545           return 0;
59546 
59547   ;
59548   return 0;
59549 }
59550 _ACEOF
59551 if ac_fn_c_try_link "$LINENO"; then :
59552   LIBFFI_WORKS=yes
59553 else
59554   LIBFFI_WORKS=no
59555 
59556 fi
59557 rm -f core conftest.err conftest.$ac_objext \
59558     conftest$ac_exeext conftest.$ac_ext
59559     CFLAGS="$OLD_CFLAGS"
59560     LIBS="$OLD_LIBS"
59561     ac_ext=cpp
59562 ac_cpp='$CXXCPP $CPPFLAGS'
59563 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59564 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59565 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59566 
59567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
59568 $as_echo "$LIBFFI_WORKS" >&6; }
59569 
59570     if test "x$LIBFFI_WORKS" = xno; then
59571 
59572   # Print a helpful message on how to acquire the necessary build dependency.
59573   # ffi is the help tag: freetype, cups, alsa etc
59574   MISSING_DEPENDENCY=ffi
59575 
59576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59577     cygwin_help $MISSING_DEPENDENCY
59578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59579     msys_help $MISSING_DEPENDENCY
59580   else
59581     PKGHANDLER_COMMAND=
59582 
59583     case $PKGHANDLER in
59584       apt-get)
59585         apt_help     $MISSING_DEPENDENCY ;;
59586       yum)
59587         yum_help     $MISSING_DEPENDENCY ;;
59588       port)
59589         port_help    $MISSING_DEPENDENCY ;;
59590       pkgutil)
59591         pkgutil_help $MISSING_DEPENDENCY ;;
59592       pkgadd)
59593         pkgadd_help  $MISSING_DEPENDENCY ;;
59594     esac
59595 
59596     if test "x$PKGHANDLER_COMMAND" != x; then
59597       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59598     fi
59599   fi
59600 
59601       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
59602     fi
59603   fi
59604 
59605 
59606 
59607 
59608 
59609   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
59610     # Extract the first word of "llvm-config", so it can be a program name with args.
59611 set dummy llvm-config; ac_word=$2
59612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59613 $as_echo_n "checking for $ac_word... " >&6; }
59614 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
59615   $as_echo_n "(cached) " >&6
59616 else
59617   if test -n "$LLVM_CONFIG"; then
59618   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
59619 else
59620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59621 for as_dir in $PATH
59622 do
59623   IFS=$as_save_IFS
59624   test -z "$as_dir" && as_dir=.
59625     for ac_exec_ext in '' $ac_executable_extensions; do
59626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59627     ac_cv_prog_LLVM_CONFIG="llvm-config"
59628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59629     break 2
59630   fi
59631 done
59632   done
59633 IFS=$as_save_IFS
59634 
59635 fi
59636 fi
59637 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
59638 if test -n "$LLVM_CONFIG"; then
59639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
59640 $as_echo "$LLVM_CONFIG" >&6; }
59641 else
59642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59643 $as_echo "no" >&6; }
59644 fi
59645 
59646 
59647 
59648     if test "x$LLVM_CONFIG" != xllvm-config; then
59649       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
59650     fi
59651 
59652     llvm_components="jit mcjit engine nativecodegen native"
59653     unset LLVM_CFLAGS
59654     for flag in $("$LLVM_CONFIG" --cxxflags); do
59655       if echo "${flag}" | grep -q '^-[ID]'; then
59656         if test "${flag}" != "-D_DEBUG" ; then
59657           if test "${LLVM_CFLAGS}" != "" ; then
59658             LLVM_CFLAGS="${LLVM_CFLAGS} "
59659           fi
59660           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
59661         fi
59662       fi
59663     done
59664     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
59665     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
59666 
59667     unset LLVM_LDFLAGS
59668     for flag in $("${LLVM_CONFIG}" --ldflags); do
59669       if echo "${flag}" | grep -q '^-L'; then
59670         if test "${LLVM_LDFLAGS}" != ""; then
59671           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
59672         fi
59673         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
59674       fi
59675     done
59676 
59677     unset LLVM_LIBS
59678     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
59679       if echo "${flag}" | grep -q '^-l'; then
59680         if test "${LLVM_LIBS}" != ""; then
59681           LLVM_LIBS="${LLVM_LIBS} "
59682         fi
59683         LLVM_LIBS="${LLVM_LIBS}${flag}"
59684       fi
59685     done
59686 
59687     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
59688     # always properly detect -ltinfo
59689     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
59690 
59691 
59692 
59693 
59694   fi
59695 
59696 
59697 
59698 # Check whether --with-libjpeg was given.
59699 if test "${with_libjpeg+set}" = set; then :
59700   withval=$with_libjpeg;
59701 fi
59702 
59703 
59704   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
59705 $as_echo_n "checking for which libjpeg to use... " >&6; }
59706   # default is bundled
59707   DEFAULT_LIBJPEG=bundled
59708   # if user didn't specify, use DEFAULT_LIBJPEG
59709   if test "x${with_libjpeg}" = "x"; then
59710     with_libjpeg=${DEFAULT_LIBJPEG}
59711   fi
59712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
59713 $as_echo "${with_libjpeg}" >&6; }
59714 
59715   if test "x${with_libjpeg}" = "xbundled"; then
59716     USE_EXTERNAL_LIBJPEG=false
59717   elif test "x${with_libjpeg}" = "xsystem"; then
59718     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
59719 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
59720 
59721 else
59722    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
59723 fi
59724 
59725 
59726     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
59727 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
59728 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
59729   $as_echo_n "(cached) " >&6
59730 else
59731   ac_check_lib_save_LIBS=$LIBS
59732 LIBS="-ljpeg  $LIBS"
59733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59734 /* end confdefs.h.  */
59735 
59736 /* Override any GCC internal prototype to avoid an error.
59737    Use char because int might match the return type of a GCC
59738    builtin and then its argument prototype would still apply.  */
59739 #ifdef __cplusplus
59740 extern "C"
59741 #endif
59742 char jpeg_CreateDecompress ();
59743 int
59744 main ()
59745 {
59746 return jpeg_CreateDecompress ();
59747   ;
59748   return 0;
59749 }
59750 _ACEOF
59751 if ac_fn_cxx_try_link "$LINENO"; then :
59752   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
59753 else
59754   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
59755 fi
59756 rm -f core conftest.err conftest.$ac_objext \
59757     conftest$ac_exeext conftest.$ac_ext
59758 LIBS=$ac_check_lib_save_LIBS
59759 fi
59760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
59761 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
59762 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
59763   cat >>confdefs.h <<_ACEOF
59764 #define HAVE_LIBJPEG 1
59765 _ACEOF
59766 
59767   LIBS="-ljpeg $LIBS"
59768 
59769 else
59770    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
59771 fi
59772 
59773 
59774     USE_EXTERNAL_LIBJPEG=true
59775   else
59776     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
59777   fi
59778 
59779 
59780 
59781 
59782 
59783 # Check whether --with-giflib was given.
59784 if test "${with_giflib+set}" = set; then :
59785   withval=$with_giflib;
59786 fi
59787 
59788 
59789   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
59790 $as_echo_n "checking for which giflib to use... " >&6; }
59791   # default is bundled
59792   DEFAULT_GIFLIB=bundled
59793   # if user didn't specify, use DEFAULT_GIFLIB
59794   if test "x${with_giflib}" = "x"; then
59795     with_giflib=${DEFAULT_GIFLIB}
59796   fi
59797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
59798 $as_echo "${with_giflib}" >&6; }
59799 
59800   if test "x${with_giflib}" = "xbundled"; then
59801     USE_EXTERNAL_LIBGIF=false
59802   elif test "x${with_giflib}" = "xsystem"; then
59803     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
59804 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
59805 
59806 else
59807    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
59808 fi
59809 
59810 
59811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
59812 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
59813 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
59814   $as_echo_n "(cached) " >&6
59815 else
59816   ac_check_lib_save_LIBS=$LIBS
59817 LIBS="-lgif  $LIBS"
59818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59819 /* end confdefs.h.  */
59820 
59821 /* Override any GCC internal prototype to avoid an error.
59822    Use char because int might match the return type of a GCC
59823    builtin and then its argument prototype would still apply.  */
59824 #ifdef __cplusplus
59825 extern "C"
59826 #endif
59827 char DGifGetCode ();
59828 int
59829 main ()
59830 {
59831 return DGifGetCode ();
59832   ;
59833   return 0;
59834 }
59835 _ACEOF
59836 if ac_fn_cxx_try_link "$LINENO"; then :
59837   ac_cv_lib_gif_DGifGetCode=yes
59838 else
59839   ac_cv_lib_gif_DGifGetCode=no
59840 fi
59841 rm -f core conftest.err conftest.$ac_objext \
59842     conftest$ac_exeext conftest.$ac_ext
59843 LIBS=$ac_check_lib_save_LIBS
59844 fi
59845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
59846 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
59847 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
59848   cat >>confdefs.h <<_ACEOF
59849 #define HAVE_LIBGIF 1
59850 _ACEOF
59851 
59852   LIBS="-lgif $LIBS"
59853 
59854 else
59855    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
59856 fi
59857 
59858 
59859     USE_EXTERNAL_LIBGIF=true
59860   else
59861     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
59862   fi
59863 
59864 
59865 
59866 
59867 
59868 # Check whether --with-libpng was given.
59869 if test "${with_libpng+set}" = set; then :
59870   withval=$with_libpng;
59871 fi
59872 
59873 
59874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
59875 $as_echo_n "checking for which libpng to use... " >&6; }
59876 
59877   # default is bundled
59878   DEFAULT_LIBPNG=bundled
59879   # if user didn't specify, use DEFAULT_LIBPNG
59880   if test "x${with_libpng}" = "x"; then
59881       with_libpng=${DEFAULT_LIBPNG}
59882   fi
59883 
59884   if test "x${with_libpng}" = "xbundled"; then
59885       USE_EXTERNAL_LIBPNG=false
59886       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
59887 $as_echo "bundled" >&6; }
59888   elif test "x${with_libpng}" = "xsystem"; then
59889 
59890 pkg_failed=no
59891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
59892 $as_echo_n "checking for PNG... " >&6; }
59893 
59894 if test -n "$PNG_CFLAGS"; then
59895     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
59896  elif test -n "$PKG_CONFIG"; then
59897     if test -n "$PKG_CONFIG" && \
59898     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
59899   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
59900   ac_status=$?
59901   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59902   test $ac_status = 0; }; then
59903   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
59904 else
59905   pkg_failed=yes
59906 fi
59907  else
59908     pkg_failed=untried
59909 fi
59910 if test -n "$PNG_LIBS"; then
59911     pkg_cv_PNG_LIBS="$PNG_LIBS"
59912  elif test -n "$PKG_CONFIG"; then
59913     if test -n "$PKG_CONFIG" && \
59914     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
59915   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
59916   ac_status=$?
59917   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59918   test $ac_status = 0; }; then
59919   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
59920 else
59921   pkg_failed=yes
59922 fi
59923  else
59924     pkg_failed=untried
59925 fi
59926 
59927 
59928 
59929 if test $pkg_failed = yes; then
59930 
59931 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59932         _pkg_short_errors_supported=yes
59933 else
59934         _pkg_short_errors_supported=no
59935 fi
59936         if test $_pkg_short_errors_supported = yes; then
59937                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
59938         else
59939                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
59940         fi
59941         # Put the nasty error message in config.log where it belongs
59942         echo "$PNG_PKG_ERRORS" >&5
59943 
59944         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59945 $as_echo "no" >&6; }
59946                  LIBPNG_FOUND=no
59947 elif test $pkg_failed = untried; then
59948          LIBPNG_FOUND=no
59949 else
59950         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
59951         PNG_LIBS=$pkg_cv_PNG_LIBS
59952         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59953 $as_echo "yes" >&6; }
59954          LIBPNG_FOUND=yes
59955 fi
59956       if test "x${LIBPNG_FOUND}" = "xyes"; then
59957           USE_EXTERNAL_LIBPNG=true
59958           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
59959 $as_echo "system" >&6; }
59960       else
59961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
59962 $as_echo "system not found" >&6; }
59963           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
59964       fi
59965   else
59966       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
59967   fi
59968 
59969 
59970 
59971 
59972 
59973 # Check whether --with-zlib was given.
59974 if test "${with_zlib+set}" = set; then :
59975   withval=$with_zlib;
59976 fi
59977 
59978 
59979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
59980 $as_echo_n "checking for compress in -lz... " >&6; }
59981 if ${ac_cv_lib_z_compress+:} false; then :
59982   $as_echo_n "(cached) " >&6
59983 else
59984   ac_check_lib_save_LIBS=$LIBS
59985 LIBS="-lz  $LIBS"
59986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59987 /* end confdefs.h.  */
59988 
59989 /* Override any GCC internal prototype to avoid an error.
59990    Use char because int might match the return type of a GCC
59991    builtin and then its argument prototype would still apply.  */
59992 #ifdef __cplusplus
59993 extern "C"
59994 #endif
59995 char compress ();
59996 int
59997 main ()
59998 {
59999 return compress ();
60000   ;
60001   return 0;
60002 }
60003 _ACEOF
60004 if ac_fn_cxx_try_link "$LINENO"; then :
60005   ac_cv_lib_z_compress=yes
60006 else
60007   ac_cv_lib_z_compress=no
60008 fi
60009 rm -f core conftest.err conftest.$ac_objext \
60010     conftest$ac_exeext conftest.$ac_ext
60011 LIBS=$ac_check_lib_save_LIBS
60012 fi
60013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
60014 $as_echo "$ac_cv_lib_z_compress" >&6; }
60015 if test "x$ac_cv_lib_z_compress" = xyes; then :
60016    ZLIB_FOUND=yes
60017 else
60018    ZLIB_FOUND=no
60019 fi
60020 
60021 
60022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
60023 $as_echo_n "checking for which zlib to use... " >&6; }
60024 
60025   DEFAULT_ZLIB=bundled
60026   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60027     # On macosx default is system...on others default is bundled
60028     DEFAULT_ZLIB=system
60029   fi
60030 
60031   if test "x${ZLIB_FOUND}" != "xyes"; then
60032     # If we don't find any system...set default to bundled
60033     DEFAULT_ZLIB=bundled
60034   fi
60035 
60036   # If user didn't specify, use DEFAULT_ZLIB
60037   if test "x${with_zlib}" = "x"; then
60038     with_zlib=${DEFAULT_ZLIB}
60039   fi
60040 
60041   if test "x${with_zlib}" = "xbundled"; then
60042     USE_EXTERNAL_LIBZ=false
60043     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
60044 $as_echo "bundled" >&6; }
60045   elif test "x${with_zlib}" = "xsystem"; then
60046     if test "x${ZLIB_FOUND}" = "xyes"; then
60047       USE_EXTERNAL_LIBZ=true
60048       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
60049 $as_echo "system" >&6; }
60050     else
60051       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
60052 $as_echo "system not found" >&6; }
60053       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
60054     fi
60055   else
60056     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
60057   fi
60058 
60059 
60060 
60061 
60062 
60063 # Check whether --with-lcms was given.
60064 if test "${with_lcms+set}" = set; then :
60065   withval=$with_lcms;
60066 fi
60067 
60068 
60069   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
60070 $as_echo_n "checking for which lcms to use... " >&6; }
60071 
60072   DEFAULT_LCMS=bundled
60073   # If user didn't specify, use DEFAULT_LCMS
60074   if test "x${with_lcms}" = "x"; then
60075       with_lcms=${DEFAULT_LCMS}
60076   fi
60077 
60078   if test "x${with_lcms}" = "xbundled"; then
60079     USE_EXTERNAL_LCMS=false
60080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
60081 $as_echo "bundled" >&6; }
60082   elif test "x${with_lcms}" = "xsystem"; then
60083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
60084 $as_echo "system" >&6; }
60085 
60086 pkg_failed=no
60087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
60088 $as_echo_n "checking for LCMS... " >&6; }
60089 
60090 if test -n "$LCMS_CFLAGS"; then
60091     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
60092  elif test -n "$PKG_CONFIG"; then
60093     if test -n "$PKG_CONFIG" && \
60094     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
60095   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
60096   ac_status=$?
60097   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60098   test $ac_status = 0; }; then
60099   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
60100 else
60101   pkg_failed=yes
60102 fi
60103  else
60104     pkg_failed=untried
60105 fi
60106 if test -n "$LCMS_LIBS"; then
60107     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
60108  elif test -n "$PKG_CONFIG"; then
60109     if test -n "$PKG_CONFIG" && \
60110     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
60111   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
60112   ac_status=$?
60113   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60114   test $ac_status = 0; }; then
60115   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
60116 else
60117   pkg_failed=yes
60118 fi
60119  else
60120     pkg_failed=untried
60121 fi
60122 
60123 
60124 
60125 if test $pkg_failed = yes; then
60126 
60127 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60128         _pkg_short_errors_supported=yes
60129 else
60130         _pkg_short_errors_supported=no
60131 fi
60132         if test $_pkg_short_errors_supported = yes; then
60133                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
60134         else
60135                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
60136         fi
60137         # Put the nasty error message in config.log where it belongs
60138         echo "$LCMS_PKG_ERRORS" >&5
60139 
60140         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60141 $as_echo "no" >&6; }
60142                 LCMS_FOUND=no
60143 elif test $pkg_failed = untried; then
60144         LCMS_FOUND=no
60145 else
60146         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
60147         LCMS_LIBS=$pkg_cv_LCMS_LIBS
60148         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60149 $as_echo "yes" >&6; }
60150         LCMS_FOUND=yes
60151 fi
60152     if test "x${LCMS_FOUND}" = "xyes"; then
60153       USE_EXTERNAL_LCMS=true
60154     else
60155       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
60156     fi
60157   else
60158     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
60159   fi
60160 
60161 
60162 
60163 
60164 
60165 
60166 
60167 
60168 
60169 
60170 
60171   # Setup libm (the maths library)
60172   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
60173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
60174 $as_echo_n "checking for cos in -lm... " >&6; }
60175 if ${ac_cv_lib_m_cos+:} false; then :
60176   $as_echo_n "(cached) " >&6
60177 else
60178   ac_check_lib_save_LIBS=$LIBS
60179 LIBS="-lm  $LIBS"
60180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60181 /* end confdefs.h.  */
60182 
60183 /* Override any GCC internal prototype to avoid an error.
60184    Use char because int might match the return type of a GCC
60185    builtin and then its argument prototype would still apply.  */
60186 #ifdef __cplusplus
60187 extern "C"
60188 #endif
60189 char cos ();
60190 int
60191 main ()
60192 {
60193 return cos ();
60194   ;
60195   return 0;
60196 }
60197 _ACEOF
60198 if ac_fn_cxx_try_link "$LINENO"; then :
60199   ac_cv_lib_m_cos=yes
60200 else
60201   ac_cv_lib_m_cos=no
60202 fi
60203 rm -f core conftest.err conftest.$ac_objext \
60204     conftest$ac_exeext conftest.$ac_ext
60205 LIBS=$ac_check_lib_save_LIBS
60206 fi
60207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
60208 $as_echo "$ac_cv_lib_m_cos" >&6; }
60209 if test "x$ac_cv_lib_m_cos" = xyes; then :
60210   cat >>confdefs.h <<_ACEOF
60211 #define HAVE_LIBM 1
60212 _ACEOF
60213 
60214   LIBS="-lm $LIBS"
60215 
60216 else
60217 
60218         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
60219 $as_echo "$as_me: Maths library was not found" >&6;}
60220 
60221 fi
60222 
60223     LIBM="-lm"
60224   else
60225     LIBM=""
60226   fi
60227 
60228 
60229   # Setup libdl (for dynamic library loading)
60230   save_LIBS="$LIBS"
60231   LIBS=""
60232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
60233 $as_echo_n "checking for dlopen in -ldl... " >&6; }
60234 if ${ac_cv_lib_dl_dlopen+:} false; then :
60235   $as_echo_n "(cached) " >&6
60236 else
60237   ac_check_lib_save_LIBS=$LIBS
60238 LIBS="-ldl  $LIBS"
60239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60240 /* end confdefs.h.  */
60241 
60242 /* Override any GCC internal prototype to avoid an error.
60243    Use char because int might match the return type of a GCC
60244    builtin and then its argument prototype would still apply.  */
60245 #ifdef __cplusplus
60246 extern "C"
60247 #endif
60248 char dlopen ();
60249 int
60250 main ()
60251 {
60252 return dlopen ();
60253   ;
60254   return 0;
60255 }
60256 _ACEOF
60257 if ac_fn_cxx_try_link "$LINENO"; then :
60258   ac_cv_lib_dl_dlopen=yes
60259 else
60260   ac_cv_lib_dl_dlopen=no
60261 fi
60262 rm -f core conftest.err conftest.$ac_objext \
60263     conftest$ac_exeext conftest.$ac_ext
60264 LIBS=$ac_check_lib_save_LIBS
60265 fi
60266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
60267 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
60268 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
60269   cat >>confdefs.h <<_ACEOF
60270 #define HAVE_LIBDL 1
60271 _ACEOF
60272 
60273   LIBS="-ldl $LIBS"
60274 
60275 fi
60276 
60277   LIBDL="$LIBS"
60278 
60279   LIBS="$save_LIBS"
60280 
60281   # Deprecated libraries, keep the flags for backwards compatibility
60282   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
60283 
60284 
60285 # Check whether --with-dxsdk was given.
60286 if test "${with_dxsdk+set}" = set; then :
60287   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
60288 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
60289 fi
60290 
60291 
60292 
60293 
60294 # Check whether --with-dxsdk-lib was given.
60295 if test "${with_dxsdk_lib+set}" = set; then :
60296   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
60297 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
60298 fi
60299 
60300 
60301 
60302 
60303 # Check whether --with-dxsdk-include was given.
60304 if test "${with_dxsdk_include+set}" = set; then :
60305   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
60306 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
60307 fi
60308 
60309 
60310   fi
60311 
60312   # Control if libzip can use mmap. Available for purposes of overriding.
60313   LIBZIP_CAN_USE_MMAP=true
60314 
60315 
60316 
60317 
60318 
60319 
60320 
60321 
60322 
60323 
60324 
60325 
60326 
60327 
60328 ###############################################################################
60329 #
60330 # We need to do some final tweaking, when everything else is done.
60331 #
60332 ###############################################################################
60333 
60334 
60335   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
60336 
60337 
60338 
60339   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
60340 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
60341 
60342   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
60343     ENABLE_INTREE_EC=yes
60344     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60345 $as_echo "yes" >&6; }
60346   else
60347     ENABLE_INTREE_EC=no
60348     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60349 $as_echo "no" >&6; }
60350   fi
60351 
60352 
60353 
60354 
60355 ###############################################################################
60356 #
60357 # Configure parts of the build that only affect the build performance,
60358 # not the result.
60359 #
60360 ###############################################################################
60361 
60362 
60363   # How many cores do we have on this build system?
60364 
60365 # Check whether --with-num-cores was given.
60366 if test "${with_num_cores+set}" = set; then :
60367   withval=$with_num_cores;
60368 fi
60369 
60370   if test "x$with_num_cores" = x; then
60371     # The number of cores were not specified, try to probe them.
60372 
60373   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
60374 $as_echo_n "checking for number of cores... " >&6; }
60375   NUM_CORES=1
60376   FOUND_CORES=no
60377 
60378   if test -f /proc/cpuinfo; then
60379     # Looks like a Linux (or cygwin) system
60380     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
60381     FOUND_CORES=yes
60382   elif test -x /usr/sbin/psrinfo; then
60383     # Looks like a Solaris system
60384     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
60385     FOUND_CORES=yes
60386   elif test -x /usr/sbin/sysctl; then
60387     # Looks like a MacOSX system
60388     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
60389     FOUND_CORES=yes
60390   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
60391     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
60392     FOUND_CORES=yes
60393   elif test -n "$NUMBER_OF_PROCESSORS"; then
60394     # On windows, look in the env
60395     NUM_CORES=$NUMBER_OF_PROCESSORS
60396     FOUND_CORES=yes
60397   fi
60398 
60399   if test "x$FOUND_CORES" = xyes; then
60400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
60401 $as_echo "$NUM_CORES" >&6; }
60402   else
60403     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
60404 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
60405     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
60406 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
60407   fi
60408 
60409   else
60410     NUM_CORES=$with_num_cores
60411   fi
60412 
60413 
60414 
60415   # How much memory do we have on this build system?
60416 
60417 # Check whether --with-memory-size was given.
60418 if test "${with_memory_size+set}" = set; then :
60419   withval=$with_memory_size;
60420 fi
60421 
60422   if test "x$with_memory_size" = x; then
60423     # The memory size was not specified, try to probe it.
60424 
60425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
60426 $as_echo_n "checking for memory size... " >&6; }
60427   # Default to 1024 MB
60428   MEMORY_SIZE=1024
60429   FOUND_MEM=no
60430 
60431   if test -f /proc/meminfo; then
60432     # Looks like a Linux (or cygwin) system
60433     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
60434     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
60435     FOUND_MEM=yes
60436   elif test -x /usr/sbin/prtconf; then
60437     # Looks like a Solaris or AIX system
60438     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
60439     FOUND_MEM=yes
60440   elif test -x /usr/sbin/sysctl; then
60441     # Looks like a MacOSX system
60442     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
60443     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
60444     FOUND_MEM=yes
60445   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
60446     # Windows, but without cygwin
60447     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
60448     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
60449     FOUND_MEM=yes
60450   fi
60451 
60452   if test "x$FOUND_MEM" = xyes; then
60453     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
60454 $as_echo "$MEMORY_SIZE MB" >&6; }
60455   else
60456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
60457 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
60458     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
60459 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
60460   fi
60461 
60462   else
60463     MEMORY_SIZE=$with_memory_size
60464   fi
60465 
60466 
60467 
60468   # Provide a decent default number of parallel jobs for make depending on
60469   # number of cores, amount of memory and machine architecture.
60470 
60471 # Check whether --with-jobs was given.
60472 if test "${with_jobs+set}" = set; then :
60473   withval=$with_jobs;
60474 fi
60475 
60476   if test "x$with_jobs" = x; then
60477     # Number of jobs was not specified, calculate.
60478     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
60479 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
60480     # Approximate memory in GB.
60481     memory_gb=`expr $MEMORY_SIZE / 1024`
60482     # Pick the lowest of memory in gb and number of cores.
60483     if test "$memory_gb" -lt "$NUM_CORES"; then
60484       JOBS="$memory_gb"
60485     else
60486       JOBS="$NUM_CORES"
60487     fi
60488     if test "$JOBS" -eq "0"; then
60489       JOBS=1
60490     fi
60491     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
60492 $as_echo "$JOBS" >&6; }
60493   else
60494     JOBS=$with_jobs
60495   fi
60496 
60497 
60498 
60499   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
60500 
60501 # Check whether --with-test-jobs was given.
60502 if test "${with_test_jobs+set}" = set; then :
60503   withval=$with_test_jobs;
60504 fi
60505 
60506   if test "x$with_test_jobs" = x; then
60507       TEST_JOBS=0
60508   else
60509       TEST_JOBS=$with_test_jobs
60510   fi
60511 
60512 
60513 
60514 # Setup arguments for the boot jdk (after cores and memory have been setup)
60515 
60516   ##############################################################################
60517   #
60518   # Specify jvm options for anything that is run with the Boot JDK.
60519   # Not all JVM:s accept the same arguments on the command line.
60520   #
60521 
60522 # Check whether --with-boot-jdk-jvmargs was given.
60523 if test "${with_boot_jdk_jvmargs+set}" = set; then :
60524   withval=$with_boot_jdk_jvmargs;
60525 fi
60526 
60527 
60528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
60529 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
60530 
60531   # Disable special log output when a debug build is used as Boot JDK...
60532 
60533   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
60534   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
60535   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
60536   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60537   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60538   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60539     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
60540     JVM_ARG_OK=true
60541   else
60542     $ECHO "Arg failed:" >&5
60543     $ECHO "$OUTPUT" >&5
60544     JVM_ARG_OK=false
60545   fi
60546 
60547 
60548   # Apply user provided options.
60549 
60550   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
60551   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
60552   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
60553   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60554   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60555   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60556     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
60557     JVM_ARG_OK=true
60558   else
60559     $ECHO "Arg failed:" >&5
60560     $ECHO "$OUTPUT" >&5
60561     JVM_ARG_OK=false
60562   fi
60563 
60564 
60565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
60566 $as_echo "$boot_jdk_jvmargs" >&6; }
60567 
60568   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
60569   JAVA_FLAGS=$boot_jdk_jvmargs
60570 
60571 
60572 
60573   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
60574 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
60575 
60576   # Starting amount of heap memory.
60577 
60578   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
60579   $ECHO "Command: $JAVA -Xms64M -version" >&5
60580   OUTPUT=`$JAVA -Xms64M -version 2>&1`
60581   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60582   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60583   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60584     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
60585     JVM_ARG_OK=true
60586   else
60587     $ECHO "Arg failed:" >&5
60588     $ECHO "$OUTPUT" >&5
60589     JVM_ARG_OK=false
60590   fi
60591 
60592 
60593   # Maximum amount of heap memory.
60594   # Maximum stack size.
60595   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
60596   if test "x$BOOT_JDK_BITS" = "x32"; then
60597     if test "$JVM_MAX_HEAP" -gt "1100"; then
60598       JVM_MAX_HEAP=1100
60599     elif test "$JVM_MAX_HEAP" -lt "512"; then
60600       JVM_MAX_HEAP=512
60601     fi
60602     STACK_SIZE=768
60603   else
60604     # Running a 64 bit JVM allows for and requires a bigger heap
60605     if test "$JVM_MAX_HEAP" -gt "1600"; then
60606       JVM_MAX_HEAP=1600
60607     elif test "$JVM_MAX_HEAP" -lt "512"; then
60608       JVM_MAX_HEAP=512
60609     fi
60610     STACK_SIZE=1536
60611   fi
60612 
60613   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
60614   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
60615   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
60616   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60617   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60618   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60619     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
60620     JVM_ARG_OK=true
60621   else
60622     $ECHO "Arg failed:" >&5
60623     $ECHO "$OUTPUT" >&5
60624     JVM_ARG_OK=false
60625   fi
60626 
60627 
60628   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
60629   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
60630   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
60631   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60632   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60633   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60634     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
60635     JVM_ARG_OK=true
60636   else
60637     $ECHO "Arg failed:" >&5
60638     $ECHO "$OUTPUT" >&5
60639     JVM_ARG_OK=false
60640   fi
60641 
60642 
60643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
60644 $as_echo "$boot_jdk_jvmargs_big" >&6; }
60645 
60646   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
60647 
60648 
60649   # By default, the main javac compilations use big
60650   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
60651 
60652 
60653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
60654 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
60655 
60656   # Use serial gc for small short lived tools if possible
60657 
60658   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
60659   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
60660   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
60661   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60662   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60663   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60664     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
60665     JVM_ARG_OK=true
60666   else
60667     $ECHO "Arg failed:" >&5
60668     $ECHO "$OUTPUT" >&5
60669     JVM_ARG_OK=false
60670   fi
60671 
60672 
60673   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
60674   $ECHO "Command: $JAVA -Xms32M -version" >&5
60675   OUTPUT=`$JAVA -Xms32M -version 2>&1`
60676   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60677   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60678   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60679     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
60680     JVM_ARG_OK=true
60681   else
60682     $ECHO "Arg failed:" >&5
60683     $ECHO "$OUTPUT" >&5
60684     JVM_ARG_OK=false
60685   fi
60686 
60687 
60688   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
60689   $ECHO "Command: $JAVA -Xmx512M -version" >&5
60690   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
60691   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60692   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60693   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60694     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
60695     JVM_ARG_OK=true
60696   else
60697     $ECHO "Arg failed:" >&5
60698     $ECHO "$OUTPUT" >&5
60699     JVM_ARG_OK=false
60700   fi
60701 
60702 
60703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
60704 $as_echo "$boot_jdk_jvmargs_small" >&6; }
60705 
60706   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
60707 
60708 
60709   JAVA_TOOL_FLAGS_SMALL=""
60710   for f in $JAVA_FLAGS_SMALL; do
60711     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
60712   done
60713 
60714 
60715 
60716 # Setup smart javac (after cores and memory have been setup)
60717 
60718 
60719 # Check whether --with-sjavac-server-java was given.
60720 if test "${with_sjavac_server_java+set}" = set; then :
60721   withval=$with_sjavac_server_java;
60722 fi
60723 
60724 
60725   if test "x$with_sjavac_server_java" != x; then
60726     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
60727     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
60728     if test "x$FOUND_VERSION" = x; then
60729       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
60730     fi
60731   else
60732     SJAVAC_SERVER_JAVA="$JAVA"
60733   fi
60734 
60735 
60736   if test "$MEMORY_SIZE" -gt "3000"; then
60737 
60738   $ECHO "Check if jvm arg is ok: -d64" >&5
60739   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
60740   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
60741   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60742   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60743   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60744     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
60745     JVM_ARG_OK=true
60746   else
60747     $ECHO "Arg failed:" >&5
60748     $ECHO "$OUTPUT" >&5
60749     JVM_ARG_OK=false
60750   fi
60751 
60752     if test "$JVM_ARG_OK" = true; then
60753       JVM_64BIT=true
60754       JVM_ARG_OK=false
60755     fi
60756   fi
60757 
60758   MX_VALUE=`expr $MEMORY_SIZE / 2`
60759   if test "$JVM_64BIT" = true; then
60760     # Set ms lower than mx since more than one instance of the server might
60761     # get launched at the same time before they figure out which instance won.
60762     MS_VALUE=512
60763     if test "$MX_VALUE" -gt "2048"; then
60764       MX_VALUE=2048
60765     fi
60766   else
60767     MS_VALUE=256
60768     if test "$MX_VALUE" -gt "1500"; then
60769       MX_VALUE=1500
60770     fi
60771   fi
60772   if test "$MX_VALUE" -lt "512"; then
60773     MX_VALUE=512
60774   fi
60775 
60776   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
60777   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
60778   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
60779   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
60780   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
60781   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
60782     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
60783     JVM_ARG_OK=true
60784   else
60785     $ECHO "Arg failed:" >&5
60786     $ECHO "$OUTPUT" >&5
60787     JVM_ARG_OK=false
60788   fi
60789 
60790 
60791 
60792   # Check whether --enable-sjavac was given.
60793 if test "${enable_sjavac+set}" = set; then :
60794   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
60795 else
60796   ENABLE_SJAVAC="no"
60797 fi
60798 
60799   if test "x$JVM_ARG_OK" = "xfalse"; then
60800     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
60801 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
60802     ENABLE_SJAVAC="no"
60803   fi
60804   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
60805 $as_echo_n "checking whether to use sjavac... " >&6; }
60806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
60807 $as_echo "$ENABLE_SJAVAC" >&6; }
60808 
60809 
60810   # Check whether --enable-javac-server was given.
60811 if test "${enable_javac_server+set}" = set; then :
60812   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
60813 else
60814   ENABLE_JAVAC_SERVER="yes"
60815 fi
60816 
60817   if test "x$JVM_ARG_OK" = "xfalse"; then
60818     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
60819 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
60820     ENABLE_JAVAC_SERVER="no"
60821   fi
60822   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
60823 $as_echo_n "checking whether to use javac server... " >&6; }
60824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
60825 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
60826 
60827 
60828   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
60829     # When using a server javac, the small client instances do not need much
60830     # resources.
60831     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
60832   fi
60833 
60834 
60835 # Setup use of icecc if requested
60836 
60837   # Check whether --enable-icecc was given.
60838 if test "${enable_icecc+set}" = set; then :
60839   enableval=$enable_icecc;
60840 fi
60841 
60842 
60843   if test "x${enable_icecc}" = "xyes"; then
60844 
60845 
60846 
60847   # Publish this variable in the help.
60848 
60849 
60850   if [ -z "${ICECC_CMD+x}" ]; then
60851     # The variable is not set by user, try to locate tool using the code snippet
60852     for ac_prog in icecc
60853 do
60854   # Extract the first word of "$ac_prog", so it can be a program name with args.
60855 set dummy $ac_prog; ac_word=$2
60856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60857 $as_echo_n "checking for $ac_word... " >&6; }
60858 if ${ac_cv_path_ICECC_CMD+:} false; then :
60859   $as_echo_n "(cached) " >&6
60860 else
60861   case $ICECC_CMD in
60862   [\\/]* | ?:[\\/]*)
60863   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
60864   ;;
60865   *)
60866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60867 for as_dir in $PATH
60868 do
60869   IFS=$as_save_IFS
60870   test -z "$as_dir" && as_dir=.
60871     for ac_exec_ext in '' $ac_executable_extensions; do
60872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60873     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
60874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60875     break 2
60876   fi
60877 done
60878   done
60879 IFS=$as_save_IFS
60880 
60881   ;;
60882 esac
60883 fi
60884 ICECC_CMD=$ac_cv_path_ICECC_CMD
60885 if test -n "$ICECC_CMD"; then
60886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
60887 $as_echo "$ICECC_CMD" >&6; }
60888 else
60889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60890 $as_echo "no" >&6; }
60891 fi
60892 
60893 
60894   test -n "$ICECC_CMD" && break
60895 done
60896 
60897   else
60898     # The variable is set, but is it from the command line or the environment?
60899 
60900     # Try to remove the string !ICECC_CMD! from our list.
60901     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
60902     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60903       # If it failed, the variable was not from the command line. Ignore it,
60904       # but warn the user (except for BASH, which is always set by the calling BASH).
60905       if test "xICECC_CMD" != xBASH; then
60906         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
60907 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
60908       fi
60909       # Try to locate tool using the code snippet
60910       for ac_prog in icecc
60911 do
60912   # Extract the first word of "$ac_prog", so it can be a program name with args.
60913 set dummy $ac_prog; ac_word=$2
60914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60915 $as_echo_n "checking for $ac_word... " >&6; }
60916 if ${ac_cv_path_ICECC_CMD+:} false; then :
60917   $as_echo_n "(cached) " >&6
60918 else
60919   case $ICECC_CMD in
60920   [\\/]* | ?:[\\/]*)
60921   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
60922   ;;
60923   *)
60924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60925 for as_dir in $PATH
60926 do
60927   IFS=$as_save_IFS
60928   test -z "$as_dir" && as_dir=.
60929     for ac_exec_ext in '' $ac_executable_extensions; do
60930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60931     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
60932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60933     break 2
60934   fi
60935 done
60936   done
60937 IFS=$as_save_IFS
60938 
60939   ;;
60940 esac
60941 fi
60942 ICECC_CMD=$ac_cv_path_ICECC_CMD
60943 if test -n "$ICECC_CMD"; then
60944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
60945 $as_echo "$ICECC_CMD" >&6; }
60946 else
60947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60948 $as_echo "no" >&6; }
60949 fi
60950 
60951 
60952   test -n "$ICECC_CMD" && break
60953 done
60954 
60955     else
60956       # If it succeeded, then it was overridden by the user. We will use it
60957       # for the tool.
60958 
60959       # First remove it from the list of overridden variables, so we can test
60960       # for unknown variables in the end.
60961       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60962 
60963       # Check if we try to supply an empty value
60964       if test "x$ICECC_CMD" = x; then
60965         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
60966 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
60967         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
60968 $as_echo_n "checking for ICECC_CMD... " >&6; }
60969         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60970 $as_echo "disabled" >&6; }
60971       else
60972         # Check if the provided tool contains a complete path.
60973         tool_specified="$ICECC_CMD"
60974         tool_basename="${tool_specified##*/}"
60975         if test "x$tool_basename" = "x$tool_specified"; then
60976           # A command without a complete path is provided, search $PATH.
60977           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
60978 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
60979           # Extract the first word of "$tool_basename", so it can be a program name with args.
60980 set dummy $tool_basename; ac_word=$2
60981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60982 $as_echo_n "checking for $ac_word... " >&6; }
60983 if ${ac_cv_path_ICECC_CMD+:} false; then :
60984   $as_echo_n "(cached) " >&6
60985 else
60986   case $ICECC_CMD in
60987   [\\/]* | ?:[\\/]*)
60988   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
60989   ;;
60990   *)
60991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60992 for as_dir in $PATH
60993 do
60994   IFS=$as_save_IFS
60995   test -z "$as_dir" && as_dir=.
60996     for ac_exec_ext in '' $ac_executable_extensions; do
60997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60998     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
60999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61000     break 2
61001   fi
61002 done
61003   done
61004 IFS=$as_save_IFS
61005 
61006   ;;
61007 esac
61008 fi
61009 ICECC_CMD=$ac_cv_path_ICECC_CMD
61010 if test -n "$ICECC_CMD"; then
61011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
61012 $as_echo "$ICECC_CMD" >&6; }
61013 else
61014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61015 $as_echo "no" >&6; }
61016 fi
61017 
61018 
61019           if test "x$ICECC_CMD" = x; then
61020             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61021           fi
61022         else
61023           # Otherwise we believe it is a complete path. Use it as it is.
61024           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
61025 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
61026           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
61027 $as_echo_n "checking for ICECC_CMD... " >&6; }
61028           if test ! -x "$tool_specified"; then
61029             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61030 $as_echo "not found" >&6; }
61031             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
61032           fi
61033           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61034 $as_echo "$tool_specified" >&6; }
61035         fi
61036       fi
61037     fi
61038 
61039   fi
61040 
61041 
61042 
61043   if test "x$ICECC_CMD" = x; then
61044     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
61045   fi
61046 
61047 
61048     old_path="$PATH"
61049 
61050     # Look for icecc-create-env in some known places
61051     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
61052 
61053 
61054 
61055   # Publish this variable in the help.
61056 
61057 
61058   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
61059     # The variable is not set by user, try to locate tool using the code snippet
61060     for ac_prog in icecc-create-env
61061 do
61062   # Extract the first word of "$ac_prog", so it can be a program name with args.
61063 set dummy $ac_prog; ac_word=$2
61064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61065 $as_echo_n "checking for $ac_word... " >&6; }
61066 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
61067   $as_echo_n "(cached) " >&6
61068 else
61069   case $ICECC_CREATE_ENV in
61070   [\\/]* | ?:[\\/]*)
61071   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
61072   ;;
61073   *)
61074   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61075 for as_dir in $PATH
61076 do
61077   IFS=$as_save_IFS
61078   test -z "$as_dir" && as_dir=.
61079     for ac_exec_ext in '' $ac_executable_extensions; do
61080   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61081     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
61082     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61083     break 2
61084   fi
61085 done
61086   done
61087 IFS=$as_save_IFS
61088 
61089   ;;
61090 esac
61091 fi
61092 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
61093 if test -n "$ICECC_CREATE_ENV"; then
61094   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
61095 $as_echo "$ICECC_CREATE_ENV" >&6; }
61096 else
61097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61098 $as_echo "no" >&6; }
61099 fi
61100 
61101 
61102   test -n "$ICECC_CREATE_ENV" && break
61103 done
61104 
61105   else
61106     # The variable is set, but is it from the command line or the environment?
61107 
61108     # Try to remove the string !ICECC_CREATE_ENV! from our list.
61109     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
61110     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
61111       # If it failed, the variable was not from the command line. Ignore it,
61112       # but warn the user (except for BASH, which is always set by the calling BASH).
61113       if test "xICECC_CREATE_ENV" != xBASH; then
61114         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
61115 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
61116       fi
61117       # Try to locate tool using the code snippet
61118       for ac_prog in icecc-create-env
61119 do
61120   # Extract the first word of "$ac_prog", so it can be a program name with args.
61121 set dummy $ac_prog; ac_word=$2
61122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61123 $as_echo_n "checking for $ac_word... " >&6; }
61124 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
61125   $as_echo_n "(cached) " >&6
61126 else
61127   case $ICECC_CREATE_ENV in
61128   [\\/]* | ?:[\\/]*)
61129   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
61130   ;;
61131   *)
61132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61133 for as_dir in $PATH
61134 do
61135   IFS=$as_save_IFS
61136   test -z "$as_dir" && as_dir=.
61137     for ac_exec_ext in '' $ac_executable_extensions; do
61138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61139     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
61140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61141     break 2
61142   fi
61143 done
61144   done
61145 IFS=$as_save_IFS
61146 
61147   ;;
61148 esac
61149 fi
61150 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
61151 if test -n "$ICECC_CREATE_ENV"; then
61152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
61153 $as_echo "$ICECC_CREATE_ENV" >&6; }
61154 else
61155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61156 $as_echo "no" >&6; }
61157 fi
61158 
61159 
61160   test -n "$ICECC_CREATE_ENV" && break
61161 done
61162 
61163     else
61164       # If it succeeded, then it was overridden by the user. We will use it
61165       # for the tool.
61166 
61167       # First remove it from the list of overridden variables, so we can test
61168       # for unknown variables in the end.
61169       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
61170 
61171       # Check if we try to supply an empty value
61172       if test "x$ICECC_CREATE_ENV" = x; then
61173         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
61174 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
61175         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
61176 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
61177         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
61178 $as_echo "disabled" >&6; }
61179       else
61180         # Check if the provided tool contains a complete path.
61181         tool_specified="$ICECC_CREATE_ENV"
61182         tool_basename="${tool_specified##*/}"
61183         if test "x$tool_basename" = "x$tool_specified"; then
61184           # A command without a complete path is provided, search $PATH.
61185           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
61186 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
61187           # Extract the first word of "$tool_basename", so it can be a program name with args.
61188 set dummy $tool_basename; ac_word=$2
61189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61190 $as_echo_n "checking for $ac_word... " >&6; }
61191 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
61192   $as_echo_n "(cached) " >&6
61193 else
61194   case $ICECC_CREATE_ENV in
61195   [\\/]* | ?:[\\/]*)
61196   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
61197   ;;
61198   *)
61199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61200 for as_dir in $PATH
61201 do
61202   IFS=$as_save_IFS
61203   test -z "$as_dir" && as_dir=.
61204     for ac_exec_ext in '' $ac_executable_extensions; do
61205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61206     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
61207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61208     break 2
61209   fi
61210 done
61211   done
61212 IFS=$as_save_IFS
61213 
61214   ;;
61215 esac
61216 fi
61217 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
61218 if test -n "$ICECC_CREATE_ENV"; then
61219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
61220 $as_echo "$ICECC_CREATE_ENV" >&6; }
61221 else
61222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61223 $as_echo "no" >&6; }
61224 fi
61225 
61226 
61227           if test "x$ICECC_CREATE_ENV" = x; then
61228             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61229           fi
61230         else
61231           # Otherwise we believe it is a complete path. Use it as it is.
61232           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
61233 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
61234           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
61235 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
61236           if test ! -x "$tool_specified"; then
61237             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61238 $as_echo "not found" >&6; }
61239             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
61240           fi
61241           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61242 $as_echo "$tool_specified" >&6; }
61243         fi
61244       fi
61245     fi
61246 
61247   fi
61248 
61249 
61250 
61251   if test "x$ICECC_CREATE_ENV" = x; then
61252     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
61253   fi
61254 
61255 
61256     # Use icecc-create-env to create a minimal compilation environment that can
61257     # be sent to the other hosts in the icecream cluster.
61258     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
61259     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
61260     # Older versions of icecc does not have the --gcc parameter
61261     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
61262       icecc_gcc_arg="--gcc"
61263     fi
61264     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
61265 
61266   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61267       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
61268           ${icecc_create_env_log} 2>&1 )
61269   if test "$?" != "0"; then
61270     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61271 $as_echo "$as_me: icecc-create-env output:" >&6;}
61272     cat \
61273           ${icecc_create_env_log}
61274     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61275   fi
61276 
61277     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
61278       # For clang, the icecc compilerwrapper is needed. It usually resides next
61279       # to icecc-create-env.
61280 
61281 
61282 
61283   # Publish this variable in the help.
61284 
61285 
61286   if [ -z "${ICECC_WRAPPER+x}" ]; then
61287     # The variable is not set by user, try to locate tool using the code snippet
61288     for ac_prog in compilerwrapper
61289 do
61290   # Extract the first word of "$ac_prog", so it can be a program name with args.
61291 set dummy $ac_prog; ac_word=$2
61292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61293 $as_echo_n "checking for $ac_word... " >&6; }
61294 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
61295   $as_echo_n "(cached) " >&6
61296 else
61297   case $ICECC_WRAPPER in
61298   [\\/]* | ?:[\\/]*)
61299   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
61300   ;;
61301   *)
61302   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61303 for as_dir in $PATH
61304 do
61305   IFS=$as_save_IFS
61306   test -z "$as_dir" && as_dir=.
61307     for ac_exec_ext in '' $ac_executable_extensions; do
61308   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61309     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
61310     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61311     break 2
61312   fi
61313 done
61314   done
61315 IFS=$as_save_IFS
61316 
61317   ;;
61318 esac
61319 fi
61320 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
61321 if test -n "$ICECC_WRAPPER"; then
61322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
61323 $as_echo "$ICECC_WRAPPER" >&6; }
61324 else
61325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61326 $as_echo "no" >&6; }
61327 fi
61328 
61329 
61330   test -n "$ICECC_WRAPPER" && break
61331 done
61332 
61333   else
61334     # The variable is set, but is it from the command line or the environment?
61335 
61336     # Try to remove the string !ICECC_WRAPPER! from our list.
61337     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
61338     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
61339       # If it failed, the variable was not from the command line. Ignore it,
61340       # but warn the user (except for BASH, which is always set by the calling BASH).
61341       if test "xICECC_WRAPPER" != xBASH; then
61342         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
61343 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
61344       fi
61345       # Try to locate tool using the code snippet
61346       for ac_prog in compilerwrapper
61347 do
61348   # Extract the first word of "$ac_prog", so it can be a program name with args.
61349 set dummy $ac_prog; ac_word=$2
61350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61351 $as_echo_n "checking for $ac_word... " >&6; }
61352 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
61353   $as_echo_n "(cached) " >&6
61354 else
61355   case $ICECC_WRAPPER in
61356   [\\/]* | ?:[\\/]*)
61357   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
61358   ;;
61359   *)
61360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61361 for as_dir in $PATH
61362 do
61363   IFS=$as_save_IFS
61364   test -z "$as_dir" && as_dir=.
61365     for ac_exec_ext in '' $ac_executable_extensions; do
61366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61367     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
61368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61369     break 2
61370   fi
61371 done
61372   done
61373 IFS=$as_save_IFS
61374 
61375   ;;
61376 esac
61377 fi
61378 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
61379 if test -n "$ICECC_WRAPPER"; then
61380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
61381 $as_echo "$ICECC_WRAPPER" >&6; }
61382 else
61383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61384 $as_echo "no" >&6; }
61385 fi
61386 
61387 
61388   test -n "$ICECC_WRAPPER" && break
61389 done
61390 
61391     else
61392       # If it succeeded, then it was overridden by the user. We will use it
61393       # for the tool.
61394 
61395       # First remove it from the list of overridden variables, so we can test
61396       # for unknown variables in the end.
61397       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
61398 
61399       # Check if we try to supply an empty value
61400       if test "x$ICECC_WRAPPER" = x; then
61401         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
61402 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
61403         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
61404 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
61405         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
61406 $as_echo "disabled" >&6; }
61407       else
61408         # Check if the provided tool contains a complete path.
61409         tool_specified="$ICECC_WRAPPER"
61410         tool_basename="${tool_specified##*/}"
61411         if test "x$tool_basename" = "x$tool_specified"; then
61412           # A command without a complete path is provided, search $PATH.
61413           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
61414 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
61415           # Extract the first word of "$tool_basename", so it can be a program name with args.
61416 set dummy $tool_basename; ac_word=$2
61417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61418 $as_echo_n "checking for $ac_word... " >&6; }
61419 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
61420   $as_echo_n "(cached) " >&6
61421 else
61422   case $ICECC_WRAPPER in
61423   [\\/]* | ?:[\\/]*)
61424   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
61425   ;;
61426   *)
61427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61428 for as_dir in $PATH
61429 do
61430   IFS=$as_save_IFS
61431   test -z "$as_dir" && as_dir=.
61432     for ac_exec_ext in '' $ac_executable_extensions; do
61433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61434     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
61435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61436     break 2
61437   fi
61438 done
61439   done
61440 IFS=$as_save_IFS
61441 
61442   ;;
61443 esac
61444 fi
61445 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
61446 if test -n "$ICECC_WRAPPER"; then
61447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
61448 $as_echo "$ICECC_WRAPPER" >&6; }
61449 else
61450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61451 $as_echo "no" >&6; }
61452 fi
61453 
61454 
61455           if test "x$ICECC_WRAPPER" = x; then
61456             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61457           fi
61458         else
61459           # Otherwise we believe it is a complete path. Use it as it is.
61460           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
61461 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
61462           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
61463 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
61464           if test ! -x "$tool_specified"; then
61465             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61466 $as_echo "not found" >&6; }
61467             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
61468           fi
61469           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61470 $as_echo "$tool_specified" >&6; }
61471         fi
61472       fi
61473     fi
61474 
61475   fi
61476 
61477 
61478 
61479   if test "x$ICECC_WRAPPER" = x; then
61480     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
61481   fi
61482 
61483 
61484 
61485   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61486       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
61487   if test "$?" != "0"; then
61488     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61489 $as_echo "$as_me: icecc-create-env output:" >&6;}
61490     cat ${icecc_create_env_log}
61491     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61492   fi
61493 
61494     else
61495       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
61496     fi
61497     PATH="$old_path"
61498     # The bundle with the compiler gets a name based on checksums. Parse log file
61499     # to find it.
61500     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
61501     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
61502     if test ! -f ${ICECC_ENV_BUNDLE}; then
61503       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
61504     fi
61505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
61506 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
61507     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
61508 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
61509     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
61510 
61511     if test "x${COMPILE_TYPE}" = "xcross"; then
61512       # If cross compiling, create a separate env package for the build compiler
61513       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
61514       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
61515       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
61516 
61517   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61518       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
61519             ${icecc_create_env_log_build} 2>&1 )
61520   if test "$?" != "0"; then
61521     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61522 $as_echo "$as_me: icecc-create-env output:" >&6;}
61523     cat \
61524             ${icecc_create_env_log_build}
61525     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61526   fi
61527 
61528       elif test "x${BUILD_CC##*/}" = "xclang"; then
61529 
61530   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
61531       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
61532   if test "$?" != "0"; then
61533     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
61534 $as_echo "$as_me: icecc-create-env output:" >&6;}
61535     cat ${icecc_create_env_log_build}
61536     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
61537   fi
61538 
61539       else
61540         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
61541       fi
61542       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
61543       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
61544       if test ! -f ${ICECC_ENV_BUNDLE}; then
61545         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
61546       fi
61547       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
61548 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
61549       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
61550 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
61551       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
61552           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
61553     else
61554       BUILD_ICECC="${ICECC}"
61555     fi
61556 
61557 
61558   fi
61559 
61560 
61561 # Can the C/C++ compiler use precompiled headers?
61562 
61563 
61564   ###############################################################################
61565   #
61566   # Can the C/C++ compiler use precompiled headers?
61567   #
61568   # Check whether --enable-precompiled-headers was given.
61569 if test "${enable_precompiled_headers+set}" = set; then :
61570   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
61571 else
61572   ENABLE_PRECOMPH=yes
61573 fi
61574 
61575 
61576   USE_PRECOMPILED_HEADER=1
61577   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
61578 $as_echo_n "checking If precompiled header is enabled... " >&6; }
61579   if test "x$ENABLE_PRECOMPH" = xno; then
61580     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
61581 $as_echo "no, forced" >&6; }
61582     USE_PRECOMPILED_HEADER=0
61583   elif test "x$ICECC" != "x"; then
61584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
61585 $as_echo "no, does not work effectively with icecc" >&6; }
61586     USE_PRECOMPILED_HEADER=0
61587   else
61588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61589 $as_echo "yes" >&6; }
61590   fi
61591 
61592   if test "x$ENABLE_PRECOMPH" = xyes; then
61593     # Check that the compiler actually supports precomp headers.
61594     if test "x$TOOLCHAIN_TYPE" = xgcc; then
61595       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
61596 $as_echo_n "checking that precompiled headers work... " >&6; }
61597       echo "int alfa();" > conftest.h
61598       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
61599       if test ! -f conftest.hpp.gch; then
61600         USE_PRECOMPILED_HEADER=0
61601         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61602 $as_echo "no" >&6; }
61603       else
61604         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61605 $as_echo "yes" >&6; }
61606       fi
61607       rm -f conftest.h conftest.hpp.gch
61608     fi
61609   fi
61610 
61611 
61612 
61613 
61614 # Setup use of ccache, if available
61615 
61616   # Check whether --enable-ccache was given.
61617 if test "${enable_ccache+set}" = set; then :
61618   enableval=$enable_ccache;
61619 fi
61620 
61621 
61622   CCACHE=
61623   CCACHE_STATUS=
61624   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
61625 $as_echo_n "checking is ccache enabled... " >&6; }
61626   if test "x$enable_ccache" = xyes; then
61627     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
61628       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61629 $as_echo "yes" >&6; }
61630       OLD_PATH="$PATH"
61631       if test "x$TOOLCHAIN_PATH" != x; then
61632         PATH=$TOOLCHAIN_PATH:$PATH
61633       fi
61634 
61635 
61636 
61637   # Publish this variable in the help.
61638 
61639 
61640   if [ -z "${CCACHE+x}" ]; then
61641     # The variable is not set by user, try to locate tool using the code snippet
61642     for ac_prog in ccache
61643 do
61644   # Extract the first word of "$ac_prog", so it can be a program name with args.
61645 set dummy $ac_prog; ac_word=$2
61646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61647 $as_echo_n "checking for $ac_word... " >&6; }
61648 if ${ac_cv_path_CCACHE+:} false; then :
61649   $as_echo_n "(cached) " >&6
61650 else
61651   case $CCACHE in
61652   [\\/]* | ?:[\\/]*)
61653   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
61654   ;;
61655   *)
61656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61657 for as_dir in $PATH
61658 do
61659   IFS=$as_save_IFS
61660   test -z "$as_dir" && as_dir=.
61661     for ac_exec_ext in '' $ac_executable_extensions; do
61662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61663     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
61664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61665     break 2
61666   fi
61667 done
61668   done
61669 IFS=$as_save_IFS
61670 
61671   ;;
61672 esac
61673 fi
61674 CCACHE=$ac_cv_path_CCACHE
61675 if test -n "$CCACHE"; then
61676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
61677 $as_echo "$CCACHE" >&6; }
61678 else
61679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61680 $as_echo "no" >&6; }
61681 fi
61682 
61683 
61684   test -n "$CCACHE" && break
61685 done
61686 
61687   else
61688     # The variable is set, but is it from the command line or the environment?
61689 
61690     # Try to remove the string !CCACHE! from our list.
61691     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
61692     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
61693       # If it failed, the variable was not from the command line. Ignore it,
61694       # but warn the user (except for BASH, which is always set by the calling BASH).
61695       if test "xCCACHE" != xBASH; then
61696         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
61697 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
61698       fi
61699       # Try to locate tool using the code snippet
61700       for ac_prog in ccache
61701 do
61702   # Extract the first word of "$ac_prog", so it can be a program name with args.
61703 set dummy $ac_prog; ac_word=$2
61704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61705 $as_echo_n "checking for $ac_word... " >&6; }
61706 if ${ac_cv_path_CCACHE+:} false; then :
61707   $as_echo_n "(cached) " >&6
61708 else
61709   case $CCACHE in
61710   [\\/]* | ?:[\\/]*)
61711   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
61712   ;;
61713   *)
61714   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61715 for as_dir in $PATH
61716 do
61717   IFS=$as_save_IFS
61718   test -z "$as_dir" && as_dir=.
61719     for ac_exec_ext in '' $ac_executable_extensions; do
61720   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61721     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
61722     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61723     break 2
61724   fi
61725 done
61726   done
61727 IFS=$as_save_IFS
61728 
61729   ;;
61730 esac
61731 fi
61732 CCACHE=$ac_cv_path_CCACHE
61733 if test -n "$CCACHE"; then
61734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
61735 $as_echo "$CCACHE" >&6; }
61736 else
61737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61738 $as_echo "no" >&6; }
61739 fi
61740 
61741 
61742   test -n "$CCACHE" && break
61743 done
61744 
61745     else
61746       # If it succeeded, then it was overridden by the user. We will use it
61747       # for the tool.
61748 
61749       # First remove it from the list of overridden variables, so we can test
61750       # for unknown variables in the end.
61751       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
61752 
61753       # Check if we try to supply an empty value
61754       if test "x$CCACHE" = x; then
61755         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
61756 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
61757         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
61758 $as_echo_n "checking for CCACHE... " >&6; }
61759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
61760 $as_echo "disabled" >&6; }
61761       else
61762         # Check if the provided tool contains a complete path.
61763         tool_specified="$CCACHE"
61764         tool_basename="${tool_specified##*/}"
61765         if test "x$tool_basename" = "x$tool_specified"; then
61766           # A command without a complete path is provided, search $PATH.
61767           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
61768 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
61769           # Extract the first word of "$tool_basename", so it can be a program name with args.
61770 set dummy $tool_basename; ac_word=$2
61771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61772 $as_echo_n "checking for $ac_word... " >&6; }
61773 if ${ac_cv_path_CCACHE+:} false; then :
61774   $as_echo_n "(cached) " >&6
61775 else
61776   case $CCACHE in
61777   [\\/]* | ?:[\\/]*)
61778   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
61779   ;;
61780   *)
61781   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61782 for as_dir in $PATH
61783 do
61784   IFS=$as_save_IFS
61785   test -z "$as_dir" && as_dir=.
61786     for ac_exec_ext in '' $ac_executable_extensions; do
61787   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61788     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
61789     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61790     break 2
61791   fi
61792 done
61793   done
61794 IFS=$as_save_IFS
61795 
61796   ;;
61797 esac
61798 fi
61799 CCACHE=$ac_cv_path_CCACHE
61800 if test -n "$CCACHE"; then
61801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
61802 $as_echo "$CCACHE" >&6; }
61803 else
61804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61805 $as_echo "no" >&6; }
61806 fi
61807 
61808 
61809           if test "x$CCACHE" = x; then
61810             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
61811           fi
61812         else
61813           # Otherwise we believe it is a complete path. Use it as it is.
61814           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
61815 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
61816           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
61817 $as_echo_n "checking for CCACHE... " >&6; }
61818           if test ! -x "$tool_specified"; then
61819             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
61820 $as_echo "not found" >&6; }
61821             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
61822           fi
61823           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
61824 $as_echo "$tool_specified" >&6; }
61825         fi
61826       fi
61827     fi
61828 
61829   fi
61830 
61831 
61832 
61833   if test "x$CCACHE" = x; then
61834     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
61835   fi
61836 
61837 
61838       PATH="$OLD_PATH"
61839       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
61840       CCACHE_STATUS="Active ($CCACHE_VERSION)"
61841     else
61842       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61843 $as_echo "no" >&6; }
61844       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
61845 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
61846     fi
61847   elif test "x$enable_ccache" = xno; then
61848     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
61849 $as_echo "no, explicitly disabled" >&6; }
61850     CCACHE_STATUS="Disabled"
61851   elif test "x$enable_ccache" = x; then
61852     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61853 $as_echo "no" >&6; }
61854   else
61855     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
61856 $as_echo "unknown" >&6; }
61857     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
61858   fi
61859 
61860 
61861 
61862 # Check whether --with-ccache-dir was given.
61863 if test "${with_ccache_dir+set}" = set; then :
61864   withval=$with_ccache_dir;
61865 fi
61866 
61867 
61868   if test "x$with_ccache_dir" != x; then
61869     # When using a non home ccache directory, assume the use is to share ccache files
61870     # with other users. Thus change the umask.
61871     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
61872     if test "x$CCACHE" = x; then
61873       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
61874 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
61875     fi
61876   fi
61877 
61878   if test "x$CCACHE" != x; then
61879 
61880   if test "x$CCACHE" != x; then
61881     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
61882       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
61883           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
61884       if test "x$HAS_BAD_CCACHE" != "x"; then
61885         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
61886       fi
61887       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
61888 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
61889       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
61890       PUSHED_FLAGS="$CXXFLAGS"
61891       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
61892       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61893 /* end confdefs.h.  */
61894 
61895 int
61896 main ()
61897 {
61898 
61899   ;
61900   return 0;
61901 }
61902 _ACEOF
61903 if ac_fn_cxx_try_compile "$LINENO"; then :
61904   CC_KNOWS_CCACHE_TRICK=yes
61905 else
61906   CC_KNOWS_CCACHE_TRICK=no
61907 fi
61908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
61909       CXXFLAGS="$PUSHED_FLAGS"
61910       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
61911         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
61912 $as_echo "yes" >&6; }
61913         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
61914 
61915         CCACHE_SLOPPINESS=pch_defines,time_macros
61916       else
61917         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
61918 $as_echo "no" >&6; }
61919         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
61920       fi
61921     fi
61922 
61923     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
61924         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
61925 
61926     if test "x$SET_CCACHE_DIR" != x; then
61927       mkdir -p $CCACHE_DIR > /dev/null 2>&1
61928       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
61929     fi
61930   fi
61931 
61932   fi
61933 
61934 
61935 ###############################################################################
61936 #
61937 # And now the finish...
61938 #
61939 ###############################################################################
61940 
61941 # Check for some common pitfalls
61942 
61943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61944     file_to_test="$SRC_ROOT/LICENSE"
61945     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
61946       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
61947     fi
61948   fi
61949 
61950 
61951   # Did user specify any unknown variables?
61952 
61953   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
61954     # Replace the separating ! with spaces before presenting for end user.
61955     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
61956     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
61957 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
61958   fi
61959 
61960 
61961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
61962 $as_echo_n "checking if build directory is on local disk... " >&6; }
61963 
61964   # df -l lists only local disks; if the given directory is not found then
61965   # a non-zero exit code is given
61966   if test "x$DF" = x; then
61967     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61968       # msys does not have df; use Windows "net use" instead.
61969       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
61970       if test "x$IS_NETWORK_DISK" = x; then
61971         OUTPUT_DIR_IS_LOCAL="yes"
61972       else
61973         OUTPUT_DIR_IS_LOCAL="no"
61974       fi
61975     else
61976       # No df here, say it's local
61977       OUTPUT_DIR_IS_LOCAL="yes"
61978     fi
61979   else
61980     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
61981       OUTPUT_DIR_IS_LOCAL="yes"
61982     else
61983       OUTPUT_DIR_IS_LOCAL="no"
61984     fi
61985   fi
61986 
61987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
61988 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
61989 
61990 
61991 
61992   # Check if the user has any old-style ALT_ variables set.
61993   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
61994 
61995   # Before generating output files, test if they exist. If they do, this is a reconfigure.
61996   # Since we can't properly handle the dependencies for this, warn the user about the situation
61997   if test -e $OUTPUT_ROOT/spec.gmk; then
61998     IS_RECONFIGURE=yes
61999   else
62000     IS_RECONFIGURE=no
62001   fi
62002 
62003 
62004 # At the end, call the custom hook. (Dummy macro if no custom sources available)
62005 
62006 
62007 # We're messing a bit with internal autoconf variables to put the config.status
62008 # in the output directory instead of the current directory.
62009 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
62010 
62011 # Create the actual output files. Now the main work of configure is done.
62012 cat >confcache <<\_ACEOF
62013 # This file is a shell script that caches the results of configure
62014 # tests run on this system so they can be shared between configure
62015 # scripts and configure runs, see configure's option --config-cache.
62016 # It is not useful on other systems.  If it contains results you don't
62017 # want to keep, you may remove or edit it.
62018 #
62019 # config.status only pays attention to the cache file if you give it
62020 # the --recheck option to rerun configure.
62021 #
62022 # `ac_cv_env_foo' variables (set or unset) will be overridden when
62023 # loading this file, other *unset* `ac_cv_foo' will be assigned the
62024 # following values.
62025 
62026 _ACEOF
62027 
62028 # The following way of writing the cache mishandles newlines in values,
62029 # but we know of no workaround that is simple, portable, and efficient.
62030 # So, we kill variables containing newlines.
62031 # Ultrix sh set writes to stderr and can't be redirected directly,
62032 # and sets the high bit in the cache file unless we assign to the vars.
62033 (
62034   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
62035     eval ac_val=\$$ac_var
62036     case $ac_val in #(
62037     *${as_nl}*)
62038       case $ac_var in #(
62039       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
62040 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
62041       esac
62042       case $ac_var in #(
62043       _ | IFS | as_nl) ;; #(
62044       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
62045       *) { eval $ac_var=; unset $ac_var;} ;;
62046       esac ;;
62047     esac
62048   done
62049 
62050   (set) 2>&1 |
62051     case $as_nl`(ac_space=' '; set) 2>&1` in #(
62052     *${as_nl}ac_space=\ *)
62053       # `set' does not quote correctly, so add quotes: double-quote
62054       # substitution turns \\\\ into \\, and sed turns \\ into \.
62055       sed -n \
62056         "s/'/'\\\\''/g;
62057           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
62058       ;; #(
62059     *)
62060       # `set' quotes correctly as required by POSIX, so do not add quotes.
62061       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
62062       ;;
62063     esac |
62064     sort
62065 ) |
62066   sed '
62067      /^ac_cv_env_/b end
62068      t clear
62069      :clear
62070      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
62071      t end
62072      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
62073      :end' >>confcache
62074 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
62075   if test -w "$cache_file"; then
62076     if test "x$cache_file" != "x/dev/null"; then
62077       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
62078 $as_echo "$as_me: updating cache $cache_file" >&6;}
62079       if test ! -f "$cache_file" || test -h "$cache_file"; then
62080         cat confcache >"$cache_file"
62081       else
62082         case $cache_file in #(
62083         */* | ?:*)
62084           mv -f confcache "$cache_file"$$ &&
62085           mv -f "$cache_file"$$ "$cache_file" ;; #(
62086         *)
62087           mv -f confcache "$cache_file" ;;
62088         esac
62089       fi
62090     fi
62091   else
62092     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
62093 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
62094   fi
62095 fi
62096 rm -f confcache
62097 
62098 test "x$prefix" = xNONE && prefix=$ac_default_prefix
62099 # Let make expand exec_prefix.
62100 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
62101 
62102 # Transform confdefs.h into DEFS.
62103 # Protect against shell expansion while executing Makefile rules.
62104 # Protect against Makefile macro expansion.
62105 #
62106 # If the first sed substitution is executed (which looks for macros that
62107 # take arguments), then branch to the quote section.  Otherwise,
62108 # look for a macro that doesn't take arguments.
62109 ac_script='
62110 :mline
62111 /\\$/{
62112  N
62113  s,\\\n,,
62114  b mline
62115 }
62116 t clear
62117 :clear
62118 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
62119 t quote
62120 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
62121 t quote
62122 b any
62123 :quote
62124 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
62125 s/\[/\\&/g
62126 s/\]/\\&/g
62127 s/\$/$$/g
62128 H
62129 :any
62130 ${
62131         g
62132         s/^\n//
62133         s/\n/ /g
62134         p
62135 }
62136 '
62137 DEFS=`sed -n "$ac_script" confdefs.h`
62138 
62139 
62140 ac_libobjs=
62141 ac_ltlibobjs=
62142 U=
62143 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
62144   # 1. Remove the extension, and $U if already installed.
62145   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
62146   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
62147   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
62148   #    will be set to the directory where LIBOBJS objects are built.
62149   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
62150   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
62151 done
62152 LIBOBJS=$ac_libobjs
62153 
62154 LTLIBOBJS=$ac_ltlibobjs
62155 
62156 
62157 
62158 : "${CONFIG_STATUS=./config.status}"
62159 ac_write_fail=0
62160 ac_clean_files_save=$ac_clean_files
62161 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
62162 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
62163 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
62164 as_write_fail=0
62165 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
62166 #! $SHELL
62167 # Generated by $as_me.
62168 # Run this file to recreate the current configuration.
62169 # Compiler output produced by configure, useful for debugging
62170 # configure, is in config.log if it exists.
62171 
62172 debug=false
62173 ac_cs_recheck=false
62174 ac_cs_silent=false
62175 
62176 SHELL=\${CONFIG_SHELL-$SHELL}
62177 export SHELL
62178 _ASEOF
62179 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
62180 ## -------------------- ##
62181 ## M4sh Initialization. ##
62182 ## -------------------- ##
62183 
62184 # Be more Bourne compatible
62185 DUALCASE=1; export DUALCASE # for MKS sh
62186 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
62187   emulate sh
62188   NULLCMD=:
62189   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
62190   # is contrary to our usage.  Disable this feature.
62191   alias -g '${1+"$@"}'='"$@"'
62192   setopt NO_GLOB_SUBST
62193 else
62194   case `(set -o) 2>/dev/null` in #(
62195   *posix*) :
62196     set -o posix ;; #(
62197   *) :
62198      ;;
62199 esac
62200 fi
62201 
62202 
62203 as_nl='
62204 '
62205 export as_nl
62206 # Printing a long string crashes Solaris 7 /usr/bin/printf.
62207 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
62208 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
62209 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
62210 # Prefer a ksh shell builtin over an external printf program on Solaris,
62211 # but without wasting forks for bash or zsh.
62212 if test -z "$BASH_VERSION$ZSH_VERSION" \
62213     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
62214   as_echo='print -r --'
62215   as_echo_n='print -rn --'
62216 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
62217   as_echo='printf %s\n'
62218   as_echo_n='printf %s'
62219 else
62220   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
62221     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
62222     as_echo_n='/usr/ucb/echo -n'
62223   else
62224     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62225     as_echo_n_body='eval
62226       arg=$1;
62227       case $arg in #(
62228       *"$as_nl"*)
62229         expr "X$arg" : "X\\(.*\\)$as_nl";
62230         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62231       esac;
62232       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
62233     '
62234     export as_echo_n_body
62235     as_echo_n='sh -c $as_echo_n_body as_echo'
62236   fi
62237   export as_echo_body
62238   as_echo='sh -c $as_echo_body as_echo'
62239 fi
62240 
62241 # The user is always right.
62242 if test "${PATH_SEPARATOR+set}" != set; then
62243   PATH_SEPARATOR=:
62244   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
62245     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
62246       PATH_SEPARATOR=';'
62247   }
62248 fi
62249 
62250 
62251 # IFS
62252 # We need space, tab and new line, in precisely that order.  Quoting is
62253 # there to prevent editors from complaining about space-tab.
62254 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
62255 # splitting by setting IFS to empty value.)
62256 IFS=" ""        $as_nl"
62257 
62258 # Find who we are.  Look in the path if we contain no directory separator.
62259 as_myself=
62260 case $0 in #((
62261   *[\\/]* ) as_myself=$0 ;;
62262   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62263 for as_dir in $PATH
62264 do
62265   IFS=$as_save_IFS
62266   test -z "$as_dir" && as_dir=.
62267     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
62268   done
62269 IFS=$as_save_IFS
62270 
62271      ;;
62272 esac
62273 # We did not find ourselves, most probably we were run as `sh COMMAND'
62274 # in which case we are not to be found in the path.
62275 if test "x$as_myself" = x; then
62276   as_myself=$0
62277 fi
62278 if test ! -f "$as_myself"; then
62279   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
62280   exit 1
62281 fi
62282 
62283 # Unset variables that we do not need and which cause bugs (e.g. in
62284 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
62285 # suppresses any "Segmentation fault" message there.  '((' could
62286 # trigger a bug in pdksh 5.2.14.
62287 for as_var in BASH_ENV ENV MAIL MAILPATH
62288 do eval test x\${$as_var+set} = xset \
62289   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
62290 done
62291 PS1='$ '
62292 PS2='> '
62293 PS4='+ '
62294 
62295 # NLS nuisances.
62296 LC_ALL=C
62297 export LC_ALL
62298 LANGUAGE=C
62299 export LANGUAGE
62300 
62301 # CDPATH.
62302 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
62303 
62304 
62305 # as_fn_error STATUS ERROR [LINENO LOG_FD]
62306 # ----------------------------------------
62307 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
62308 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
62309 # script with STATUS, using 1 if that was 0.
62310 as_fn_error ()
62311 {
62312   as_status=$1; test $as_status -eq 0 && as_status=1
62313   if test "$4"; then
62314     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
62315     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
62316   fi
62317   $as_echo "$as_me: error: $2" >&2
62318   as_fn_exit $as_status
62319 } # as_fn_error
62320 
62321 
62322 # as_fn_set_status STATUS
62323 # -----------------------
62324 # Set $? to STATUS, without forking.
62325 as_fn_set_status ()
62326 {
62327   return $1
62328 } # as_fn_set_status
62329 
62330 # as_fn_exit STATUS
62331 # -----------------
62332 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
62333 as_fn_exit ()
62334 {
62335   set +e
62336   as_fn_set_status $1
62337   exit $1
62338 } # as_fn_exit
62339 
62340 # as_fn_unset VAR
62341 # ---------------
62342 # Portably unset VAR.
62343 as_fn_unset ()
62344 {
62345   { eval $1=; unset $1;}
62346 }
62347 as_unset=as_fn_unset
62348 # as_fn_append VAR VALUE
62349 # ----------------------
62350 # Append the text in VALUE to the end of the definition contained in VAR. Take
62351 # advantage of any shell optimizations that allow amortized linear growth over
62352 # repeated appends, instead of the typical quadratic growth present in naive
62353 # implementations.
62354 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
62355   eval 'as_fn_append ()
62356   {
62357     eval $1+=\$2
62358   }'
62359 else
62360   as_fn_append ()
62361   {
62362     eval $1=\$$1\$2
62363   }
62364 fi # as_fn_append
62365 
62366 # as_fn_arith ARG...
62367 # ------------------
62368 # Perform arithmetic evaluation on the ARGs, and store the result in the
62369 # global $as_val. Take advantage of shells that can avoid forks. The arguments
62370 # must be portable across $(()) and expr.
62371 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
62372   eval 'as_fn_arith ()
62373   {
62374     as_val=$(( $* ))
62375   }'
62376 else
62377   as_fn_arith ()
62378   {
62379     as_val=`expr "$@" || test $? -eq 1`
62380   }
62381 fi # as_fn_arith
62382 
62383 
62384 if expr a : '\(a\)' >/dev/null 2>&1 &&
62385    test "X`expr 00001 : '.*\(...\)'`" = X001; then
62386   as_expr=expr
62387 else
62388   as_expr=false
62389 fi
62390 
62391 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
62392   as_basename=basename
62393 else
62394   as_basename=false
62395 fi
62396 
62397 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
62398   as_dirname=dirname
62399 else
62400   as_dirname=false
62401 fi
62402 
62403 as_me=`$as_basename -- "$0" ||
62404 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
62405          X"$0" : 'X\(//\)$' \| \
62406          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
62407 $as_echo X/"$0" |
62408     sed '/^.*\/\([^/][^/]*\)\/*$/{
62409             s//\1/
62410             q
62411           }
62412           /^X\/\(\/\/\)$/{
62413             s//\1/
62414             q
62415           }
62416           /^X\/\(\/\).*/{
62417             s//\1/
62418             q
62419           }
62420           s/.*/./; q'`
62421 
62422 # Avoid depending upon Character Ranges.
62423 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
62424 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
62425 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
62426 as_cr_digits='0123456789'
62427 as_cr_alnum=$as_cr_Letters$as_cr_digits
62428 
62429 ECHO_C= ECHO_N= ECHO_T=
62430 case `echo -n x` in #(((((
62431 -n*)
62432   case `echo 'xy\c'` in
62433   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
62434   xy)  ECHO_C='\c';;
62435   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
62436        ECHO_T=' ';;
62437   esac;;
62438 *)
62439   ECHO_N='-n';;
62440 esac
62441 
62442 rm -f conf$$ conf$$.exe conf$$.file
62443 if test -d conf$$.dir; then
62444   rm -f conf$$.dir/conf$$.file
62445 else
62446   rm -f conf$$.dir
62447   mkdir conf$$.dir 2>/dev/null
62448 fi
62449 if (echo >conf$$.file) 2>/dev/null; then
62450   if ln -s conf$$.file conf$$ 2>/dev/null; then
62451     as_ln_s='ln -s'
62452     # ... but there are two gotchas:
62453     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
62454     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
62455     # In both cases, we have to default to `cp -pR'.
62456     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
62457       as_ln_s='cp -pR'
62458   elif ln conf$$.file conf$$ 2>/dev/null; then
62459     as_ln_s=ln
62460   else
62461     as_ln_s='cp -pR'
62462   fi
62463 else
62464   as_ln_s='cp -pR'
62465 fi
62466 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
62467 rmdir conf$$.dir 2>/dev/null
62468 
62469 
62470 # as_fn_mkdir_p
62471 # -------------
62472 # Create "$as_dir" as a directory, including parents if necessary.
62473 as_fn_mkdir_p ()
62474 {
62475 
62476   case $as_dir in #(
62477   -*) as_dir=./$as_dir;;
62478   esac
62479   test -d "$as_dir" || eval $as_mkdir_p || {
62480     as_dirs=
62481     while :; do
62482       case $as_dir in #(
62483       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
62484       *) as_qdir=$as_dir;;
62485       esac
62486       as_dirs="'$as_qdir' $as_dirs"
62487       as_dir=`$as_dirname -- "$as_dir" ||
62488 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62489          X"$as_dir" : 'X\(//\)[^/]' \| \
62490          X"$as_dir" : 'X\(//\)$' \| \
62491          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
62492 $as_echo X"$as_dir" |
62493     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
62494             s//\1/
62495             q
62496           }
62497           /^X\(\/\/\)[^/].*/{
62498             s//\1/
62499             q
62500           }
62501           /^X\(\/\/\)$/{
62502             s//\1/
62503             q
62504           }
62505           /^X\(\/\).*/{
62506             s//\1/
62507             q
62508           }
62509           s/.*/./; q'`
62510       test -d "$as_dir" && break
62511     done
62512     test -z "$as_dirs" || eval "mkdir $as_dirs"
62513   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
62514 
62515 
62516 } # as_fn_mkdir_p
62517 if mkdir -p . 2>/dev/null; then
62518   as_mkdir_p='mkdir -p "$as_dir"'
62519 else
62520   test -d ./-p && rmdir ./-p
62521   as_mkdir_p=false
62522 fi
62523 
62524 
62525 # as_fn_executable_p FILE
62526 # -----------------------
62527 # Test if FILE is an executable regular file.
62528 as_fn_executable_p ()
62529 {
62530   test -f "$1" && test -x "$1"
62531 } # as_fn_executable_p
62532 as_test_x='test -x'
62533 as_executable_p=as_fn_executable_p
62534 
62535 # Sed expression to map a string onto a valid CPP name.
62536 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
62537 
62538 # Sed expression to map a string onto a valid variable name.
62539 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
62540 
62541 
62542 exec 6>&1
62543 ## ----------------------------------- ##
62544 ## Main body of $CONFIG_STATUS script. ##
62545 ## ----------------------------------- ##
62546 _ASEOF
62547 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
62548 
62549 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62550 # Save the log message, to keep $0 and so on meaningful, and to
62551 # report actual input values of CONFIG_FILES etc. instead of their
62552 # values after options handling.
62553 ac_log="
62554 This file was extended by OpenJDK $as_me jdk9, which was
62555 generated by GNU Autoconf 2.69.  Invocation command line was
62556 
62557   CONFIG_FILES    = $CONFIG_FILES
62558   CONFIG_HEADERS  = $CONFIG_HEADERS
62559   CONFIG_LINKS    = $CONFIG_LINKS
62560   CONFIG_COMMANDS = $CONFIG_COMMANDS
62561   $ $0 $@
62562 
62563 on `(hostname || uname -n) 2>/dev/null | sed 1q`
62564 "
62565 
62566 _ACEOF
62567 
62568 case $ac_config_files in *"
62569 "*) set x $ac_config_files; shift; ac_config_files=$*;;
62570 esac
62571 
62572 
62573 
62574 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62575 # Files that config.status was made for.
62576 config_files="$ac_config_files"
62577 
62578 _ACEOF
62579 
62580 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62581 ac_cs_usage="\
62582 \`$as_me' instantiates files and other configuration actions
62583 from templates according to the current configuration.  Unless the files
62584 and actions are specified as TAGs, all are instantiated by default.
62585 
62586 Usage: $0 [OPTION]... [TAG]...
62587 
62588   -h, --help       print this help, then exit
62589   -V, --version    print version number and configuration settings, then exit
62590       --config     print configuration, then exit
62591   -q, --quiet, --silent
62592                    do not print progress messages
62593   -d, --debug      don't remove temporary files
62594       --recheck    update $as_me by reconfiguring in the same conditions
62595       --file=FILE[:TEMPLATE]
62596                    instantiate the configuration file FILE
62597 
62598 Configuration files:
62599 $config_files
62600 
62601 Report bugs to <build-dev@openjdk.java.net>.
62602 OpenJDK home page: <http://openjdk.java.net>."
62603 
62604 _ACEOF
62605 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62606 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
62607 ac_cs_version="\\
62608 OpenJDK config.status jdk9
62609 configured by $0, generated by GNU Autoconf 2.69,
62610   with options \\"\$ac_cs_config\\"
62611 
62612 Copyright (C) 2012 Free Software Foundation, Inc.
62613 This config.status script is free software; the Free Software Foundation
62614 gives unlimited permission to copy, distribute and modify it."
62615 
62616 ac_pwd='$ac_pwd'
62617 srcdir='$srcdir'
62618 AWK='$AWK'
62619 test -n "\$AWK" || AWK=awk
62620 _ACEOF
62621 
62622 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62623 # The default lists apply if the user does not specify any file.
62624 ac_need_defaults=:
62625 while test $# != 0
62626 do
62627   case $1 in
62628   --*=?*)
62629     ac_option=`expr "X$1" : 'X\([^=]*\)='`
62630     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
62631     ac_shift=:
62632     ;;
62633   --*=)
62634     ac_option=`expr "X$1" : 'X\([^=]*\)='`
62635     ac_optarg=
62636     ac_shift=:
62637     ;;
62638   *)
62639     ac_option=$1
62640     ac_optarg=$2
62641     ac_shift=shift
62642     ;;
62643   esac
62644 
62645   case $ac_option in
62646   # Handling of the options.
62647   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
62648     ac_cs_recheck=: ;;
62649   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
62650     $as_echo "$ac_cs_version"; exit ;;
62651   --config | --confi | --conf | --con | --co | --c )
62652     $as_echo "$ac_cs_config"; exit ;;
62653   --debug | --debu | --deb | --de | --d | -d )
62654     debug=: ;;
62655   --file | --fil | --fi | --f )
62656     $ac_shift
62657     case $ac_optarg in
62658     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
62659     '') as_fn_error $? "missing file argument" ;;
62660     esac
62661     as_fn_append CONFIG_FILES " '$ac_optarg'"
62662     ac_need_defaults=false;;
62663   --he | --h |  --help | --hel | -h )
62664     $as_echo "$ac_cs_usage"; exit ;;
62665   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
62666   | -silent | --silent | --silen | --sile | --sil | --si | --s)
62667     ac_cs_silent=: ;;
62668 
62669   # This is an error.
62670   -*) as_fn_error $? "unrecognized option: \`$1'
62671 Try \`$0 --help' for more information." ;;
62672 
62673   *) as_fn_append ac_config_targets " $1"
62674      ac_need_defaults=false ;;
62675 
62676   esac
62677   shift
62678 done
62679 
62680 ac_configure_extra_args=
62681 
62682 if $ac_cs_silent; then
62683   exec 6>/dev/null
62684   ac_configure_extra_args="$ac_configure_extra_args --silent"
62685 fi
62686 
62687 _ACEOF
62688 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62689 if \$ac_cs_recheck; then
62690   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
62691   shift
62692   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
62693   CONFIG_SHELL='$SHELL'
62694   export CONFIG_SHELL
62695   exec "\$@"
62696 fi
62697 
62698 _ACEOF
62699 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62700 exec 5>>config.log
62701 {
62702   echo
62703   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
62704 ## Running $as_me. ##
62705 _ASBOX
62706   $as_echo "$ac_log"
62707 } >&5
62708 
62709 _ACEOF
62710 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62711 _ACEOF
62712 
62713 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62714 
62715 # Handling of arguments.
62716 for ac_config_target in $ac_config_targets
62717 do
62718   case $ac_config_target in
62719     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
62720     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
62721     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
62722     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
62723     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
62724 
62725   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
62726   esac
62727 done
62728 
62729 
62730 # If the user did not use the arguments to specify the items to instantiate,
62731 # then the envvar interface is used.  Set only those that are not.
62732 # We use the long form for the default assignment because of an extremely
62733 # bizarre bug on SunOS 4.1.3.
62734 if $ac_need_defaults; then
62735   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
62736 fi
62737 
62738 # Have a temporary directory for convenience.  Make it in the build tree
62739 # simply because there is no reason against having it here, and in addition,
62740 # creating and moving files from /tmp can sometimes cause problems.
62741 # Hook for its removal unless debugging.
62742 # Note that there is a small window in which the directory will not be cleaned:
62743 # after its creation but before its name has been assigned to `$tmp'.
62744 $debug ||
62745 {
62746   tmp= ac_tmp=
62747   trap 'exit_status=$?
62748   : "${ac_tmp:=$tmp}"
62749   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
62750 ' 0
62751   trap 'as_fn_exit 1' 1 2 13 15
62752 }
62753 # Create a (secure) tmp directory for tmp files.
62754 
62755 {
62756   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
62757   test -d "$tmp"
62758 }  ||
62759 {
62760   tmp=./conf$$-$RANDOM
62761   (umask 077 && mkdir "$tmp")
62762 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
62763 ac_tmp=$tmp
62764 
62765 # Set up the scripts for CONFIG_FILES section.
62766 # No need to generate them if there are no CONFIG_FILES.
62767 # This happens for instance with `./config.status config.h'.
62768 if test -n "$CONFIG_FILES"; then
62769 
62770 
62771 ac_cr=`echo X | tr X '\015'`
62772 # On cygwin, bash can eat \r inside `` if the user requested igncr.
62773 # But we know of no other shell where ac_cr would be empty at this
62774 # point, so we can use a bashism as a fallback.
62775 if test "x$ac_cr" = x; then
62776   eval ac_cr=\$\'\\r\'
62777 fi
62778 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
62779 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
62780   ac_cs_awk_cr='\\r'
62781 else
62782   ac_cs_awk_cr=$ac_cr
62783 fi
62784 
62785 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
62786 _ACEOF
62787 
62788 
62789 {
62790   echo "cat >conf$$subs.awk <<_ACEOF" &&
62791   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
62792   echo "_ACEOF"
62793 } >conf$$subs.sh ||
62794   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62795 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
62796 ac_delim='%!_!# '
62797 for ac_last_try in false false false false false :; do
62798   . ./conf$$subs.sh ||
62799     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62800 
62801   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
62802   if test $ac_delim_n = $ac_delim_num; then
62803     break
62804   elif $ac_last_try; then
62805     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
62806   else
62807     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
62808   fi
62809 done
62810 rm -f conf$$subs.sh
62811 
62812 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62813 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
62814 _ACEOF
62815 sed -n '
62816 h
62817 s/^/S["/; s/!.*/"]=/
62818 p
62819 g
62820 s/^[^!]*!//
62821 :repl
62822 t repl
62823 s/'"$ac_delim"'$//
62824 t delim
62825 :nl
62826 h
62827 s/\(.\{148\}\)..*/\1/
62828 t more1
62829 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
62830 p
62831 n
62832 b repl
62833 :more1
62834 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62835 p
62836 g
62837 s/.\{148\}//
62838 t nl
62839 :delim
62840 h
62841 s/\(.\{148\}\)..*/\1/
62842 t more2
62843 s/["\\]/\\&/g; s/^/"/; s/$/"/
62844 p
62845 b
62846 :more2
62847 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
62848 p
62849 g
62850 s/.\{148\}//
62851 t delim
62852 ' <conf$$subs.awk | sed '
62853 /^[^""]/{
62854   N
62855   s/\n//
62856 }
62857 ' >>$CONFIG_STATUS || ac_write_fail=1
62858 rm -f conf$$subs.awk
62859 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
62860 _ACAWK
62861 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
62862   for (key in S) S_is_set[key] = 1
62863   FS = ""
62864 
62865 }
62866 {
62867   line = $ 0
62868   nfields = split(line, field, "@")
62869   substed = 0
62870   len = length(field[1])
62871   for (i = 2; i < nfields; i++) {
62872     key = field[i]
62873     keylen = length(key)
62874     if (S_is_set[key]) {
62875       value = S[key]
62876       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
62877       len += length(value) + length(field[++i])
62878       substed = 1
62879     } else
62880       len += 1 + keylen
62881   }
62882 
62883   print line
62884 }
62885 
62886 _ACAWK
62887 _ACEOF
62888 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62889 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
62890   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
62891 else
62892   cat
62893 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
62894   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
62895 _ACEOF
62896 
62897 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
62898 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
62899 # trailing colons and then remove the whole line if VPATH becomes empty
62900 # (actually we leave an empty line to preserve line numbers).
62901 if test "x$srcdir" = x.; then
62902   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
62903 h
62904 s///
62905 s/^/:/
62906 s/[      ]*$/:/
62907 s/:\$(srcdir):/:/g
62908 s/:\${srcdir}:/:/g
62909 s/:@srcdir@:/:/g
62910 s/^:*//
62911 s/:*$//
62912 x
62913 s/\(=[   ]*\).*/\1/
62914 G
62915 s/\n//
62916 s/^[^=]*=[       ]*$//
62917 }'
62918 fi
62919 
62920 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
62921 fi # test -n "$CONFIG_FILES"
62922 
62923 
62924 eval set X "  :F $CONFIG_FILES      "
62925 shift
62926 for ac_tag
62927 do
62928   case $ac_tag in
62929   :[FHLC]) ac_mode=$ac_tag; continue;;
62930   esac
62931   case $ac_mode$ac_tag in
62932   :[FHL]*:*);;
62933   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
62934   :[FH]-) ac_tag=-:-;;
62935   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
62936   esac
62937   ac_save_IFS=$IFS
62938   IFS=:
62939   set x $ac_tag
62940   IFS=$ac_save_IFS
62941   shift
62942   ac_file=$1
62943   shift
62944 
62945   case $ac_mode in
62946   :L) ac_source=$1;;
62947   :[FH])
62948     ac_file_inputs=
62949     for ac_f
62950     do
62951       case $ac_f in
62952       -) ac_f="$ac_tmp/stdin";;
62953       *) # Look for the file first in the build tree, then in the source tree
62954          # (if the path is not absolute).  The absolute path cannot be DOS-style,
62955          # because $ac_f cannot contain `:'.
62956          test -f "$ac_f" ||
62957            case $ac_f in
62958            [\\/$]*) false;;
62959            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
62960            esac ||
62961            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
62962       esac
62963       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
62964       as_fn_append ac_file_inputs " '$ac_f'"
62965     done
62966 
62967     # Let's still pretend it is `configure' which instantiates (i.e., don't
62968     # use $as_me), people would be surprised to read:
62969     #    /* config.h.  Generated by config.status.  */
62970     configure_input='Generated from '`
62971           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
62972         `' by configure.'
62973     if test x"$ac_file" != x-; then
62974       configure_input="$ac_file.  $configure_input"
62975       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
62976 $as_echo "$as_me: creating $ac_file" >&6;}
62977     fi
62978     # Neutralize special characters interpreted by sed in replacement strings.
62979     case $configure_input in #(
62980     *\&* | *\|* | *\\* )
62981        ac_sed_conf_input=`$as_echo "$configure_input" |
62982        sed 's/[\\\\&|]/\\\\&/g'`;; #(
62983     *) ac_sed_conf_input=$configure_input;;
62984     esac
62985 
62986     case $ac_tag in
62987     *:-:* | *:-) cat >"$ac_tmp/stdin" \
62988       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
62989     esac
62990     ;;
62991   esac
62992 
62993   ac_dir=`$as_dirname -- "$ac_file" ||
62994 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
62995          X"$ac_file" : 'X\(//\)[^/]' \| \
62996          X"$ac_file" : 'X\(//\)$' \| \
62997          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
62998 $as_echo X"$ac_file" |
62999     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
63000             s//\1/
63001             q
63002           }
63003           /^X\(\/\/\)[^/].*/{
63004             s//\1/
63005             q
63006           }
63007           /^X\(\/\/\)$/{
63008             s//\1/
63009             q
63010           }
63011           /^X\(\/\).*/{
63012             s//\1/
63013             q
63014           }
63015           s/.*/./; q'`
63016   as_dir="$ac_dir"; as_fn_mkdir_p
63017   ac_builddir=.
63018 
63019 case "$ac_dir" in
63020 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
63021 *)
63022   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
63023   # A ".." for each directory in $ac_dir_suffix.
63024   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
63025   case $ac_top_builddir_sub in
63026   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
63027   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
63028   esac ;;
63029 esac
63030 ac_abs_top_builddir=$ac_pwd
63031 ac_abs_builddir=$ac_pwd$ac_dir_suffix
63032 # for backward compatibility:
63033 ac_top_builddir=$ac_top_build_prefix
63034 
63035 case $srcdir in
63036   .)  # We are building in place.
63037     ac_srcdir=.
63038     ac_top_srcdir=$ac_top_builddir_sub
63039     ac_abs_top_srcdir=$ac_pwd ;;
63040   [\\/]* | ?:[\\/]* )  # Absolute name.
63041     ac_srcdir=$srcdir$ac_dir_suffix;
63042     ac_top_srcdir=$srcdir
63043     ac_abs_top_srcdir=$srcdir ;;
63044   *) # Relative name.
63045     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
63046     ac_top_srcdir=$ac_top_build_prefix$srcdir
63047     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
63048 esac
63049 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
63050 
63051 
63052   case $ac_mode in
63053   :F)
63054   #
63055   # CONFIG_FILE
63056   #
63057 
63058 _ACEOF
63059 
63060 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
63061 # If the template does not know about datarootdir, expand it.
63062 # FIXME: This hack should be removed a few years after 2.60.
63063 ac_datarootdir_hack=; ac_datarootdir_seen=
63064 ac_sed_dataroot='
63065 /datarootdir/ {
63066   p
63067   q
63068 }
63069 /@datadir@/p
63070 /@docdir@/p
63071 /@infodir@/p
63072 /@localedir@/p
63073 /@mandir@/p'
63074 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
63075 *datarootdir*) ac_datarootdir_seen=yes;;
63076 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
63077   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
63078 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
63079 _ACEOF
63080 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63081   ac_datarootdir_hack='
63082   s&@datadir@&$datadir&g
63083   s&@docdir@&$docdir&g
63084   s&@infodir@&$infodir&g
63085   s&@localedir@&$localedir&g
63086   s&@mandir@&$mandir&g
63087   s&\\\${datarootdir}&$datarootdir&g' ;;
63088 esac
63089 _ACEOF
63090 
63091 # Neutralize VPATH when `$srcdir' = `.'.
63092 # Shell code in configure.ac might set extrasub.
63093 # FIXME: do we really want to maintain this feature?
63094 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
63095 ac_sed_extra="$ac_vpsub
63096 $extrasub
63097 _ACEOF
63098 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
63099 :t
63100 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
63101 s|@configure_input@|$ac_sed_conf_input|;t t
63102 s&@top_builddir@&$ac_top_builddir_sub&;t t
63103 s&@top_build_prefix@&$ac_top_build_prefix&;t t
63104 s&@srcdir@&$ac_srcdir&;t t
63105 s&@abs_srcdir@&$ac_abs_srcdir&;t t
63106 s&@top_srcdir@&$ac_top_srcdir&;t t
63107 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
63108 s&@builddir@&$ac_builddir&;t t
63109 s&@abs_builddir@&$ac_abs_builddir&;t t
63110 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
63111 $ac_datarootdir_hack
63112 "
63113 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
63114   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
63115 
63116 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
63117   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
63118   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
63119       "$ac_tmp/out"`; test -z "$ac_out"; } &&
63120   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63121 which seems to be undefined.  Please make sure it is defined" >&5
63122 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
63123 which seems to be undefined.  Please make sure it is defined" >&2;}
63124 
63125   rm -f "$ac_tmp/stdin"
63126   case $ac_file in
63127   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
63128   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
63129   esac \
63130   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
63131  ;;
63132 
63133 
63134 
63135   esac
63136 
63137 done # for ac_tag
63138 
63139 
63140 as_fn_exit 0
63141 _ACEOF
63142 ac_clean_files=$ac_clean_files_save
63143 
63144 test $ac_write_fail = 0 ||
63145   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
63146 
63147 
63148 # configure is writing to config.log, and then calls config.status.
63149 # config.status does its own redirection, appending to config.log.
63150 # Unfortunately, on DOS this fails, as config.log is still kept open
63151 # by configure, so config.status won't be able to write to it; its
63152 # output is simply discarded.  So we exec the FD to /dev/null,
63153 # effectively closing config.log, so it can be properly (re)opened and
63154 # appended to by config.status.  When coming back to configure, we
63155 # need to make the FD available again.
63156 if test "$no_create" != yes; then
63157   ac_cs_success=:
63158   ac_config_status_args=
63159   test "$silent" = yes &&
63160     ac_config_status_args="$ac_config_status_args --quiet"
63161   exec 5>/dev/null
63162   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
63163   exec 5>>config.log
63164   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
63165   # would make configure fail if this is the last instruction.
63166   $ac_cs_success || as_fn_exit 1
63167 fi
63168 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
63169   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
63170 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
63171 fi
63172 
63173 
63174 # After AC_OUTPUT, we need to do final work
63175 
63176 
63177   # Try to move config.log (generated by autoconf) to the configure-support directory.
63178   if test -e ./config.log; then
63179     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
63180   fi
63181 
63182   # Rotate our log file (configure.log)
63183   if test -e "$OUTPUT_ROOT/configure.log.old"; then
63184     $RM -f "$OUTPUT_ROOT/configure.log.old"
63185   fi
63186   if test -e "$OUTPUT_ROOT/configure.log"; then
63187     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
63188   fi
63189 
63190   # Move configure.log from current directory to the build output root
63191   if test -e ./configure.log; then
63192     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
63193   fi
63194 
63195   # Make the compare script executable
63196   $CHMOD +x $OUTPUT_ROOT/compare.sh
63197 
63198 
63199 # Finally output some useful information to the user
63200 
63201   # Finally output some useful information to the user
63202 
63203   printf "\n"
63204   printf "====================================================\n"
63205   if test "x$no_create" != "xyes"; then
63206     if test "x$IS_RECONFIGURE" != "xyes"; then
63207       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
63208     else
63209       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
63210     fi
63211   else
63212     if test "x$IS_RECONFIGURE" != "xyes"; then
63213       printf "A configuration has been successfully checked but not created\n"
63214     else
63215       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
63216     fi
63217   fi
63218   if test "x$CONFIGURE_COMMAND_LINE" != x; then
63219     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
63220   else
63221     printf "using default settings.\n"
63222   fi
63223 
63224   printf "\n"
63225   printf "Configuration summary:\n"
63226   printf "* Debug level:    $DEBUG_LEVEL\n"
63227   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
63228   printf "* JDK variant:    $JDK_VARIANT\n"
63229   printf "* JVM variants:   $with_jvm_variants\n"
63230   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
63231   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
63232 
63233   printf "\n"
63234   printf "Tools summary:\n"
63235   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
63236     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
63237   fi
63238   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
63239   if test "x$TOOLCHAIN_VERSION" != "x"; then
63240     print_version=" $TOOLCHAIN_VERSION"
63241   fi
63242   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
63243   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
63244   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
63245 
63246   printf "\n"
63247   printf "Build performance summary:\n"
63248   printf "* Cores to use:   $JOBS\n"
63249   printf "* Memory limit:   $MEMORY_SIZE MB\n"
63250   if test "x$CCACHE_STATUS" != "x"; then
63251     printf "* ccache status:  $CCACHE_STATUS\n"
63252   fi
63253   printf "\n"
63254 
63255   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
63256     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
63257     printf "will result in longer build times.\n"
63258     printf "\n"
63259   fi
63260 
63261   if test "x$FOUND_ALT_VARIABLES" != "x"; then
63262     printf "WARNING: You have old-style ALT_ environment variables set.\n"
63263     printf "These are not respected, and will be ignored. It is recommended\n"
63264     printf "that you clean your environment. The following variables are set:\n"
63265     printf "$FOUND_ALT_VARIABLES\n"
63266     printf "\n"
63267   fi
63268 
63269   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
63270     printf "WARNING: Your build output directory is not on a local disk.\n"
63271     printf "This will severely degrade build performance!\n"
63272     printf "It is recommended that you create an output directory on a local disk,\n"
63273     printf "and run the configure script again from that directory.\n"
63274     printf "\n"
63275   fi
63276 
63277   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
63278     printf "WARNING: The result of this configuration has overridden an older\n"
63279     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
63280     printf "proper build. Failure to do so might result in strange build problems.\n"
63281     printf "\n"
63282   fi
63283 
63284   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
63285     printf "WARNING: The result of this configuration was not saved.\n"
63286     printf "You should run without '--no-create | -n' to create the configuration.\n"
63287     printf "\n"
63288   fi
63289 
63290 
63291 
63292   # Locate config.log.
63293   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
63294     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
63295   elif test -e "./config.log"; then
63296     CONFIG_LOG_PATH="."
63297   fi
63298 
63299   if test -e "$CONFIG_LOG_PATH/config.log"; then
63300     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
63301     if test $? -eq 0; then
63302       printf "The following warnings were produced. Repeated here for convenience:\n"
63303       # We must quote sed expression (using []) to stop m4 from eating the [].
63304       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
63305       printf "\n"
63306     fi
63307   fi
63308