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 SJAVAC_SERVER_DIR
 636 ENABLE_SJAVAC
 637 SJAVAC_SERVER_JAVA_FLAGS
 638 SJAVAC_SERVER_JAVA
 639 JAVA_TOOL_FLAGS_SMALL
 640 JAVA_FLAGS_SMALL
 641 JAVA_FLAGS_BIG
 642 JAVA_FLAGS
 643 JOBS
 644 MEMORY_SIZE
 645 NUM_CORES
 646 ENABLE_INTREE_EC
 647 SALIB_NAME
 648 HOTSPOT_MAKE_ARGS
 649 MSVCR_DLL
 650 LIBCXX
 651 LLVM_LIBS
 652 LLVM_LDFLAGS
 653 LLVM_CFLAGS
 654 LLVM_CONFIG
 655 LIBFFI_LIBS
 656 LIBFFI_CFLAGS
 657 STATIC_CXX_SETTING
 658 LIBDL
 659 LIBM
 660 LIBZIP_CAN_USE_MMAP
 661 USE_EXTERNAL_LIBZ
 662 USE_EXTERNAL_LIBPNG
 663 PNG_LIBS
 664 PNG_CFLAGS
 665 USE_EXTERNAL_LCMS
 666 LCMS_LIBS
 667 LCMS_CFLAGS
 668 USE_EXTERNAL_LIBGIF
 669 USE_EXTERNAL_LIBJPEG
 670 ALSA_LIBS
 671 ALSA_CFLAGS
 672 FREETYPE_BUNDLE_LIB_PATH
 673 FREETYPE_LIBS
 674 FREETYPE_CFLAGS
 675 CUPS_CFLAGS
 676 X_EXTRA_LIBS
 677 X_LIBS
 678 X_PRE_LIBS
 679 X_CFLAGS
 680 XMKMF
 681 FIXPATH
 682 ZIP_DEBUGINFO_FILES
 683 ENABLE_DEBUG_SYMBOLS
 684 CFLAGS_WARNINGS_ARE_ERRORS
 685 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 686 ZERO_ARCHFLAG
 687 LDFLAGS_CXX_JDK
 688 LDFLAGS_JDKEXE_SUFFIX
 689 LDFLAGS_JDKLIB_SUFFIX
 690 LDFLAGS_JDKEXE
 691 LDFLAGS_JDKLIB
 692 CXXFLAGS_JDKEXE
 693 CXXFLAGS_JDKLIB
 694 CFLAGS_JDKEXE
 695 CFLAGS_JDKLIB
 696 MACOSX_VERSION_MIN
 697 LEGACY_EXTRA_LDFLAGS
 698 LEGACY_EXTRA_CXXFLAGS
 699 LEGACY_EXTRA_CFLAGS
 700 CXX_O_FLAG_NONE
 701 CXX_O_FLAG_DEBUG
 702 CXX_O_FLAG_NORM
 703 CXX_O_FLAG_HI
 704 CXX_O_FLAG_HIGHEST
 705 C_O_FLAG_NONE
 706 C_O_FLAG_DEBUG
 707 C_O_FLAG_NORM
 708 C_O_FLAG_HI
 709 C_O_FLAG_HIGHEST
 710 CXXFLAGS_DEBUG_OPTIONS
 711 CFLAGS_DEBUG_OPTIONS
 712 CXXFLAGS_DEBUG_SYMBOLS
 713 CFLAGS_DEBUG_SYMBOLS
 714 CXX_FLAG_DEPS
 715 C_FLAG_DEPS
 716 SET_SHARED_LIBRARY_MAPFILE
 717 SET_SHARED_LIBRARY_NAME
 718 SET_SHARED_LIBRARY_ORIGIN
 719 SET_EXECUTABLE_ORIGIN
 720 SHARED_LIBRARY_FLAGS
 721 CXX_FLAG_REORDER
 722 C_FLAG_REORDER
 723 SYSROOT_LDFLAGS
 724 SYSROOT_CFLAGS
 725 RC_FLAGS
 726 AR_OUT_OPTION
 727 LD_OUT_OPTION
 728 EXE_OUT_OPTION
 729 CC_OUT_OPTION
 730 POST_MCS_CMD
 731 POST_STRIP_CMD
 732 ARFLAGS
 733 COMPILER_TARGET_BITS_FLAG
 734 JT_HOME
 735 JTREGEXE
 736 USING_BROKEN_SUSE_LD
 737 PACKAGE_PATH
 738 LDEXECXX
 739 LDEXE
 740 USE_CLANG
 741 HOTSPOT_LD
 742 HOTSPOT_CXX
 743 HOTSPOT_RC
 744 HOTSPOT_MT
 745 BUILD_LD
 746 BUILD_CXX
 747 BUILD_CC
 748 ac_ct_OBJDUMP
 749 OBJDUMP
 750 ac_ct_OBJCOPY
 751 OBJCOPY
 752 ac_ct_NM
 753 ac_ct_STRIP
 754 MCS
 755 GNM
 756 NM
 757 STRIP
 758 MSBUILD
 759 DUMPBIN
 760 RC
 761 MT
 762 LIPO
 763 ac_ct_OBJC
 764 OBJCFLAGS
 765 OBJC
 766 ac_ct_AR
 767 AR
 768 AS
 769 LDCXX
 770 LD
 771 CXXCPP
 772 CPP
 773 ac_ct_CXX
 774 CXXFLAGS
 775 CXX
 776 ac_ct_PROPER_COMPILER_CXX
 777 PROPER_COMPILER_CXX
 778 TOOLCHAIN_PATH_CXX
 779 POTENTIAL_CXX
 780 OBJEXT
 781 EXEEXT
 782 ac_ct_CC
 783 CPPFLAGS
 784 LDFLAGS
 785 CFLAGS
 786 CC
 787 ac_ct_PROPER_COMPILER_CC
 788 PROPER_COMPILER_CC
 789 TOOLCHAIN_PATH_CC
 790 POTENTIAL_CC
 791 VS_LIB
 792 VS_INCLUDE
 793 VS_PATH
 794 CYGWIN_LINK
 795 EXE_SUFFIX
 796 OBJ_SUFFIX
 797 STATIC_LIBRARY
 798 SHARED_LIBRARY
 799 STATIC_LIBRARY_SUFFIX
 800 SHARED_LIBRARY_SUFFIX
 801 LIBRARY_PREFIX
 802 TOOLCHAIN_TYPE
 803 BUILD_HOTSPOT
 804 HOTSPOT_DIST
 805 BUILD_OUTPUT
 806 OVERRIDE_SRC_ROOT
 807 ADD_SRC_ROOT
 808 JDK_TOPDIR
 809 NASHORN_TOPDIR
 810 HOTSPOT_TOPDIR
 811 JAXWS_TOPDIR
 812 JAXP_TOPDIR
 813 CORBA_TOPDIR
 814 LANGTOOLS_TOPDIR
 815 JAVAC_FLAGS
 816 BOOT_JDK_SOURCETARGET
 817 JARSIGNER
 818 NATIVE2ASCII
 819 JAR
 820 JAVAH
 821 JAVAC
 822 JAVA
 823 BOOT_JDK
 824 JAVA_CHECK
 825 JAVAC_CHECK
 826 COOKED_BUILD_NUMBER
 827 JDK_VERSION
 828 COPYRIGHT_YEAR
 829 MACOSX_BUNDLE_ID_BASE
 830 MACOSX_BUNDLE_NAME_BASE
 831 COMPANY_NAME
 832 JDK_RC_PLATFORM_NAME
 833 PRODUCT_SUFFIX
 834 PRODUCT_NAME
 835 LAUNCHER_NAME
 836 MILESTONE
 837 JDK_BUILD_NUMBER
 838 JDK_UPDATE_VERSION
 839 JDK_MICRO_VERSION
 840 JDK_MINOR_VERSION
 841 JDK_MAJOR_VERSION
 842 USER_RELEASE_SUFFIX
 843 COMPRESS_JARS
 844 RMICONNECTOR_IIOP
 845 UNLIMITED_CRYPTO
 846 CACERTS_FILE
 847 TEST_IN_BUILD
 848 BUILD_HEADLESS
 849 SUPPORT_HEADFUL
 850 SUPPORT_HEADLESS
 851 BDEPS_FTP
 852 BDEPS_UNZIP
 853 OS_VERSION_MICRO
 854 OS_VERSION_MINOR
 855 OS_VERSION_MAJOR
 856 PKG_CONFIG
 857 CODESIGN
 858 XATTR
 859 DSYMUTIL
 860 IS_GNU_TIME
 861 TIME
 862 STAT
 863 HG
 864 READELF
 865 OTOOL
 866 LDD
 867 ZIP
 868 UNZIP
 869 FIND_DELETE
 870 OUTPUT_SYNC
 871 OUTPUT_SYNC_SUPPORTED
 872 MAKE
 873 CHECK_TOOLSDIR_MAKE
 874 CHECK_TOOLSDIR_GMAKE
 875 CHECK_MAKE
 876 CHECK_GMAKE
 877 PKGHANDLER
 878 OUTPUT_ROOT
 879 CONF_NAME
 880 SPEC
 881 SDKROOT
 882 XCODEBUILD
 883 BUILD_VARIANT_RELEASE
 884 DEBUG_CLASSFILES
 885 FASTDEBUG
 886 VARIANT
 887 DEBUG_LEVEL
 888 MACOSX_UNIVERSAL
 889 INCLUDE_SA
 890 JVM_VARIANT_CORE
 891 JVM_VARIANT_ZEROSHARK
 892 JVM_VARIANT_ZERO
 893 JVM_VARIANT_KERNEL
 894 JVM_VARIANT_MINIMAL1
 895 JVM_VARIANT_CLIENT
 896 JVM_VARIANT_SERVER
 897 JVM_VARIANTS
 898 JVM_INTERPRETER
 899 JDK_VARIANT
 900 SET_OPENJDK
 901 BUILD_LOG_WRAPPER
 902 BUILD_LOG_PREVIOUS
 903 BUILD_LOG
 904 TOPDIR
 905 PATH_SEP
 906 ZERO_ARCHDEF
 907 DEFINE_CROSS_COMPILE_ARCH
 908 LP64
 909 OPENJDK_TARGET_OS_EXPORT_DIR
 910 OPENJDK_TARGET_CPU_JLI_CFLAGS
 911 OPENJDK_TARGET_CPU_OSARCH
 912 OPENJDK_TARGET_CPU_ISADIR
 913 OPENJDK_TARGET_CPU_LIBDIR
 914 OPENJDK_TARGET_CPU_LEGACY_LIB
 915 OPENJDK_TARGET_CPU_LEGACY
 916 REQUIRED_OS_VERSION
 917 REQUIRED_OS_NAME
 918 COMPILE_TYPE
 919 OPENJDK_TARGET_CPU_ENDIAN
 920 OPENJDK_TARGET_CPU_BITS
 921 OPENJDK_TARGET_CPU_ARCH
 922 OPENJDK_TARGET_CPU
 923 OPENJDK_TARGET_OS_ENV
 924 OPENJDK_TARGET_OS_TYPE
 925 OPENJDK_TARGET_OS
 926 OPENJDK_BUILD_CPU_ENDIAN
 927 OPENJDK_BUILD_CPU_BITS
 928 OPENJDK_BUILD_CPU_ARCH
 929 OPENJDK_BUILD_CPU
 930 OPENJDK_BUILD_OS_ENV
 931 OPENJDK_BUILD_OS_TYPE
 932 OPENJDK_BUILD_OS
 933 OPENJDK_BUILD_AUTOCONF_NAME
 934 OPENJDK_TARGET_AUTOCONF_NAME
 935 target_os
 936 target_vendor
 937 target_cpu
 938 target
 939 host_os
 940 host_vendor
 941 host_cpu
 942 host
 943 build_os
 944 build_vendor
 945 build_cpu
 946 build
 947 CPIO
 948 SETFILE
 949 DF
 950 READLINK
 951 CYGPATH
 952 SED
 953 FGREP
 954 EGREP
 955 GREP
 956 AWK
 957 XARGS
 958 WHICH
 959 WC
 960 UNIQ
 961 UNAME
 962 TR
 963 TOUCH
 964 TEE
 965 TAR
 966 TAIL
 967 SORT
 968 SH
 969 RM
 970 PRINTF
 971 NAWK
 972 MV
 973 MKTEMP
 974 MKDIR
 975 LS
 976 LN
 977 HEAD
 978 FIND
 979 FILE
 980 EXPR
 981 ECHO
 982 DIRNAME
 983 DIFF
 984 DATE
 985 CUT
 986 CP
 987 COMM
 988 CMP
 989 CHMOD
 990 CAT
 991 BASH
 992 BASENAME
 993 DATE_WHEN_CONFIGURED
 994 CONFIGURE_COMMAND_LINE
 995 target_alias
 996 host_alias
 997 build_alias
 998 LIBS
 999 ECHO_T
1000 ECHO_N
1001 ECHO_C
1002 DEFS
1003 mandir
1004 localedir
1005 libdir
1006 psdir
1007 pdfdir
1008 dvidir
1009 htmldir
1010 infodir
1011 docdir
1012 oldincludedir
1013 includedir
1014 localstatedir
1015 sharedstatedir
1016 sysconfdir
1017 datadir
1018 datarootdir
1019 libexecdir
1020 sbindir
1021 bindir
1022 program_transform_name
1023 prefix
1024 exec_prefix
1025 PACKAGE_URL
1026 PACKAGE_BUGREPORT
1027 PACKAGE_STRING
1028 PACKAGE_VERSION
1029 PACKAGE_TARNAME
1030 PACKAGE_NAME
1031 PATH_SEPARATOR
1032 SHELL'
1033 ac_subst_files=''
1034 ac_user_opts='
1035 enable_option_checking
1036 with_target_bits
1037 enable_openjdk_only
1038 with_custom_make_dir
1039 with_jdk_variant
1040 with_jvm_interpreter
1041 with_jvm_variants
1042 enable_debug
1043 with_debug_level
1044 with_devkit
1045 with_sys_root
1046 with_sysroot
1047 with_tools_dir
1048 with_toolchain_path
1049 with_extra_path
1050 with_sdk_name
1051 with_conf_name
1052 with_output_sync
1053 with_builddeps_conf
1054 with_builddeps_server
1055 with_builddeps_dir
1056 with_builddeps_group
1057 enable_headful
1058 enable_hotspot_test_in_build
1059 with_cacerts_file
1060 enable_unlimited_crypto
1061 enable_rmiconnector_iiop
1062 with_milestone
1063 with_update_version
1064 with_user_release_suffix
1065 with_build_number
1066 with_copyright_year
1067 with_boot_jdk
1068 with_add_source_root
1069 with_override_source_root
1070 with_adds_and_overrides
1071 with_override_langtools
1072 with_override_corba
1073 with_override_jaxp
1074 with_override_jaxws
1075 with_override_hotspot
1076 with_override_nashorn
1077 with_override_jdk
1078 with_import_hotspot
1079 with_toolchain_type
1080 with_jtreg
1081 with_extra_cflags
1082 with_extra_cxxflags
1083 with_extra_ldflags
1084 enable_debug_symbols
1085 enable_zip_debug_info
1086 with_x
1087 with_cups
1088 with_cups_include
1089 with_freetype
1090 with_freetype_include
1091 with_freetype_lib
1092 with_freetype_src
1093 enable_freetype_bundling
1094 with_alsa
1095 with_alsa_include
1096 with_alsa_lib
1097 with_libjpeg
1098 with_giflib
1099 with_lcms
1100 with_libpng
1101 with_zlib
1102 with_stdc__lib
1103 with_msvcr_dll
1104 with_dxsdk
1105 with_dxsdk_lib
1106 with_dxsdk_include
1107 with_num_cores
1108 with_memory_size
1109 with_jobs
1110 with_boot_jdk_jvmargs
1111 with_sjavac_server_java
1112 enable_sjavac
1113 enable_precompiled_headers
1114 enable_ccache
1115 with_ccache_dir
1116 '
1117       ac_precious_vars='build_alias
1118 host_alias
1119 target_alias
1120 BASENAME
1121 BASH
1122 CAT
1123 CHMOD
1124 CMP
1125 COMM
1126 CP
1127 CUT
1128 DATE
1129 DIFF
1130 DIRNAME
1131 ECHO
1132 EXPR
1133 FILE
1134 FIND
1135 HEAD
1136 LN
1137 LS
1138 MKDIR
1139 MKTEMP
1140 MV
1141 NAWK
1142 PRINTF
1143 RM
1144 SH
1145 SORT
1146 TAIL
1147 TAR
1148 TEE
1149 TOUCH
1150 TR
1151 UNAME
1152 UNIQ
1153 WC
1154 WHICH
1155 XARGS
1156 AWK
1157 GREP
1158 EGREP
1159 FGREP
1160 SED
1161 CYGPATH
1162 READLINK
1163 DF
1164 SETFILE
1165 CPIO
1166 UNZIP
1167 ZIP
1168 LDD
1169 OTOOL
1170 READELF
1171 HG
1172 STAT
1173 TIME
1174 DSYMUTIL
1175 XATTR
1176 CODESIGN
1177 PKG_CONFIG
1178 JAVA
1179 JAVAC
1180 JAVAH
1181 JAR
1182 NATIVE2ASCII
1183 JARSIGNER
1184 CC
1185 CFLAGS
1186 LDFLAGS
1187 LIBS
1188 CPPFLAGS
1189 CXX
1190 CXXFLAGS
1191 CCC
1192 CPP
1193 CXXCPP
1194 AS
1195 AR
1196 OBJC
1197 OBJCFLAGS
1198 LIPO
1199 STRIP
1200 NM
1201 GNM
1202 MCS
1203 OBJCOPY
1204 OBJDUMP
1205 BUILD_CC
1206 BUILD_CXX
1207 BUILD_LD
1208 JTREGEXE
1209 XMKMF
1210 FREETYPE_CFLAGS
1211 FREETYPE_LIBS
1212 ALSA_CFLAGS
1213 ALSA_LIBS
1214 LCMS_CFLAGS
1215 LCMS_LIBS
1216 PNG_CFLAGS
1217 PNG_LIBS
1218 LIBFFI_CFLAGS
1219 LIBFFI_LIBS
1220 CCACHE'
1221 
1222 
1223 # Initialize some variables set by options.
1224 ac_init_help=
1225 ac_init_version=false
1226 ac_unrecognized_opts=
1227 ac_unrecognized_sep=
1228 # The variables have the same names as the options, with
1229 # dashes changed to underlines.
1230 cache_file=/dev/null
1231 exec_prefix=NONE
1232 no_create=
1233 no_recursion=
1234 prefix=NONE
1235 program_prefix=NONE
1236 program_suffix=NONE
1237 program_transform_name=s,x,x,
1238 silent=
1239 site=
1240 srcdir=
1241 verbose=
1242 x_includes=NONE
1243 x_libraries=NONE
1244 
1245 # Installation directory options.
1246 # These are left unexpanded so users can "make install exec_prefix=/foo"
1247 # and all the variables that are supposed to be based on exec_prefix
1248 # by default will actually change.
1249 # Use braces instead of parens because sh, perl, etc. also accept them.
1250 # (The list follows the same order as the GNU Coding Standards.)
1251 bindir='${exec_prefix}/bin'
1252 sbindir='${exec_prefix}/sbin'
1253 libexecdir='${exec_prefix}/libexec'
1254 datarootdir='${prefix}/share'
1255 datadir='${datarootdir}'
1256 sysconfdir='${prefix}/etc'
1257 sharedstatedir='${prefix}/com'
1258 localstatedir='${prefix}/var'
1259 includedir='${prefix}/include'
1260 oldincludedir='/usr/include'
1261 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1262 infodir='${datarootdir}/info'
1263 htmldir='${docdir}'
1264 dvidir='${docdir}'
1265 pdfdir='${docdir}'
1266 psdir='${docdir}'
1267 libdir='${exec_prefix}/lib'
1268 localedir='${datarootdir}/locale'
1269 mandir='${datarootdir}/man'
1270 
1271 ac_prev=
1272 ac_dashdash=
1273 for ac_option
1274 do
1275   # If the previous option needs an argument, assign it.
1276   if test -n "$ac_prev"; then
1277     eval $ac_prev=\$ac_option
1278     ac_prev=
1279     continue
1280   fi
1281 
1282   case $ac_option in
1283   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1284   *=)   ac_optarg= ;;
1285   *)    ac_optarg=yes ;;
1286   esac
1287 
1288   # Accept the important Cygnus configure options, so we can diagnose typos.
1289 
1290   case $ac_dashdash$ac_option in
1291   --)
1292     ac_dashdash=yes ;;
1293 
1294   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1295     ac_prev=bindir ;;
1296   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1297     bindir=$ac_optarg ;;
1298 
1299   -build | --build | --buil | --bui | --bu)
1300     ac_prev=build_alias ;;
1301   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1302     build_alias=$ac_optarg ;;
1303 
1304   -cache-file | --cache-file | --cache-fil | --cache-fi \
1305   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1306     ac_prev=cache_file ;;
1307   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1308   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1309     cache_file=$ac_optarg ;;
1310 
1311   --config-cache | -C)
1312     cache_file=config.cache ;;
1313 
1314   -datadir | --datadir | --datadi | --datad)
1315     ac_prev=datadir ;;
1316   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1317     datadir=$ac_optarg ;;
1318 
1319   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1320   | --dataroo | --dataro | --datar)
1321     ac_prev=datarootdir ;;
1322   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1323   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1324     datarootdir=$ac_optarg ;;
1325 
1326   -disable-* | --disable-*)
1327     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1328     # Reject names that are not valid shell variable names.
1329     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1330       as_fn_error $? "invalid feature name: $ac_useropt"
1331     ac_useropt_orig=$ac_useropt
1332     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1333     case $ac_user_opts in
1334       *"
1335 "enable_$ac_useropt"
1336 "*) ;;
1337       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1338          ac_unrecognized_sep=', ';;
1339     esac
1340     eval enable_$ac_useropt=no ;;
1341 
1342   -docdir | --docdir | --docdi | --doc | --do)
1343     ac_prev=docdir ;;
1344   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1345     docdir=$ac_optarg ;;
1346 
1347   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1348     ac_prev=dvidir ;;
1349   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1350     dvidir=$ac_optarg ;;
1351 
1352   -enable-* | --enable-*)
1353     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1354     # Reject names that are not valid shell variable names.
1355     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1356       as_fn_error $? "invalid feature name: $ac_useropt"
1357     ac_useropt_orig=$ac_useropt
1358     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1359     case $ac_user_opts in
1360       *"
1361 "enable_$ac_useropt"
1362 "*) ;;
1363       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1364          ac_unrecognized_sep=', ';;
1365     esac
1366     eval enable_$ac_useropt=\$ac_optarg ;;
1367 
1368   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1369   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1370   | --exec | --exe | --ex)
1371     ac_prev=exec_prefix ;;
1372   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1373   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1374   | --exec=* | --exe=* | --ex=*)
1375     exec_prefix=$ac_optarg ;;
1376 
1377   -gas | --gas | --ga | --g)
1378     # Obsolete; use --with-gas.
1379     with_gas=yes ;;
1380 
1381   -help | --help | --hel | --he | -h)
1382     ac_init_help=long ;;
1383   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1384     ac_init_help=recursive ;;
1385   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1386     ac_init_help=short ;;
1387 
1388   -host | --host | --hos | --ho)
1389     ac_prev=host_alias ;;
1390   -host=* | --host=* | --hos=* | --ho=*)
1391     host_alias=$ac_optarg ;;
1392 
1393   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1394     ac_prev=htmldir ;;
1395   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1396   | --ht=*)
1397     htmldir=$ac_optarg ;;
1398 
1399   -includedir | --includedir | --includedi | --included | --include \
1400   | --includ | --inclu | --incl | --inc)
1401     ac_prev=includedir ;;
1402   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1403   | --includ=* | --inclu=* | --incl=* | --inc=*)
1404     includedir=$ac_optarg ;;
1405 
1406   -infodir | --infodir | --infodi | --infod | --info | --inf)
1407     ac_prev=infodir ;;
1408   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1409     infodir=$ac_optarg ;;
1410 
1411   -libdir | --libdir | --libdi | --libd)
1412     ac_prev=libdir ;;
1413   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1414     libdir=$ac_optarg ;;
1415 
1416   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1417   | --libexe | --libex | --libe)
1418     ac_prev=libexecdir ;;
1419   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1420   | --libexe=* | --libex=* | --libe=*)
1421     libexecdir=$ac_optarg ;;
1422 
1423   -localedir | --localedir | --localedi | --localed | --locale)
1424     ac_prev=localedir ;;
1425   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1426     localedir=$ac_optarg ;;
1427 
1428   -localstatedir | --localstatedir | --localstatedi | --localstated \
1429   | --localstate | --localstat | --localsta | --localst | --locals)
1430     ac_prev=localstatedir ;;
1431   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1432   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1433     localstatedir=$ac_optarg ;;
1434 
1435   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1436     ac_prev=mandir ;;
1437   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1438     mandir=$ac_optarg ;;
1439 
1440   -nfp | --nfp | --nf)
1441     # Obsolete; use --without-fp.
1442     with_fp=no ;;
1443 
1444   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1445   | --no-cr | --no-c | -n)
1446     no_create=yes ;;
1447 
1448   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1449   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1450     no_recursion=yes ;;
1451 
1452   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1453   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1454   | --oldin | --oldi | --old | --ol | --o)
1455     ac_prev=oldincludedir ;;
1456   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1457   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1458   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1459     oldincludedir=$ac_optarg ;;
1460 
1461   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1462     ac_prev=prefix ;;
1463   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1464     prefix=$ac_optarg ;;
1465 
1466   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1467   | --program-pre | --program-pr | --program-p)
1468     ac_prev=program_prefix ;;
1469   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1470   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1471     program_prefix=$ac_optarg ;;
1472 
1473   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1474   | --program-suf | --program-su | --program-s)
1475     ac_prev=program_suffix ;;
1476   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1477   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1478     program_suffix=$ac_optarg ;;
1479 
1480   -program-transform-name | --program-transform-name \
1481   | --program-transform-nam | --program-transform-na \
1482   | --program-transform-n | --program-transform- \
1483   | --program-transform | --program-transfor \
1484   | --program-transfo | --program-transf \
1485   | --program-trans | --program-tran \
1486   | --progr-tra | --program-tr | --program-t)
1487     ac_prev=program_transform_name ;;
1488   -program-transform-name=* | --program-transform-name=* \
1489   | --program-transform-nam=* | --program-transform-na=* \
1490   | --program-transform-n=* | --program-transform-=* \
1491   | --program-transform=* | --program-transfor=* \
1492   | --program-transfo=* | --program-transf=* \
1493   | --program-trans=* | --program-tran=* \
1494   | --progr-tra=* | --program-tr=* | --program-t=*)
1495     program_transform_name=$ac_optarg ;;
1496 
1497   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1498     ac_prev=pdfdir ;;
1499   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1500     pdfdir=$ac_optarg ;;
1501 
1502   -psdir | --psdir | --psdi | --psd | --ps)
1503     ac_prev=psdir ;;
1504   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1505     psdir=$ac_optarg ;;
1506 
1507   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1508   | -silent | --silent | --silen | --sile | --sil)
1509     silent=yes ;;
1510 
1511   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1512     ac_prev=sbindir ;;
1513   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1514   | --sbi=* | --sb=*)
1515     sbindir=$ac_optarg ;;
1516 
1517   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1518   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1519   | --sharedst | --shareds | --shared | --share | --shar \
1520   | --sha | --sh)
1521     ac_prev=sharedstatedir ;;
1522   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1523   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1524   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1525   | --sha=* | --sh=*)
1526     sharedstatedir=$ac_optarg ;;
1527 
1528   -site | --site | --sit)
1529     ac_prev=site ;;
1530   -site=* | --site=* | --sit=*)
1531     site=$ac_optarg ;;
1532 
1533   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1534     ac_prev=srcdir ;;
1535   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1536     srcdir=$ac_optarg ;;
1537 
1538   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1539   | --syscon | --sysco | --sysc | --sys | --sy)
1540     ac_prev=sysconfdir ;;
1541   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1542   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1543     sysconfdir=$ac_optarg ;;
1544 
1545   -target | --target | --targe | --targ | --tar | --ta | --t)
1546     ac_prev=target_alias ;;
1547   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1548     target_alias=$ac_optarg ;;
1549 
1550   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1551     verbose=yes ;;
1552 
1553   -version | --version | --versio | --versi | --vers | -V)
1554     ac_init_version=: ;;
1555 
1556   -with-* | --with-*)
1557     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1558     # Reject names that are not valid shell variable names.
1559     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1560       as_fn_error $? "invalid package name: $ac_useropt"
1561     ac_useropt_orig=$ac_useropt
1562     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1563     case $ac_user_opts in
1564       *"
1565 "with_$ac_useropt"
1566 "*) ;;
1567       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1568          ac_unrecognized_sep=', ';;
1569     esac
1570     eval with_$ac_useropt=\$ac_optarg ;;
1571 
1572   -without-* | --without-*)
1573     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1574     # Reject names that are not valid shell variable names.
1575     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1576       as_fn_error $? "invalid package name: $ac_useropt"
1577     ac_useropt_orig=$ac_useropt
1578     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1579     case $ac_user_opts in
1580       *"
1581 "with_$ac_useropt"
1582 "*) ;;
1583       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1584          ac_unrecognized_sep=', ';;
1585     esac
1586     eval with_$ac_useropt=no ;;
1587 
1588   --x)
1589     # Obsolete; use --with-x.
1590     with_x=yes ;;
1591 
1592   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1593   | --x-incl | --x-inc | --x-in | --x-i)
1594     ac_prev=x_includes ;;
1595   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1596   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1597     x_includes=$ac_optarg ;;
1598 
1599   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1600   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1601     ac_prev=x_libraries ;;
1602   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1603   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1604     x_libraries=$ac_optarg ;;
1605 
1606   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1607 Try \`$0 --help' for more information"
1608     ;;
1609 
1610   *=*)
1611     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1612     # Reject names that are not valid shell variable names.
1613     case $ac_envvar in #(
1614       '' | [0-9]* | *[!_$as_cr_alnum]* )
1615       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1616     esac
1617     eval $ac_envvar=\$ac_optarg
1618     export $ac_envvar ;;
1619 
1620   *)
1621     # FIXME: should be removed in autoconf 3.0.
1622     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1623     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1624       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1625     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1626     ;;
1627 
1628   esac
1629 done
1630 
1631 if test -n "$ac_prev"; then
1632   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1633   as_fn_error $? "missing argument to $ac_option"
1634 fi
1635 
1636 if test -n "$ac_unrecognized_opts"; then
1637   case $enable_option_checking in
1638     no) ;;
1639     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1640     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1641   esac
1642 fi
1643 
1644 # Check all directory arguments for consistency.
1645 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1646                 datadir sysconfdir sharedstatedir localstatedir includedir \
1647                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1648                 libdir localedir mandir
1649 do
1650   eval ac_val=\$$ac_var
1651   # Remove trailing slashes.
1652   case $ac_val in
1653     */ )
1654       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1655       eval $ac_var=\$ac_val;;
1656   esac
1657   # Be sure to have absolute directory names.
1658   case $ac_val in
1659     [\\/$]* | ?:[\\/]* )  continue;;
1660     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1661   esac
1662   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1663 done
1664 
1665 # There might be people who depend on the old broken behavior: `$host'
1666 # used to hold the argument of --host etc.
1667 # FIXME: To remove some day.
1668 build=$build_alias
1669 host=$host_alias
1670 target=$target_alias
1671 
1672 # FIXME: To remove some day.
1673 if test "x$host_alias" != x; then
1674   if test "x$build_alias" = x; then
1675     cross_compiling=maybe
1676   elif test "x$build_alias" != "x$host_alias"; then
1677     cross_compiling=yes
1678   fi
1679 fi
1680 
1681 ac_tool_prefix=
1682 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1683 
1684 test "$silent" = yes && exec 6>/dev/null
1685 
1686 
1687 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1688 ac_ls_di=`ls -di .` &&
1689 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1690   as_fn_error $? "working directory cannot be determined"
1691 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1692   as_fn_error $? "pwd does not report name of working directory"
1693 
1694 
1695 # Find the source files, if location was not specified.
1696 if test -z "$srcdir"; then
1697   ac_srcdir_defaulted=yes
1698   # Try the directory containing this script, then the parent directory.
1699   ac_confdir=`$as_dirname -- "$as_myself" ||
1700 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1701          X"$as_myself" : 'X\(//\)[^/]' \| \
1702          X"$as_myself" : 'X\(//\)$' \| \
1703          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1704 $as_echo X"$as_myself" |
1705     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1706             s//\1/
1707             q
1708           }
1709           /^X\(\/\/\)[^/].*/{
1710             s//\1/
1711             q
1712           }
1713           /^X\(\/\/\)$/{
1714             s//\1/
1715             q
1716           }
1717           /^X\(\/\).*/{
1718             s//\1/
1719             q
1720           }
1721           s/.*/./; q'`
1722   srcdir=$ac_confdir
1723   if test ! -r "$srcdir/$ac_unique_file"; then
1724     srcdir=..
1725   fi
1726 else
1727   ac_srcdir_defaulted=no
1728 fi
1729 if test ! -r "$srcdir/$ac_unique_file"; then
1730   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1731   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1732 fi
1733 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1734 ac_abs_confdir=`(
1735         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1736         pwd)`
1737 # When building in place, set srcdir=.
1738 if test "$ac_abs_confdir" = "$ac_pwd"; then
1739   srcdir=.
1740 fi
1741 # Remove unnecessary trailing slashes from srcdir.
1742 # Double slashes in file names in object file debugging info
1743 # mess up M-x gdb in Emacs.
1744 case $srcdir in
1745 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1746 esac
1747 for ac_var in $ac_precious_vars; do
1748   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1749   eval ac_env_${ac_var}_value=\$${ac_var}
1750   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1751   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1752 done
1753 
1754 #
1755 # Report the --help message.
1756 #
1757 if test "$ac_init_help" = "long"; then
1758   # Omit some internal or obsolete options to make the list less imposing.
1759   # This message is too long to be a string in the A/UX 3.1 sh.
1760   cat <<_ACEOF
1761 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1762 
1763 Usage: $0 [OPTION]... [VAR=VALUE]...
1764 
1765 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1766 VAR=VALUE.  See below for descriptions of some of the useful variables.
1767 
1768 Defaults for the options are specified in brackets.
1769 
1770 Configuration:
1771   -h, --help              display this help and exit
1772       --help=short        display options specific to this package
1773       --help=recursive    display the short help of all the included packages
1774   -V, --version           display version information and exit
1775   -q, --quiet, --silent   do not print \`checking ...' messages
1776       --cache-file=FILE   cache test results in FILE [disabled]
1777   -C, --config-cache      alias for \`--cache-file=config.cache'
1778   -n, --no-create         do not create output files
1779       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1780 
1781 Installation directories:
1782   --prefix=PREFIX         install architecture-independent files in PREFIX
1783                           [$ac_default_prefix]
1784   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1785                           [PREFIX]
1786 
1787 By default, \`make install' will install all the files in
1788 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1789 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1790 for instance \`--prefix=\$HOME'.
1791 
1792 For better control, use the options below.
1793 
1794 Fine tuning of the installation directories:
1795   --bindir=DIR            user executables [EPREFIX/bin]
1796   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1797   --libexecdir=DIR        program executables [EPREFIX/libexec]
1798   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1799   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1800   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1801   --libdir=DIR            object code libraries [EPREFIX/lib]
1802   --includedir=DIR        C header files [PREFIX/include]
1803   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1804   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1805   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1806   --infodir=DIR           info documentation [DATAROOTDIR/info]
1807   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1808   --mandir=DIR            man documentation [DATAROOTDIR/man]
1809   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1810   --htmldir=DIR           html documentation [DOCDIR]
1811   --dvidir=DIR            dvi documentation [DOCDIR]
1812   --pdfdir=DIR            pdf documentation [DOCDIR]
1813   --psdir=DIR             ps documentation [DOCDIR]
1814 _ACEOF
1815 
1816   cat <<\_ACEOF
1817 
1818 X features:
1819   --x-includes=DIR    X include files are in DIR
1820   --x-libraries=DIR   X library files are in DIR
1821 
1822 System types:
1823   --build=BUILD     configure for building on BUILD [guessed]
1824   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1825   --target=TARGET   configure for building compilers for TARGET [HOST]
1826 _ACEOF
1827 fi
1828 
1829 if test -n "$ac_init_help"; then
1830   case $ac_init_help in
1831      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1832    esac
1833   cat <<\_ACEOF
1834 
1835 Optional Features:
1836   --disable-option-checking  ignore unrecognized --enable/--with options
1837   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1838   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1839   --enable-openjdk-only   suppress building custom source even if present
1840                           [disabled]
1841   --enable-debug          set the debug level to fastdebug (shorthand for
1842                           --with-debug-level=fastdebug) [disabled]
1843   --disable-headful       disable building headful support (graphical UI
1844                           support) [enabled]
1845   --enable-hotspot-test-in-build
1846                           run the Queens test after Hotspot build [disabled]
1847   --enable-unlimited-crypto
1848                           Enable unlimited crypto policy [disabled]
1849   --enable-rmiconnector-iiop
1850                           enable the JMX RMIConnector iiop transport
1851                           [disabled]
1852   --disable-debug-symbols disable generation of debug symbols [enabled]
1853   --disable-zip-debug-info
1854                           disable zipping of debug-info files [enabled]
1855   --disable-freetype-bundling
1856                           disable bundling of the freetype library with the
1857                           build result [enabled on Windows or when using
1858                           --with-freetype, disabled otherwise]
1859   --enable-sjavac         use sjavac to do fast incremental compiles
1860                           [disabled]
1861   --disable-precompiled-headers
1862                           disable using precompiled headers when compiling C++
1863                           [enabled]
1864   --enable-ccache         enable using ccache to speed up recompilations
1865                           [disabled]
1866 
1867 Optional Packages:
1868   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1869   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1870   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1871                           support it), e.g. --with-target-bits=32 [guessed]
1872   --with-custom-make-dir  Deprecated. Option is kept for backwards
1873                           compatibility and is ignored
1874   --with-jdk-variant      JDK variant to build (normal) [normal]
1875   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1876   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1877                           client, minimal1, kernel, zero, zeroshark, core)
1878                           [server]
1879   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1880                           optimized (HotSpot build only)) [release]
1881   --with-devkit           use this devkit for compilers, tools and resources
1882   --with-sys-root         alias for --with-sysroot for backwards compatability
1883   --with-sysroot          use this directory as sysroot
1884   --with-tools-dir        alias for --with-toolchain-path for backwards
1885                           compatibility
1886   --with-toolchain-path   prepend these directories when searching for
1887                           toolchain binaries (compilers etc)
1888   --with-extra-path       prepend these directories to the default path
1889   --with-sdk-name         use the platform SDK of the given name. [macosx]
1890   --with-conf-name        use this as the name of the configuration [generated
1891                           from important configuration options]
1892   --with-output-sync      set make output sync type if supported by make.
1893                           [recurse]
1894   --with-builddeps-conf   use this configuration file for the builddeps
1895   --with-builddeps-server download and use build dependencies from this server
1896                           url
1897   --with-builddeps-dir    store downloaded build dependencies here
1898                           [/localhome/builddeps]
1899   --with-builddeps-group  chgrp the downloaded build dependencies to this
1900                           group
1901   --with-cacerts-file     specify alternative cacerts file
1902   --with-milestone        Set milestone value for build [internal]
1903   --with-update-version   Set update version value for build [b00]
1904   --with-user-release-suffix
1905                           Add a custom string to the version string if build
1906                           number is not set.[username_builddateb00]
1907   --with-build-number     Set build number value for build [b00]
1908   --with-copyright-year   Set copyright year value for build [current year]
1909   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1910   --with-add-source-root  for each and every source directory, look in this
1911                           additional source root for the same directory; if it
1912                           exists and have files in it, include it in the build
1913   --with-override-source-root
1914                           for each and every source directory, look in this
1915                           override source root for the same directory; if it
1916                           exists, use that directory instead and ignore the
1917                           directory in the original source root
1918   --with-adds-and-overrides
1919                           use the subdirs 'adds' and 'overrides' in the
1920                           specified directory as add-source-root and
1921                           override-source-root
1922   --with-override-langtools
1923                           use this langtools dir for the build
1924   --with-override-corba   use this corba dir for the build
1925   --with-override-jaxp    use this jaxp dir for the build
1926   --with-override-jaxws   use this jaxws dir for the build
1927   --with-override-hotspot use this hotspot dir for the build
1928   --with-override-nashorn use this nashorn dir for the build
1929   --with-override-jdk     use this jdk dir for the build
1930   --with-import-hotspot   import hotspot binaries from this jdk image or
1931                           hotspot build dist dir instead of building from
1932                           source
1933   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1934                           to show possible values [platform dependent]
1935   --with-jtreg            Regression Test Harness [probed]
1936   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1937   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1938   --with-extra-ldflags    extra flags to be used when linking jdk
1939   --with-x                use the X Window System
1940   --with-cups             specify prefix directory for the cups package
1941                           (expecting the headers under PATH/include)
1942   --with-cups-include     specify directory for the cups include files
1943   --with-freetype         specify prefix directory for the freetype package
1944                           (expecting the libraries under PATH/lib and the
1945                           headers under PATH/include)
1946   --with-freetype-include specify directory for the freetype include files
1947   --with-freetype-lib     specify directory for the freetype library
1948   --with-freetype-src     specify directory with freetype sources to
1949                           automatically build the library (experimental,
1950                           Windows-only)
1951   --with-alsa             specify prefix directory for the alsa package
1952                           (expecting the libraries under PATH/lib and the
1953                           headers under PATH/include)
1954   --with-alsa-include     specify directory for the alsa include files
1955   --with-alsa-lib         specify directory for the alsa library
1956   --with-libjpeg          use libjpeg from build system or OpenJDK source
1957                           (system, bundled) [bundled]
1958   --with-giflib           use giflib from build system or OpenJDK source
1959                           (system, bundled) [bundled]
1960   --with-lcms             use lcms2 from build system or OpenJDK source
1961                           (system, bundled) [bundled]
1962   --with-libpng           use libpng from build system or OpenJDK source
1963                           (system, bundled) [bundled]
1964   --with-zlib             use zlib from build system or OpenJDK source
1965                           (system, bundled) [bundled]
1966   --with-stdc++lib=<static>,<dynamic>,<default>
1967                           force linking of the C++ runtime on Linux to either
1968                           static or dynamic, default is static with dynamic as
1969                           fallback
1970   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1971                           only) [probed]
1972   --with-dxsdk            Deprecated. Option is kept for backwards
1973                           compatibility and is ignored
1974   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1975                           compatibility and is ignored
1976   --with-dxsdk-include    Deprecated. Option is kept for backwards
1977                           compatibility and is ignored
1978   --with-num-cores        number of cores in the build system, e.g.
1979                           --with-num-cores=8 [probed]
1980   --with-memory-size      memory (in MB) available in the build system, e.g.
1981                           --with-memory-size=1024 [probed]
1982   --with-jobs             number of parallel jobs to let make run [calculated
1983                           based on cores and memory]
1984   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1985                           invocations of boot JDK, overriding the default
1986                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1987                           -enableassertions"
1988   --with-sjavac-server-java
1989                           use this java binary for running the sjavac
1990                           background server [Boot JDK java]
1991   --with-ccache-dir       where to store ccache files [~/.ccache]
1992 
1993 Some influential environment variables:
1994   BASENAME    Override default value for BASENAME
1995   BASH        Override default value for BASH
1996   CAT         Override default value for CAT
1997   CHMOD       Override default value for CHMOD
1998   CMP         Override default value for CMP
1999   COMM        Override default value for COMM
2000   CP          Override default value for CP
2001   CUT         Override default value for CUT
2002   DATE        Override default value for DATE
2003   DIFF        Override default value for DIFF
2004   DIRNAME     Override default value for DIRNAME
2005   ECHO        Override default value for ECHO
2006   EXPR        Override default value for EXPR
2007   FILE        Override default value for FILE
2008   FIND        Override default value for FIND
2009   HEAD        Override default value for HEAD
2010   LN          Override default value for LN
2011   LS          Override default value for LS
2012   MKDIR       Override default value for MKDIR
2013   MKTEMP      Override default value for MKTEMP
2014   MV          Override default value for MV
2015   NAWK        Override default value for NAWK
2016   PRINTF      Override default value for PRINTF
2017   RM          Override default value for RM
2018   SH          Override default value for SH
2019   SORT        Override default value for SORT
2020   TAIL        Override default value for TAIL
2021   TAR         Override default value for TAR
2022   TEE         Override default value for TEE
2023   TOUCH       Override default value for TOUCH
2024   TR          Override default value for TR
2025   UNAME       Override default value for UNAME
2026   UNIQ        Override default value for UNIQ
2027   WC          Override default value for WC
2028   WHICH       Override default value for WHICH
2029   XARGS       Override default value for XARGS
2030   AWK         Override default value for AWK
2031   GREP        Override default value for GREP
2032   EGREP       Override default value for EGREP
2033   FGREP       Override default value for FGREP
2034   SED         Override default value for SED
2035   CYGPATH     Override default value for CYGPATH
2036   READLINK    Override default value for READLINK
2037   DF          Override default value for DF
2038   SETFILE     Override default value for SETFILE
2039   CPIO        Override default value for CPIO
2040   UNZIP       Override default value for UNZIP
2041   ZIP         Override default value for ZIP
2042   LDD         Override default value for LDD
2043   OTOOL       Override default value for OTOOL
2044   READELF     Override default value for READELF
2045   HG          Override default value for HG
2046   STAT        Override default value for STAT
2047   TIME        Override default value for TIME
2048   DSYMUTIL    Override default value for DSYMUTIL
2049   XATTR       Override default value for XATTR
2050   CODESIGN    Override default value for CODESIGN
2051   PKG_CONFIG  path to pkg-config utility
2052   JAVA        Override default value for JAVA
2053   JAVAC       Override default value for JAVAC
2054   JAVAH       Override default value for JAVAH
2055   JAR         Override default value for JAR
2056   NATIVE2ASCII
2057               Override default value for NATIVE2ASCII
2058   JARSIGNER   Override default value for JARSIGNER
2059   CC          C compiler command
2060   CFLAGS      C compiler flags
2061   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2062               nonstandard directory <lib dir>
2063   LIBS        libraries to pass to the linker, e.g. -l<library>
2064   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2065               you have headers in a nonstandard directory <include dir>
2066   CXX         C++ compiler command
2067   CXXFLAGS    C++ compiler flags
2068   CPP         C preprocessor
2069   CXXCPP      C++ preprocessor
2070   AS          Override default value for AS
2071   AR          Override default value for AR
2072   OBJC        Objective C compiler command
2073   OBJCFLAGS   Objective C compiler flags
2074   LIPO        Override default value for LIPO
2075   STRIP       Override default value for STRIP
2076   NM          Override default value for NM
2077   GNM         Override default value for GNM
2078   MCS         Override default value for MCS
2079   OBJCOPY     Override default value for OBJCOPY
2080   OBJDUMP     Override default value for OBJDUMP
2081   BUILD_CC    Override default value for BUILD_CC
2082   BUILD_CXX   Override default value for BUILD_CXX
2083   BUILD_LD    Override default value for BUILD_LD
2084   JTREGEXE    Override default value for JTREGEXE
2085   XMKMF       Path to xmkmf, Makefile generator for X Window System
2086   FREETYPE_CFLAGS
2087               C compiler flags for FREETYPE, overriding pkg-config
2088   FREETYPE_LIBS
2089               linker flags for FREETYPE, overriding pkg-config
2090   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2091   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2092   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2093   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2094   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2095   PNG_LIBS    linker flags for PNG, overriding pkg-config
2096   LIBFFI_CFLAGS
2097               C compiler flags for LIBFFI, overriding pkg-config
2098   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2099   CCACHE      Override default value for CCACHE
2100 
2101 Use these variables to override the choices made by `configure' or to help
2102 it to find libraries and programs with nonstandard names/locations.
2103 
2104 Report bugs to <build-dev@openjdk.java.net>.
2105 OpenJDK home page: <http://openjdk.java.net>.
2106 _ACEOF
2107 ac_status=$?
2108 fi
2109 
2110 if test "$ac_init_help" = "recursive"; then
2111   # If there are subdirs, report their specific --help.
2112   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2113     test -d "$ac_dir" ||
2114       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2115       continue
2116     ac_builddir=.
2117 
2118 case "$ac_dir" in
2119 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2120 *)
2121   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2122   # A ".." for each directory in $ac_dir_suffix.
2123   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2124   case $ac_top_builddir_sub in
2125   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2126   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2127   esac ;;
2128 esac
2129 ac_abs_top_builddir=$ac_pwd
2130 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2131 # for backward compatibility:
2132 ac_top_builddir=$ac_top_build_prefix
2133 
2134 case $srcdir in
2135   .)  # We are building in place.
2136     ac_srcdir=.
2137     ac_top_srcdir=$ac_top_builddir_sub
2138     ac_abs_top_srcdir=$ac_pwd ;;
2139   [\\/]* | ?:[\\/]* )  # Absolute name.
2140     ac_srcdir=$srcdir$ac_dir_suffix;
2141     ac_top_srcdir=$srcdir
2142     ac_abs_top_srcdir=$srcdir ;;
2143   *) # Relative name.
2144     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2145     ac_top_srcdir=$ac_top_build_prefix$srcdir
2146     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2147 esac
2148 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2149 
2150     cd "$ac_dir" || { ac_status=$?; continue; }
2151     # Check for guested configure.
2152     if test -f "$ac_srcdir/configure.gnu"; then
2153       echo &&
2154       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2155     elif test -f "$ac_srcdir/configure"; then
2156       echo &&
2157       $SHELL "$ac_srcdir/configure" --help=recursive
2158     else
2159       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2160     fi || ac_status=$?
2161     cd "$ac_pwd" || { ac_status=$?; break; }
2162   done
2163 fi
2164 
2165 test -n "$ac_init_help" && exit $ac_status
2166 if $ac_init_version; then
2167   cat <<\_ACEOF
2168 OpenJDK configure jdk9
2169 generated by GNU Autoconf 2.69
2170 
2171 Copyright (C) 2012 Free Software Foundation, Inc.
2172 This configure script is free software; the Free Software Foundation
2173 gives unlimited permission to copy, distribute and modify it.
2174 _ACEOF
2175   exit
2176 fi
2177 
2178 ## ------------------------ ##
2179 ## Autoconf initialization. ##
2180 ## ------------------------ ##
2181 
2182 # ac_fn_c_try_compile LINENO
2183 # --------------------------
2184 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2185 ac_fn_c_try_compile ()
2186 {
2187   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2188   rm -f conftest.$ac_objext
2189   if { { ac_try="$ac_compile"
2190 case "(($ac_try" in
2191   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2192   *) ac_try_echo=$ac_try;;
2193 esac
2194 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2195 $as_echo "$ac_try_echo"; } >&5
2196   (eval "$ac_compile") 2>conftest.err
2197   ac_status=$?
2198   if test -s conftest.err; then
2199     grep -v '^ *+' conftest.err >conftest.er1
2200     cat conftest.er1 >&5
2201     mv -f conftest.er1 conftest.err
2202   fi
2203   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2204   test $ac_status = 0; } && {
2205          test -z "$ac_c_werror_flag" ||
2206          test ! -s conftest.err
2207        } && test -s conftest.$ac_objext; then :
2208   ac_retval=0
2209 else
2210   $as_echo "$as_me: failed program was:" >&5
2211 sed 's/^/| /' conftest.$ac_ext >&5
2212 
2213         ac_retval=1
2214 fi
2215   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2216   as_fn_set_status $ac_retval
2217 
2218 } # ac_fn_c_try_compile
2219 
2220 # ac_fn_cxx_try_compile LINENO
2221 # ----------------------------
2222 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2223 ac_fn_cxx_try_compile ()
2224 {
2225   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226   rm -f conftest.$ac_objext
2227   if { { ac_try="$ac_compile"
2228 case "(($ac_try" in
2229   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2230   *) ac_try_echo=$ac_try;;
2231 esac
2232 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2233 $as_echo "$ac_try_echo"; } >&5
2234   (eval "$ac_compile") 2>conftest.err
2235   ac_status=$?
2236   if test -s conftest.err; then
2237     grep -v '^ *+' conftest.err >conftest.er1
2238     cat conftest.er1 >&5
2239     mv -f conftest.er1 conftest.err
2240   fi
2241   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2242   test $ac_status = 0; } && {
2243          test -z "$ac_cxx_werror_flag" ||
2244          test ! -s conftest.err
2245        } && test -s conftest.$ac_objext; then :
2246   ac_retval=0
2247 else
2248   $as_echo "$as_me: failed program was:" >&5
2249 sed 's/^/| /' conftest.$ac_ext >&5
2250 
2251         ac_retval=1
2252 fi
2253   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2254   as_fn_set_status $ac_retval
2255 
2256 } # ac_fn_cxx_try_compile
2257 
2258 # ac_fn_c_try_cpp LINENO
2259 # ----------------------
2260 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2261 ac_fn_c_try_cpp ()
2262 {
2263   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2264   if { { ac_try="$ac_cpp conftest.$ac_ext"
2265 case "(($ac_try" in
2266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2267   *) ac_try_echo=$ac_try;;
2268 esac
2269 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2270 $as_echo "$ac_try_echo"; } >&5
2271   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2272   ac_status=$?
2273   if test -s conftest.err; then
2274     grep -v '^ *+' conftest.err >conftest.er1
2275     cat conftest.er1 >&5
2276     mv -f conftest.er1 conftest.err
2277   fi
2278   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2279   test $ac_status = 0; } > conftest.i && {
2280          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2281          test ! -s conftest.err
2282        }; then :
2283   ac_retval=0
2284 else
2285   $as_echo "$as_me: failed program was:" >&5
2286 sed 's/^/| /' conftest.$ac_ext >&5
2287 
2288     ac_retval=1
2289 fi
2290   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291   as_fn_set_status $ac_retval
2292 
2293 } # ac_fn_c_try_cpp
2294 
2295 # ac_fn_cxx_try_cpp LINENO
2296 # ------------------------
2297 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2298 ac_fn_cxx_try_cpp ()
2299 {
2300   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301   if { { ac_try="$ac_cpp conftest.$ac_ext"
2302 case "(($ac_try" in
2303   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2304   *) ac_try_echo=$ac_try;;
2305 esac
2306 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2307 $as_echo "$ac_try_echo"; } >&5
2308   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2309   ac_status=$?
2310   if test -s conftest.err; then
2311     grep -v '^ *+' conftest.err >conftest.er1
2312     cat conftest.er1 >&5
2313     mv -f conftest.er1 conftest.err
2314   fi
2315   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2316   test $ac_status = 0; } > conftest.i && {
2317          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2318          test ! -s conftest.err
2319        }; then :
2320   ac_retval=0
2321 else
2322   $as_echo "$as_me: failed program was:" >&5
2323 sed 's/^/| /' conftest.$ac_ext >&5
2324 
2325     ac_retval=1
2326 fi
2327   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2328   as_fn_set_status $ac_retval
2329 
2330 } # ac_fn_cxx_try_cpp
2331 
2332 # ac_fn_objc_try_compile LINENO
2333 # -----------------------------
2334 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2335 ac_fn_objc_try_compile ()
2336 {
2337   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338   rm -f conftest.$ac_objext
2339   if { { ac_try="$ac_compile"
2340 case "(($ac_try" in
2341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2342   *) ac_try_echo=$ac_try;;
2343 esac
2344 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2345 $as_echo "$ac_try_echo"; } >&5
2346   (eval "$ac_compile") 2>conftest.err
2347   ac_status=$?
2348   if test -s conftest.err; then
2349     grep -v '^ *+' conftest.err >conftest.er1
2350     cat conftest.er1 >&5
2351     mv -f conftest.er1 conftest.err
2352   fi
2353   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2354   test $ac_status = 0; } && {
2355          test -z "$ac_objc_werror_flag" ||
2356          test ! -s conftest.err
2357        } && test -s conftest.$ac_objext; then :
2358   ac_retval=0
2359 else
2360   $as_echo "$as_me: failed program was:" >&5
2361 sed 's/^/| /' conftest.$ac_ext >&5
2362 
2363         ac_retval=1
2364 fi
2365   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2366   as_fn_set_status $ac_retval
2367 
2368 } # ac_fn_objc_try_compile
2369 
2370 # ac_fn_c_try_link LINENO
2371 # -----------------------
2372 # Try to link conftest.$ac_ext, and return whether this succeeded.
2373 ac_fn_c_try_link ()
2374 {
2375   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376   rm -f conftest.$ac_objext conftest$ac_exeext
2377   if { { ac_try="$ac_link"
2378 case "(($ac_try" in
2379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2380   *) ac_try_echo=$ac_try;;
2381 esac
2382 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2383 $as_echo "$ac_try_echo"; } >&5
2384   (eval "$ac_link") 2>conftest.err
2385   ac_status=$?
2386   if test -s conftest.err; then
2387     grep -v '^ *+' conftest.err >conftest.er1
2388     cat conftest.er1 >&5
2389     mv -f conftest.er1 conftest.err
2390   fi
2391   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2392   test $ac_status = 0; } && {
2393          test -z "$ac_c_werror_flag" ||
2394          test ! -s conftest.err
2395        } && test -s conftest$ac_exeext && {
2396          test "$cross_compiling" = yes ||
2397          test -x conftest$ac_exeext
2398        }; then :
2399   ac_retval=0
2400 else
2401   $as_echo "$as_me: failed program was:" >&5
2402 sed 's/^/| /' conftest.$ac_ext >&5
2403 
2404         ac_retval=1
2405 fi
2406   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2407   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2408   # interfere with the next link command; also delete a directory that is
2409   # left behind by Apple's compiler.  We do this before executing the actions.
2410   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2411   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412   as_fn_set_status $ac_retval
2413 
2414 } # ac_fn_c_try_link
2415 
2416 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2417 # ---------------------------------------------------------
2418 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2419 # the include files in INCLUDES and setting the cache variable VAR
2420 # accordingly.
2421 ac_fn_cxx_check_header_mongrel ()
2422 {
2423   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424   if eval \${$3+:} false; then :
2425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2426 $as_echo_n "checking for $2... " >&6; }
2427 if eval \${$3+:} false; then :
2428   $as_echo_n "(cached) " >&6
2429 fi
2430 eval ac_res=\$$3
2431                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2432 $as_echo "$ac_res" >&6; }
2433 else
2434   # Is the header compilable?
2435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2436 $as_echo_n "checking $2 usability... " >&6; }
2437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438 /* end confdefs.h.  */
2439 $4
2440 #include <$2>
2441 _ACEOF
2442 if ac_fn_cxx_try_compile "$LINENO"; then :
2443   ac_header_compiler=yes
2444 else
2445   ac_header_compiler=no
2446 fi
2447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2449 $as_echo "$ac_header_compiler" >&6; }
2450 
2451 # Is the header present?
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2453 $as_echo_n "checking $2 presence... " >&6; }
2454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2455 /* end confdefs.h.  */
2456 #include <$2>
2457 _ACEOF
2458 if ac_fn_cxx_try_cpp "$LINENO"; then :
2459   ac_header_preproc=yes
2460 else
2461   ac_header_preproc=no
2462 fi
2463 rm -f conftest.err conftest.i conftest.$ac_ext
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2465 $as_echo "$ac_header_preproc" >&6; }
2466 
2467 # So?  What about this header?
2468 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2469   yes:no: )
2470     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2471 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2472     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2473 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2474     ;;
2475   no:yes:* )
2476     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2477 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2478     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2479 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2480     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2481 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2482     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2483 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2484     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2485 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2486 ( $as_echo "## ----------------------------------------- ##
2487 ## Report this to build-dev@openjdk.java.net ##
2488 ## ----------------------------------------- ##"
2489      ) | sed "s/^/$as_me: WARNING:     /" >&2
2490     ;;
2491 esac
2492   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493 $as_echo_n "checking for $2... " >&6; }
2494 if eval \${$3+:} false; then :
2495   $as_echo_n "(cached) " >&6
2496 else
2497   eval "$3=\$ac_header_compiler"
2498 fi
2499 eval ac_res=\$$3
2500                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2501 $as_echo "$ac_res" >&6; }
2502 fi
2503   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2504 
2505 } # ac_fn_cxx_check_header_mongrel
2506 
2507 # ac_fn_cxx_try_run LINENO
2508 # ------------------------
2509 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2510 # that executables *can* be run.
2511 ac_fn_cxx_try_run ()
2512 {
2513   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514   if { { ac_try="$ac_link"
2515 case "(($ac_try" in
2516   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2517   *) ac_try_echo=$ac_try;;
2518 esac
2519 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2520 $as_echo "$ac_try_echo"; } >&5
2521   (eval "$ac_link") 2>&5
2522   ac_status=$?
2523   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2524   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2525   { { case "(($ac_try" in
2526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527   *) ac_try_echo=$ac_try;;
2528 esac
2529 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530 $as_echo "$ac_try_echo"; } >&5
2531   (eval "$ac_try") 2>&5
2532   ac_status=$?
2533   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2534   test $ac_status = 0; }; }; then :
2535   ac_retval=0
2536 else
2537   $as_echo "$as_me: program exited with status $ac_status" >&5
2538        $as_echo "$as_me: failed program was:" >&5
2539 sed 's/^/| /' conftest.$ac_ext >&5
2540 
2541        ac_retval=$ac_status
2542 fi
2543   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2544   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545   as_fn_set_status $ac_retval
2546 
2547 } # ac_fn_cxx_try_run
2548 
2549 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2550 # ---------------------------------------------------------
2551 # Tests whether HEADER exists and can be compiled using the include files in
2552 # INCLUDES, setting the cache variable VAR accordingly.
2553 ac_fn_cxx_check_header_compile ()
2554 {
2555   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2557 $as_echo_n "checking for $2... " >&6; }
2558 if eval \${$3+:} false; then :
2559   $as_echo_n "(cached) " >&6
2560 else
2561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562 /* end confdefs.h.  */
2563 $4
2564 #include <$2>
2565 _ACEOF
2566 if ac_fn_cxx_try_compile "$LINENO"; then :
2567   eval "$3=yes"
2568 else
2569   eval "$3=no"
2570 fi
2571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572 fi
2573 eval ac_res=\$$3
2574                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2575 $as_echo "$ac_res" >&6; }
2576   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577 
2578 } # ac_fn_cxx_check_header_compile
2579 
2580 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2581 # ----------------------------------------------
2582 # Tries to find the compile-time value of EXPR in a program that includes
2583 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2584 # computed
2585 ac_fn_cxx_compute_int ()
2586 {
2587   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588   if test "$cross_compiling" = yes; then
2589     # Depending upon the size, compute the lo and hi bounds.
2590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591 /* end confdefs.h.  */
2592 $4
2593 int
2594 main ()
2595 {
2596 static int test_array [1 - 2 * !(($2) >= 0)];
2597 test_array [0] = 0;
2598 return test_array [0];
2599 
2600   ;
2601   return 0;
2602 }
2603 _ACEOF
2604 if ac_fn_cxx_try_compile "$LINENO"; then :
2605   ac_lo=0 ac_mid=0
2606   while :; do
2607     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608 /* end confdefs.h.  */
2609 $4
2610 int
2611 main ()
2612 {
2613 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2614 test_array [0] = 0;
2615 return test_array [0];
2616 
2617   ;
2618   return 0;
2619 }
2620 _ACEOF
2621 if ac_fn_cxx_try_compile "$LINENO"; then :
2622   ac_hi=$ac_mid; break
2623 else
2624   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2625                         if test $ac_lo -le $ac_mid; then
2626                           ac_lo= ac_hi=
2627                           break
2628                         fi
2629                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2630 fi
2631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2632   done
2633 else
2634   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2635 /* end confdefs.h.  */
2636 $4
2637 int
2638 main ()
2639 {
2640 static int test_array [1 - 2 * !(($2) < 0)];
2641 test_array [0] = 0;
2642 return test_array [0];
2643 
2644   ;
2645   return 0;
2646 }
2647 _ACEOF
2648 if ac_fn_cxx_try_compile "$LINENO"; then :
2649   ac_hi=-1 ac_mid=-1
2650   while :; do
2651     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2652 /* end confdefs.h.  */
2653 $4
2654 int
2655 main ()
2656 {
2657 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2658 test_array [0] = 0;
2659 return test_array [0];
2660 
2661   ;
2662   return 0;
2663 }
2664 _ACEOF
2665 if ac_fn_cxx_try_compile "$LINENO"; then :
2666   ac_lo=$ac_mid; break
2667 else
2668   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2669                         if test $ac_mid -le $ac_hi; then
2670                           ac_lo= ac_hi=
2671                           break
2672                         fi
2673                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2674 fi
2675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2676   done
2677 else
2678   ac_lo= ac_hi=
2679 fi
2680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2681 fi
2682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683 # Binary search between lo and hi bounds.
2684 while test "x$ac_lo" != "x$ac_hi"; do
2685   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687 /* end confdefs.h.  */
2688 $4
2689 int
2690 main ()
2691 {
2692 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2693 test_array [0] = 0;
2694 return test_array [0];
2695 
2696   ;
2697   return 0;
2698 }
2699 _ACEOF
2700 if ac_fn_cxx_try_compile "$LINENO"; then :
2701   ac_hi=$ac_mid
2702 else
2703   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2704 fi
2705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706 done
2707 case $ac_lo in #((
2708 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2709 '') ac_retval=1 ;;
2710 esac
2711   else
2712     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2713 /* end confdefs.h.  */
2714 $4
2715 static long int longval () { return $2; }
2716 static unsigned long int ulongval () { return $2; }
2717 #include <stdio.h>
2718 #include <stdlib.h>
2719 int
2720 main ()
2721 {
2722 
2723   FILE *f = fopen ("conftest.val", "w");
2724   if (! f)
2725     return 1;
2726   if (($2) < 0)
2727     {
2728       long int i = longval ();
2729       if (i != ($2))
2730         return 1;
2731       fprintf (f, "%ld", i);
2732     }
2733   else
2734     {
2735       unsigned long int i = ulongval ();
2736       if (i != ($2))
2737         return 1;
2738       fprintf (f, "%lu", i);
2739     }
2740   /* Do not output a trailing newline, as this causes \r\n confusion
2741      on some platforms.  */
2742   return ferror (f) || fclose (f) != 0;
2743 
2744   ;
2745   return 0;
2746 }
2747 _ACEOF
2748 if ac_fn_cxx_try_run "$LINENO"; then :
2749   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2750 else
2751   ac_retval=1
2752 fi
2753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2754   conftest.$ac_objext conftest.beam conftest.$ac_ext
2755 rm -f conftest.val
2756 
2757   fi
2758   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2759   as_fn_set_status $ac_retval
2760 
2761 } # ac_fn_cxx_compute_int
2762 
2763 # ac_fn_cxx_try_link LINENO
2764 # -------------------------
2765 # Try to link conftest.$ac_ext, and return whether this succeeded.
2766 ac_fn_cxx_try_link ()
2767 {
2768   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2769   rm -f conftest.$ac_objext conftest$ac_exeext
2770   if { { ac_try="$ac_link"
2771 case "(($ac_try" in
2772   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2773   *) ac_try_echo=$ac_try;;
2774 esac
2775 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2776 $as_echo "$ac_try_echo"; } >&5
2777   (eval "$ac_link") 2>conftest.err
2778   ac_status=$?
2779   if test -s conftest.err; then
2780     grep -v '^ *+' conftest.err >conftest.er1
2781     cat conftest.er1 >&5
2782     mv -f conftest.er1 conftest.err
2783   fi
2784   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2785   test $ac_status = 0; } && {
2786          test -z "$ac_cxx_werror_flag" ||
2787          test ! -s conftest.err
2788        } && test -s conftest$ac_exeext && {
2789          test "$cross_compiling" = yes ||
2790          test -x conftest$ac_exeext
2791        }; then :
2792   ac_retval=0
2793 else
2794   $as_echo "$as_me: failed program was:" >&5
2795 sed 's/^/| /' conftest.$ac_ext >&5
2796 
2797         ac_retval=1
2798 fi
2799   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2800   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2801   # interfere with the next link command; also delete a directory that is
2802   # left behind by Apple's compiler.  We do this before executing the actions.
2803   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2804   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2805   as_fn_set_status $ac_retval
2806 
2807 } # ac_fn_cxx_try_link
2808 
2809 # ac_fn_cxx_check_func LINENO FUNC VAR
2810 # ------------------------------------
2811 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2812 ac_fn_cxx_check_func ()
2813 {
2814   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2815   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2816 $as_echo_n "checking for $2... " >&6; }
2817 if eval \${$3+:} false; then :
2818   $as_echo_n "(cached) " >&6
2819 else
2820   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2821 /* end confdefs.h.  */
2822 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2823    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2824 #define $2 innocuous_$2
2825 
2826 /* System header to define __stub macros and hopefully few prototypes,
2827     which can conflict with char $2 (); below.
2828     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2829     <limits.h> exists even on freestanding compilers.  */
2830 
2831 #ifdef __STDC__
2832 # include <limits.h>
2833 #else
2834 # include <assert.h>
2835 #endif
2836 
2837 #undef $2
2838 
2839 /* Override any GCC internal prototype to avoid an error.
2840    Use char because int might match the return type of a GCC
2841    builtin and then its argument prototype would still apply.  */
2842 #ifdef __cplusplus
2843 extern "C"
2844 #endif
2845 char $2 ();
2846 /* The GNU C library defines this for functions which it implements
2847     to always fail with ENOSYS.  Some functions are actually named
2848     something starting with __ and the normal name is an alias.  */
2849 #if defined __stub_$2 || defined __stub___$2
2850 choke me
2851 #endif
2852 
2853 int
2854 main ()
2855 {
2856 return $2 ();
2857   ;
2858   return 0;
2859 }
2860 _ACEOF
2861 if ac_fn_cxx_try_link "$LINENO"; then :
2862   eval "$3=yes"
2863 else
2864   eval "$3=no"
2865 fi
2866 rm -f core conftest.err conftest.$ac_objext \
2867     conftest$ac_exeext conftest.$ac_ext
2868 fi
2869 eval ac_res=\$$3
2870                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871 $as_echo "$ac_res" >&6; }
2872   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873 
2874 } # ac_fn_cxx_check_func
2875 
2876 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2877 # -------------------------------------------------------
2878 # Tests whether HEADER exists and can be compiled using the include files in
2879 # INCLUDES, setting the cache variable VAR accordingly.
2880 ac_fn_c_check_header_compile ()
2881 {
2882   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2884 $as_echo_n "checking for $2... " >&6; }
2885 if eval \${$3+:} false; then :
2886   $as_echo_n "(cached) " >&6
2887 else
2888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2889 /* end confdefs.h.  */
2890 $4
2891 #include <$2>
2892 _ACEOF
2893 if ac_fn_c_try_compile "$LINENO"; then :
2894   eval "$3=yes"
2895 else
2896   eval "$3=no"
2897 fi
2898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899 fi
2900 eval ac_res=\$$3
2901                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2902 $as_echo "$ac_res" >&6; }
2903   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2904 
2905 } # ac_fn_c_check_header_compile
2906 cat >config.log <<_ACEOF
2907 This file contains any messages produced by compilers while
2908 running configure, to aid debugging if configure makes a mistake.
2909 
2910 It was created by OpenJDK $as_me jdk9, which was
2911 generated by GNU Autoconf 2.69.  Invocation command line was
2912 
2913   $ $0 $@
2914 
2915 _ACEOF
2916 exec 5>>config.log
2917 {
2918 cat <<_ASUNAME
2919 ## --------- ##
2920 ## Platform. ##
2921 ## --------- ##
2922 
2923 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2924 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2925 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2926 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2927 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2928 
2929 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2930 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2931 
2932 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2933 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2934 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2935 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2936 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2937 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2938 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2939 
2940 _ASUNAME
2941 
2942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943 for as_dir in $PATH
2944 do
2945   IFS=$as_save_IFS
2946   test -z "$as_dir" && as_dir=.
2947     $as_echo "PATH: $as_dir"
2948   done
2949 IFS=$as_save_IFS
2950 
2951 } >&5
2952 
2953 cat >&5 <<_ACEOF
2954 
2955 
2956 ## ----------- ##
2957 ## Core tests. ##
2958 ## ----------- ##
2959 
2960 _ACEOF
2961 
2962 
2963 # Keep a trace of the command line.
2964 # Strip out --no-create and --no-recursion so they do not pile up.
2965 # Strip out --silent because we don't want to record it for future runs.
2966 # Also quote any args containing shell meta-characters.
2967 # Make two passes to allow for proper duplicate-argument suppression.
2968 ac_configure_args=
2969 ac_configure_args0=
2970 ac_configure_args1=
2971 ac_must_keep_next=false
2972 for ac_pass in 1 2
2973 do
2974   for ac_arg
2975   do
2976     case $ac_arg in
2977     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2978     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2979     | -silent | --silent | --silen | --sile | --sil)
2980       continue ;;
2981     *\'*)
2982       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2983     esac
2984     case $ac_pass in
2985     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2986     2)
2987       as_fn_append ac_configure_args1 " '$ac_arg'"
2988       if test $ac_must_keep_next = true; then
2989         ac_must_keep_next=false # Got value, back to normal.
2990       else
2991         case $ac_arg in
2992           *=* | --config-cache | -C | -disable-* | --disable-* \
2993           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2994           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2995           | -with-* | --with-* | -without-* | --without-* | --x)
2996             case "$ac_configure_args0 " in
2997               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2998             esac
2999             ;;
3000           -* ) ac_must_keep_next=true ;;
3001         esac
3002       fi
3003       as_fn_append ac_configure_args " '$ac_arg'"
3004       ;;
3005     esac
3006   done
3007 done
3008 { ac_configure_args0=; unset ac_configure_args0;}
3009 { ac_configure_args1=; unset ac_configure_args1;}
3010 
3011 # When interrupted or exit'd, cleanup temporary files, and complete
3012 # config.log.  We remove comments because anyway the quotes in there
3013 # would cause problems or look ugly.
3014 # WARNING: Use '\'' to represent an apostrophe within the trap.
3015 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3016 trap 'exit_status=$?
3017   # Save into config.log some information that might help in debugging.
3018   {
3019     echo
3020 
3021     $as_echo "## ---------------- ##
3022 ## Cache variables. ##
3023 ## ---------------- ##"
3024     echo
3025     # The following way of writing the cache mishandles newlines in values,
3026 (
3027   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3028     eval ac_val=\$$ac_var
3029     case $ac_val in #(
3030     *${as_nl}*)
3031       case $ac_var in #(
3032       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3033 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3034       esac
3035       case $ac_var in #(
3036       _ | IFS | as_nl) ;; #(
3037       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3038       *) { eval $ac_var=; unset $ac_var;} ;;
3039       esac ;;
3040     esac
3041   done
3042   (set) 2>&1 |
3043     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3044     *${as_nl}ac_space=\ *)
3045       sed -n \
3046         "s/'\''/'\''\\\\'\'''\''/g;
3047           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3048       ;; #(
3049     *)
3050       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3051       ;;
3052     esac |
3053     sort
3054 )
3055     echo
3056 
3057     $as_echo "## ----------------- ##
3058 ## Output variables. ##
3059 ## ----------------- ##"
3060     echo
3061     for ac_var in $ac_subst_vars
3062     do
3063       eval ac_val=\$$ac_var
3064       case $ac_val in
3065       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3066       esac
3067       $as_echo "$ac_var='\''$ac_val'\''"
3068     done | sort
3069     echo
3070 
3071     if test -n "$ac_subst_files"; then
3072       $as_echo "## ------------------- ##
3073 ## File substitutions. ##
3074 ## ------------------- ##"
3075       echo
3076       for ac_var in $ac_subst_files
3077       do
3078         eval ac_val=\$$ac_var
3079         case $ac_val in
3080         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3081         esac
3082         $as_echo "$ac_var='\''$ac_val'\''"
3083       done | sort
3084       echo
3085     fi
3086 
3087     if test -s confdefs.h; then
3088       $as_echo "## ----------- ##
3089 ## confdefs.h. ##
3090 ## ----------- ##"
3091       echo
3092       cat confdefs.h
3093       echo
3094     fi
3095     test "$ac_signal" != 0 &&
3096       $as_echo "$as_me: caught signal $ac_signal"
3097     $as_echo "$as_me: exit $exit_status"
3098   } >&5
3099   rm -f core *.core core.conftest.* &&
3100     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3101     exit $exit_status
3102 ' 0
3103 for ac_signal in 1 2 13 15; do
3104   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3105 done
3106 ac_signal=0
3107 
3108 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3109 rm -f -r conftest* confdefs.h
3110 
3111 $as_echo "/* confdefs.h */" > confdefs.h
3112 
3113 # Predefined preprocessor variables.
3114 
3115 cat >>confdefs.h <<_ACEOF
3116 #define PACKAGE_NAME "$PACKAGE_NAME"
3117 _ACEOF
3118 
3119 cat >>confdefs.h <<_ACEOF
3120 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3121 _ACEOF
3122 
3123 cat >>confdefs.h <<_ACEOF
3124 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3125 _ACEOF
3126 
3127 cat >>confdefs.h <<_ACEOF
3128 #define PACKAGE_STRING "$PACKAGE_STRING"
3129 _ACEOF
3130 
3131 cat >>confdefs.h <<_ACEOF
3132 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3133 _ACEOF
3134 
3135 cat >>confdefs.h <<_ACEOF
3136 #define PACKAGE_URL "$PACKAGE_URL"
3137 _ACEOF
3138 
3139 
3140 # Let the site file select an alternate cache file if it wants to.
3141 # Prefer an explicitly selected file to automatically selected ones.
3142 ac_site_file1=NONE
3143 ac_site_file2=NONE
3144 if test -n "$CONFIG_SITE"; then
3145   # We do not want a PATH search for config.site.
3146   case $CONFIG_SITE in #((
3147     -*)  ac_site_file1=./$CONFIG_SITE;;
3148     */*) ac_site_file1=$CONFIG_SITE;;
3149     *)   ac_site_file1=./$CONFIG_SITE;;
3150   esac
3151 elif test "x$prefix" != xNONE; then
3152   ac_site_file1=$prefix/share/config.site
3153   ac_site_file2=$prefix/etc/config.site
3154 else
3155   ac_site_file1=$ac_default_prefix/share/config.site
3156   ac_site_file2=$ac_default_prefix/etc/config.site
3157 fi
3158 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3159 do
3160   test "x$ac_site_file" = xNONE && continue
3161   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3162     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3163 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3164     sed 's/^/| /' "$ac_site_file" >&5
3165     . "$ac_site_file" \
3166       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3167 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3168 as_fn_error $? "failed to load site script $ac_site_file
3169 See \`config.log' for more details" "$LINENO" 5; }
3170   fi
3171 done
3172 
3173 if test -r "$cache_file"; then
3174   # Some versions of bash will fail to source /dev/null (special files
3175   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3176   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3177     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3178 $as_echo "$as_me: loading cache $cache_file" >&6;}
3179     case $cache_file in
3180       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3181       *)                      . "./$cache_file";;
3182     esac
3183   fi
3184 else
3185   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3186 $as_echo "$as_me: creating cache $cache_file" >&6;}
3187   >$cache_file
3188 fi
3189 
3190 # Check that the precious variables saved in the cache have kept the same
3191 # value.
3192 ac_cache_corrupted=false
3193 for ac_var in $ac_precious_vars; do
3194   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3195   eval ac_new_set=\$ac_env_${ac_var}_set
3196   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3197   eval ac_new_val=\$ac_env_${ac_var}_value
3198   case $ac_old_set,$ac_new_set in
3199     set,)
3200       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3201 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3202       ac_cache_corrupted=: ;;
3203     ,set)
3204       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3205 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3206       ac_cache_corrupted=: ;;
3207     ,);;
3208     *)
3209       if test "x$ac_old_val" != "x$ac_new_val"; then
3210         # differences in whitespace do not lead to failure.
3211         ac_old_val_w=`echo x $ac_old_val`
3212         ac_new_val_w=`echo x $ac_new_val`
3213         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3214           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3215 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3216           ac_cache_corrupted=:
3217         else
3218           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3219 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3220           eval $ac_var=\$ac_old_val
3221         fi
3222         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3223 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3224         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3225 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3226       fi;;
3227   esac
3228   # Pass precious variables to config.status.
3229   if test "$ac_new_set" = set; then
3230     case $ac_new_val in
3231     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3232     *) ac_arg=$ac_var=$ac_new_val ;;
3233     esac
3234     case " $ac_configure_args " in
3235       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3236       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3237     esac
3238   fi
3239 done
3240 if $ac_cache_corrupted; then
3241   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3242 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3243   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3244 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3245   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3246 fi
3247 ## -------------------- ##
3248 ## Main body of script. ##
3249 ## -------------------- ##
3250 
3251 ac_ext=c
3252 ac_cpp='$CPP $CPPFLAGS'
3253 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3254 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3255 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3256 
3257 
3258 
3259 ac_aux_dir=
3260 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3261   if test -f "$ac_dir/install-sh"; then
3262     ac_aux_dir=$ac_dir
3263     ac_install_sh="$ac_aux_dir/install-sh -c"
3264     break
3265   elif test -f "$ac_dir/install.sh"; then
3266     ac_aux_dir=$ac_dir
3267     ac_install_sh="$ac_aux_dir/install.sh -c"
3268     break
3269   elif test -f "$ac_dir/shtool"; then
3270     ac_aux_dir=$ac_dir
3271     ac_install_sh="$ac_aux_dir/shtool install -c"
3272     break
3273   fi
3274 done
3275 if test -z "$ac_aux_dir"; then
3276   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
3277 fi
3278 
3279 # These three variables are undocumented and unsupported,
3280 # and are intended to be withdrawn in a future Autoconf release.
3281 # They can cause serious problems if a builder's source tree is in a directory
3282 # whose full name contains unusual characters.
3283 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3284 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3285 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3286 
3287 
3288 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3289 
3290 #
3291 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3292 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3293 #
3294 # This code is free software; you can redistribute it and/or modify it
3295 # under the terms of the GNU General Public License version 2 only, as
3296 # published by the Free Software Foundation.  Oracle designates this
3297 # particular file as subject to the "Classpath" exception as provided
3298 # by Oracle in the LICENSE file that accompanied this code.
3299 #
3300 # This code is distributed in the hope that it will be useful, but WITHOUT
3301 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3302 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3303 # version 2 for more details (a copy is included in the LICENSE file that
3304 # accompanied this code).
3305 #
3306 # You should have received a copy of the GNU General Public License version
3307 # 2 along with this work; if not, write to the Free Software Foundation,
3308 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3309 #
3310 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3311 # or visit www.oracle.com if you need additional information or have any
3312 # questions.
3313 #
3314 
3315 #
3316 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3317 #
3318 # This program is free software; you can redistribute it and/or modify
3319 # it under the terms of the GNU General Public License as published by
3320 # the Free Software Foundation; either version 2 of the License, or
3321 # (at your option) any later version.
3322 #
3323 # This program is distributed in the hope that it will be useful, but
3324 # WITHOUT ANY WARRANTY; without even the implied warranty of
3325 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3326 # General Public License for more details.
3327 #
3328 # You should have received a copy of the GNU General Public License
3329 # along with this program; if not, write to the Free Software
3330 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3331 #
3332 # As a special exception to the GNU General Public License, if you
3333 # distribute this file as part of a program that contains a
3334 # configuration script generated by Autoconf, you may include it under
3335 # the same distribution terms that you use for the rest of that program.
3336 
3337 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3338 # ----------------------------------
3339 # PKG_PROG_PKG_CONFIG
3340 
3341 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3342 #
3343 # Check to see whether a particular set of modules exists.  Similar
3344 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3345 #
3346 #
3347 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3348 # this or PKG_CHECK_MODULES is called, or make sure to call
3349 # PKG_CHECK_EXISTS manually
3350 # --------------------------------------------------------------
3351 
3352 
3353 
3354 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3355 # ---------------------------------------------
3356 # _PKG_CONFIG
3357 
3358 # _PKG_SHORT_ERRORS_SUPPORTED
3359 # -----------------------------
3360 # _PKG_SHORT_ERRORS_SUPPORTED
3361 
3362 
3363 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3364 # [ACTION-IF-NOT-FOUND])
3365 #
3366 #
3367 # Note that if there is a possibility the first call to
3368 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3369 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3370 #
3371 #
3372 # --------------------------------------------------------------
3373 # PKG_CHECK_MODULES
3374 
3375 
3376 # Include these first...
3377 #
3378 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3379 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3380 #
3381 # This code is free software; you can redistribute it and/or modify it
3382 # under the terms of the GNU General Public License version 2 only, as
3383 # published by the Free Software Foundation.  Oracle designates this
3384 # particular file as subject to the "Classpath" exception as provided
3385 # by Oracle in the LICENSE file that accompanied this code.
3386 #
3387 # This code is distributed in the hope that it will be useful, but WITHOUT
3388 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3389 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3390 # version 2 for more details (a copy is included in the LICENSE file that
3391 # accompanied this code).
3392 #
3393 # You should have received a copy of the GNU General Public License version
3394 # 2 along with this work; if not, write to the Free Software Foundation,
3395 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3396 #
3397 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3398 # or visit www.oracle.com if you need additional information or have any
3399 # questions.
3400 #
3401 
3402 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3403 # If so, then append $1 to $2 \
3404 # Also set JVM_ARG_OK to true/false depending on outcome.
3405 
3406 
3407 # Appends a string to a path variable, only adding the : when needed.
3408 
3409 
3410 # Prepends a string to a path variable, only adding the : when needed.
3411 
3412 
3413 # This will make sure the given variable points to a full and proper
3414 # path. This means:
3415 # 1) There will be no spaces in the path. On unix platforms,
3416 #    spaces in the path will result in an error. On Windows,
3417 #    the path will be rewritten using short-style to be space-free.
3418 # 2) The path will be absolute, and it will be in unix-style (on
3419 #     cygwin).
3420 # $1: The name of the variable to fix
3421 
3422 
3423 # This will make sure the given variable points to a executable
3424 # with a full and proper path. This means:
3425 # 1) There will be no spaces in the path. On unix platforms,
3426 #    spaces in the path will result in an error. On Windows,
3427 #    the path will be rewritten using short-style to be space-free.
3428 # 2) The path will be absolute, and it will be in unix-style (on
3429 #     cygwin).
3430 # Any arguments given to the executable is preserved.
3431 # If the input variable does not have a directory specification, then
3432 # it need to be in the PATH.
3433 # $1: The name of the variable to fix
3434 
3435 
3436 
3437 
3438 # Register a --with argument but mark it as deprecated
3439 # $1: The name of the with argument to deprecate, not including --with-
3440 
3441 
3442 # Register a --enable argument but mark it as deprecated
3443 # $1: The name of the with argument to deprecate, not including --enable-
3444 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3445 
3446 
3447 
3448 
3449 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3450 # $1: variable to check
3451 
3452 
3453 # Check that there are no unprocessed overridden variables left.
3454 # If so, they are an incorrect argument and we will exit with an error.
3455 
3456 
3457 # Setup a tool for the given variable. If correctly specified by the user,
3458 # use that value, otherwise search for the tool using the supplied code snippet.
3459 # $1: variable to set
3460 # $2: code snippet to call to look for the tool
3461 
3462 
3463 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3464 # $1: variable to set
3465 # $2: executable name (or list of names) to look for
3466 
3467 
3468 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3469 # $1: variable to set
3470 # $2: executable name (or list of names) to look for
3471 
3472 
3473 # Like BASIC_PATH_PROGS but fails if no tool was found.
3474 # $1: variable to set
3475 # $2: executable name (or list of names) to look for
3476 
3477 
3478 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3479 # $1: variable to set
3480 # $2: autoconf macro to call to look for the special tool
3481 
3482 
3483 # Setup the most fundamental tools that relies on not much else to set up,
3484 # but is used by much of the early bootstrap code.
3485 
3486 
3487 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3488 
3489 
3490 
3491 
3492 
3493 
3494 
3495 
3496 
3497 #%%% Simple tools %%%
3498 
3499 # Check if we have found a usable version of make
3500 # $1: the path to a potential make binary (or empty)
3501 # $2: the description on how we found this
3502 
3503 
3504 
3505 
3506 # Goes looking for a usable version of GNU make.
3507 
3508 
3509 
3510 
3511 
3512 
3513 # Check if build directory is on local disk. If not possible to determine,
3514 # we prefer to claim it's local.
3515 # Argument 1: directory to test
3516 # Argument 2: what to do if it is on local disk
3517 # Argument 3: what to do otherwise (remote disk or failure)
3518 
3519 
3520 # Check that source files have basic read permissions set. This might
3521 # not be the case in cygwin in certain conditions.
3522 
3523 
3524 
3525 
3526 #
3527 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3528 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3529 #
3530 # This code is free software; you can redistribute it and/or modify it
3531 # under the terms of the GNU General Public License version 2 only, as
3532 # published by the Free Software Foundation.  Oracle designates this
3533 # particular file as subject to the "Classpath" exception as provided
3534 # by Oracle in the LICENSE file that accompanied this code.
3535 #
3536 # This code is distributed in the hope that it will be useful, but WITHOUT
3537 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3538 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3539 # version 2 for more details (a copy is included in the LICENSE file that
3540 # accompanied this code).
3541 #
3542 # You should have received a copy of the GNU General Public License version
3543 # 2 along with this work; if not, write to the Free Software Foundation,
3544 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3545 #
3546 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3547 # or visit www.oracle.com if you need additional information or have any
3548 # questions.
3549 #
3550 
3551 
3552 
3553 
3554 
3555 # Helper function which possibly converts a path using DOS-style short mode.
3556 # If so, the updated path is stored in $new_path.
3557 # $1: The path to check
3558 
3559 
3560 # Helper function which possibly converts a path using DOS-style short mode.
3561 # If so, the updated path is stored in $new_path.
3562 # $1: The path to check
3563 
3564 
3565 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3566 # and could probably be heavily simplified. However, all changes in this
3567 # area tend to need lot of testing in different scenarios, and in lack of
3568 # proper unit testing, cleaning this up has not been deemed worth the effort
3569 # at the moment.
3570 
3571 
3572 
3573 
3574 
3575 
3576 
3577 
3578 
3579 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3580 
3581 
3582 
3583 
3584 #
3585 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3586 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3587 #
3588 # This code is free software; you can redistribute it and/or modify it
3589 # under the terms of the GNU General Public License version 2 only, as
3590 # published by the Free Software Foundation.  Oracle designates this
3591 # particular file as subject to the "Classpath" exception as provided
3592 # by Oracle in the LICENSE file that accompanied this code.
3593 #
3594 # This code is distributed in the hope that it will be useful, but WITHOUT
3595 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3596 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3597 # version 2 for more details (a copy is included in the LICENSE file that
3598 # accompanied this code).
3599 #
3600 # You should have received a copy of the GNU General Public License version
3601 # 2 along with this work; if not, write to the Free Software Foundation,
3602 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3603 #
3604 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3605 # or visit www.oracle.com if you need additional information or have any
3606 # questions.
3607 #
3608 
3609 
3610 
3611 
3612 
3613 
3614 
3615 
3616 
3617 
3618 
3619 # ... then the rest
3620 #
3621 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3622 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3623 #
3624 # This code is free software; you can redistribute it and/or modify it
3625 # under the terms of the GNU General Public License version 2 only, as
3626 # published by the Free Software Foundation.  Oracle designates this
3627 # particular file as subject to the "Classpath" exception as provided
3628 # by Oracle in the LICENSE file that accompanied this code.
3629 #
3630 # This code is distributed in the hope that it will be useful, but WITHOUT
3631 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3632 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3633 # version 2 for more details (a copy is included in the LICENSE file that
3634 # accompanied this code).
3635 #
3636 # You should have received a copy of the GNU General Public License version
3637 # 2 along with this work; if not, write to the Free Software Foundation,
3638 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3639 #
3640 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3641 # or visit www.oracle.com if you need additional information or have any
3642 # questions.
3643 #
3644 
3645 ########################################################################
3646 # This file handles detection of the Boot JDK. The Boot JDK detection
3647 # process has been developed as a response to solve a complex real-world
3648 # problem. Initially, it was simple, but it has grown as platform after
3649 # platform, idiosyncracy after idiosyncracy has been supported.
3650 #
3651 # The basic idea is this:
3652 # 1) You need an acceptable *) JDK to use as a Boot JDK
3653 # 2) There are several ways to locate a JDK, that are mostly platform
3654 #    dependent **)
3655 # 3) You can have multiple JDKs installed
3656 # 4) If possible, configure should try to dig out an acceptable JDK
3657 #    automatically, without having to resort to command-line options
3658 #
3659 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3660 #     javac) and not a JRE, etc.
3661 #
3662 # **) On Windows we typically use a well-known path.
3663 #     On MacOSX we typically use the tool java_home.
3664 #     On Linux we typically find javac in the $PATH, and then follow a
3665 #     chain of symlinks that often ends up in a real JDK.
3666 #
3667 # This leads to the code where we check in different ways to locate a
3668 # JDK, and if one is found, check if it is acceptable. If not, we print
3669 # our reasons for rejecting it (useful when debugging non-working
3670 # configure situations) and continue checking the next one.
3671 ########################################################################
3672 
3673 # Execute the check given as argument, and verify the result
3674 # If the Boot JDK was previously found, do nothing
3675 # $1 A command line (typically autoconf macro) to execute
3676 
3677 
3678 # Test: Is bootjdk explicitely set by command line arguments?
3679 
3680 
3681 # Test: Is bootjdk available from builddeps?
3682 
3683 
3684 # Test: Is $JAVA_HOME set?
3685 
3686 
3687 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3688 
3689 
3690 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3691 # $1: Argument to the java_home binary (optional)
3692 
3693 
3694 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3695 
3696 
3697 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3698 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3699 # $1 = Path to directory containing jdk installations.
3700 # $2 = String to append to the found JDK directory to get the proper JDK home
3701 
3702 
3703 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3704 # environmental variable as base for where to look.
3705 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3706 
3707 
3708 # Test: Is there a JDK installed in default, well-known locations?
3709 
3710 
3711 # Check that a command-line tool in the Boot JDK is correct
3712 # $1 = name of variable to assign
3713 # $2 = name of binary
3714 
3715 
3716 ###############################################################################
3717 #
3718 # We need a Boot JDK to bootstrap the build.
3719 #
3720 
3721 
3722 
3723 
3724 
3725 #
3726 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3727 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3728 #
3729 # This code is free software; you can redistribute it and/or modify it
3730 # under the terms of the GNU General Public License version 2 only, as
3731 # published by the Free Software Foundation.  Oracle designates this
3732 # particular file as subject to the "Classpath" exception as provided
3733 # by Oracle in the LICENSE file that accompanied this code.
3734 #
3735 # This code is distributed in the hope that it will be useful, but WITHOUT
3736 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3737 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3738 # version 2 for more details (a copy is included in the LICENSE file that
3739 # accompanied this code).
3740 #
3741 # You should have received a copy of the GNU General Public License version
3742 # 2 along with this work; if not, write to the Free Software Foundation,
3743 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3744 #
3745 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3746 # or visit www.oracle.com if you need additional information or have any
3747 # questions.
3748 #
3749 
3750 
3751 
3752 
3753 
3754 
3755 
3756 
3757 
3758 
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 
3767 
3768 
3769 #
3770 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3771 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3772 #
3773 # This code is free software; you can redistribute it and/or modify it
3774 # under the terms of the GNU General Public License version 2 only, as
3775 # published by the Free Software Foundation.  Oracle designates this
3776 # particular file as subject to the "Classpath" exception as provided
3777 # by Oracle in the LICENSE file that accompanied this code.
3778 #
3779 # This code is distributed in the hope that it will be useful, but WITHOUT
3780 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3781 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3782 # version 2 for more details (a copy is included in the LICENSE file that
3783 # accompanied this code).
3784 #
3785 # You should have received a copy of the GNU General Public License version
3786 # 2 along with this work; if not, write to the Free Software Foundation,
3787 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3788 #
3789 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3790 # or visit www.oracle.com if you need additional information or have any
3791 # questions.
3792 #
3793 
3794 
3795 
3796 
3797 
3798 # Documentation on common flags used for solstudio in HIGHEST.
3799 #
3800 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3801 #          done with care, there are some assumptions below that need to
3802 #          be understood about the use of pointers, and IEEE behavior.
3803 #
3804 # -fns: Use non-standard floating point mode (not IEEE 754)
3805 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3806 # -fsingle: Use single precision floating point with 'float'
3807 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
3808 #   (Source with excessing pointer casting and data access with mixed
3809 #    pointer types are not recommended)
3810 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3811 #   (If you expect perfect errno behavior, do not use this)
3812 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3813 # -xrestrict: Pointer parameters to functions do not overlap
3814 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3815 #    If you pass in multiple pointers to the same data, do not use this)
3816 # -xlibmil: Inline some library routines
3817 #   (If you expect perfect errno behavior, do not use this)
3818 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3819 #   (If you expect perfect errno behavior, do not use this)
3820 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3821 
3822     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3823     # Bug?
3824     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3825     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3826     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3827     #fi
3828 
3829 
3830 
3831 
3832 
3833 # FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3834 #                                   [RUN-IF-FALSE])
3835 # ------------------------------------------------------------
3836 # Check that the c and c++ compilers support an argument
3837 
3838 
3839 # FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3840 #                                    [RUN-IF-FALSE])
3841 # ------------------------------------------------------------
3842 # Check that the linker support an argument
3843 
3844 
3845 
3846 
3847 #
3848 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3849 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3850 #
3851 # This code is free software; you can redistribute it and/or modify it
3852 # under the terms of the GNU General Public License version 2 only, as
3853 # published by the Free Software Foundation.  Oracle designates this
3854 # particular file as subject to the "Classpath" exception as provided
3855 # by Oracle in the LICENSE file that accompanied this code.
3856 #
3857 # This code is distributed in the hope that it will be useful, but WITHOUT
3858 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3859 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3860 # version 2 for more details (a copy is included in the LICENSE file that
3861 # accompanied this code).
3862 #
3863 # You should have received a copy of the GNU General Public License version
3864 # 2 along with this work; if not, write to the Free Software Foundation,
3865 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3866 #
3867 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3868 # or visit www.oracle.com if you need additional information or have any
3869 # questions.
3870 #
3871 
3872 
3873 
3874 
3875 
3876 cygwin_help() {
3877   case $1 in
3878     unzip)
3879       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3880       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3881       ;;
3882     zip)
3883       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3884       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3885       ;;
3886     make)
3887       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3888       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3889       ;;
3890     freetype)
3891       HELP_MSG="
3892 The freetype library can now be build during the configure process.
3893 Download the freetype sources and unpack them into an arbitrary directory:
3894 
3895 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3896 tar -xzf freetype-2.5.3.tar.gz
3897 
3898 Then run configure with '--with-freetype-src=<freetype_src>'. This will
3899 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3900 builds or into '<freetype_src>/lib32' for 32-bit builds.
3901 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3902 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3903       ;;
3904   esac
3905 }
3906 
3907 msys_help() {
3908   PKGHANDLER_COMMAND=""
3909 }
3910 
3911 apt_help() {
3912   case $1 in
3913     devkit)
3914       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3915     openjdk)
3916       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3917     alsa)
3918       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3919     cups)
3920       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3921     freetype)
3922       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3923     pulse)
3924       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3925     x11)
3926       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3927     ccache)
3928       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3929   esac
3930 }
3931 
3932 yum_help() {
3933   case $1 in
3934     devkit)
3935       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3936     openjdk)
3937       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3938     alsa)
3939       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3940     cups)
3941       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3942     freetype)
3943       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3944     pulse)
3945       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3946     x11)
3947       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3948     ccache)
3949       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3950   esac
3951 }
3952 
3953 port_help() {
3954   PKGHANDLER_COMMAND=""
3955 }
3956 
3957 pkgutil_help() {
3958   PKGHANDLER_COMMAND=""
3959 }
3960 
3961 pkgadd_help() {
3962   PKGHANDLER_COMMAND=""
3963 }
3964 
3965 # This function will check if we're called from the "configure" wrapper while
3966 # printing --help. If so, we will print out additional information that can
3967 # only be extracted within the autoconf script, and then exit. This must be
3968 # called at the very beginning in configure.ac.
3969 
3970 
3971 
3972 
3973 
3974 
3975 #
3976 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3977 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3978 #
3979 # This code is free software; you can redistribute it and/or modify it
3980 # under the terms of the GNU General Public License version 2 only, as
3981 # published by the Free Software Foundation.  Oracle designates this
3982 # particular file as subject to the "Classpath" exception as provided
3983 # by Oracle in the LICENSE file that accompanied this code.
3984 #
3985 # This code is distributed in the hope that it will be useful, but WITHOUT
3986 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3987 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3988 # version 2 for more details (a copy is included in the LICENSE file that
3989 # accompanied this code).
3990 #
3991 # You should have received a copy of the GNU General Public License version
3992 # 2 along with this work; if not, write to the Free Software Foundation,
3993 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3994 #
3995 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3996 # or visit www.oracle.com if you need additional information or have any
3997 # questions.
3998 #
3999 
4000 
4001 
4002 
4003 
4004 
4005 
4006 
4007 
4008 
4009 ###############################################################################
4010 #
4011 # Should we build only OpenJDK even if closed sources are present?
4012 #
4013 
4014 
4015 
4016 
4017 ###############################################################################
4018 #
4019 # Setup version numbers
4020 #
4021 
4022 
4023 
4024 
4025 
4026 
4027 #
4028 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4029 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4030 #
4031 # This code is free software; you can redistribute it and/or modify it
4032 # under the terms of the GNU General Public License version 2 only, as
4033 # published by the Free Software Foundation.  Oracle designates this
4034 # particular file as subject to the "Classpath" exception as provided
4035 # by Oracle in the LICENSE file that accompanied this code.
4036 #
4037 # This code is distributed in the hope that it will be useful, but WITHOUT
4038 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4039 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4040 # version 2 for more details (a copy is included in the LICENSE file that
4041 # accompanied this code).
4042 #
4043 # You should have received a copy of the GNU General Public License version
4044 # 2 along with this work; if not, write to the Free Software Foundation,
4045 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4046 #
4047 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4048 # or visit www.oracle.com if you need additional information or have any
4049 # questions.
4050 #
4051 
4052 
4053 
4054 
4055 
4056 
4057 
4058 
4059 
4060 
4061 
4062 
4063 
4064 
4065 
4066 
4067 
4068 
4069 
4070 
4071 
4072 #
4073 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4074 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4075 #
4076 # This code is free software; you can redistribute it and/or modify it
4077 # under the terms of the GNU General Public License version 2 only, as
4078 # published by the Free Software Foundation.  Oracle designates this
4079 # particular file as subject to the "Classpath" exception as provided
4080 # by Oracle in the LICENSE file that accompanied this code.
4081 #
4082 # This code is distributed in the hope that it will be useful, but WITHOUT
4083 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4084 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4085 # version 2 for more details (a copy is included in the LICENSE file that
4086 # accompanied this code).
4087 #
4088 # You should have received a copy of the GNU General Public License version
4089 # 2 along with this work; if not, write to the Free Software Foundation,
4090 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4091 #
4092 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4093 # or visit www.oracle.com if you need additional information or have any
4094 # questions.
4095 #
4096 
4097 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4098 # Converts autoconf style CPU name to OpenJDK style, into
4099 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4100 
4101 
4102 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4103 # Converts autoconf style OS name to OpenJDK style, into
4104 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4105 
4106 
4107 # Expects $host_os $host_cpu $build_os and $build_cpu
4108 # and $with_target_bits to have been setup!
4109 #
4110 # Translate the standard triplet(quadruplet) definition
4111 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4112 # OPENJDK_BUILD_OS, etc.
4113 
4114 
4115 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4116 # accordingly. Must be done after setting up build and target system, but before
4117 # doing anything else with these values.
4118 
4119 
4120 # Setup the legacy variables, for controlling the old makefiles.
4121 #
4122 
4123 
4124 
4125 
4126 #%%% Build and target systems %%%
4127 
4128 
4129 
4130 
4131 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4132 # Add -mX to various FLAGS variables.
4133 
4134 
4135 
4136 
4137 
4138 
4139 #
4140 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4141 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4142 #
4143 # This code is free software; you can redistribute it and/or modify it
4144 # under the terms of the GNU General Public License version 2 only, as
4145 # published by the Free Software Foundation.  Oracle designates this
4146 # particular file as subject to the "Classpath" exception as provided
4147 # by Oracle in the LICENSE file that accompanied this code.
4148 #
4149 # This code is distributed in the hope that it will be useful, but WITHOUT
4150 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4151 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4152 # version 2 for more details (a copy is included in the LICENSE file that
4153 # accompanied this code).
4154 #
4155 # You should have received a copy of the GNU General Public License version
4156 # 2 along with this work; if not, write to the Free Software Foundation,
4157 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4158 #
4159 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4160 # or visit www.oracle.com if you need additional information or have any
4161 # questions.
4162 #
4163 
4164 
4165 
4166 
4167 
4168 
4169 
4170 
4171 #
4172 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4173 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4174 #
4175 # This code is free software; you can redistribute it and/or modify it
4176 # under the terms of the GNU General Public License version 2 only, as
4177 # published by the Free Software Foundation.  Oracle designates this
4178 # particular file as subject to the "Classpath" exception as provided
4179 # by Oracle in the LICENSE file that accompanied this code.
4180 #
4181 # This code is distributed in the hope that it will be useful, but WITHOUT
4182 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4183 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4184 # version 2 for more details (a copy is included in the LICENSE file that
4185 # accompanied this code).
4186 #
4187 # You should have received a copy of the GNU General Public License version
4188 # 2 along with this work; if not, write to the Free Software Foundation,
4189 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4190 #
4191 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4192 # or visit www.oracle.com if you need additional information or have any
4193 # questions.
4194 #
4195 
4196 ########################################################################
4197 # This file is responsible for detecting, verifying and setting up the
4198 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4199 # proper paths to the binaries, but it will not setup any flags.
4200 #
4201 # The binaries used is determined by the toolchain type, which is the family of
4202 # compilers and related tools that are used.
4203 ########################################################################
4204 
4205 
4206 # All valid toolchains, regardless of platform (used by help.m4)
4207 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4208 
4209 # These toolchains are valid on different platforms
4210 VALID_TOOLCHAINS_linux="gcc clang"
4211 VALID_TOOLCHAINS_solaris="solstudio"
4212 VALID_TOOLCHAINS_macosx="gcc clang"
4213 VALID_TOOLCHAINS_aix="xlc"
4214 VALID_TOOLCHAINS_windows="microsoft"
4215 
4216 # Toolchain descriptions
4217 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4218 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4219 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4220 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4221 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4222 
4223 # Setup a number of variables describing how native output files are
4224 # named on this platform/toolchain.
4225 
4226 
4227 # Determine which toolchain type to use, and make sure it is valid for this
4228 # platform. Setup various information about the selected toolchain.
4229 
4230 
4231 # Before we start detecting the toolchain executables, we might need some
4232 # special setup, e.g. additional paths etc.
4233 
4234 
4235 # Restore path, etc
4236 
4237 
4238 # Check if a compiler is of the toolchain type we expect, and save the version
4239 # information from it. If the compiler does not match the expected type,
4240 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4241 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4242 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4243 #
4244 # $1 = compiler to test (CC or CXX)
4245 # $2 = human readable name of compiler (C or C++)
4246 
4247 
4248 # Try to locate the given C or C++ compiler in the path, or otherwise.
4249 #
4250 # $1 = compiler to test (CC or CXX)
4251 # $2 = human readable name of compiler (C or C++)
4252 # $3 = list of compiler names to search for
4253 
4254 
4255 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4256 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4257 # archiver (AR). Verify that the compilers are correct according to the
4258 # toolchain type.
4259 
4260 
4261 # Setup additional tools that is considered a part of the toolchain, but not the
4262 # core part. Many of these are highly platform-specific and do not exist,
4263 # and/or are not needed on all platforms.
4264 
4265 
4266 # Setup the build tools (i.e, the compiler and linker used to build programs
4267 # that should be run on the build platform, not the target platform, as a build
4268 # helper). Since the non-cross-compile case uses the normal, target compilers
4269 # for this, we can only do this after these have been setup.
4270 
4271 
4272 # Setup legacy variables that are still needed as alternative ways to refer to
4273 # parts of the toolchain.
4274 
4275 
4276 # Do some additional checks on the detected tools.
4277 
4278 
4279 # Setup the JTReg Regression Test Harness.
4280 
4281 
4282 #
4283 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4284 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4285 #
4286 # This code is free software; you can redistribute it and/or modify it
4287 # under the terms of the GNU General Public License version 2 only, as
4288 # published by the Free Software Foundation.  Oracle designates this
4289 # particular file as subject to the "Classpath" exception as provided
4290 # by Oracle in the LICENSE file that accompanied this code.
4291 #
4292 # This code is distributed in the hope that it will be useful, but WITHOUT
4293 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4294 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4295 # version 2 for more details (a copy is included in the LICENSE file that
4296 # accompanied this code).
4297 #
4298 # You should have received a copy of the GNU General Public License version
4299 # 2 along with this work; if not, write to the Free Software Foundation,
4300 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4301 #
4302 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4303 # or visit www.oracle.com if you need additional information or have any
4304 # questions.
4305 #
4306 
4307 
4308 
4309 
4310 
4311 
4312 
4313 # Check if the VS env variables were setup prior to running configure.
4314 # If not, then find vcvarsall.bat and run it automatically, and integrate
4315 # the set env variables into the spec file.
4316 
4317 
4318 
4319 
4320 
4321 
4322 
4323 
4324 
4325 
4326 
4327 # This line needs to be here, verbatim, after all includes and the dummy hook
4328 # definitions. It is replaced with custom functionality when building
4329 # custom sources.
4330 #CUSTOM_AUTOCONF_INCLUDE
4331 
4332 # Do not change or remove the following line, it is needed for consistency checks:
4333 DATE_WHEN_GENERATED=1423146375
4334 
4335 ###############################################################################
4336 #
4337 # Initialization / Boot-strapping
4338 #
4339 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4340 # thus it jumps back and forth, each time gaining something needed later on.
4341 #
4342 ###############################################################################
4343 
4344 # If we are requested to print additional help, do that and then exit.
4345 # This must be the very first call.
4346 
4347   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4348     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4349     $PRINTF "Which are valid to use depends on the build platform.\n"
4350     for toolchain in $VALID_TOOLCHAINS_all; do
4351       # Use indirect variable referencing
4352       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4353       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4354       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4355     done
4356 
4357     # And now exit directly
4358     exit 0
4359   fi
4360 
4361 
4362 # Basic initialization that must happen first of all in the normal process.
4363 
4364   # Save the original command line. This is passed to us by the wrapper configure script.
4365 
4366   DATE_WHEN_CONFIGURED=`LANG=C date`
4367 
4368   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4369 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4370   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4371 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4372 
4373 
4374   # Start with tools that do not need have cross compilation support
4375   # and can be expected to be found in the default PATH. These tools are
4376   # used by configure. Nor are these tools expected to be found in the
4377   # devkit from the builddeps server either, since they are
4378   # needed to download the devkit.
4379 
4380   # First are all the simple required tools.
4381 
4382 
4383 
4384   # Publish this variable in the help.
4385 
4386 
4387   if test "x$BASENAME" = x; then
4388     # The variable is not set by user, try to locate tool using the code snippet
4389     for ac_prog in basename
4390 do
4391   # Extract the first word of "$ac_prog", so it can be a program name with args.
4392 set dummy $ac_prog; ac_word=$2
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4394 $as_echo_n "checking for $ac_word... " >&6; }
4395 if ${ac_cv_path_BASENAME+:} false; then :
4396   $as_echo_n "(cached) " >&6
4397 else
4398   case $BASENAME in
4399   [\\/]* | ?:[\\/]*)
4400   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4401   ;;
4402   *)
4403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4404 for as_dir in $PATH
4405 do
4406   IFS=$as_save_IFS
4407   test -z "$as_dir" && as_dir=.
4408     for ac_exec_ext in '' $ac_executable_extensions; do
4409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4410     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4412     break 2
4413   fi
4414 done
4415   done
4416 IFS=$as_save_IFS
4417 
4418   ;;
4419 esac
4420 fi
4421 BASENAME=$ac_cv_path_BASENAME
4422 if test -n "$BASENAME"; then
4423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4424 $as_echo "$BASENAME" >&6; }
4425 else
4426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4427 $as_echo "no" >&6; }
4428 fi
4429 
4430 
4431   test -n "$BASENAME" && break
4432 done
4433 
4434   else
4435     # The variable is set, but is it from the command line or the environment?
4436 
4437     # Try to remove the string !BASENAME! from our list.
4438     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4439     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4440       # If it failed, the variable was not from the command line. Ignore it,
4441       # but warn the user (except for BASH, which is always set by the calling BASH).
4442       if test "xBASENAME" != xBASH; then
4443         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4444 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4445       fi
4446       # Try to locate tool using the code snippet
4447       for ac_prog in basename
4448 do
4449   # Extract the first word of "$ac_prog", so it can be a program name with args.
4450 set dummy $ac_prog; ac_word=$2
4451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4452 $as_echo_n "checking for $ac_word... " >&6; }
4453 if ${ac_cv_path_BASENAME+:} false; then :
4454   $as_echo_n "(cached) " >&6
4455 else
4456   case $BASENAME in
4457   [\\/]* | ?:[\\/]*)
4458   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4459   ;;
4460   *)
4461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4462 for as_dir in $PATH
4463 do
4464   IFS=$as_save_IFS
4465   test -z "$as_dir" && as_dir=.
4466     for ac_exec_ext in '' $ac_executable_extensions; do
4467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4468     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4470     break 2
4471   fi
4472 done
4473   done
4474 IFS=$as_save_IFS
4475 
4476   ;;
4477 esac
4478 fi
4479 BASENAME=$ac_cv_path_BASENAME
4480 if test -n "$BASENAME"; then
4481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4482 $as_echo "$BASENAME" >&6; }
4483 else
4484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4485 $as_echo "no" >&6; }
4486 fi
4487 
4488 
4489   test -n "$BASENAME" && break
4490 done
4491 
4492     else
4493       # If it succeeded, then it was overridden by the user. We will use it
4494       # for the tool.
4495 
4496       # First remove it from the list of overridden variables, so we can test
4497       # for unknown variables in the end.
4498       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4499 
4500       # Check if the provided tool contains a complete path.
4501       tool_specified="$BASENAME"
4502       tool_basename="${tool_specified##*/}"
4503       if test "x$tool_basename" = "x$tool_specified"; then
4504         # A command without a complete path is provided, search $PATH.
4505         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4506 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4507         # Extract the first word of "$tool_basename", so it can be a program name with args.
4508 set dummy $tool_basename; ac_word=$2
4509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4510 $as_echo_n "checking for $ac_word... " >&6; }
4511 if ${ac_cv_path_BASENAME+:} false; then :
4512   $as_echo_n "(cached) " >&6
4513 else
4514   case $BASENAME in
4515   [\\/]* | ?:[\\/]*)
4516   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4517   ;;
4518   *)
4519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520 for as_dir in $PATH
4521 do
4522   IFS=$as_save_IFS
4523   test -z "$as_dir" && as_dir=.
4524     for ac_exec_ext in '' $ac_executable_extensions; do
4525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4526     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4528     break 2
4529   fi
4530 done
4531   done
4532 IFS=$as_save_IFS
4533 
4534   ;;
4535 esac
4536 fi
4537 BASENAME=$ac_cv_path_BASENAME
4538 if test -n "$BASENAME"; then
4539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4540 $as_echo "$BASENAME" >&6; }
4541 else
4542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4543 $as_echo "no" >&6; }
4544 fi
4545 
4546 
4547         if test "x$BASENAME" = x; then
4548           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4549         fi
4550       else
4551         # Otherwise we believe it is a complete path. Use it as it is.
4552         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4553 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4555 $as_echo_n "checking for BASENAME... " >&6; }
4556         if test ! -x "$tool_specified"; then
4557           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4558 $as_echo "not found" >&6; }
4559           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4560         fi
4561         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4562 $as_echo "$tool_specified" >&6; }
4563       fi
4564     fi
4565   fi
4566 
4567 
4568 
4569   if test "x$BASENAME" = x; then
4570     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4571   fi
4572 
4573 
4574 
4575 
4576 
4577   # Publish this variable in the help.
4578 
4579 
4580   if test "x$BASH" = x; then
4581     # The variable is not set by user, try to locate tool using the code snippet
4582     for ac_prog in bash
4583 do
4584   # Extract the first word of "$ac_prog", so it can be a program name with args.
4585 set dummy $ac_prog; ac_word=$2
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587 $as_echo_n "checking for $ac_word... " >&6; }
4588 if ${ac_cv_path_BASH+:} false; then :
4589   $as_echo_n "(cached) " >&6
4590 else
4591   case $BASH in
4592   [\\/]* | ?:[\\/]*)
4593   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4594   ;;
4595   *)
4596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597 for as_dir in $PATH
4598 do
4599   IFS=$as_save_IFS
4600   test -z "$as_dir" && as_dir=.
4601     for ac_exec_ext in '' $ac_executable_extensions; do
4602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4603     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4605     break 2
4606   fi
4607 done
4608   done
4609 IFS=$as_save_IFS
4610 
4611   ;;
4612 esac
4613 fi
4614 BASH=$ac_cv_path_BASH
4615 if test -n "$BASH"; then
4616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4617 $as_echo "$BASH" >&6; }
4618 else
4619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620 $as_echo "no" >&6; }
4621 fi
4622 
4623 
4624   test -n "$BASH" && break
4625 done
4626 
4627   else
4628     # The variable is set, but is it from the command line or the environment?
4629 
4630     # Try to remove the string !BASH! from our list.
4631     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4632     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4633       # If it failed, the variable was not from the command line. Ignore it,
4634       # but warn the user (except for BASH, which is always set by the calling BASH).
4635       if test "xBASH" != xBASH; then
4636         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4637 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4638       fi
4639       # Try to locate tool using the code snippet
4640       for ac_prog in bash
4641 do
4642   # Extract the first word of "$ac_prog", so it can be a program name with args.
4643 set dummy $ac_prog; ac_word=$2
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4645 $as_echo_n "checking for $ac_word... " >&6; }
4646 if ${ac_cv_path_BASH+:} false; then :
4647   $as_echo_n "(cached) " >&6
4648 else
4649   case $BASH in
4650   [\\/]* | ?:[\\/]*)
4651   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4652   ;;
4653   *)
4654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655 for as_dir in $PATH
4656 do
4657   IFS=$as_save_IFS
4658   test -z "$as_dir" && as_dir=.
4659     for ac_exec_ext in '' $ac_executable_extensions; do
4660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4661     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4663     break 2
4664   fi
4665 done
4666   done
4667 IFS=$as_save_IFS
4668 
4669   ;;
4670 esac
4671 fi
4672 BASH=$ac_cv_path_BASH
4673 if test -n "$BASH"; then
4674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4675 $as_echo "$BASH" >&6; }
4676 else
4677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4678 $as_echo "no" >&6; }
4679 fi
4680 
4681 
4682   test -n "$BASH" && break
4683 done
4684 
4685     else
4686       # If it succeeded, then it was overridden by the user. We will use it
4687       # for the tool.
4688 
4689       # First remove it from the list of overridden variables, so we can test
4690       # for unknown variables in the end.
4691       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4692 
4693       # Check if the provided tool contains a complete path.
4694       tool_specified="$BASH"
4695       tool_basename="${tool_specified##*/}"
4696       if test "x$tool_basename" = "x$tool_specified"; then
4697         # A command without a complete path is provided, search $PATH.
4698         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4699 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4700         # Extract the first word of "$tool_basename", so it can be a program name with args.
4701 set dummy $tool_basename; ac_word=$2
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4703 $as_echo_n "checking for $ac_word... " >&6; }
4704 if ${ac_cv_path_BASH+:} false; then :
4705   $as_echo_n "(cached) " >&6
4706 else
4707   case $BASH in
4708   [\\/]* | ?:[\\/]*)
4709   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4710   ;;
4711   *)
4712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4713 for as_dir in $PATH
4714 do
4715   IFS=$as_save_IFS
4716   test -z "$as_dir" && as_dir=.
4717     for ac_exec_ext in '' $ac_executable_extensions; do
4718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4719     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4721     break 2
4722   fi
4723 done
4724   done
4725 IFS=$as_save_IFS
4726 
4727   ;;
4728 esac
4729 fi
4730 BASH=$ac_cv_path_BASH
4731 if test -n "$BASH"; then
4732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4733 $as_echo "$BASH" >&6; }
4734 else
4735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4736 $as_echo "no" >&6; }
4737 fi
4738 
4739 
4740         if test "x$BASH" = x; then
4741           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4742         fi
4743       else
4744         # Otherwise we believe it is a complete path. Use it as it is.
4745         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4746 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4747         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4748 $as_echo_n "checking for BASH... " >&6; }
4749         if test ! -x "$tool_specified"; then
4750           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4751 $as_echo "not found" >&6; }
4752           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4753         fi
4754         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4755 $as_echo "$tool_specified" >&6; }
4756       fi
4757     fi
4758   fi
4759 
4760 
4761 
4762   if test "x$BASH" = x; then
4763     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4764   fi
4765 
4766 
4767 
4768 
4769 
4770   # Publish this variable in the help.
4771 
4772 
4773   if test "x$CAT" = x; then
4774     # The variable is not set by user, try to locate tool using the code snippet
4775     for ac_prog in cat
4776 do
4777   # Extract the first word of "$ac_prog", so it can be a program name with args.
4778 set dummy $ac_prog; ac_word=$2
4779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780 $as_echo_n "checking for $ac_word... " >&6; }
4781 if ${ac_cv_path_CAT+:} false; then :
4782   $as_echo_n "(cached) " >&6
4783 else
4784   case $CAT in
4785   [\\/]* | ?:[\\/]*)
4786   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4787   ;;
4788   *)
4789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790 for as_dir in $PATH
4791 do
4792   IFS=$as_save_IFS
4793   test -z "$as_dir" && as_dir=.
4794     for ac_exec_ext in '' $ac_executable_extensions; do
4795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4796     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4798     break 2
4799   fi
4800 done
4801   done
4802 IFS=$as_save_IFS
4803 
4804   ;;
4805 esac
4806 fi
4807 CAT=$ac_cv_path_CAT
4808 if test -n "$CAT"; then
4809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4810 $as_echo "$CAT" >&6; }
4811 else
4812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813 $as_echo "no" >&6; }
4814 fi
4815 
4816 
4817   test -n "$CAT" && break
4818 done
4819 
4820   else
4821     # The variable is set, but is it from the command line or the environment?
4822 
4823     # Try to remove the string !CAT! from our list.
4824     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4825     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4826       # If it failed, the variable was not from the command line. Ignore it,
4827       # but warn the user (except for BASH, which is always set by the calling BASH).
4828       if test "xCAT" != xBASH; then
4829         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4830 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4831       fi
4832       # Try to locate tool using the code snippet
4833       for ac_prog in cat
4834 do
4835   # Extract the first word of "$ac_prog", so it can be a program name with args.
4836 set dummy $ac_prog; ac_word=$2
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4838 $as_echo_n "checking for $ac_word... " >&6; }
4839 if ${ac_cv_path_CAT+:} false; then :
4840   $as_echo_n "(cached) " >&6
4841 else
4842   case $CAT in
4843   [\\/]* | ?:[\\/]*)
4844   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4845   ;;
4846   *)
4847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4848 for as_dir in $PATH
4849 do
4850   IFS=$as_save_IFS
4851   test -z "$as_dir" && as_dir=.
4852     for ac_exec_ext in '' $ac_executable_extensions; do
4853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4854     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4856     break 2
4857   fi
4858 done
4859   done
4860 IFS=$as_save_IFS
4861 
4862   ;;
4863 esac
4864 fi
4865 CAT=$ac_cv_path_CAT
4866 if test -n "$CAT"; then
4867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4868 $as_echo "$CAT" >&6; }
4869 else
4870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4871 $as_echo "no" >&6; }
4872 fi
4873 
4874 
4875   test -n "$CAT" && break
4876 done
4877 
4878     else
4879       # If it succeeded, then it was overridden by the user. We will use it
4880       # for the tool.
4881 
4882       # First remove it from the list of overridden variables, so we can test
4883       # for unknown variables in the end.
4884       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4885 
4886       # Check if the provided tool contains a complete path.
4887       tool_specified="$CAT"
4888       tool_basename="${tool_specified##*/}"
4889       if test "x$tool_basename" = "x$tool_specified"; then
4890         # A command without a complete path is provided, search $PATH.
4891         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4892 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4893         # Extract the first word of "$tool_basename", so it can be a program name with args.
4894 set dummy $tool_basename; ac_word=$2
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4896 $as_echo_n "checking for $ac_word... " >&6; }
4897 if ${ac_cv_path_CAT+:} false; then :
4898   $as_echo_n "(cached) " >&6
4899 else
4900   case $CAT in
4901   [\\/]* | ?:[\\/]*)
4902   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4903   ;;
4904   *)
4905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4906 for as_dir in $PATH
4907 do
4908   IFS=$as_save_IFS
4909   test -z "$as_dir" && as_dir=.
4910     for ac_exec_ext in '' $ac_executable_extensions; do
4911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4912     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4914     break 2
4915   fi
4916 done
4917   done
4918 IFS=$as_save_IFS
4919 
4920   ;;
4921 esac
4922 fi
4923 CAT=$ac_cv_path_CAT
4924 if test -n "$CAT"; then
4925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4926 $as_echo "$CAT" >&6; }
4927 else
4928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4929 $as_echo "no" >&6; }
4930 fi
4931 
4932 
4933         if test "x$CAT" = x; then
4934           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4935         fi
4936       else
4937         # Otherwise we believe it is a complete path. Use it as it is.
4938         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4939 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4940         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4941 $as_echo_n "checking for CAT... " >&6; }
4942         if test ! -x "$tool_specified"; then
4943           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4944 $as_echo "not found" >&6; }
4945           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4946         fi
4947         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4948 $as_echo "$tool_specified" >&6; }
4949       fi
4950     fi
4951   fi
4952 
4953 
4954 
4955   if test "x$CAT" = x; then
4956     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4957   fi
4958 
4959 
4960 
4961 
4962 
4963   # Publish this variable in the help.
4964 
4965 
4966   if test "x$CHMOD" = x; then
4967     # The variable is not set by user, try to locate tool using the code snippet
4968     for ac_prog in chmod
4969 do
4970   # Extract the first word of "$ac_prog", so it can be a program name with args.
4971 set dummy $ac_prog; ac_word=$2
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4973 $as_echo_n "checking for $ac_word... " >&6; }
4974 if ${ac_cv_path_CHMOD+:} false; then :
4975   $as_echo_n "(cached) " >&6
4976 else
4977   case $CHMOD in
4978   [\\/]* | ?:[\\/]*)
4979   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4980   ;;
4981   *)
4982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4983 for as_dir in $PATH
4984 do
4985   IFS=$as_save_IFS
4986   test -z "$as_dir" && as_dir=.
4987     for ac_exec_ext in '' $ac_executable_extensions; do
4988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4989     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4991     break 2
4992   fi
4993 done
4994   done
4995 IFS=$as_save_IFS
4996 
4997   ;;
4998 esac
4999 fi
5000 CHMOD=$ac_cv_path_CHMOD
5001 if test -n "$CHMOD"; then
5002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5003 $as_echo "$CHMOD" >&6; }
5004 else
5005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006 $as_echo "no" >&6; }
5007 fi
5008 
5009 
5010   test -n "$CHMOD" && break
5011 done
5012 
5013   else
5014     # The variable is set, but is it from the command line or the environment?
5015 
5016     # Try to remove the string !CHMOD! from our list.
5017     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5018     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5019       # If it failed, the variable was not from the command line. Ignore it,
5020       # but warn the user (except for BASH, which is always set by the calling BASH).
5021       if test "xCHMOD" != xBASH; then
5022         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5023 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5024       fi
5025       # Try to locate tool using the code snippet
5026       for ac_prog in chmod
5027 do
5028   # Extract the first word of "$ac_prog", so it can be a program name with args.
5029 set dummy $ac_prog; ac_word=$2
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031 $as_echo_n "checking for $ac_word... " >&6; }
5032 if ${ac_cv_path_CHMOD+:} false; then :
5033   $as_echo_n "(cached) " >&6
5034 else
5035   case $CHMOD in
5036   [\\/]* | ?:[\\/]*)
5037   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5038   ;;
5039   *)
5040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041 for as_dir in $PATH
5042 do
5043   IFS=$as_save_IFS
5044   test -z "$as_dir" && as_dir=.
5045     for ac_exec_ext in '' $ac_executable_extensions; do
5046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5047     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5049     break 2
5050   fi
5051 done
5052   done
5053 IFS=$as_save_IFS
5054 
5055   ;;
5056 esac
5057 fi
5058 CHMOD=$ac_cv_path_CHMOD
5059 if test -n "$CHMOD"; then
5060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5061 $as_echo "$CHMOD" >&6; }
5062 else
5063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064 $as_echo "no" >&6; }
5065 fi
5066 
5067 
5068   test -n "$CHMOD" && break
5069 done
5070 
5071     else
5072       # If it succeeded, then it was overridden by the user. We will use it
5073       # for the tool.
5074 
5075       # First remove it from the list of overridden variables, so we can test
5076       # for unknown variables in the end.
5077       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5078 
5079       # Check if the provided tool contains a complete path.
5080       tool_specified="$CHMOD"
5081       tool_basename="${tool_specified##*/}"
5082       if test "x$tool_basename" = "x$tool_specified"; then
5083         # A command without a complete path is provided, search $PATH.
5084         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5085 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5086         # Extract the first word of "$tool_basename", so it can be a program name with args.
5087 set dummy $tool_basename; ac_word=$2
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5089 $as_echo_n "checking for $ac_word... " >&6; }
5090 if ${ac_cv_path_CHMOD+:} false; then :
5091   $as_echo_n "(cached) " >&6
5092 else
5093   case $CHMOD in
5094   [\\/]* | ?:[\\/]*)
5095   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5096   ;;
5097   *)
5098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5099 for as_dir in $PATH
5100 do
5101   IFS=$as_save_IFS
5102   test -z "$as_dir" && as_dir=.
5103     for ac_exec_ext in '' $ac_executable_extensions; do
5104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5105     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5107     break 2
5108   fi
5109 done
5110   done
5111 IFS=$as_save_IFS
5112 
5113   ;;
5114 esac
5115 fi
5116 CHMOD=$ac_cv_path_CHMOD
5117 if test -n "$CHMOD"; then
5118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5119 $as_echo "$CHMOD" >&6; }
5120 else
5121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5122 $as_echo "no" >&6; }
5123 fi
5124 
5125 
5126         if test "x$CHMOD" = x; then
5127           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5128         fi
5129       else
5130         # Otherwise we believe it is a complete path. Use it as it is.
5131         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5132 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5134 $as_echo_n "checking for CHMOD... " >&6; }
5135         if test ! -x "$tool_specified"; then
5136           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5137 $as_echo "not found" >&6; }
5138           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5139         fi
5140         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5141 $as_echo "$tool_specified" >&6; }
5142       fi
5143     fi
5144   fi
5145 
5146 
5147 
5148   if test "x$CHMOD" = x; then
5149     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5150   fi
5151 
5152 
5153 
5154 
5155 
5156   # Publish this variable in the help.
5157 
5158 
5159   if test "x$CMP" = x; then
5160     # The variable is not set by user, try to locate tool using the code snippet
5161     for ac_prog in cmp
5162 do
5163   # Extract the first word of "$ac_prog", so it can be a program name with args.
5164 set dummy $ac_prog; ac_word=$2
5165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5166 $as_echo_n "checking for $ac_word... " >&6; }
5167 if ${ac_cv_path_CMP+:} false; then :
5168   $as_echo_n "(cached) " >&6
5169 else
5170   case $CMP in
5171   [\\/]* | ?:[\\/]*)
5172   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5173   ;;
5174   *)
5175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5176 for as_dir in $PATH
5177 do
5178   IFS=$as_save_IFS
5179   test -z "$as_dir" && as_dir=.
5180     for ac_exec_ext in '' $ac_executable_extensions; do
5181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5182     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5184     break 2
5185   fi
5186 done
5187   done
5188 IFS=$as_save_IFS
5189 
5190   ;;
5191 esac
5192 fi
5193 CMP=$ac_cv_path_CMP
5194 if test -n "$CMP"; then
5195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5196 $as_echo "$CMP" >&6; }
5197 else
5198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5199 $as_echo "no" >&6; }
5200 fi
5201 
5202 
5203   test -n "$CMP" && break
5204 done
5205 
5206   else
5207     # The variable is set, but is it from the command line or the environment?
5208 
5209     # Try to remove the string !CMP! from our list.
5210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5212       # If it failed, the variable was not from the command line. Ignore it,
5213       # but warn the user (except for BASH, which is always set by the calling BASH).
5214       if test "xCMP" != xBASH; then
5215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5216 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5217       fi
5218       # Try to locate tool using the code snippet
5219       for ac_prog in cmp
5220 do
5221   # Extract the first word of "$ac_prog", so it can be a program name with args.
5222 set dummy $ac_prog; ac_word=$2
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5224 $as_echo_n "checking for $ac_word... " >&6; }
5225 if ${ac_cv_path_CMP+:} false; then :
5226   $as_echo_n "(cached) " >&6
5227 else
5228   case $CMP in
5229   [\\/]* | ?:[\\/]*)
5230   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5231   ;;
5232   *)
5233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5234 for as_dir in $PATH
5235 do
5236   IFS=$as_save_IFS
5237   test -z "$as_dir" && as_dir=.
5238     for ac_exec_ext in '' $ac_executable_extensions; do
5239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5240     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5242     break 2
5243   fi
5244 done
5245   done
5246 IFS=$as_save_IFS
5247 
5248   ;;
5249 esac
5250 fi
5251 CMP=$ac_cv_path_CMP
5252 if test -n "$CMP"; then
5253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5254 $as_echo "$CMP" >&6; }
5255 else
5256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5257 $as_echo "no" >&6; }
5258 fi
5259 
5260 
5261   test -n "$CMP" && break
5262 done
5263 
5264     else
5265       # If it succeeded, then it was overridden by the user. We will use it
5266       # for the tool.
5267 
5268       # First remove it from the list of overridden variables, so we can test
5269       # for unknown variables in the end.
5270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5271 
5272       # Check if the provided tool contains a complete path.
5273       tool_specified="$CMP"
5274       tool_basename="${tool_specified##*/}"
5275       if test "x$tool_basename" = "x$tool_specified"; then
5276         # A command without a complete path is provided, search $PATH.
5277         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5278 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5279         # Extract the first word of "$tool_basename", so it can be a program name with args.
5280 set dummy $tool_basename; ac_word=$2
5281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5282 $as_echo_n "checking for $ac_word... " >&6; }
5283 if ${ac_cv_path_CMP+:} false; then :
5284   $as_echo_n "(cached) " >&6
5285 else
5286   case $CMP in
5287   [\\/]* | ?:[\\/]*)
5288   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5289   ;;
5290   *)
5291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5292 for as_dir in $PATH
5293 do
5294   IFS=$as_save_IFS
5295   test -z "$as_dir" && as_dir=.
5296     for ac_exec_ext in '' $ac_executable_extensions; do
5297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5298     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5300     break 2
5301   fi
5302 done
5303   done
5304 IFS=$as_save_IFS
5305 
5306   ;;
5307 esac
5308 fi
5309 CMP=$ac_cv_path_CMP
5310 if test -n "$CMP"; then
5311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5312 $as_echo "$CMP" >&6; }
5313 else
5314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5315 $as_echo "no" >&6; }
5316 fi
5317 
5318 
5319         if test "x$CMP" = x; then
5320           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5321         fi
5322       else
5323         # Otherwise we believe it is a complete path. Use it as it is.
5324         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5325 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5326         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5327 $as_echo_n "checking for CMP... " >&6; }
5328         if test ! -x "$tool_specified"; then
5329           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5330 $as_echo "not found" >&6; }
5331           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5332         fi
5333         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5334 $as_echo "$tool_specified" >&6; }
5335       fi
5336     fi
5337   fi
5338 
5339 
5340 
5341   if test "x$CMP" = x; then
5342     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5343   fi
5344 
5345 
5346 
5347 
5348 
5349   # Publish this variable in the help.
5350 
5351 
5352   if test "x$COMM" = x; then
5353     # The variable is not set by user, try to locate tool using the code snippet
5354     for ac_prog in comm
5355 do
5356   # Extract the first word of "$ac_prog", so it can be a program name with args.
5357 set dummy $ac_prog; ac_word=$2
5358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5359 $as_echo_n "checking for $ac_word... " >&6; }
5360 if ${ac_cv_path_COMM+:} false; then :
5361   $as_echo_n "(cached) " >&6
5362 else
5363   case $COMM in
5364   [\\/]* | ?:[\\/]*)
5365   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5366   ;;
5367   *)
5368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5369 for as_dir in $PATH
5370 do
5371   IFS=$as_save_IFS
5372   test -z "$as_dir" && as_dir=.
5373     for ac_exec_ext in '' $ac_executable_extensions; do
5374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5375     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5377     break 2
5378   fi
5379 done
5380   done
5381 IFS=$as_save_IFS
5382 
5383   ;;
5384 esac
5385 fi
5386 COMM=$ac_cv_path_COMM
5387 if test -n "$COMM"; then
5388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5389 $as_echo "$COMM" >&6; }
5390 else
5391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5392 $as_echo "no" >&6; }
5393 fi
5394 
5395 
5396   test -n "$COMM" && break
5397 done
5398 
5399   else
5400     # The variable is set, but is it from the command line or the environment?
5401 
5402     # Try to remove the string !COMM! from our list.
5403     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5404     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5405       # If it failed, the variable was not from the command line. Ignore it,
5406       # but warn the user (except for BASH, which is always set by the calling BASH).
5407       if test "xCOMM" != xBASH; then
5408         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5409 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5410       fi
5411       # Try to locate tool using the code snippet
5412       for ac_prog in comm
5413 do
5414   # Extract the first word of "$ac_prog", so it can be a program name with args.
5415 set dummy $ac_prog; ac_word=$2
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5417 $as_echo_n "checking for $ac_word... " >&6; }
5418 if ${ac_cv_path_COMM+:} false; then :
5419   $as_echo_n "(cached) " >&6
5420 else
5421   case $COMM in
5422   [\\/]* | ?:[\\/]*)
5423   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5424   ;;
5425   *)
5426   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5427 for as_dir in $PATH
5428 do
5429   IFS=$as_save_IFS
5430   test -z "$as_dir" && as_dir=.
5431     for ac_exec_ext in '' $ac_executable_extensions; do
5432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5433     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5435     break 2
5436   fi
5437 done
5438   done
5439 IFS=$as_save_IFS
5440 
5441   ;;
5442 esac
5443 fi
5444 COMM=$ac_cv_path_COMM
5445 if test -n "$COMM"; then
5446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5447 $as_echo "$COMM" >&6; }
5448 else
5449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5450 $as_echo "no" >&6; }
5451 fi
5452 
5453 
5454   test -n "$COMM" && break
5455 done
5456 
5457     else
5458       # If it succeeded, then it was overridden by the user. We will use it
5459       # for the tool.
5460 
5461       # First remove it from the list of overridden variables, so we can test
5462       # for unknown variables in the end.
5463       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5464 
5465       # Check if the provided tool contains a complete path.
5466       tool_specified="$COMM"
5467       tool_basename="${tool_specified##*/}"
5468       if test "x$tool_basename" = "x$tool_specified"; then
5469         # A command without a complete path is provided, search $PATH.
5470         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5471 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5472         # Extract the first word of "$tool_basename", so it can be a program name with args.
5473 set dummy $tool_basename; ac_word=$2
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475 $as_echo_n "checking for $ac_word... " >&6; }
5476 if ${ac_cv_path_COMM+:} false; then :
5477   $as_echo_n "(cached) " >&6
5478 else
5479   case $COMM in
5480   [\\/]* | ?:[\\/]*)
5481   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5482   ;;
5483   *)
5484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485 for as_dir in $PATH
5486 do
5487   IFS=$as_save_IFS
5488   test -z "$as_dir" && as_dir=.
5489     for ac_exec_ext in '' $ac_executable_extensions; do
5490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5491     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493     break 2
5494   fi
5495 done
5496   done
5497 IFS=$as_save_IFS
5498 
5499   ;;
5500 esac
5501 fi
5502 COMM=$ac_cv_path_COMM
5503 if test -n "$COMM"; then
5504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5505 $as_echo "$COMM" >&6; }
5506 else
5507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508 $as_echo "no" >&6; }
5509 fi
5510 
5511 
5512         if test "x$COMM" = x; then
5513           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5514         fi
5515       else
5516         # Otherwise we believe it is a complete path. Use it as it is.
5517         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5518 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5520 $as_echo_n "checking for COMM... " >&6; }
5521         if test ! -x "$tool_specified"; then
5522           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5523 $as_echo "not found" >&6; }
5524           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5525         fi
5526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5527 $as_echo "$tool_specified" >&6; }
5528       fi
5529     fi
5530   fi
5531 
5532 
5533 
5534   if test "x$COMM" = x; then
5535     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5536   fi
5537 
5538 
5539 
5540 
5541 
5542   # Publish this variable in the help.
5543 
5544 
5545   if test "x$CP" = x; then
5546     # The variable is not set by user, try to locate tool using the code snippet
5547     for ac_prog in cp
5548 do
5549   # Extract the first word of "$ac_prog", so it can be a program name with args.
5550 set dummy $ac_prog; ac_word=$2
5551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5552 $as_echo_n "checking for $ac_word... " >&6; }
5553 if ${ac_cv_path_CP+:} false; then :
5554   $as_echo_n "(cached) " >&6
5555 else
5556   case $CP in
5557   [\\/]* | ?:[\\/]*)
5558   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5559   ;;
5560   *)
5561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562 for as_dir in $PATH
5563 do
5564   IFS=$as_save_IFS
5565   test -z "$as_dir" && as_dir=.
5566     for ac_exec_ext in '' $ac_executable_extensions; do
5567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5568     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5570     break 2
5571   fi
5572 done
5573   done
5574 IFS=$as_save_IFS
5575 
5576   ;;
5577 esac
5578 fi
5579 CP=$ac_cv_path_CP
5580 if test -n "$CP"; then
5581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5582 $as_echo "$CP" >&6; }
5583 else
5584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5585 $as_echo "no" >&6; }
5586 fi
5587 
5588 
5589   test -n "$CP" && break
5590 done
5591 
5592   else
5593     # The variable is set, but is it from the command line or the environment?
5594 
5595     # Try to remove the string !CP! from our list.
5596     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5597     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5598       # If it failed, the variable was not from the command line. Ignore it,
5599       # but warn the user (except for BASH, which is always set by the calling BASH).
5600       if test "xCP" != xBASH; then
5601         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5602 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5603       fi
5604       # Try to locate tool using the code snippet
5605       for ac_prog in cp
5606 do
5607   # Extract the first word of "$ac_prog", so it can be a program name with args.
5608 set dummy $ac_prog; ac_word=$2
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5610 $as_echo_n "checking for $ac_word... " >&6; }
5611 if ${ac_cv_path_CP+:} false; then :
5612   $as_echo_n "(cached) " >&6
5613 else
5614   case $CP in
5615   [\\/]* | ?:[\\/]*)
5616   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5617   ;;
5618   *)
5619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5620 for as_dir in $PATH
5621 do
5622   IFS=$as_save_IFS
5623   test -z "$as_dir" && as_dir=.
5624     for ac_exec_ext in '' $ac_executable_extensions; do
5625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5626     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5628     break 2
5629   fi
5630 done
5631   done
5632 IFS=$as_save_IFS
5633 
5634   ;;
5635 esac
5636 fi
5637 CP=$ac_cv_path_CP
5638 if test -n "$CP"; then
5639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5640 $as_echo "$CP" >&6; }
5641 else
5642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5643 $as_echo "no" >&6; }
5644 fi
5645 
5646 
5647   test -n "$CP" && break
5648 done
5649 
5650     else
5651       # If it succeeded, then it was overridden by the user. We will use it
5652       # for the tool.
5653 
5654       # First remove it from the list of overridden variables, so we can test
5655       # for unknown variables in the end.
5656       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5657 
5658       # Check if the provided tool contains a complete path.
5659       tool_specified="$CP"
5660       tool_basename="${tool_specified##*/}"
5661       if test "x$tool_basename" = "x$tool_specified"; then
5662         # A command without a complete path is provided, search $PATH.
5663         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5664 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5665         # Extract the first word of "$tool_basename", so it can be a program name with args.
5666 set dummy $tool_basename; ac_word=$2
5667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5668 $as_echo_n "checking for $ac_word... " >&6; }
5669 if ${ac_cv_path_CP+:} false; then :
5670   $as_echo_n "(cached) " >&6
5671 else
5672   case $CP in
5673   [\\/]* | ?:[\\/]*)
5674   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5675   ;;
5676   *)
5677   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678 for as_dir in $PATH
5679 do
5680   IFS=$as_save_IFS
5681   test -z "$as_dir" && as_dir=.
5682     for ac_exec_ext in '' $ac_executable_extensions; do
5683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5684     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5686     break 2
5687   fi
5688 done
5689   done
5690 IFS=$as_save_IFS
5691 
5692   ;;
5693 esac
5694 fi
5695 CP=$ac_cv_path_CP
5696 if test -n "$CP"; then
5697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5698 $as_echo "$CP" >&6; }
5699 else
5700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701 $as_echo "no" >&6; }
5702 fi
5703 
5704 
5705         if test "x$CP" = x; then
5706           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5707         fi
5708       else
5709         # Otherwise we believe it is a complete path. Use it as it is.
5710         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5711 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5712         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5713 $as_echo_n "checking for CP... " >&6; }
5714         if test ! -x "$tool_specified"; then
5715           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5716 $as_echo "not found" >&6; }
5717           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5718         fi
5719         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5720 $as_echo "$tool_specified" >&6; }
5721       fi
5722     fi
5723   fi
5724 
5725 
5726 
5727   if test "x$CP" = x; then
5728     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5729   fi
5730 
5731 
5732 
5733 
5734 
5735   # Publish this variable in the help.
5736 
5737 
5738   if test "x$CUT" = x; then
5739     # The variable is not set by user, try to locate tool using the code snippet
5740     for ac_prog in cut
5741 do
5742   # Extract the first word of "$ac_prog", so it can be a program name with args.
5743 set dummy $ac_prog; ac_word=$2
5744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5745 $as_echo_n "checking for $ac_word... " >&6; }
5746 if ${ac_cv_path_CUT+:} false; then :
5747   $as_echo_n "(cached) " >&6
5748 else
5749   case $CUT in
5750   [\\/]* | ?:[\\/]*)
5751   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5752   ;;
5753   *)
5754   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5755 for as_dir in $PATH
5756 do
5757   IFS=$as_save_IFS
5758   test -z "$as_dir" && as_dir=.
5759     for ac_exec_ext in '' $ac_executable_extensions; do
5760   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5761     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5762     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5763     break 2
5764   fi
5765 done
5766   done
5767 IFS=$as_save_IFS
5768 
5769   ;;
5770 esac
5771 fi
5772 CUT=$ac_cv_path_CUT
5773 if test -n "$CUT"; then
5774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5775 $as_echo "$CUT" >&6; }
5776 else
5777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5778 $as_echo "no" >&6; }
5779 fi
5780 
5781 
5782   test -n "$CUT" && break
5783 done
5784 
5785   else
5786     # The variable is set, but is it from the command line or the environment?
5787 
5788     # Try to remove the string !CUT! from our list.
5789     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5790     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5791       # If it failed, the variable was not from the command line. Ignore it,
5792       # but warn the user (except for BASH, which is always set by the calling BASH).
5793       if test "xCUT" != xBASH; then
5794         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5795 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5796       fi
5797       # Try to locate tool using the code snippet
5798       for ac_prog in cut
5799 do
5800   # Extract the first word of "$ac_prog", so it can be a program name with args.
5801 set dummy $ac_prog; ac_word=$2
5802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5803 $as_echo_n "checking for $ac_word... " >&6; }
5804 if ${ac_cv_path_CUT+:} false; then :
5805   $as_echo_n "(cached) " >&6
5806 else
5807   case $CUT in
5808   [\\/]* | ?:[\\/]*)
5809   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5810   ;;
5811   *)
5812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5813 for as_dir in $PATH
5814 do
5815   IFS=$as_save_IFS
5816   test -z "$as_dir" && as_dir=.
5817     for ac_exec_ext in '' $ac_executable_extensions; do
5818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5819     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5821     break 2
5822   fi
5823 done
5824   done
5825 IFS=$as_save_IFS
5826 
5827   ;;
5828 esac
5829 fi
5830 CUT=$ac_cv_path_CUT
5831 if test -n "$CUT"; then
5832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5833 $as_echo "$CUT" >&6; }
5834 else
5835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836 $as_echo "no" >&6; }
5837 fi
5838 
5839 
5840   test -n "$CUT" && break
5841 done
5842 
5843     else
5844       # If it succeeded, then it was overridden by the user. We will use it
5845       # for the tool.
5846 
5847       # First remove it from the list of overridden variables, so we can test
5848       # for unknown variables in the end.
5849       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5850 
5851       # Check if the provided tool contains a complete path.
5852       tool_specified="$CUT"
5853       tool_basename="${tool_specified##*/}"
5854       if test "x$tool_basename" = "x$tool_specified"; then
5855         # A command without a complete path is provided, search $PATH.
5856         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5857 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5858         # Extract the first word of "$tool_basename", so it can be a program name with args.
5859 set dummy $tool_basename; ac_word=$2
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861 $as_echo_n "checking for $ac_word... " >&6; }
5862 if ${ac_cv_path_CUT+:} false; then :
5863   $as_echo_n "(cached) " >&6
5864 else
5865   case $CUT in
5866   [\\/]* | ?:[\\/]*)
5867   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5868   ;;
5869   *)
5870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871 for as_dir in $PATH
5872 do
5873   IFS=$as_save_IFS
5874   test -z "$as_dir" && as_dir=.
5875     for ac_exec_ext in '' $ac_executable_extensions; do
5876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879     break 2
5880   fi
5881 done
5882   done
5883 IFS=$as_save_IFS
5884 
5885   ;;
5886 esac
5887 fi
5888 CUT=$ac_cv_path_CUT
5889 if test -n "$CUT"; then
5890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5891 $as_echo "$CUT" >&6; }
5892 else
5893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894 $as_echo "no" >&6; }
5895 fi
5896 
5897 
5898         if test "x$CUT" = x; then
5899           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5900         fi
5901       else
5902         # Otherwise we believe it is a complete path. Use it as it is.
5903         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5904 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5905         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5906 $as_echo_n "checking for CUT... " >&6; }
5907         if test ! -x "$tool_specified"; then
5908           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5909 $as_echo "not found" >&6; }
5910           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5911         fi
5912         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5913 $as_echo "$tool_specified" >&6; }
5914       fi
5915     fi
5916   fi
5917 
5918 
5919 
5920   if test "x$CUT" = x; then
5921     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5922   fi
5923 
5924 
5925 
5926 
5927 
5928   # Publish this variable in the help.
5929 
5930 
5931   if test "x$DATE" = x; then
5932     # The variable is not set by user, try to locate tool using the code snippet
5933     for ac_prog in date
5934 do
5935   # Extract the first word of "$ac_prog", so it can be a program name with args.
5936 set dummy $ac_prog; ac_word=$2
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5938 $as_echo_n "checking for $ac_word... " >&6; }
5939 if ${ac_cv_path_DATE+:} false; then :
5940   $as_echo_n "(cached) " >&6
5941 else
5942   case $DATE in
5943   [\\/]* | ?:[\\/]*)
5944   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5945   ;;
5946   *)
5947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948 for as_dir in $PATH
5949 do
5950   IFS=$as_save_IFS
5951   test -z "$as_dir" && as_dir=.
5952     for ac_exec_ext in '' $ac_executable_extensions; do
5953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5954     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5956     break 2
5957   fi
5958 done
5959   done
5960 IFS=$as_save_IFS
5961 
5962   ;;
5963 esac
5964 fi
5965 DATE=$ac_cv_path_DATE
5966 if test -n "$DATE"; then
5967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5968 $as_echo "$DATE" >&6; }
5969 else
5970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971 $as_echo "no" >&6; }
5972 fi
5973 
5974 
5975   test -n "$DATE" && break
5976 done
5977 
5978   else
5979     # The variable is set, but is it from the command line or the environment?
5980 
5981     # Try to remove the string !DATE! from our list.
5982     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5983     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5984       # If it failed, the variable was not from the command line. Ignore it,
5985       # but warn the user (except for BASH, which is always set by the calling BASH).
5986       if test "xDATE" != xBASH; then
5987         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5988 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5989       fi
5990       # Try to locate tool using the code snippet
5991       for ac_prog in date
5992 do
5993   # Extract the first word of "$ac_prog", so it can be a program name with args.
5994 set dummy $ac_prog; ac_word=$2
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996 $as_echo_n "checking for $ac_word... " >&6; }
5997 if ${ac_cv_path_DATE+:} false; then :
5998   $as_echo_n "(cached) " >&6
5999 else
6000   case $DATE in
6001   [\\/]* | ?:[\\/]*)
6002   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6003   ;;
6004   *)
6005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006 for as_dir in $PATH
6007 do
6008   IFS=$as_save_IFS
6009   test -z "$as_dir" && as_dir=.
6010     for ac_exec_ext in '' $ac_executable_extensions; do
6011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6012     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6014     break 2
6015   fi
6016 done
6017   done
6018 IFS=$as_save_IFS
6019 
6020   ;;
6021 esac
6022 fi
6023 DATE=$ac_cv_path_DATE
6024 if test -n "$DATE"; then
6025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6026 $as_echo "$DATE" >&6; }
6027 else
6028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6029 $as_echo "no" >&6; }
6030 fi
6031 
6032 
6033   test -n "$DATE" && break
6034 done
6035 
6036     else
6037       # If it succeeded, then it was overridden by the user. We will use it
6038       # for the tool.
6039 
6040       # First remove it from the list of overridden variables, so we can test
6041       # for unknown variables in the end.
6042       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6043 
6044       # Check if the provided tool contains a complete path.
6045       tool_specified="$DATE"
6046       tool_basename="${tool_specified##*/}"
6047       if test "x$tool_basename" = "x$tool_specified"; then
6048         # A command without a complete path is provided, search $PATH.
6049         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6050 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6051         # Extract the first word of "$tool_basename", so it can be a program name with args.
6052 set dummy $tool_basename; ac_word=$2
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054 $as_echo_n "checking for $ac_word... " >&6; }
6055 if ${ac_cv_path_DATE+:} false; then :
6056   $as_echo_n "(cached) " >&6
6057 else
6058   case $DATE in
6059   [\\/]* | ?:[\\/]*)
6060   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6061   ;;
6062   *)
6063   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6064 for as_dir in $PATH
6065 do
6066   IFS=$as_save_IFS
6067   test -z "$as_dir" && as_dir=.
6068     for ac_exec_ext in '' $ac_executable_extensions; do
6069   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6070     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6072     break 2
6073   fi
6074 done
6075   done
6076 IFS=$as_save_IFS
6077 
6078   ;;
6079 esac
6080 fi
6081 DATE=$ac_cv_path_DATE
6082 if test -n "$DATE"; then
6083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6084 $as_echo "$DATE" >&6; }
6085 else
6086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087 $as_echo "no" >&6; }
6088 fi
6089 
6090 
6091         if test "x$DATE" = x; then
6092           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6093         fi
6094       else
6095         # Otherwise we believe it is a complete path. Use it as it is.
6096         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6097 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6098         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6099 $as_echo_n "checking for DATE... " >&6; }
6100         if test ! -x "$tool_specified"; then
6101           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6102 $as_echo "not found" >&6; }
6103           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6104         fi
6105         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6106 $as_echo "$tool_specified" >&6; }
6107       fi
6108     fi
6109   fi
6110 
6111 
6112 
6113   if test "x$DATE" = x; then
6114     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6115   fi
6116 
6117 
6118 
6119 
6120 
6121   # Publish this variable in the help.
6122 
6123 
6124   if test "x$DIFF" = x; then
6125     # The variable is not set by user, try to locate tool using the code snippet
6126     for ac_prog in gdiff diff
6127 do
6128   # Extract the first word of "$ac_prog", so it can be a program name with args.
6129 set dummy $ac_prog; ac_word=$2
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6131 $as_echo_n "checking for $ac_word... " >&6; }
6132 if ${ac_cv_path_DIFF+:} false; then :
6133   $as_echo_n "(cached) " >&6
6134 else
6135   case $DIFF in
6136   [\\/]* | ?:[\\/]*)
6137   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6138   ;;
6139   *)
6140   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6141 for as_dir in $PATH
6142 do
6143   IFS=$as_save_IFS
6144   test -z "$as_dir" && as_dir=.
6145     for ac_exec_ext in '' $ac_executable_extensions; do
6146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6147     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6149     break 2
6150   fi
6151 done
6152   done
6153 IFS=$as_save_IFS
6154 
6155   ;;
6156 esac
6157 fi
6158 DIFF=$ac_cv_path_DIFF
6159 if test -n "$DIFF"; then
6160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6161 $as_echo "$DIFF" >&6; }
6162 else
6163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6164 $as_echo "no" >&6; }
6165 fi
6166 
6167 
6168   test -n "$DIFF" && break
6169 done
6170 
6171   else
6172     # The variable is set, but is it from the command line or the environment?
6173 
6174     # Try to remove the string !DIFF! from our list.
6175     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6176     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6177       # If it failed, the variable was not from the command line. Ignore it,
6178       # but warn the user (except for BASH, which is always set by the calling BASH).
6179       if test "xDIFF" != xBASH; then
6180         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6181 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6182       fi
6183       # Try to locate tool using the code snippet
6184       for ac_prog in gdiff diff
6185 do
6186   # Extract the first word of "$ac_prog", so it can be a program name with args.
6187 set dummy $ac_prog; ac_word=$2
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6189 $as_echo_n "checking for $ac_word... " >&6; }
6190 if ${ac_cv_path_DIFF+:} false; then :
6191   $as_echo_n "(cached) " >&6
6192 else
6193   case $DIFF in
6194   [\\/]* | ?:[\\/]*)
6195   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6196   ;;
6197   *)
6198   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199 for as_dir in $PATH
6200 do
6201   IFS=$as_save_IFS
6202   test -z "$as_dir" && as_dir=.
6203     for ac_exec_ext in '' $ac_executable_extensions; do
6204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6205     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207     break 2
6208   fi
6209 done
6210   done
6211 IFS=$as_save_IFS
6212 
6213   ;;
6214 esac
6215 fi
6216 DIFF=$ac_cv_path_DIFF
6217 if test -n "$DIFF"; then
6218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6219 $as_echo "$DIFF" >&6; }
6220 else
6221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222 $as_echo "no" >&6; }
6223 fi
6224 
6225 
6226   test -n "$DIFF" && break
6227 done
6228 
6229     else
6230       # If it succeeded, then it was overridden by the user. We will use it
6231       # for the tool.
6232 
6233       # First remove it from the list of overridden variables, so we can test
6234       # for unknown variables in the end.
6235       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6236 
6237       # Check if the provided tool contains a complete path.
6238       tool_specified="$DIFF"
6239       tool_basename="${tool_specified##*/}"
6240       if test "x$tool_basename" = "x$tool_specified"; then
6241         # A command without a complete path is provided, search $PATH.
6242         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6243 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6244         # Extract the first word of "$tool_basename", so it can be a program name with args.
6245 set dummy $tool_basename; ac_word=$2
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247 $as_echo_n "checking for $ac_word... " >&6; }
6248 if ${ac_cv_path_DIFF+:} false; then :
6249   $as_echo_n "(cached) " >&6
6250 else
6251   case $DIFF in
6252   [\\/]* | ?:[\\/]*)
6253   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6254   ;;
6255   *)
6256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257 for as_dir in $PATH
6258 do
6259   IFS=$as_save_IFS
6260   test -z "$as_dir" && as_dir=.
6261     for ac_exec_ext in '' $ac_executable_extensions; do
6262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6263     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265     break 2
6266   fi
6267 done
6268   done
6269 IFS=$as_save_IFS
6270 
6271   ;;
6272 esac
6273 fi
6274 DIFF=$ac_cv_path_DIFF
6275 if test -n "$DIFF"; then
6276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6277 $as_echo "$DIFF" >&6; }
6278 else
6279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280 $as_echo "no" >&6; }
6281 fi
6282 
6283 
6284         if test "x$DIFF" = x; then
6285           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6286         fi
6287       else
6288         # Otherwise we believe it is a complete path. Use it as it is.
6289         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6290 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6291         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6292 $as_echo_n "checking for DIFF... " >&6; }
6293         if test ! -x "$tool_specified"; then
6294           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6295 $as_echo "not found" >&6; }
6296           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6297         fi
6298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6299 $as_echo "$tool_specified" >&6; }
6300       fi
6301     fi
6302   fi
6303 
6304 
6305 
6306   if test "x$DIFF" = x; then
6307     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6308   fi
6309 
6310 
6311 
6312 
6313 
6314   # Publish this variable in the help.
6315 
6316 
6317   if test "x$DIRNAME" = x; then
6318     # The variable is not set by user, try to locate tool using the code snippet
6319     for ac_prog in dirname
6320 do
6321   # Extract the first word of "$ac_prog", so it can be a program name with args.
6322 set dummy $ac_prog; ac_word=$2
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6324 $as_echo_n "checking for $ac_word... " >&6; }
6325 if ${ac_cv_path_DIRNAME+:} false; then :
6326   $as_echo_n "(cached) " >&6
6327 else
6328   case $DIRNAME in
6329   [\\/]* | ?:[\\/]*)
6330   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6331   ;;
6332   *)
6333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6334 for as_dir in $PATH
6335 do
6336   IFS=$as_save_IFS
6337   test -z "$as_dir" && as_dir=.
6338     for ac_exec_ext in '' $ac_executable_extensions; do
6339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6340     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6342     break 2
6343   fi
6344 done
6345   done
6346 IFS=$as_save_IFS
6347 
6348   ;;
6349 esac
6350 fi
6351 DIRNAME=$ac_cv_path_DIRNAME
6352 if test -n "$DIRNAME"; then
6353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6354 $as_echo "$DIRNAME" >&6; }
6355 else
6356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6357 $as_echo "no" >&6; }
6358 fi
6359 
6360 
6361   test -n "$DIRNAME" && break
6362 done
6363 
6364   else
6365     # The variable is set, but is it from the command line or the environment?
6366 
6367     # Try to remove the string !DIRNAME! from our list.
6368     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6369     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6370       # If it failed, the variable was not from the command line. Ignore it,
6371       # but warn the user (except for BASH, which is always set by the calling BASH).
6372       if test "xDIRNAME" != xBASH; then
6373         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6374 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6375       fi
6376       # Try to locate tool using the code snippet
6377       for ac_prog in dirname
6378 do
6379   # Extract the first word of "$ac_prog", so it can be a program name with args.
6380 set dummy $ac_prog; ac_word=$2
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6382 $as_echo_n "checking for $ac_word... " >&6; }
6383 if ${ac_cv_path_DIRNAME+:} false; then :
6384   $as_echo_n "(cached) " >&6
6385 else
6386   case $DIRNAME in
6387   [\\/]* | ?:[\\/]*)
6388   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6389   ;;
6390   *)
6391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392 for as_dir in $PATH
6393 do
6394   IFS=$as_save_IFS
6395   test -z "$as_dir" && as_dir=.
6396     for ac_exec_ext in '' $ac_executable_extensions; do
6397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6398     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6400     break 2
6401   fi
6402 done
6403   done
6404 IFS=$as_save_IFS
6405 
6406   ;;
6407 esac
6408 fi
6409 DIRNAME=$ac_cv_path_DIRNAME
6410 if test -n "$DIRNAME"; then
6411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6412 $as_echo "$DIRNAME" >&6; }
6413 else
6414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6415 $as_echo "no" >&6; }
6416 fi
6417 
6418 
6419   test -n "$DIRNAME" && break
6420 done
6421 
6422     else
6423       # If it succeeded, then it was overridden by the user. We will use it
6424       # for the tool.
6425 
6426       # First remove it from the list of overridden variables, so we can test
6427       # for unknown variables in the end.
6428       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6429 
6430       # Check if the provided tool contains a complete path.
6431       tool_specified="$DIRNAME"
6432       tool_basename="${tool_specified##*/}"
6433       if test "x$tool_basename" = "x$tool_specified"; then
6434         # A command without a complete path is provided, search $PATH.
6435         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6436 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6437         # Extract the first word of "$tool_basename", so it can be a program name with args.
6438 set dummy $tool_basename; ac_word=$2
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6440 $as_echo_n "checking for $ac_word... " >&6; }
6441 if ${ac_cv_path_DIRNAME+:} false; then :
6442   $as_echo_n "(cached) " >&6
6443 else
6444   case $DIRNAME in
6445   [\\/]* | ?:[\\/]*)
6446   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6447   ;;
6448   *)
6449   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450 for as_dir in $PATH
6451 do
6452   IFS=$as_save_IFS
6453   test -z "$as_dir" && as_dir=.
6454     for ac_exec_ext in '' $ac_executable_extensions; do
6455   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458     break 2
6459   fi
6460 done
6461   done
6462 IFS=$as_save_IFS
6463 
6464   ;;
6465 esac
6466 fi
6467 DIRNAME=$ac_cv_path_DIRNAME
6468 if test -n "$DIRNAME"; then
6469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6470 $as_echo "$DIRNAME" >&6; }
6471 else
6472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473 $as_echo "no" >&6; }
6474 fi
6475 
6476 
6477         if test "x$DIRNAME" = x; then
6478           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6479         fi
6480       else
6481         # Otherwise we believe it is a complete path. Use it as it is.
6482         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6483 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6484         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6485 $as_echo_n "checking for DIRNAME... " >&6; }
6486         if test ! -x "$tool_specified"; then
6487           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6488 $as_echo "not found" >&6; }
6489           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6490         fi
6491         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6492 $as_echo "$tool_specified" >&6; }
6493       fi
6494     fi
6495   fi
6496 
6497 
6498 
6499   if test "x$DIRNAME" = x; then
6500     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6501   fi
6502 
6503 
6504 
6505 
6506 
6507   # Publish this variable in the help.
6508 
6509 
6510   if test "x$ECHO" = x; then
6511     # The variable is not set by user, try to locate tool using the code snippet
6512     for ac_prog in echo
6513 do
6514   # Extract the first word of "$ac_prog", so it can be a program name with args.
6515 set dummy $ac_prog; ac_word=$2
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517 $as_echo_n "checking for $ac_word... " >&6; }
6518 if ${ac_cv_path_ECHO+:} false; then :
6519   $as_echo_n "(cached) " >&6
6520 else
6521   case $ECHO in
6522   [\\/]* | ?:[\\/]*)
6523   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6524   ;;
6525   *)
6526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527 for as_dir in $PATH
6528 do
6529   IFS=$as_save_IFS
6530   test -z "$as_dir" && as_dir=.
6531     for ac_exec_ext in '' $ac_executable_extensions; do
6532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535     break 2
6536   fi
6537 done
6538   done
6539 IFS=$as_save_IFS
6540 
6541   ;;
6542 esac
6543 fi
6544 ECHO=$ac_cv_path_ECHO
6545 if test -n "$ECHO"; then
6546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6547 $as_echo "$ECHO" >&6; }
6548 else
6549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550 $as_echo "no" >&6; }
6551 fi
6552 
6553 
6554   test -n "$ECHO" && break
6555 done
6556 
6557   else
6558     # The variable is set, but is it from the command line or the environment?
6559 
6560     # Try to remove the string !ECHO! from our list.
6561     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6562     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6563       # If it failed, the variable was not from the command line. Ignore it,
6564       # but warn the user (except for BASH, which is always set by the calling BASH).
6565       if test "xECHO" != xBASH; then
6566         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6567 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6568       fi
6569       # Try to locate tool using the code snippet
6570       for ac_prog in echo
6571 do
6572   # Extract the first word of "$ac_prog", so it can be a program name with args.
6573 set dummy $ac_prog; ac_word=$2
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6575 $as_echo_n "checking for $ac_word... " >&6; }
6576 if ${ac_cv_path_ECHO+:} false; then :
6577   $as_echo_n "(cached) " >&6
6578 else
6579   case $ECHO in
6580   [\\/]* | ?:[\\/]*)
6581   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6582   ;;
6583   *)
6584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6585 for as_dir in $PATH
6586 do
6587   IFS=$as_save_IFS
6588   test -z "$as_dir" && as_dir=.
6589     for ac_exec_ext in '' $ac_executable_extensions; do
6590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6591     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6593     break 2
6594   fi
6595 done
6596   done
6597 IFS=$as_save_IFS
6598 
6599   ;;
6600 esac
6601 fi
6602 ECHO=$ac_cv_path_ECHO
6603 if test -n "$ECHO"; then
6604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6605 $as_echo "$ECHO" >&6; }
6606 else
6607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6608 $as_echo "no" >&6; }
6609 fi
6610 
6611 
6612   test -n "$ECHO" && break
6613 done
6614 
6615     else
6616       # If it succeeded, then it was overridden by the user. We will use it
6617       # for the tool.
6618 
6619       # First remove it from the list of overridden variables, so we can test
6620       # for unknown variables in the end.
6621       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6622 
6623       # Check if the provided tool contains a complete path.
6624       tool_specified="$ECHO"
6625       tool_basename="${tool_specified##*/}"
6626       if test "x$tool_basename" = "x$tool_specified"; then
6627         # A command without a complete path is provided, search $PATH.
6628         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6629 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6630         # Extract the first word of "$tool_basename", so it can be a program name with args.
6631 set dummy $tool_basename; ac_word=$2
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6633 $as_echo_n "checking for $ac_word... " >&6; }
6634 if ${ac_cv_path_ECHO+:} false; then :
6635   $as_echo_n "(cached) " >&6
6636 else
6637   case $ECHO in
6638   [\\/]* | ?:[\\/]*)
6639   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6640   ;;
6641   *)
6642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6643 for as_dir in $PATH
6644 do
6645   IFS=$as_save_IFS
6646   test -z "$as_dir" && as_dir=.
6647     for ac_exec_ext in '' $ac_executable_extensions; do
6648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6649     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6651     break 2
6652   fi
6653 done
6654   done
6655 IFS=$as_save_IFS
6656 
6657   ;;
6658 esac
6659 fi
6660 ECHO=$ac_cv_path_ECHO
6661 if test -n "$ECHO"; then
6662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6663 $as_echo "$ECHO" >&6; }
6664 else
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6666 $as_echo "no" >&6; }
6667 fi
6668 
6669 
6670         if test "x$ECHO" = x; then
6671           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6672         fi
6673       else
6674         # Otherwise we believe it is a complete path. Use it as it is.
6675         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6676 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6678 $as_echo_n "checking for ECHO... " >&6; }
6679         if test ! -x "$tool_specified"; then
6680           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6681 $as_echo "not found" >&6; }
6682           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6683         fi
6684         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6685 $as_echo "$tool_specified" >&6; }
6686       fi
6687     fi
6688   fi
6689 
6690 
6691 
6692   if test "x$ECHO" = x; then
6693     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6694   fi
6695 
6696 
6697 
6698 
6699 
6700   # Publish this variable in the help.
6701 
6702 
6703   if test "x$EXPR" = x; then
6704     # The variable is not set by user, try to locate tool using the code snippet
6705     for ac_prog in expr
6706 do
6707   # Extract the first word of "$ac_prog", so it can be a program name with args.
6708 set dummy $ac_prog; ac_word=$2
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6710 $as_echo_n "checking for $ac_word... " >&6; }
6711 if ${ac_cv_path_EXPR+:} false; then :
6712   $as_echo_n "(cached) " >&6
6713 else
6714   case $EXPR in
6715   [\\/]* | ?:[\\/]*)
6716   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6717   ;;
6718   *)
6719   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6720 for as_dir in $PATH
6721 do
6722   IFS=$as_save_IFS
6723   test -z "$as_dir" && as_dir=.
6724     for ac_exec_ext in '' $ac_executable_extensions; do
6725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6726     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6728     break 2
6729   fi
6730 done
6731   done
6732 IFS=$as_save_IFS
6733 
6734   ;;
6735 esac
6736 fi
6737 EXPR=$ac_cv_path_EXPR
6738 if test -n "$EXPR"; then
6739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6740 $as_echo "$EXPR" >&6; }
6741 else
6742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6743 $as_echo "no" >&6; }
6744 fi
6745 
6746 
6747   test -n "$EXPR" && break
6748 done
6749 
6750   else
6751     # The variable is set, but is it from the command line or the environment?
6752 
6753     # Try to remove the string !EXPR! from our list.
6754     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6755     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6756       # If it failed, the variable was not from the command line. Ignore it,
6757       # but warn the user (except for BASH, which is always set by the calling BASH).
6758       if test "xEXPR" != xBASH; then
6759         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6760 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6761       fi
6762       # Try to locate tool using the code snippet
6763       for ac_prog in expr
6764 do
6765   # Extract the first word of "$ac_prog", so it can be a program name with args.
6766 set dummy $ac_prog; ac_word=$2
6767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6768 $as_echo_n "checking for $ac_word... " >&6; }
6769 if ${ac_cv_path_EXPR+:} false; then :
6770   $as_echo_n "(cached) " >&6
6771 else
6772   case $EXPR in
6773   [\\/]* | ?:[\\/]*)
6774   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6775   ;;
6776   *)
6777   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6778 for as_dir in $PATH
6779 do
6780   IFS=$as_save_IFS
6781   test -z "$as_dir" && as_dir=.
6782     for ac_exec_ext in '' $ac_executable_extensions; do
6783   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6784     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6785     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6786     break 2
6787   fi
6788 done
6789   done
6790 IFS=$as_save_IFS
6791 
6792   ;;
6793 esac
6794 fi
6795 EXPR=$ac_cv_path_EXPR
6796 if test -n "$EXPR"; then
6797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6798 $as_echo "$EXPR" >&6; }
6799 else
6800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6801 $as_echo "no" >&6; }
6802 fi
6803 
6804 
6805   test -n "$EXPR" && break
6806 done
6807 
6808     else
6809       # If it succeeded, then it was overridden by the user. We will use it
6810       # for the tool.
6811 
6812       # First remove it from the list of overridden variables, so we can test
6813       # for unknown variables in the end.
6814       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6815 
6816       # Check if the provided tool contains a complete path.
6817       tool_specified="$EXPR"
6818       tool_basename="${tool_specified##*/}"
6819       if test "x$tool_basename" = "x$tool_specified"; then
6820         # A command without a complete path is provided, search $PATH.
6821         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6822 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6823         # Extract the first word of "$tool_basename", so it can be a program name with args.
6824 set dummy $tool_basename; ac_word=$2
6825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6826 $as_echo_n "checking for $ac_word... " >&6; }
6827 if ${ac_cv_path_EXPR+:} false; then :
6828   $as_echo_n "(cached) " >&6
6829 else
6830   case $EXPR in
6831   [\\/]* | ?:[\\/]*)
6832   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6833   ;;
6834   *)
6835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6836 for as_dir in $PATH
6837 do
6838   IFS=$as_save_IFS
6839   test -z "$as_dir" && as_dir=.
6840     for ac_exec_ext in '' $ac_executable_extensions; do
6841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6842     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6844     break 2
6845   fi
6846 done
6847   done
6848 IFS=$as_save_IFS
6849 
6850   ;;
6851 esac
6852 fi
6853 EXPR=$ac_cv_path_EXPR
6854 if test -n "$EXPR"; then
6855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6856 $as_echo "$EXPR" >&6; }
6857 else
6858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6859 $as_echo "no" >&6; }
6860 fi
6861 
6862 
6863         if test "x$EXPR" = x; then
6864           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6865         fi
6866       else
6867         # Otherwise we believe it is a complete path. Use it as it is.
6868         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6869 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6870         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6871 $as_echo_n "checking for EXPR... " >&6; }
6872         if test ! -x "$tool_specified"; then
6873           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6874 $as_echo "not found" >&6; }
6875           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6876         fi
6877         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6878 $as_echo "$tool_specified" >&6; }
6879       fi
6880     fi
6881   fi
6882 
6883 
6884 
6885   if test "x$EXPR" = x; then
6886     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6887   fi
6888 
6889 
6890 
6891 
6892 
6893   # Publish this variable in the help.
6894 
6895 
6896   if test "x$FILE" = x; then
6897     # The variable is not set by user, try to locate tool using the code snippet
6898     for ac_prog in file
6899 do
6900   # Extract the first word of "$ac_prog", so it can be a program name with args.
6901 set dummy $ac_prog; ac_word=$2
6902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6903 $as_echo_n "checking for $ac_word... " >&6; }
6904 if ${ac_cv_path_FILE+:} false; then :
6905   $as_echo_n "(cached) " >&6
6906 else
6907   case $FILE in
6908   [\\/]* | ?:[\\/]*)
6909   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6910   ;;
6911   *)
6912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6913 for as_dir in $PATH
6914 do
6915   IFS=$as_save_IFS
6916   test -z "$as_dir" && as_dir=.
6917     for ac_exec_ext in '' $ac_executable_extensions; do
6918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6919     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6921     break 2
6922   fi
6923 done
6924   done
6925 IFS=$as_save_IFS
6926 
6927   ;;
6928 esac
6929 fi
6930 FILE=$ac_cv_path_FILE
6931 if test -n "$FILE"; then
6932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6933 $as_echo "$FILE" >&6; }
6934 else
6935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6936 $as_echo "no" >&6; }
6937 fi
6938 
6939 
6940   test -n "$FILE" && break
6941 done
6942 
6943   else
6944     # The variable is set, but is it from the command line or the environment?
6945 
6946     # Try to remove the string !FILE! from our list.
6947     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6948     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6949       # If it failed, the variable was not from the command line. Ignore it,
6950       # but warn the user (except for BASH, which is always set by the calling BASH).
6951       if test "xFILE" != xBASH; then
6952         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6953 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6954       fi
6955       # Try to locate tool using the code snippet
6956       for ac_prog in file
6957 do
6958   # Extract the first word of "$ac_prog", so it can be a program name with args.
6959 set dummy $ac_prog; ac_word=$2
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6961 $as_echo_n "checking for $ac_word... " >&6; }
6962 if ${ac_cv_path_FILE+:} false; then :
6963   $as_echo_n "(cached) " >&6
6964 else
6965   case $FILE in
6966   [\\/]* | ?:[\\/]*)
6967   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6968   ;;
6969   *)
6970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6971 for as_dir in $PATH
6972 do
6973   IFS=$as_save_IFS
6974   test -z "$as_dir" && as_dir=.
6975     for ac_exec_ext in '' $ac_executable_extensions; do
6976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6977     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6979     break 2
6980   fi
6981 done
6982   done
6983 IFS=$as_save_IFS
6984 
6985   ;;
6986 esac
6987 fi
6988 FILE=$ac_cv_path_FILE
6989 if test -n "$FILE"; then
6990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6991 $as_echo "$FILE" >&6; }
6992 else
6993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6994 $as_echo "no" >&6; }
6995 fi
6996 
6997 
6998   test -n "$FILE" && break
6999 done
7000 
7001     else
7002       # If it succeeded, then it was overridden by the user. We will use it
7003       # for the tool.
7004 
7005       # First remove it from the list of overridden variables, so we can test
7006       # for unknown variables in the end.
7007       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7008 
7009       # Check if the provided tool contains a complete path.
7010       tool_specified="$FILE"
7011       tool_basename="${tool_specified##*/}"
7012       if test "x$tool_basename" = "x$tool_specified"; then
7013         # A command without a complete path is provided, search $PATH.
7014         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7015 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7016         # Extract the first word of "$tool_basename", so it can be a program name with args.
7017 set dummy $tool_basename; ac_word=$2
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7019 $as_echo_n "checking for $ac_word... " >&6; }
7020 if ${ac_cv_path_FILE+:} false; then :
7021   $as_echo_n "(cached) " >&6
7022 else
7023   case $FILE in
7024   [\\/]* | ?:[\\/]*)
7025   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7026   ;;
7027   *)
7028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7029 for as_dir in $PATH
7030 do
7031   IFS=$as_save_IFS
7032   test -z "$as_dir" && as_dir=.
7033     for ac_exec_ext in '' $ac_executable_extensions; do
7034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7035     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7037     break 2
7038   fi
7039 done
7040   done
7041 IFS=$as_save_IFS
7042 
7043   ;;
7044 esac
7045 fi
7046 FILE=$ac_cv_path_FILE
7047 if test -n "$FILE"; then
7048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7049 $as_echo "$FILE" >&6; }
7050 else
7051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7052 $as_echo "no" >&6; }
7053 fi
7054 
7055 
7056         if test "x$FILE" = x; then
7057           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7058         fi
7059       else
7060         # Otherwise we believe it is a complete path. Use it as it is.
7061         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7062 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7063         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7064 $as_echo_n "checking for FILE... " >&6; }
7065         if test ! -x "$tool_specified"; then
7066           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7067 $as_echo "not found" >&6; }
7068           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7069         fi
7070         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7071 $as_echo "$tool_specified" >&6; }
7072       fi
7073     fi
7074   fi
7075 
7076 
7077 
7078   if test "x$FILE" = x; then
7079     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7080   fi
7081 
7082 
7083 
7084 
7085 
7086   # Publish this variable in the help.
7087 
7088 
7089   if test "x$FIND" = x; then
7090     # The variable is not set by user, try to locate tool using the code snippet
7091     for ac_prog in find
7092 do
7093   # Extract the first word of "$ac_prog", so it can be a program name with args.
7094 set dummy $ac_prog; ac_word=$2
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7096 $as_echo_n "checking for $ac_word... " >&6; }
7097 if ${ac_cv_path_FIND+:} false; then :
7098   $as_echo_n "(cached) " >&6
7099 else
7100   case $FIND in
7101   [\\/]* | ?:[\\/]*)
7102   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7103   ;;
7104   *)
7105   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7106 for as_dir in $PATH
7107 do
7108   IFS=$as_save_IFS
7109   test -z "$as_dir" && as_dir=.
7110     for ac_exec_ext in '' $ac_executable_extensions; do
7111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7112     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7114     break 2
7115   fi
7116 done
7117   done
7118 IFS=$as_save_IFS
7119 
7120   ;;
7121 esac
7122 fi
7123 FIND=$ac_cv_path_FIND
7124 if test -n "$FIND"; then
7125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7126 $as_echo "$FIND" >&6; }
7127 else
7128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7129 $as_echo "no" >&6; }
7130 fi
7131 
7132 
7133   test -n "$FIND" && break
7134 done
7135 
7136   else
7137     # The variable is set, but is it from the command line or the environment?
7138 
7139     # Try to remove the string !FIND! from our list.
7140     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7141     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7142       # If it failed, the variable was not from the command line. Ignore it,
7143       # but warn the user (except for BASH, which is always set by the calling BASH).
7144       if test "xFIND" != xBASH; then
7145         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7146 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7147       fi
7148       # Try to locate tool using the code snippet
7149       for ac_prog in find
7150 do
7151   # Extract the first word of "$ac_prog", so it can be a program name with args.
7152 set dummy $ac_prog; ac_word=$2
7153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7154 $as_echo_n "checking for $ac_word... " >&6; }
7155 if ${ac_cv_path_FIND+:} false; then :
7156   $as_echo_n "(cached) " >&6
7157 else
7158   case $FIND in
7159   [\\/]* | ?:[\\/]*)
7160   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7161   ;;
7162   *)
7163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164 for as_dir in $PATH
7165 do
7166   IFS=$as_save_IFS
7167   test -z "$as_dir" && as_dir=.
7168     for ac_exec_ext in '' $ac_executable_extensions; do
7169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7170     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7172     break 2
7173   fi
7174 done
7175   done
7176 IFS=$as_save_IFS
7177 
7178   ;;
7179 esac
7180 fi
7181 FIND=$ac_cv_path_FIND
7182 if test -n "$FIND"; then
7183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7184 $as_echo "$FIND" >&6; }
7185 else
7186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7187 $as_echo "no" >&6; }
7188 fi
7189 
7190 
7191   test -n "$FIND" && break
7192 done
7193 
7194     else
7195       # If it succeeded, then it was overridden by the user. We will use it
7196       # for the tool.
7197 
7198       # First remove it from the list of overridden variables, so we can test
7199       # for unknown variables in the end.
7200       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7201 
7202       # Check if the provided tool contains a complete path.
7203       tool_specified="$FIND"
7204       tool_basename="${tool_specified##*/}"
7205       if test "x$tool_basename" = "x$tool_specified"; then
7206         # A command without a complete path is provided, search $PATH.
7207         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7208 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7209         # Extract the first word of "$tool_basename", so it can be a program name with args.
7210 set dummy $tool_basename; ac_word=$2
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7212 $as_echo_n "checking for $ac_word... " >&6; }
7213 if ${ac_cv_path_FIND+:} false; then :
7214   $as_echo_n "(cached) " >&6
7215 else
7216   case $FIND in
7217   [\\/]* | ?:[\\/]*)
7218   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7219   ;;
7220   *)
7221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222 for as_dir in $PATH
7223 do
7224   IFS=$as_save_IFS
7225   test -z "$as_dir" && as_dir=.
7226     for ac_exec_ext in '' $ac_executable_extensions; do
7227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7230     break 2
7231   fi
7232 done
7233   done
7234 IFS=$as_save_IFS
7235 
7236   ;;
7237 esac
7238 fi
7239 FIND=$ac_cv_path_FIND
7240 if test -n "$FIND"; then
7241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7242 $as_echo "$FIND" >&6; }
7243 else
7244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245 $as_echo "no" >&6; }
7246 fi
7247 
7248 
7249         if test "x$FIND" = x; then
7250           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7251         fi
7252       else
7253         # Otherwise we believe it is a complete path. Use it as it is.
7254         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7255 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7257 $as_echo_n "checking for FIND... " >&6; }
7258         if test ! -x "$tool_specified"; then
7259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7260 $as_echo "not found" >&6; }
7261           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7262         fi
7263         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7264 $as_echo "$tool_specified" >&6; }
7265       fi
7266     fi
7267   fi
7268 
7269 
7270 
7271   if test "x$FIND" = x; then
7272     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7273   fi
7274 
7275 
7276 
7277 
7278 
7279   # Publish this variable in the help.
7280 
7281 
7282   if test "x$HEAD" = x; then
7283     # The variable is not set by user, try to locate tool using the code snippet
7284     for ac_prog in head
7285 do
7286   # Extract the first word of "$ac_prog", so it can be a program name with args.
7287 set dummy $ac_prog; ac_word=$2
7288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7289 $as_echo_n "checking for $ac_word... " >&6; }
7290 if ${ac_cv_path_HEAD+:} false; then :
7291   $as_echo_n "(cached) " >&6
7292 else
7293   case $HEAD in
7294   [\\/]* | ?:[\\/]*)
7295   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7296   ;;
7297   *)
7298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299 for as_dir in $PATH
7300 do
7301   IFS=$as_save_IFS
7302   test -z "$as_dir" && as_dir=.
7303     for ac_exec_ext in '' $ac_executable_extensions; do
7304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307     break 2
7308   fi
7309 done
7310   done
7311 IFS=$as_save_IFS
7312 
7313   ;;
7314 esac
7315 fi
7316 HEAD=$ac_cv_path_HEAD
7317 if test -n "$HEAD"; then
7318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7319 $as_echo "$HEAD" >&6; }
7320 else
7321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7322 $as_echo "no" >&6; }
7323 fi
7324 
7325 
7326   test -n "$HEAD" && break
7327 done
7328 
7329   else
7330     # The variable is set, but is it from the command line or the environment?
7331 
7332     # Try to remove the string !HEAD! from our list.
7333     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7334     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7335       # If it failed, the variable was not from the command line. Ignore it,
7336       # but warn the user (except for BASH, which is always set by the calling BASH).
7337       if test "xHEAD" != xBASH; then
7338         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7339 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7340       fi
7341       # Try to locate tool using the code snippet
7342       for ac_prog in head
7343 do
7344   # Extract the first word of "$ac_prog", so it can be a program name with args.
7345 set dummy $ac_prog; ac_word=$2
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7347 $as_echo_n "checking for $ac_word... " >&6; }
7348 if ${ac_cv_path_HEAD+:} false; then :
7349   $as_echo_n "(cached) " >&6
7350 else
7351   case $HEAD in
7352   [\\/]* | ?:[\\/]*)
7353   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7354   ;;
7355   *)
7356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7357 for as_dir in $PATH
7358 do
7359   IFS=$as_save_IFS
7360   test -z "$as_dir" && as_dir=.
7361     for ac_exec_ext in '' $ac_executable_extensions; do
7362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7363     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7365     break 2
7366   fi
7367 done
7368   done
7369 IFS=$as_save_IFS
7370 
7371   ;;
7372 esac
7373 fi
7374 HEAD=$ac_cv_path_HEAD
7375 if test -n "$HEAD"; then
7376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7377 $as_echo "$HEAD" >&6; }
7378 else
7379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7380 $as_echo "no" >&6; }
7381 fi
7382 
7383 
7384   test -n "$HEAD" && break
7385 done
7386 
7387     else
7388       # If it succeeded, then it was overridden by the user. We will use it
7389       # for the tool.
7390 
7391       # First remove it from the list of overridden variables, so we can test
7392       # for unknown variables in the end.
7393       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7394 
7395       # Check if the provided tool contains a complete path.
7396       tool_specified="$HEAD"
7397       tool_basename="${tool_specified##*/}"
7398       if test "x$tool_basename" = "x$tool_specified"; then
7399         # A command without a complete path is provided, search $PATH.
7400         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7401 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7402         # Extract the first word of "$tool_basename", so it can be a program name with args.
7403 set dummy $tool_basename; ac_word=$2
7404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7405 $as_echo_n "checking for $ac_word... " >&6; }
7406 if ${ac_cv_path_HEAD+:} false; then :
7407   $as_echo_n "(cached) " >&6
7408 else
7409   case $HEAD in
7410   [\\/]* | ?:[\\/]*)
7411   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7412   ;;
7413   *)
7414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7415 for as_dir in $PATH
7416 do
7417   IFS=$as_save_IFS
7418   test -z "$as_dir" && as_dir=.
7419     for ac_exec_ext in '' $ac_executable_extensions; do
7420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7421     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7423     break 2
7424   fi
7425 done
7426   done
7427 IFS=$as_save_IFS
7428 
7429   ;;
7430 esac
7431 fi
7432 HEAD=$ac_cv_path_HEAD
7433 if test -n "$HEAD"; then
7434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7435 $as_echo "$HEAD" >&6; }
7436 else
7437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7438 $as_echo "no" >&6; }
7439 fi
7440 
7441 
7442         if test "x$HEAD" = x; then
7443           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7444         fi
7445       else
7446         # Otherwise we believe it is a complete path. Use it as it is.
7447         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7448 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7449         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7450 $as_echo_n "checking for HEAD... " >&6; }
7451         if test ! -x "$tool_specified"; then
7452           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7453 $as_echo "not found" >&6; }
7454           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7455         fi
7456         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7457 $as_echo "$tool_specified" >&6; }
7458       fi
7459     fi
7460   fi
7461 
7462 
7463 
7464   if test "x$HEAD" = x; then
7465     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7466   fi
7467 
7468 
7469 
7470 
7471 
7472   # Publish this variable in the help.
7473 
7474 
7475   if test "x$LN" = x; then
7476     # The variable is not set by user, try to locate tool using the code snippet
7477     for ac_prog in ln
7478 do
7479   # Extract the first word of "$ac_prog", so it can be a program name with args.
7480 set dummy $ac_prog; ac_word=$2
7481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7482 $as_echo_n "checking for $ac_word... " >&6; }
7483 if ${ac_cv_path_LN+:} false; then :
7484   $as_echo_n "(cached) " >&6
7485 else
7486   case $LN in
7487   [\\/]* | ?:[\\/]*)
7488   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7489   ;;
7490   *)
7491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7492 for as_dir in $PATH
7493 do
7494   IFS=$as_save_IFS
7495   test -z "$as_dir" && as_dir=.
7496     for ac_exec_ext in '' $ac_executable_extensions; do
7497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7498     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7500     break 2
7501   fi
7502 done
7503   done
7504 IFS=$as_save_IFS
7505 
7506   ;;
7507 esac
7508 fi
7509 LN=$ac_cv_path_LN
7510 if test -n "$LN"; then
7511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7512 $as_echo "$LN" >&6; }
7513 else
7514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7515 $as_echo "no" >&6; }
7516 fi
7517 
7518 
7519   test -n "$LN" && break
7520 done
7521 
7522   else
7523     # The variable is set, but is it from the command line or the environment?
7524 
7525     # Try to remove the string !LN! from our list.
7526     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7527     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7528       # If it failed, the variable was not from the command line. Ignore it,
7529       # but warn the user (except for BASH, which is always set by the calling BASH).
7530       if test "xLN" != xBASH; then
7531         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7532 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7533       fi
7534       # Try to locate tool using the code snippet
7535       for ac_prog in ln
7536 do
7537   # Extract the first word of "$ac_prog", so it can be a program name with args.
7538 set dummy $ac_prog; ac_word=$2
7539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7540 $as_echo_n "checking for $ac_word... " >&6; }
7541 if ${ac_cv_path_LN+:} false; then :
7542   $as_echo_n "(cached) " >&6
7543 else
7544   case $LN in
7545   [\\/]* | ?:[\\/]*)
7546   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7547   ;;
7548   *)
7549   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7550 for as_dir in $PATH
7551 do
7552   IFS=$as_save_IFS
7553   test -z "$as_dir" && as_dir=.
7554     for ac_exec_ext in '' $ac_executable_extensions; do
7555   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7556     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7558     break 2
7559   fi
7560 done
7561   done
7562 IFS=$as_save_IFS
7563 
7564   ;;
7565 esac
7566 fi
7567 LN=$ac_cv_path_LN
7568 if test -n "$LN"; then
7569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7570 $as_echo "$LN" >&6; }
7571 else
7572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7573 $as_echo "no" >&6; }
7574 fi
7575 
7576 
7577   test -n "$LN" && break
7578 done
7579 
7580     else
7581       # If it succeeded, then it was overridden by the user. We will use it
7582       # for the tool.
7583 
7584       # First remove it from the list of overridden variables, so we can test
7585       # for unknown variables in the end.
7586       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7587 
7588       # Check if the provided tool contains a complete path.
7589       tool_specified="$LN"
7590       tool_basename="${tool_specified##*/}"
7591       if test "x$tool_basename" = "x$tool_specified"; then
7592         # A command without a complete path is provided, search $PATH.
7593         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7594 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7595         # Extract the first word of "$tool_basename", so it can be a program name with args.
7596 set dummy $tool_basename; ac_word=$2
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7598 $as_echo_n "checking for $ac_word... " >&6; }
7599 if ${ac_cv_path_LN+:} false; then :
7600   $as_echo_n "(cached) " >&6
7601 else
7602   case $LN in
7603   [\\/]* | ?:[\\/]*)
7604   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7605   ;;
7606   *)
7607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7608 for as_dir in $PATH
7609 do
7610   IFS=$as_save_IFS
7611   test -z "$as_dir" && as_dir=.
7612     for ac_exec_ext in '' $ac_executable_extensions; do
7613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7614     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7616     break 2
7617   fi
7618 done
7619   done
7620 IFS=$as_save_IFS
7621 
7622   ;;
7623 esac
7624 fi
7625 LN=$ac_cv_path_LN
7626 if test -n "$LN"; then
7627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7628 $as_echo "$LN" >&6; }
7629 else
7630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7631 $as_echo "no" >&6; }
7632 fi
7633 
7634 
7635         if test "x$LN" = x; then
7636           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7637         fi
7638       else
7639         # Otherwise we believe it is a complete path. Use it as it is.
7640         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7641 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7642         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7643 $as_echo_n "checking for LN... " >&6; }
7644         if test ! -x "$tool_specified"; then
7645           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7646 $as_echo "not found" >&6; }
7647           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7648         fi
7649         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7650 $as_echo "$tool_specified" >&6; }
7651       fi
7652     fi
7653   fi
7654 
7655 
7656 
7657   if test "x$LN" = x; then
7658     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7659   fi
7660 
7661 
7662 
7663 
7664 
7665   # Publish this variable in the help.
7666 
7667 
7668   if test "x$LS" = x; then
7669     # The variable is not set by user, try to locate tool using the code snippet
7670     for ac_prog in ls
7671 do
7672   # Extract the first word of "$ac_prog", so it can be a program name with args.
7673 set dummy $ac_prog; ac_word=$2
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675 $as_echo_n "checking for $ac_word... " >&6; }
7676 if ${ac_cv_path_LS+:} false; then :
7677   $as_echo_n "(cached) " >&6
7678 else
7679   case $LS in
7680   [\\/]* | ?:[\\/]*)
7681   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7682   ;;
7683   *)
7684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7685 for as_dir in $PATH
7686 do
7687   IFS=$as_save_IFS
7688   test -z "$as_dir" && as_dir=.
7689     for ac_exec_ext in '' $ac_executable_extensions; do
7690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7691     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7693     break 2
7694   fi
7695 done
7696   done
7697 IFS=$as_save_IFS
7698 
7699   ;;
7700 esac
7701 fi
7702 LS=$ac_cv_path_LS
7703 if test -n "$LS"; then
7704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7705 $as_echo "$LS" >&6; }
7706 else
7707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708 $as_echo "no" >&6; }
7709 fi
7710 
7711 
7712   test -n "$LS" && break
7713 done
7714 
7715   else
7716     # The variable is set, but is it from the command line or the environment?
7717 
7718     # Try to remove the string !LS! from our list.
7719     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7720     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7721       # If it failed, the variable was not from the command line. Ignore it,
7722       # but warn the user (except for BASH, which is always set by the calling BASH).
7723       if test "xLS" != xBASH; then
7724         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7725 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7726       fi
7727       # Try to locate tool using the code snippet
7728       for ac_prog in ls
7729 do
7730   # Extract the first word of "$ac_prog", so it can be a program name with args.
7731 set dummy $ac_prog; ac_word=$2
7732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7733 $as_echo_n "checking for $ac_word... " >&6; }
7734 if ${ac_cv_path_LS+:} false; then :
7735   $as_echo_n "(cached) " >&6
7736 else
7737   case $LS in
7738   [\\/]* | ?:[\\/]*)
7739   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7740   ;;
7741   *)
7742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7743 for as_dir in $PATH
7744 do
7745   IFS=$as_save_IFS
7746   test -z "$as_dir" && as_dir=.
7747     for ac_exec_ext in '' $ac_executable_extensions; do
7748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7749     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7751     break 2
7752   fi
7753 done
7754   done
7755 IFS=$as_save_IFS
7756 
7757   ;;
7758 esac
7759 fi
7760 LS=$ac_cv_path_LS
7761 if test -n "$LS"; then
7762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7763 $as_echo "$LS" >&6; }
7764 else
7765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7766 $as_echo "no" >&6; }
7767 fi
7768 
7769 
7770   test -n "$LS" && break
7771 done
7772 
7773     else
7774       # If it succeeded, then it was overridden by the user. We will use it
7775       # for the tool.
7776 
7777       # First remove it from the list of overridden variables, so we can test
7778       # for unknown variables in the end.
7779       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7780 
7781       # Check if the provided tool contains a complete path.
7782       tool_specified="$LS"
7783       tool_basename="${tool_specified##*/}"
7784       if test "x$tool_basename" = "x$tool_specified"; then
7785         # A command without a complete path is provided, search $PATH.
7786         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7787 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7788         # Extract the first word of "$tool_basename", so it can be a program name with args.
7789 set dummy $tool_basename; ac_word=$2
7790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7791 $as_echo_n "checking for $ac_word... " >&6; }
7792 if ${ac_cv_path_LS+:} false; then :
7793   $as_echo_n "(cached) " >&6
7794 else
7795   case $LS in
7796   [\\/]* | ?:[\\/]*)
7797   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7798   ;;
7799   *)
7800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7801 for as_dir in $PATH
7802 do
7803   IFS=$as_save_IFS
7804   test -z "$as_dir" && as_dir=.
7805     for ac_exec_ext in '' $ac_executable_extensions; do
7806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7807     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7809     break 2
7810   fi
7811 done
7812   done
7813 IFS=$as_save_IFS
7814 
7815   ;;
7816 esac
7817 fi
7818 LS=$ac_cv_path_LS
7819 if test -n "$LS"; then
7820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7821 $as_echo "$LS" >&6; }
7822 else
7823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7824 $as_echo "no" >&6; }
7825 fi
7826 
7827 
7828         if test "x$LS" = x; then
7829           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7830         fi
7831       else
7832         # Otherwise we believe it is a complete path. Use it as it is.
7833         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7834 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7835         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7836 $as_echo_n "checking for LS... " >&6; }
7837         if test ! -x "$tool_specified"; then
7838           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7839 $as_echo "not found" >&6; }
7840           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7841         fi
7842         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7843 $as_echo "$tool_specified" >&6; }
7844       fi
7845     fi
7846   fi
7847 
7848 
7849 
7850   if test "x$LS" = x; then
7851     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7852   fi
7853 
7854 
7855 
7856 
7857 
7858   # Publish this variable in the help.
7859 
7860 
7861   if test "x$MKDIR" = x; then
7862     # The variable is not set by user, try to locate tool using the code snippet
7863     for ac_prog in mkdir
7864 do
7865   # Extract the first word of "$ac_prog", so it can be a program name with args.
7866 set dummy $ac_prog; ac_word=$2
7867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7868 $as_echo_n "checking for $ac_word... " >&6; }
7869 if ${ac_cv_path_MKDIR+:} false; then :
7870   $as_echo_n "(cached) " >&6
7871 else
7872   case $MKDIR in
7873   [\\/]* | ?:[\\/]*)
7874   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7875   ;;
7876   *)
7877   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7878 for as_dir in $PATH
7879 do
7880   IFS=$as_save_IFS
7881   test -z "$as_dir" && as_dir=.
7882     for ac_exec_ext in '' $ac_executable_extensions; do
7883   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7884     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7885     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7886     break 2
7887   fi
7888 done
7889   done
7890 IFS=$as_save_IFS
7891 
7892   ;;
7893 esac
7894 fi
7895 MKDIR=$ac_cv_path_MKDIR
7896 if test -n "$MKDIR"; then
7897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7898 $as_echo "$MKDIR" >&6; }
7899 else
7900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7901 $as_echo "no" >&6; }
7902 fi
7903 
7904 
7905   test -n "$MKDIR" && break
7906 done
7907 
7908   else
7909     # The variable is set, but is it from the command line or the environment?
7910 
7911     # Try to remove the string !MKDIR! from our list.
7912     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7913     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7914       # If it failed, the variable was not from the command line. Ignore it,
7915       # but warn the user (except for BASH, which is always set by the calling BASH).
7916       if test "xMKDIR" != xBASH; then
7917         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7918 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7919       fi
7920       # Try to locate tool using the code snippet
7921       for ac_prog in mkdir
7922 do
7923   # Extract the first word of "$ac_prog", so it can be a program name with args.
7924 set dummy $ac_prog; ac_word=$2
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7926 $as_echo_n "checking for $ac_word... " >&6; }
7927 if ${ac_cv_path_MKDIR+:} false; then :
7928   $as_echo_n "(cached) " >&6
7929 else
7930   case $MKDIR in
7931   [\\/]* | ?:[\\/]*)
7932   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7933   ;;
7934   *)
7935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7936 for as_dir in $PATH
7937 do
7938   IFS=$as_save_IFS
7939   test -z "$as_dir" && as_dir=.
7940     for ac_exec_ext in '' $ac_executable_extensions; do
7941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7942     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7944     break 2
7945   fi
7946 done
7947   done
7948 IFS=$as_save_IFS
7949 
7950   ;;
7951 esac
7952 fi
7953 MKDIR=$ac_cv_path_MKDIR
7954 if test -n "$MKDIR"; then
7955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7956 $as_echo "$MKDIR" >&6; }
7957 else
7958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7959 $as_echo "no" >&6; }
7960 fi
7961 
7962 
7963   test -n "$MKDIR" && break
7964 done
7965 
7966     else
7967       # If it succeeded, then it was overridden by the user. We will use it
7968       # for the tool.
7969 
7970       # First remove it from the list of overridden variables, so we can test
7971       # for unknown variables in the end.
7972       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7973 
7974       # Check if the provided tool contains a complete path.
7975       tool_specified="$MKDIR"
7976       tool_basename="${tool_specified##*/}"
7977       if test "x$tool_basename" = "x$tool_specified"; then
7978         # A command without a complete path is provided, search $PATH.
7979         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7980 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7981         # Extract the first word of "$tool_basename", so it can be a program name with args.
7982 set dummy $tool_basename; ac_word=$2
7983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7984 $as_echo_n "checking for $ac_word... " >&6; }
7985 if ${ac_cv_path_MKDIR+:} false; then :
7986   $as_echo_n "(cached) " >&6
7987 else
7988   case $MKDIR in
7989   [\\/]* | ?:[\\/]*)
7990   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7991   ;;
7992   *)
7993   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7994 for as_dir in $PATH
7995 do
7996   IFS=$as_save_IFS
7997   test -z "$as_dir" && as_dir=.
7998     for ac_exec_ext in '' $ac_executable_extensions; do
7999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8000     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8002     break 2
8003   fi
8004 done
8005   done
8006 IFS=$as_save_IFS
8007 
8008   ;;
8009 esac
8010 fi
8011 MKDIR=$ac_cv_path_MKDIR
8012 if test -n "$MKDIR"; then
8013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8014 $as_echo "$MKDIR" >&6; }
8015 else
8016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8017 $as_echo "no" >&6; }
8018 fi
8019 
8020 
8021         if test "x$MKDIR" = x; then
8022           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8023         fi
8024       else
8025         # Otherwise we believe it is a complete path. Use it as it is.
8026         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8027 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8029 $as_echo_n "checking for MKDIR... " >&6; }
8030         if test ! -x "$tool_specified"; then
8031           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8032 $as_echo "not found" >&6; }
8033           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8034         fi
8035         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8036 $as_echo "$tool_specified" >&6; }
8037       fi
8038     fi
8039   fi
8040 
8041 
8042 
8043   if test "x$MKDIR" = x; then
8044     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8045   fi
8046 
8047 
8048 
8049 
8050 
8051   # Publish this variable in the help.
8052 
8053 
8054   if test "x$MKTEMP" = x; then
8055     # The variable is not set by user, try to locate tool using the code snippet
8056     for ac_prog in mktemp
8057 do
8058   # Extract the first word of "$ac_prog", so it can be a program name with args.
8059 set dummy $ac_prog; ac_word=$2
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8061 $as_echo_n "checking for $ac_word... " >&6; }
8062 if ${ac_cv_path_MKTEMP+:} false; then :
8063   $as_echo_n "(cached) " >&6
8064 else
8065   case $MKTEMP in
8066   [\\/]* | ?:[\\/]*)
8067   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8068   ;;
8069   *)
8070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8071 for as_dir in $PATH
8072 do
8073   IFS=$as_save_IFS
8074   test -z "$as_dir" && as_dir=.
8075     for ac_exec_ext in '' $ac_executable_extensions; do
8076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8077     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8079     break 2
8080   fi
8081 done
8082   done
8083 IFS=$as_save_IFS
8084 
8085   ;;
8086 esac
8087 fi
8088 MKTEMP=$ac_cv_path_MKTEMP
8089 if test -n "$MKTEMP"; then
8090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8091 $as_echo "$MKTEMP" >&6; }
8092 else
8093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8094 $as_echo "no" >&6; }
8095 fi
8096 
8097 
8098   test -n "$MKTEMP" && break
8099 done
8100 
8101   else
8102     # The variable is set, but is it from the command line or the environment?
8103 
8104     # Try to remove the string !MKTEMP! from our list.
8105     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8106     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8107       # If it failed, the variable was not from the command line. Ignore it,
8108       # but warn the user (except for BASH, which is always set by the calling BASH).
8109       if test "xMKTEMP" != xBASH; then
8110         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8111 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8112       fi
8113       # Try to locate tool using the code snippet
8114       for ac_prog in mktemp
8115 do
8116   # Extract the first word of "$ac_prog", so it can be a program name with args.
8117 set dummy $ac_prog; ac_word=$2
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8119 $as_echo_n "checking for $ac_word... " >&6; }
8120 if ${ac_cv_path_MKTEMP+:} false; then :
8121   $as_echo_n "(cached) " >&6
8122 else
8123   case $MKTEMP in
8124   [\\/]* | ?:[\\/]*)
8125   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8126   ;;
8127   *)
8128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8129 for as_dir in $PATH
8130 do
8131   IFS=$as_save_IFS
8132   test -z "$as_dir" && as_dir=.
8133     for ac_exec_ext in '' $ac_executable_extensions; do
8134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8135     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8137     break 2
8138   fi
8139 done
8140   done
8141 IFS=$as_save_IFS
8142 
8143   ;;
8144 esac
8145 fi
8146 MKTEMP=$ac_cv_path_MKTEMP
8147 if test -n "$MKTEMP"; then
8148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8149 $as_echo "$MKTEMP" >&6; }
8150 else
8151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8152 $as_echo "no" >&6; }
8153 fi
8154 
8155 
8156   test -n "$MKTEMP" && break
8157 done
8158 
8159     else
8160       # If it succeeded, then it was overridden by the user. We will use it
8161       # for the tool.
8162 
8163       # First remove it from the list of overridden variables, so we can test
8164       # for unknown variables in the end.
8165       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8166 
8167       # Check if the provided tool contains a complete path.
8168       tool_specified="$MKTEMP"
8169       tool_basename="${tool_specified##*/}"
8170       if test "x$tool_basename" = "x$tool_specified"; then
8171         # A command without a complete path is provided, search $PATH.
8172         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8173 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8174         # Extract the first word of "$tool_basename", so it can be a program name with args.
8175 set dummy $tool_basename; ac_word=$2
8176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8177 $as_echo_n "checking for $ac_word... " >&6; }
8178 if ${ac_cv_path_MKTEMP+:} false; then :
8179   $as_echo_n "(cached) " >&6
8180 else
8181   case $MKTEMP in
8182   [\\/]* | ?:[\\/]*)
8183   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8184   ;;
8185   *)
8186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8187 for as_dir in $PATH
8188 do
8189   IFS=$as_save_IFS
8190   test -z "$as_dir" && as_dir=.
8191     for ac_exec_ext in '' $ac_executable_extensions; do
8192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8193     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8195     break 2
8196   fi
8197 done
8198   done
8199 IFS=$as_save_IFS
8200 
8201   ;;
8202 esac
8203 fi
8204 MKTEMP=$ac_cv_path_MKTEMP
8205 if test -n "$MKTEMP"; then
8206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8207 $as_echo "$MKTEMP" >&6; }
8208 else
8209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8210 $as_echo "no" >&6; }
8211 fi
8212 
8213 
8214         if test "x$MKTEMP" = x; then
8215           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8216         fi
8217       else
8218         # Otherwise we believe it is a complete path. Use it as it is.
8219         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8220 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8221         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8222 $as_echo_n "checking for MKTEMP... " >&6; }
8223         if test ! -x "$tool_specified"; then
8224           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8225 $as_echo "not found" >&6; }
8226           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8227         fi
8228         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8229 $as_echo "$tool_specified" >&6; }
8230       fi
8231     fi
8232   fi
8233 
8234 
8235 
8236   if test "x$MKTEMP" = x; then
8237     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8238   fi
8239 
8240 
8241 
8242 
8243 
8244   # Publish this variable in the help.
8245 
8246 
8247   if test "x$MV" = x; then
8248     # The variable is not set by user, try to locate tool using the code snippet
8249     for ac_prog in mv
8250 do
8251   # Extract the first word of "$ac_prog", so it can be a program name with args.
8252 set dummy $ac_prog; ac_word=$2
8253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8254 $as_echo_n "checking for $ac_word... " >&6; }
8255 if ${ac_cv_path_MV+:} false; then :
8256   $as_echo_n "(cached) " >&6
8257 else
8258   case $MV in
8259   [\\/]* | ?:[\\/]*)
8260   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8261   ;;
8262   *)
8263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8264 for as_dir in $PATH
8265 do
8266   IFS=$as_save_IFS
8267   test -z "$as_dir" && as_dir=.
8268     for ac_exec_ext in '' $ac_executable_extensions; do
8269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8270     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8272     break 2
8273   fi
8274 done
8275   done
8276 IFS=$as_save_IFS
8277 
8278   ;;
8279 esac
8280 fi
8281 MV=$ac_cv_path_MV
8282 if test -n "$MV"; then
8283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8284 $as_echo "$MV" >&6; }
8285 else
8286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8287 $as_echo "no" >&6; }
8288 fi
8289 
8290 
8291   test -n "$MV" && break
8292 done
8293 
8294   else
8295     # The variable is set, but is it from the command line or the environment?
8296 
8297     # Try to remove the string !MV! from our list.
8298     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8299     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8300       # If it failed, the variable was not from the command line. Ignore it,
8301       # but warn the user (except for BASH, which is always set by the calling BASH).
8302       if test "xMV" != xBASH; then
8303         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8304 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8305       fi
8306       # Try to locate tool using the code snippet
8307       for ac_prog in mv
8308 do
8309   # Extract the first word of "$ac_prog", so it can be a program name with args.
8310 set dummy $ac_prog; ac_word=$2
8311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8312 $as_echo_n "checking for $ac_word... " >&6; }
8313 if ${ac_cv_path_MV+:} false; then :
8314   $as_echo_n "(cached) " >&6
8315 else
8316   case $MV in
8317   [\\/]* | ?:[\\/]*)
8318   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8319   ;;
8320   *)
8321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8322 for as_dir in $PATH
8323 do
8324   IFS=$as_save_IFS
8325   test -z "$as_dir" && as_dir=.
8326     for ac_exec_ext in '' $ac_executable_extensions; do
8327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8328     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8330     break 2
8331   fi
8332 done
8333   done
8334 IFS=$as_save_IFS
8335 
8336   ;;
8337 esac
8338 fi
8339 MV=$ac_cv_path_MV
8340 if test -n "$MV"; then
8341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8342 $as_echo "$MV" >&6; }
8343 else
8344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8345 $as_echo "no" >&6; }
8346 fi
8347 
8348 
8349   test -n "$MV" && break
8350 done
8351 
8352     else
8353       # If it succeeded, then it was overridden by the user. We will use it
8354       # for the tool.
8355 
8356       # First remove it from the list of overridden variables, so we can test
8357       # for unknown variables in the end.
8358       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8359 
8360       # Check if the provided tool contains a complete path.
8361       tool_specified="$MV"
8362       tool_basename="${tool_specified##*/}"
8363       if test "x$tool_basename" = "x$tool_specified"; then
8364         # A command without a complete path is provided, search $PATH.
8365         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8366 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8367         # Extract the first word of "$tool_basename", so it can be a program name with args.
8368 set dummy $tool_basename; ac_word=$2
8369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8370 $as_echo_n "checking for $ac_word... " >&6; }
8371 if ${ac_cv_path_MV+:} false; then :
8372   $as_echo_n "(cached) " >&6
8373 else
8374   case $MV in
8375   [\\/]* | ?:[\\/]*)
8376   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8377   ;;
8378   *)
8379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8380 for as_dir in $PATH
8381 do
8382   IFS=$as_save_IFS
8383   test -z "$as_dir" && as_dir=.
8384     for ac_exec_ext in '' $ac_executable_extensions; do
8385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8386     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8388     break 2
8389   fi
8390 done
8391   done
8392 IFS=$as_save_IFS
8393 
8394   ;;
8395 esac
8396 fi
8397 MV=$ac_cv_path_MV
8398 if test -n "$MV"; then
8399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8400 $as_echo "$MV" >&6; }
8401 else
8402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8403 $as_echo "no" >&6; }
8404 fi
8405 
8406 
8407         if test "x$MV" = x; then
8408           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8409         fi
8410       else
8411         # Otherwise we believe it is a complete path. Use it as it is.
8412         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8413 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8414         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8415 $as_echo_n "checking for MV... " >&6; }
8416         if test ! -x "$tool_specified"; then
8417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8418 $as_echo "not found" >&6; }
8419           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8420         fi
8421         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8422 $as_echo "$tool_specified" >&6; }
8423       fi
8424     fi
8425   fi
8426 
8427 
8428 
8429   if test "x$MV" = x; then
8430     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8431   fi
8432 
8433 
8434 
8435 
8436 
8437   # Publish this variable in the help.
8438 
8439 
8440   if test "x$NAWK" = x; then
8441     # The variable is not set by user, try to locate tool using the code snippet
8442     for ac_prog in nawk gawk awk
8443 do
8444   # Extract the first word of "$ac_prog", so it can be a program name with args.
8445 set dummy $ac_prog; ac_word=$2
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8447 $as_echo_n "checking for $ac_word... " >&6; }
8448 if ${ac_cv_path_NAWK+:} false; then :
8449   $as_echo_n "(cached) " >&6
8450 else
8451   case $NAWK in
8452   [\\/]* | ?:[\\/]*)
8453   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8454   ;;
8455   *)
8456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8457 for as_dir in $PATH
8458 do
8459   IFS=$as_save_IFS
8460   test -z "$as_dir" && as_dir=.
8461     for ac_exec_ext in '' $ac_executable_extensions; do
8462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8463     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8465     break 2
8466   fi
8467 done
8468   done
8469 IFS=$as_save_IFS
8470 
8471   ;;
8472 esac
8473 fi
8474 NAWK=$ac_cv_path_NAWK
8475 if test -n "$NAWK"; then
8476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8477 $as_echo "$NAWK" >&6; }
8478 else
8479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8480 $as_echo "no" >&6; }
8481 fi
8482 
8483 
8484   test -n "$NAWK" && break
8485 done
8486 
8487   else
8488     # The variable is set, but is it from the command line or the environment?
8489 
8490     # Try to remove the string !NAWK! from our list.
8491     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8492     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8493       # If it failed, the variable was not from the command line. Ignore it,
8494       # but warn the user (except for BASH, which is always set by the calling BASH).
8495       if test "xNAWK" != xBASH; then
8496         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8497 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8498       fi
8499       # Try to locate tool using the code snippet
8500       for ac_prog in nawk gawk awk
8501 do
8502   # Extract the first word of "$ac_prog", so it can be a program name with args.
8503 set dummy $ac_prog; ac_word=$2
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8505 $as_echo_n "checking for $ac_word... " >&6; }
8506 if ${ac_cv_path_NAWK+:} false; then :
8507   $as_echo_n "(cached) " >&6
8508 else
8509   case $NAWK in
8510   [\\/]* | ?:[\\/]*)
8511   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8512   ;;
8513   *)
8514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8515 for as_dir in $PATH
8516 do
8517   IFS=$as_save_IFS
8518   test -z "$as_dir" && as_dir=.
8519     for ac_exec_ext in '' $ac_executable_extensions; do
8520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8521     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8523     break 2
8524   fi
8525 done
8526   done
8527 IFS=$as_save_IFS
8528 
8529   ;;
8530 esac
8531 fi
8532 NAWK=$ac_cv_path_NAWK
8533 if test -n "$NAWK"; then
8534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8535 $as_echo "$NAWK" >&6; }
8536 else
8537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8538 $as_echo "no" >&6; }
8539 fi
8540 
8541 
8542   test -n "$NAWK" && break
8543 done
8544 
8545     else
8546       # If it succeeded, then it was overridden by the user. We will use it
8547       # for the tool.
8548 
8549       # First remove it from the list of overridden variables, so we can test
8550       # for unknown variables in the end.
8551       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8552 
8553       # Check if the provided tool contains a complete path.
8554       tool_specified="$NAWK"
8555       tool_basename="${tool_specified##*/}"
8556       if test "x$tool_basename" = "x$tool_specified"; then
8557         # A command without a complete path is provided, search $PATH.
8558         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8559 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8560         # Extract the first word of "$tool_basename", so it can be a program name with args.
8561 set dummy $tool_basename; ac_word=$2
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8563 $as_echo_n "checking for $ac_word... " >&6; }
8564 if ${ac_cv_path_NAWK+:} false; then :
8565   $as_echo_n "(cached) " >&6
8566 else
8567   case $NAWK in
8568   [\\/]* | ?:[\\/]*)
8569   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8570   ;;
8571   *)
8572   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8573 for as_dir in $PATH
8574 do
8575   IFS=$as_save_IFS
8576   test -z "$as_dir" && as_dir=.
8577     for ac_exec_ext in '' $ac_executable_extensions; do
8578   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8579     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8580     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8581     break 2
8582   fi
8583 done
8584   done
8585 IFS=$as_save_IFS
8586 
8587   ;;
8588 esac
8589 fi
8590 NAWK=$ac_cv_path_NAWK
8591 if test -n "$NAWK"; then
8592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8593 $as_echo "$NAWK" >&6; }
8594 else
8595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596 $as_echo "no" >&6; }
8597 fi
8598 
8599 
8600         if test "x$NAWK" = x; then
8601           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8602         fi
8603       else
8604         # Otherwise we believe it is a complete path. Use it as it is.
8605         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8606 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8607         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8608 $as_echo_n "checking for NAWK... " >&6; }
8609         if test ! -x "$tool_specified"; then
8610           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8611 $as_echo "not found" >&6; }
8612           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8613         fi
8614         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8615 $as_echo "$tool_specified" >&6; }
8616       fi
8617     fi
8618   fi
8619 
8620 
8621 
8622   if test "x$NAWK" = x; then
8623     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8624   fi
8625 
8626 
8627 
8628 
8629 
8630   # Publish this variable in the help.
8631 
8632 
8633   if test "x$PRINTF" = x; then
8634     # The variable is not set by user, try to locate tool using the code snippet
8635     for ac_prog in printf
8636 do
8637   # Extract the first word of "$ac_prog", so it can be a program name with args.
8638 set dummy $ac_prog; ac_word=$2
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640 $as_echo_n "checking for $ac_word... " >&6; }
8641 if ${ac_cv_path_PRINTF+:} false; then :
8642   $as_echo_n "(cached) " >&6
8643 else
8644   case $PRINTF in
8645   [\\/]* | ?:[\\/]*)
8646   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8647   ;;
8648   *)
8649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8650 for as_dir in $PATH
8651 do
8652   IFS=$as_save_IFS
8653   test -z "$as_dir" && as_dir=.
8654     for ac_exec_ext in '' $ac_executable_extensions; do
8655   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8656     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8658     break 2
8659   fi
8660 done
8661   done
8662 IFS=$as_save_IFS
8663 
8664   ;;
8665 esac
8666 fi
8667 PRINTF=$ac_cv_path_PRINTF
8668 if test -n "$PRINTF"; then
8669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8670 $as_echo "$PRINTF" >&6; }
8671 else
8672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8673 $as_echo "no" >&6; }
8674 fi
8675 
8676 
8677   test -n "$PRINTF" && break
8678 done
8679 
8680   else
8681     # The variable is set, but is it from the command line or the environment?
8682 
8683     # Try to remove the string !PRINTF! from our list.
8684     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8685     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8686       # If it failed, the variable was not from the command line. Ignore it,
8687       # but warn the user (except for BASH, which is always set by the calling BASH).
8688       if test "xPRINTF" != xBASH; then
8689         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8690 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8691       fi
8692       # Try to locate tool using the code snippet
8693       for ac_prog in printf
8694 do
8695   # Extract the first word of "$ac_prog", so it can be a program name with args.
8696 set dummy $ac_prog; ac_word=$2
8697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8698 $as_echo_n "checking for $ac_word... " >&6; }
8699 if ${ac_cv_path_PRINTF+:} false; then :
8700   $as_echo_n "(cached) " >&6
8701 else
8702   case $PRINTF in
8703   [\\/]* | ?:[\\/]*)
8704   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8705   ;;
8706   *)
8707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8708 for as_dir in $PATH
8709 do
8710   IFS=$as_save_IFS
8711   test -z "$as_dir" && as_dir=.
8712     for ac_exec_ext in '' $ac_executable_extensions; do
8713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8714     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8716     break 2
8717   fi
8718 done
8719   done
8720 IFS=$as_save_IFS
8721 
8722   ;;
8723 esac
8724 fi
8725 PRINTF=$ac_cv_path_PRINTF
8726 if test -n "$PRINTF"; then
8727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8728 $as_echo "$PRINTF" >&6; }
8729 else
8730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8731 $as_echo "no" >&6; }
8732 fi
8733 
8734 
8735   test -n "$PRINTF" && break
8736 done
8737 
8738     else
8739       # If it succeeded, then it was overridden by the user. We will use it
8740       # for the tool.
8741 
8742       # First remove it from the list of overridden variables, so we can test
8743       # for unknown variables in the end.
8744       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8745 
8746       # Check if the provided tool contains a complete path.
8747       tool_specified="$PRINTF"
8748       tool_basename="${tool_specified##*/}"
8749       if test "x$tool_basename" = "x$tool_specified"; then
8750         # A command without a complete path is provided, search $PATH.
8751         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8752 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8753         # Extract the first word of "$tool_basename", so it can be a program name with args.
8754 set dummy $tool_basename; ac_word=$2
8755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8756 $as_echo_n "checking for $ac_word... " >&6; }
8757 if ${ac_cv_path_PRINTF+:} false; then :
8758   $as_echo_n "(cached) " >&6
8759 else
8760   case $PRINTF in
8761   [\\/]* | ?:[\\/]*)
8762   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8763   ;;
8764   *)
8765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8766 for as_dir in $PATH
8767 do
8768   IFS=$as_save_IFS
8769   test -z "$as_dir" && as_dir=.
8770     for ac_exec_ext in '' $ac_executable_extensions; do
8771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8772     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8774     break 2
8775   fi
8776 done
8777   done
8778 IFS=$as_save_IFS
8779 
8780   ;;
8781 esac
8782 fi
8783 PRINTF=$ac_cv_path_PRINTF
8784 if test -n "$PRINTF"; then
8785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8786 $as_echo "$PRINTF" >&6; }
8787 else
8788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8789 $as_echo "no" >&6; }
8790 fi
8791 
8792 
8793         if test "x$PRINTF" = x; then
8794           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8795         fi
8796       else
8797         # Otherwise we believe it is a complete path. Use it as it is.
8798         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8799 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8801 $as_echo_n "checking for PRINTF... " >&6; }
8802         if test ! -x "$tool_specified"; then
8803           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8804 $as_echo "not found" >&6; }
8805           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8806         fi
8807         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8808 $as_echo "$tool_specified" >&6; }
8809       fi
8810     fi
8811   fi
8812 
8813 
8814 
8815   if test "x$PRINTF" = x; then
8816     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8817   fi
8818 
8819 
8820 
8821 
8822 
8823   # Publish this variable in the help.
8824 
8825 
8826   if test "x$RM" = x; then
8827     # The variable is not set by user, try to locate tool using the code snippet
8828     for ac_prog in rm
8829 do
8830   # Extract the first word of "$ac_prog", so it can be a program name with args.
8831 set dummy $ac_prog; ac_word=$2
8832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8833 $as_echo_n "checking for $ac_word... " >&6; }
8834 if ${ac_cv_path_RM+:} false; then :
8835   $as_echo_n "(cached) " >&6
8836 else
8837   case $RM in
8838   [\\/]* | ?:[\\/]*)
8839   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8840   ;;
8841   *)
8842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8843 for as_dir in $PATH
8844 do
8845   IFS=$as_save_IFS
8846   test -z "$as_dir" && as_dir=.
8847     for ac_exec_ext in '' $ac_executable_extensions; do
8848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8849     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8851     break 2
8852   fi
8853 done
8854   done
8855 IFS=$as_save_IFS
8856 
8857   ;;
8858 esac
8859 fi
8860 RM=$ac_cv_path_RM
8861 if test -n "$RM"; then
8862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8863 $as_echo "$RM" >&6; }
8864 else
8865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8866 $as_echo "no" >&6; }
8867 fi
8868 
8869 
8870   test -n "$RM" && break
8871 done
8872 
8873   else
8874     # The variable is set, but is it from the command line or the environment?
8875 
8876     # Try to remove the string !RM! from our list.
8877     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8878     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8879       # If it failed, the variable was not from the command line. Ignore it,
8880       # but warn the user (except for BASH, which is always set by the calling BASH).
8881       if test "xRM" != xBASH; then
8882         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8883 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8884       fi
8885       # Try to locate tool using the code snippet
8886       for ac_prog in rm
8887 do
8888   # Extract the first word of "$ac_prog", so it can be a program name with args.
8889 set dummy $ac_prog; ac_word=$2
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8891 $as_echo_n "checking for $ac_word... " >&6; }
8892 if ${ac_cv_path_RM+:} false; then :
8893   $as_echo_n "(cached) " >&6
8894 else
8895   case $RM in
8896   [\\/]* | ?:[\\/]*)
8897   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8898   ;;
8899   *)
8900   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8901 for as_dir in $PATH
8902 do
8903   IFS=$as_save_IFS
8904   test -z "$as_dir" && as_dir=.
8905     for ac_exec_ext in '' $ac_executable_extensions; do
8906   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8907     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8908     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8909     break 2
8910   fi
8911 done
8912   done
8913 IFS=$as_save_IFS
8914 
8915   ;;
8916 esac
8917 fi
8918 RM=$ac_cv_path_RM
8919 if test -n "$RM"; then
8920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8921 $as_echo "$RM" >&6; }
8922 else
8923   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8924 $as_echo "no" >&6; }
8925 fi
8926 
8927 
8928   test -n "$RM" && break
8929 done
8930 
8931     else
8932       # If it succeeded, then it was overridden by the user. We will use it
8933       # for the tool.
8934 
8935       # First remove it from the list of overridden variables, so we can test
8936       # for unknown variables in the end.
8937       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8938 
8939       # Check if the provided tool contains a complete path.
8940       tool_specified="$RM"
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 RM=$tool_basename" >&5
8945 $as_echo "$as_me: Will search for user supplied tool RM=$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_RM+:} false; then :
8951   $as_echo_n "(cached) " >&6
8952 else
8953   case $RM in
8954   [\\/]* | ?:[\\/]*)
8955   ac_cv_path_RM="$RM" # 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_RM="$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 RM=$ac_cv_path_RM
8977 if test -n "$RM"; then
8978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8979 $as_echo "$RM" >&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$RM" = 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 RM=$tool_specified" >&5
8992 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8993         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8994 $as_echo_n "checking for RM... " >&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 RM=$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 
9007 
9008   if test "x$RM" = x; then
9009     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9010   fi
9011 
9012 
9013 
9014 
9015 
9016   # Publish this variable in the help.
9017 
9018 
9019   if test "x$SH" = x; then
9020     # The variable is not set by user, try to locate tool using the code snippet
9021     for ac_prog in sh
9022 do
9023   # Extract the first word of "$ac_prog", so it can be a program name with args.
9024 set dummy $ac_prog; ac_word=$2
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9026 $as_echo_n "checking for $ac_word... " >&6; }
9027 if ${ac_cv_path_SH+:} false; then :
9028   $as_echo_n "(cached) " >&6
9029 else
9030   case $SH in
9031   [\\/]* | ?:[\\/]*)
9032   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9033   ;;
9034   *)
9035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9036 for as_dir in $PATH
9037 do
9038   IFS=$as_save_IFS
9039   test -z "$as_dir" && as_dir=.
9040     for ac_exec_ext in '' $ac_executable_extensions; do
9041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9042     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9044     break 2
9045   fi
9046 done
9047   done
9048 IFS=$as_save_IFS
9049 
9050   ;;
9051 esac
9052 fi
9053 SH=$ac_cv_path_SH
9054 if test -n "$SH"; then
9055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9056 $as_echo "$SH" >&6; }
9057 else
9058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9059 $as_echo "no" >&6; }
9060 fi
9061 
9062 
9063   test -n "$SH" && break
9064 done
9065 
9066   else
9067     # The variable is set, but is it from the command line or the environment?
9068 
9069     # Try to remove the string !SH! from our list.
9070     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9071     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9072       # If it failed, the variable was not from the command line. Ignore it,
9073       # but warn the user (except for BASH, which is always set by the calling BASH).
9074       if test "xSH" != xBASH; then
9075         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9076 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9077       fi
9078       # Try to locate tool using the code snippet
9079       for ac_prog in sh
9080 do
9081   # Extract the first word of "$ac_prog", so it can be a program name with args.
9082 set dummy $ac_prog; ac_word=$2
9083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9084 $as_echo_n "checking for $ac_word... " >&6; }
9085 if ${ac_cv_path_SH+:} false; then :
9086   $as_echo_n "(cached) " >&6
9087 else
9088   case $SH in
9089   [\\/]* | ?:[\\/]*)
9090   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9091   ;;
9092   *)
9093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9094 for as_dir in $PATH
9095 do
9096   IFS=$as_save_IFS
9097   test -z "$as_dir" && as_dir=.
9098     for ac_exec_ext in '' $ac_executable_extensions; do
9099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9100     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9102     break 2
9103   fi
9104 done
9105   done
9106 IFS=$as_save_IFS
9107 
9108   ;;
9109 esac
9110 fi
9111 SH=$ac_cv_path_SH
9112 if test -n "$SH"; then
9113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9114 $as_echo "$SH" >&6; }
9115 else
9116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117 $as_echo "no" >&6; }
9118 fi
9119 
9120 
9121   test -n "$SH" && break
9122 done
9123 
9124     else
9125       # If it succeeded, then it was overridden by the user. We will use it
9126       # for the tool.
9127 
9128       # First remove it from the list of overridden variables, so we can test
9129       # for unknown variables in the end.
9130       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9131 
9132       # Check if the provided tool contains a complete path.
9133       tool_specified="$SH"
9134       tool_basename="${tool_specified##*/}"
9135       if test "x$tool_basename" = "x$tool_specified"; then
9136         # A command without a complete path is provided, search $PATH.
9137         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9138 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9139         # Extract the first word of "$tool_basename", so it can be a program name with args.
9140 set dummy $tool_basename; ac_word=$2
9141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9142 $as_echo_n "checking for $ac_word... " >&6; }
9143 if ${ac_cv_path_SH+:} false; then :
9144   $as_echo_n "(cached) " >&6
9145 else
9146   case $SH in
9147   [\\/]* | ?:[\\/]*)
9148   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9149   ;;
9150   *)
9151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9152 for as_dir in $PATH
9153 do
9154   IFS=$as_save_IFS
9155   test -z "$as_dir" && as_dir=.
9156     for ac_exec_ext in '' $ac_executable_extensions; do
9157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9158     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9160     break 2
9161   fi
9162 done
9163   done
9164 IFS=$as_save_IFS
9165 
9166   ;;
9167 esac
9168 fi
9169 SH=$ac_cv_path_SH
9170 if test -n "$SH"; then
9171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9172 $as_echo "$SH" >&6; }
9173 else
9174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9175 $as_echo "no" >&6; }
9176 fi
9177 
9178 
9179         if test "x$SH" = x; then
9180           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9181         fi
9182       else
9183         # Otherwise we believe it is a complete path. Use it as it is.
9184         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9185 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9187 $as_echo_n "checking for SH... " >&6; }
9188         if test ! -x "$tool_specified"; then
9189           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9190 $as_echo "not found" >&6; }
9191           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9192         fi
9193         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9194 $as_echo "$tool_specified" >&6; }
9195       fi
9196     fi
9197   fi
9198 
9199 
9200 
9201   if test "x$SH" = x; then
9202     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9203   fi
9204 
9205 
9206 
9207 
9208 
9209   # Publish this variable in the help.
9210 
9211 
9212   if test "x$SORT" = x; then
9213     # The variable is not set by user, try to locate tool using the code snippet
9214     for ac_prog in sort
9215 do
9216   # Extract the first word of "$ac_prog", so it can be a program name with args.
9217 set dummy $ac_prog; ac_word=$2
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9219 $as_echo_n "checking for $ac_word... " >&6; }
9220 if ${ac_cv_path_SORT+:} false; then :
9221   $as_echo_n "(cached) " >&6
9222 else
9223   case $SORT in
9224   [\\/]* | ?:[\\/]*)
9225   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9226   ;;
9227   *)
9228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9229 for as_dir in $PATH
9230 do
9231   IFS=$as_save_IFS
9232   test -z "$as_dir" && as_dir=.
9233     for ac_exec_ext in '' $ac_executable_extensions; do
9234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9235     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9237     break 2
9238   fi
9239 done
9240   done
9241 IFS=$as_save_IFS
9242 
9243   ;;
9244 esac
9245 fi
9246 SORT=$ac_cv_path_SORT
9247 if test -n "$SORT"; then
9248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9249 $as_echo "$SORT" >&6; }
9250 else
9251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9252 $as_echo "no" >&6; }
9253 fi
9254 
9255 
9256   test -n "$SORT" && break
9257 done
9258 
9259   else
9260     # The variable is set, but is it from the command line or the environment?
9261 
9262     # Try to remove the string !SORT! from our list.
9263     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9264     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9265       # If it failed, the variable was not from the command line. Ignore it,
9266       # but warn the user (except for BASH, which is always set by the calling BASH).
9267       if test "xSORT" != xBASH; then
9268         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9269 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9270       fi
9271       # Try to locate tool using the code snippet
9272       for ac_prog in sort
9273 do
9274   # Extract the first word of "$ac_prog", so it can be a program name with args.
9275 set dummy $ac_prog; ac_word=$2
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9277 $as_echo_n "checking for $ac_word... " >&6; }
9278 if ${ac_cv_path_SORT+:} false; then :
9279   $as_echo_n "(cached) " >&6
9280 else
9281   case $SORT in
9282   [\\/]* | ?:[\\/]*)
9283   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9284   ;;
9285   *)
9286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9287 for as_dir in $PATH
9288 do
9289   IFS=$as_save_IFS
9290   test -z "$as_dir" && as_dir=.
9291     for ac_exec_ext in '' $ac_executable_extensions; do
9292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9293     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9295     break 2
9296   fi
9297 done
9298   done
9299 IFS=$as_save_IFS
9300 
9301   ;;
9302 esac
9303 fi
9304 SORT=$ac_cv_path_SORT
9305 if test -n "$SORT"; then
9306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9307 $as_echo "$SORT" >&6; }
9308 else
9309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9310 $as_echo "no" >&6; }
9311 fi
9312 
9313 
9314   test -n "$SORT" && break
9315 done
9316 
9317     else
9318       # If it succeeded, then it was overridden by the user. We will use it
9319       # for the tool.
9320 
9321       # First remove it from the list of overridden variables, so we can test
9322       # for unknown variables in the end.
9323       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9324 
9325       # Check if the provided tool contains a complete path.
9326       tool_specified="$SORT"
9327       tool_basename="${tool_specified##*/}"
9328       if test "x$tool_basename" = "x$tool_specified"; then
9329         # A command without a complete path is provided, search $PATH.
9330         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9331 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9332         # Extract the first word of "$tool_basename", so it can be a program name with args.
9333 set dummy $tool_basename; ac_word=$2
9334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9335 $as_echo_n "checking for $ac_word... " >&6; }
9336 if ${ac_cv_path_SORT+:} false; then :
9337   $as_echo_n "(cached) " >&6
9338 else
9339   case $SORT in
9340   [\\/]* | ?:[\\/]*)
9341   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9342   ;;
9343   *)
9344   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9345 for as_dir in $PATH
9346 do
9347   IFS=$as_save_IFS
9348   test -z "$as_dir" && as_dir=.
9349     for ac_exec_ext in '' $ac_executable_extensions; do
9350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9351     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9353     break 2
9354   fi
9355 done
9356   done
9357 IFS=$as_save_IFS
9358 
9359   ;;
9360 esac
9361 fi
9362 SORT=$ac_cv_path_SORT
9363 if test -n "$SORT"; then
9364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9365 $as_echo "$SORT" >&6; }
9366 else
9367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9368 $as_echo "no" >&6; }
9369 fi
9370 
9371 
9372         if test "x$SORT" = x; then
9373           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9374         fi
9375       else
9376         # Otherwise we believe it is a complete path. Use it as it is.
9377         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9378 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9379         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9380 $as_echo_n "checking for SORT... " >&6; }
9381         if test ! -x "$tool_specified"; then
9382           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9383 $as_echo "not found" >&6; }
9384           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9385         fi
9386         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9387 $as_echo "$tool_specified" >&6; }
9388       fi
9389     fi
9390   fi
9391 
9392 
9393 
9394   if test "x$SORT" = x; then
9395     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9396   fi
9397 
9398 
9399 
9400 
9401 
9402   # Publish this variable in the help.
9403 
9404 
9405   if test "x$TAIL" = x; then
9406     # The variable is not set by user, try to locate tool using the code snippet
9407     for ac_prog in tail
9408 do
9409   # Extract the first word of "$ac_prog", so it can be a program name with args.
9410 set dummy $ac_prog; ac_word=$2
9411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9412 $as_echo_n "checking for $ac_word... " >&6; }
9413 if ${ac_cv_path_TAIL+:} false; then :
9414   $as_echo_n "(cached) " >&6
9415 else
9416   case $TAIL in
9417   [\\/]* | ?:[\\/]*)
9418   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9419   ;;
9420   *)
9421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9422 for as_dir in $PATH
9423 do
9424   IFS=$as_save_IFS
9425   test -z "$as_dir" && as_dir=.
9426     for ac_exec_ext in '' $ac_executable_extensions; do
9427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9428     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9430     break 2
9431   fi
9432 done
9433   done
9434 IFS=$as_save_IFS
9435 
9436   ;;
9437 esac
9438 fi
9439 TAIL=$ac_cv_path_TAIL
9440 if test -n "$TAIL"; then
9441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9442 $as_echo "$TAIL" >&6; }
9443 else
9444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9445 $as_echo "no" >&6; }
9446 fi
9447 
9448 
9449   test -n "$TAIL" && break
9450 done
9451 
9452   else
9453     # The variable is set, but is it from the command line or the environment?
9454 
9455     # Try to remove the string !TAIL! from our list.
9456     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9457     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9458       # If it failed, the variable was not from the command line. Ignore it,
9459       # but warn the user (except for BASH, which is always set by the calling BASH).
9460       if test "xTAIL" != xBASH; then
9461         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9462 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9463       fi
9464       # Try to locate tool using the code snippet
9465       for ac_prog in tail
9466 do
9467   # Extract the first word of "$ac_prog", so it can be a program name with args.
9468 set dummy $ac_prog; ac_word=$2
9469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9470 $as_echo_n "checking for $ac_word... " >&6; }
9471 if ${ac_cv_path_TAIL+:} false; then :
9472   $as_echo_n "(cached) " >&6
9473 else
9474   case $TAIL in
9475   [\\/]* | ?:[\\/]*)
9476   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9477   ;;
9478   *)
9479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9480 for as_dir in $PATH
9481 do
9482   IFS=$as_save_IFS
9483   test -z "$as_dir" && as_dir=.
9484     for ac_exec_ext in '' $ac_executable_extensions; do
9485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9486     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9488     break 2
9489   fi
9490 done
9491   done
9492 IFS=$as_save_IFS
9493 
9494   ;;
9495 esac
9496 fi
9497 TAIL=$ac_cv_path_TAIL
9498 if test -n "$TAIL"; then
9499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9500 $as_echo "$TAIL" >&6; }
9501 else
9502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503 $as_echo "no" >&6; }
9504 fi
9505 
9506 
9507   test -n "$TAIL" && break
9508 done
9509 
9510     else
9511       # If it succeeded, then it was overridden by the user. We will use it
9512       # for the tool.
9513 
9514       # First remove it from the list of overridden variables, so we can test
9515       # for unknown variables in the end.
9516       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9517 
9518       # Check if the provided tool contains a complete path.
9519       tool_specified="$TAIL"
9520       tool_basename="${tool_specified##*/}"
9521       if test "x$tool_basename" = "x$tool_specified"; then
9522         # A command without a complete path is provided, search $PATH.
9523         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9524 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9525         # Extract the first word of "$tool_basename", so it can be a program name with args.
9526 set dummy $tool_basename; ac_word=$2
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9528 $as_echo_n "checking for $ac_word... " >&6; }
9529 if ${ac_cv_path_TAIL+:} false; then :
9530   $as_echo_n "(cached) " >&6
9531 else
9532   case $TAIL in
9533   [\\/]* | ?:[\\/]*)
9534   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9535   ;;
9536   *)
9537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9538 for as_dir in $PATH
9539 do
9540   IFS=$as_save_IFS
9541   test -z "$as_dir" && as_dir=.
9542     for ac_exec_ext in '' $ac_executable_extensions; do
9543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9544     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9546     break 2
9547   fi
9548 done
9549   done
9550 IFS=$as_save_IFS
9551 
9552   ;;
9553 esac
9554 fi
9555 TAIL=$ac_cv_path_TAIL
9556 if test -n "$TAIL"; then
9557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9558 $as_echo "$TAIL" >&6; }
9559 else
9560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561 $as_echo "no" >&6; }
9562 fi
9563 
9564 
9565         if test "x$TAIL" = x; then
9566           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9567         fi
9568       else
9569         # Otherwise we believe it is a complete path. Use it as it is.
9570         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9571 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9572         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9573 $as_echo_n "checking for TAIL... " >&6; }
9574         if test ! -x "$tool_specified"; then
9575           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9576 $as_echo "not found" >&6; }
9577           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9578         fi
9579         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9580 $as_echo "$tool_specified" >&6; }
9581       fi
9582     fi
9583   fi
9584 
9585 
9586 
9587   if test "x$TAIL" = x; then
9588     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9589   fi
9590 
9591 
9592 
9593 
9594 
9595   # Publish this variable in the help.
9596 
9597 
9598   if test "x$TAR" = x; then
9599     # The variable is not set by user, try to locate tool using the code snippet
9600     for ac_prog in tar
9601 do
9602   # Extract the first word of "$ac_prog", so it can be a program name with args.
9603 set dummy $ac_prog; ac_word=$2
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9605 $as_echo_n "checking for $ac_word... " >&6; }
9606 if ${ac_cv_path_TAR+:} false; then :
9607   $as_echo_n "(cached) " >&6
9608 else
9609   case $TAR in
9610   [\\/]* | ?:[\\/]*)
9611   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9612   ;;
9613   *)
9614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9615 for as_dir in $PATH
9616 do
9617   IFS=$as_save_IFS
9618   test -z "$as_dir" && as_dir=.
9619     for ac_exec_ext in '' $ac_executable_extensions; do
9620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9621     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9623     break 2
9624   fi
9625 done
9626   done
9627 IFS=$as_save_IFS
9628 
9629   ;;
9630 esac
9631 fi
9632 TAR=$ac_cv_path_TAR
9633 if test -n "$TAR"; then
9634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9635 $as_echo "$TAR" >&6; }
9636 else
9637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638 $as_echo "no" >&6; }
9639 fi
9640 
9641 
9642   test -n "$TAR" && break
9643 done
9644 
9645   else
9646     # The variable is set, but is it from the command line or the environment?
9647 
9648     # Try to remove the string !TAR! from our list.
9649     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9650     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9651       # If it failed, the variable was not from the command line. Ignore it,
9652       # but warn the user (except for BASH, which is always set by the calling BASH).
9653       if test "xTAR" != xBASH; then
9654         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9655 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9656       fi
9657       # Try to locate tool using the code snippet
9658       for ac_prog in tar
9659 do
9660   # Extract the first word of "$ac_prog", so it can be a program name with args.
9661 set dummy $ac_prog; ac_word=$2
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9663 $as_echo_n "checking for $ac_word... " >&6; }
9664 if ${ac_cv_path_TAR+:} false; then :
9665   $as_echo_n "(cached) " >&6
9666 else
9667   case $TAR in
9668   [\\/]* | ?:[\\/]*)
9669   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9670   ;;
9671   *)
9672   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9673 for as_dir in $PATH
9674 do
9675   IFS=$as_save_IFS
9676   test -z "$as_dir" && as_dir=.
9677     for ac_exec_ext in '' $ac_executable_extensions; do
9678   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9679     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9680     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9681     break 2
9682   fi
9683 done
9684   done
9685 IFS=$as_save_IFS
9686 
9687   ;;
9688 esac
9689 fi
9690 TAR=$ac_cv_path_TAR
9691 if test -n "$TAR"; then
9692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9693 $as_echo "$TAR" >&6; }
9694 else
9695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9696 $as_echo "no" >&6; }
9697 fi
9698 
9699 
9700   test -n "$TAR" && break
9701 done
9702 
9703     else
9704       # If it succeeded, then it was overridden by the user. We will use it
9705       # for the tool.
9706 
9707       # First remove it from the list of overridden variables, so we can test
9708       # for unknown variables in the end.
9709       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9710 
9711       # Check if the provided tool contains a complete path.
9712       tool_specified="$TAR"
9713       tool_basename="${tool_specified##*/}"
9714       if test "x$tool_basename" = "x$tool_specified"; then
9715         # A command without a complete path is provided, search $PATH.
9716         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9717 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9718         # Extract the first word of "$tool_basename", so it can be a program name with args.
9719 set dummy $tool_basename; ac_word=$2
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9721 $as_echo_n "checking for $ac_word... " >&6; }
9722 if ${ac_cv_path_TAR+:} false; then :
9723   $as_echo_n "(cached) " >&6
9724 else
9725   case $TAR in
9726   [\\/]* | ?:[\\/]*)
9727   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9728   ;;
9729   *)
9730   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9731 for as_dir in $PATH
9732 do
9733   IFS=$as_save_IFS
9734   test -z "$as_dir" && as_dir=.
9735     for ac_exec_ext in '' $ac_executable_extensions; do
9736   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9737     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9738     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9739     break 2
9740   fi
9741 done
9742   done
9743 IFS=$as_save_IFS
9744 
9745   ;;
9746 esac
9747 fi
9748 TAR=$ac_cv_path_TAR
9749 if test -n "$TAR"; then
9750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9751 $as_echo "$TAR" >&6; }
9752 else
9753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9754 $as_echo "no" >&6; }
9755 fi
9756 
9757 
9758         if test "x$TAR" = x; then
9759           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9760         fi
9761       else
9762         # Otherwise we believe it is a complete path. Use it as it is.
9763         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9764 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9765         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9766 $as_echo_n "checking for TAR... " >&6; }
9767         if test ! -x "$tool_specified"; then
9768           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9769 $as_echo "not found" >&6; }
9770           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9771         fi
9772         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9773 $as_echo "$tool_specified" >&6; }
9774       fi
9775     fi
9776   fi
9777 
9778 
9779 
9780   if test "x$TAR" = x; then
9781     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9782   fi
9783 
9784 
9785 
9786 
9787 
9788   # Publish this variable in the help.
9789 
9790 
9791   if test "x$TEE" = x; then
9792     # The variable is not set by user, try to locate tool using the code snippet
9793     for ac_prog in tee
9794 do
9795   # Extract the first word of "$ac_prog", so it can be a program name with args.
9796 set dummy $ac_prog; ac_word=$2
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9798 $as_echo_n "checking for $ac_word... " >&6; }
9799 if ${ac_cv_path_TEE+:} false; then :
9800   $as_echo_n "(cached) " >&6
9801 else
9802   case $TEE in
9803   [\\/]* | ?:[\\/]*)
9804   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9805   ;;
9806   *)
9807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9808 for as_dir in $PATH
9809 do
9810   IFS=$as_save_IFS
9811   test -z "$as_dir" && as_dir=.
9812     for ac_exec_ext in '' $ac_executable_extensions; do
9813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9814     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9816     break 2
9817   fi
9818 done
9819   done
9820 IFS=$as_save_IFS
9821 
9822   ;;
9823 esac
9824 fi
9825 TEE=$ac_cv_path_TEE
9826 if test -n "$TEE"; then
9827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9828 $as_echo "$TEE" >&6; }
9829 else
9830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9831 $as_echo "no" >&6; }
9832 fi
9833 
9834 
9835   test -n "$TEE" && break
9836 done
9837 
9838   else
9839     # The variable is set, but is it from the command line or the environment?
9840 
9841     # Try to remove the string !TEE! from our list.
9842     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9843     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9844       # If it failed, the variable was not from the command line. Ignore it,
9845       # but warn the user (except for BASH, which is always set by the calling BASH).
9846       if test "xTEE" != xBASH; then
9847         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9848 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9849       fi
9850       # Try to locate tool using the code snippet
9851       for ac_prog in tee
9852 do
9853   # Extract the first word of "$ac_prog", so it can be a program name with args.
9854 set dummy $ac_prog; ac_word=$2
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9856 $as_echo_n "checking for $ac_word... " >&6; }
9857 if ${ac_cv_path_TEE+:} false; then :
9858   $as_echo_n "(cached) " >&6
9859 else
9860   case $TEE in
9861   [\\/]* | ?:[\\/]*)
9862   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9863   ;;
9864   *)
9865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9866 for as_dir in $PATH
9867 do
9868   IFS=$as_save_IFS
9869   test -z "$as_dir" && as_dir=.
9870     for ac_exec_ext in '' $ac_executable_extensions; do
9871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9872     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9874     break 2
9875   fi
9876 done
9877   done
9878 IFS=$as_save_IFS
9879 
9880   ;;
9881 esac
9882 fi
9883 TEE=$ac_cv_path_TEE
9884 if test -n "$TEE"; then
9885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9886 $as_echo "$TEE" >&6; }
9887 else
9888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9889 $as_echo "no" >&6; }
9890 fi
9891 
9892 
9893   test -n "$TEE" && break
9894 done
9895 
9896     else
9897       # If it succeeded, then it was overridden by the user. We will use it
9898       # for the tool.
9899 
9900       # First remove it from the list of overridden variables, so we can test
9901       # for unknown variables in the end.
9902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9903 
9904       # Check if the provided tool contains a complete path.
9905       tool_specified="$TEE"
9906       tool_basename="${tool_specified##*/}"
9907       if test "x$tool_basename" = "x$tool_specified"; then
9908         # A command without a complete path is provided, search $PATH.
9909         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9910 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9911         # Extract the first word of "$tool_basename", so it can be a program name with args.
9912 set dummy $tool_basename; ac_word=$2
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9914 $as_echo_n "checking for $ac_word... " >&6; }
9915 if ${ac_cv_path_TEE+:} false; then :
9916   $as_echo_n "(cached) " >&6
9917 else
9918   case $TEE in
9919   [\\/]* | ?:[\\/]*)
9920   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9921   ;;
9922   *)
9923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9924 for as_dir in $PATH
9925 do
9926   IFS=$as_save_IFS
9927   test -z "$as_dir" && as_dir=.
9928     for ac_exec_ext in '' $ac_executable_extensions; do
9929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9930     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9932     break 2
9933   fi
9934 done
9935   done
9936 IFS=$as_save_IFS
9937 
9938   ;;
9939 esac
9940 fi
9941 TEE=$ac_cv_path_TEE
9942 if test -n "$TEE"; then
9943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9944 $as_echo "$TEE" >&6; }
9945 else
9946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947 $as_echo "no" >&6; }
9948 fi
9949 
9950 
9951         if test "x$TEE" = x; then
9952           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9953         fi
9954       else
9955         # Otherwise we believe it is a complete path. Use it as it is.
9956         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9957 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9959 $as_echo_n "checking for TEE... " >&6; }
9960         if test ! -x "$tool_specified"; then
9961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9962 $as_echo "not found" >&6; }
9963           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9964         fi
9965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9966 $as_echo "$tool_specified" >&6; }
9967       fi
9968     fi
9969   fi
9970 
9971 
9972 
9973   if test "x$TEE" = x; then
9974     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9975   fi
9976 
9977 
9978 
9979 
9980 
9981   # Publish this variable in the help.
9982 
9983 
9984   if test "x$TOUCH" = x; then
9985     # The variable is not set by user, try to locate tool using the code snippet
9986     for ac_prog in touch
9987 do
9988   # Extract the first word of "$ac_prog", so it can be a program name with args.
9989 set dummy $ac_prog; ac_word=$2
9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9991 $as_echo_n "checking for $ac_word... " >&6; }
9992 if ${ac_cv_path_TOUCH+:} false; then :
9993   $as_echo_n "(cached) " >&6
9994 else
9995   case $TOUCH in
9996   [\\/]* | ?:[\\/]*)
9997   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9998   ;;
9999   *)
10000   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10001 for as_dir in $PATH
10002 do
10003   IFS=$as_save_IFS
10004   test -z "$as_dir" && as_dir=.
10005     for ac_exec_ext in '' $ac_executable_extensions; do
10006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10007     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10009     break 2
10010   fi
10011 done
10012   done
10013 IFS=$as_save_IFS
10014 
10015   ;;
10016 esac
10017 fi
10018 TOUCH=$ac_cv_path_TOUCH
10019 if test -n "$TOUCH"; then
10020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10021 $as_echo "$TOUCH" >&6; }
10022 else
10023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024 $as_echo "no" >&6; }
10025 fi
10026 
10027 
10028   test -n "$TOUCH" && break
10029 done
10030 
10031   else
10032     # The variable is set, but is it from the command line or the environment?
10033 
10034     # Try to remove the string !TOUCH! from our list.
10035     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10036     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10037       # If it failed, the variable was not from the command line. Ignore it,
10038       # but warn the user (except for BASH, which is always set by the calling BASH).
10039       if test "xTOUCH" != xBASH; then
10040         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10041 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10042       fi
10043       # Try to locate tool using the code snippet
10044       for ac_prog in touch
10045 do
10046   # Extract the first word of "$ac_prog", so it can be a program name with args.
10047 set dummy $ac_prog; ac_word=$2
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10049 $as_echo_n "checking for $ac_word... " >&6; }
10050 if ${ac_cv_path_TOUCH+:} false; then :
10051   $as_echo_n "(cached) " >&6
10052 else
10053   case $TOUCH in
10054   [\\/]* | ?:[\\/]*)
10055   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10056   ;;
10057   *)
10058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10059 for as_dir in $PATH
10060 do
10061   IFS=$as_save_IFS
10062   test -z "$as_dir" && as_dir=.
10063     for ac_exec_ext in '' $ac_executable_extensions; do
10064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10065     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10067     break 2
10068   fi
10069 done
10070   done
10071 IFS=$as_save_IFS
10072 
10073   ;;
10074 esac
10075 fi
10076 TOUCH=$ac_cv_path_TOUCH
10077 if test -n "$TOUCH"; then
10078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10079 $as_echo "$TOUCH" >&6; }
10080 else
10081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10082 $as_echo "no" >&6; }
10083 fi
10084 
10085 
10086   test -n "$TOUCH" && break
10087 done
10088 
10089     else
10090       # If it succeeded, then it was overridden by the user. We will use it
10091       # for the tool.
10092 
10093       # First remove it from the list of overridden variables, so we can test
10094       # for unknown variables in the end.
10095       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10096 
10097       # Check if the provided tool contains a complete path.
10098       tool_specified="$TOUCH"
10099       tool_basename="${tool_specified##*/}"
10100       if test "x$tool_basename" = "x$tool_specified"; then
10101         # A command without a complete path is provided, search $PATH.
10102         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10103 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10104         # Extract the first word of "$tool_basename", so it can be a program name with args.
10105 set dummy $tool_basename; ac_word=$2
10106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10107 $as_echo_n "checking for $ac_word... " >&6; }
10108 if ${ac_cv_path_TOUCH+:} false; then :
10109   $as_echo_n "(cached) " >&6
10110 else
10111   case $TOUCH in
10112   [\\/]* | ?:[\\/]*)
10113   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10114   ;;
10115   *)
10116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10117 for as_dir in $PATH
10118 do
10119   IFS=$as_save_IFS
10120   test -z "$as_dir" && as_dir=.
10121     for ac_exec_ext in '' $ac_executable_extensions; do
10122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10123     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10125     break 2
10126   fi
10127 done
10128   done
10129 IFS=$as_save_IFS
10130 
10131   ;;
10132 esac
10133 fi
10134 TOUCH=$ac_cv_path_TOUCH
10135 if test -n "$TOUCH"; then
10136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10137 $as_echo "$TOUCH" >&6; }
10138 else
10139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140 $as_echo "no" >&6; }
10141 fi
10142 
10143 
10144         if test "x$TOUCH" = x; then
10145           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10146         fi
10147       else
10148         # Otherwise we believe it is a complete path. Use it as it is.
10149         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10150 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10151         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10152 $as_echo_n "checking for TOUCH... " >&6; }
10153         if test ! -x "$tool_specified"; then
10154           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10155 $as_echo "not found" >&6; }
10156           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10157         fi
10158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10159 $as_echo "$tool_specified" >&6; }
10160       fi
10161     fi
10162   fi
10163 
10164 
10165 
10166   if test "x$TOUCH" = x; then
10167     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10168   fi
10169 
10170 
10171 
10172 
10173 
10174   # Publish this variable in the help.
10175 
10176 
10177   if test "x$TR" = x; then
10178     # The variable is not set by user, try to locate tool using the code snippet
10179     for ac_prog in tr
10180 do
10181   # Extract the first word of "$ac_prog", so it can be a program name with args.
10182 set dummy $ac_prog; ac_word=$2
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10184 $as_echo_n "checking for $ac_word... " >&6; }
10185 if ${ac_cv_path_TR+:} false; then :
10186   $as_echo_n "(cached) " >&6
10187 else
10188   case $TR in
10189   [\\/]* | ?:[\\/]*)
10190   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10191   ;;
10192   *)
10193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10194 for as_dir in $PATH
10195 do
10196   IFS=$as_save_IFS
10197   test -z "$as_dir" && as_dir=.
10198     for ac_exec_ext in '' $ac_executable_extensions; do
10199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10200     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10202     break 2
10203   fi
10204 done
10205   done
10206 IFS=$as_save_IFS
10207 
10208   ;;
10209 esac
10210 fi
10211 TR=$ac_cv_path_TR
10212 if test -n "$TR"; then
10213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10214 $as_echo "$TR" >&6; }
10215 else
10216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10217 $as_echo "no" >&6; }
10218 fi
10219 
10220 
10221   test -n "$TR" && break
10222 done
10223 
10224   else
10225     # The variable is set, but is it from the command line or the environment?
10226 
10227     # Try to remove the string !TR! from our list.
10228     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10229     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10230       # If it failed, the variable was not from the command line. Ignore it,
10231       # but warn the user (except for BASH, which is always set by the calling BASH).
10232       if test "xTR" != xBASH; then
10233         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10234 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10235       fi
10236       # Try to locate tool using the code snippet
10237       for ac_prog in tr
10238 do
10239   # Extract the first word of "$ac_prog", so it can be a program name with args.
10240 set dummy $ac_prog; ac_word=$2
10241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10242 $as_echo_n "checking for $ac_word... " >&6; }
10243 if ${ac_cv_path_TR+:} false; then :
10244   $as_echo_n "(cached) " >&6
10245 else
10246   case $TR in
10247   [\\/]* | ?:[\\/]*)
10248   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10249   ;;
10250   *)
10251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10252 for as_dir in $PATH
10253 do
10254   IFS=$as_save_IFS
10255   test -z "$as_dir" && as_dir=.
10256     for ac_exec_ext in '' $ac_executable_extensions; do
10257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10258     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10260     break 2
10261   fi
10262 done
10263   done
10264 IFS=$as_save_IFS
10265 
10266   ;;
10267 esac
10268 fi
10269 TR=$ac_cv_path_TR
10270 if test -n "$TR"; then
10271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10272 $as_echo "$TR" >&6; }
10273 else
10274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10275 $as_echo "no" >&6; }
10276 fi
10277 
10278 
10279   test -n "$TR" && break
10280 done
10281 
10282     else
10283       # If it succeeded, then it was overridden by the user. We will use it
10284       # for the tool.
10285 
10286       # First remove it from the list of overridden variables, so we can test
10287       # for unknown variables in the end.
10288       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10289 
10290       # Check if the provided tool contains a complete path.
10291       tool_specified="$TR"
10292       tool_basename="${tool_specified##*/}"
10293       if test "x$tool_basename" = "x$tool_specified"; then
10294         # A command without a complete path is provided, search $PATH.
10295         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10296 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10297         # Extract the first word of "$tool_basename", so it can be a program name with args.
10298 set dummy $tool_basename; ac_word=$2
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10300 $as_echo_n "checking for $ac_word... " >&6; }
10301 if ${ac_cv_path_TR+:} false; then :
10302   $as_echo_n "(cached) " >&6
10303 else
10304   case $TR in
10305   [\\/]* | ?:[\\/]*)
10306   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10307   ;;
10308   *)
10309   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10310 for as_dir in $PATH
10311 do
10312   IFS=$as_save_IFS
10313   test -z "$as_dir" && as_dir=.
10314     for ac_exec_ext in '' $ac_executable_extensions; do
10315   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10316     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10317     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10318     break 2
10319   fi
10320 done
10321   done
10322 IFS=$as_save_IFS
10323 
10324   ;;
10325 esac
10326 fi
10327 TR=$ac_cv_path_TR
10328 if test -n "$TR"; then
10329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10330 $as_echo "$TR" >&6; }
10331 else
10332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333 $as_echo "no" >&6; }
10334 fi
10335 
10336 
10337         if test "x$TR" = x; then
10338           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10339         fi
10340       else
10341         # Otherwise we believe it is a complete path. Use it as it is.
10342         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10343 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10344         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10345 $as_echo_n "checking for TR... " >&6; }
10346         if test ! -x "$tool_specified"; then
10347           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10348 $as_echo "not found" >&6; }
10349           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10350         fi
10351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10352 $as_echo "$tool_specified" >&6; }
10353       fi
10354     fi
10355   fi
10356 
10357 
10358 
10359   if test "x$TR" = x; then
10360     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10361   fi
10362 
10363 
10364 
10365 
10366 
10367   # Publish this variable in the help.
10368 
10369 
10370   if test "x$UNAME" = x; then
10371     # The variable is not set by user, try to locate tool using the code snippet
10372     for ac_prog in uname
10373 do
10374   # Extract the first word of "$ac_prog", so it can be a program name with args.
10375 set dummy $ac_prog; 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_UNAME+:} false; then :
10379   $as_echo_n "(cached) " >&6
10380 else
10381   case $UNAME in
10382   [\\/]* | ?:[\\/]*)
10383   ac_cv_path_UNAME="$UNAME" # 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_UNAME="$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 UNAME=$ac_cv_path_UNAME
10405 if test -n "$UNAME"; then
10406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10407 $as_echo "$UNAME" >&6; }
10408 else
10409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410 $as_echo "no" >&6; }
10411 fi
10412 
10413 
10414   test -n "$UNAME" && break
10415 done
10416 
10417   else
10418     # The variable is set, but is it from the command line or the environment?
10419 
10420     # Try to remove the string !UNAME! from our list.
10421     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10422     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10423       # If it failed, the variable was not from the command line. Ignore it,
10424       # but warn the user (except for BASH, which is always set by the calling BASH).
10425       if test "xUNAME" != xBASH; then
10426         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10427 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10428       fi
10429       # Try to locate tool using the code snippet
10430       for ac_prog in uname
10431 do
10432   # Extract the first word of "$ac_prog", so it can be a program name with args.
10433 set dummy $ac_prog; ac_word=$2
10434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10435 $as_echo_n "checking for $ac_word... " >&6; }
10436 if ${ac_cv_path_UNAME+:} false; then :
10437   $as_echo_n "(cached) " >&6
10438 else
10439   case $UNAME in
10440   [\\/]* | ?:[\\/]*)
10441   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10442   ;;
10443   *)
10444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10445 for as_dir in $PATH
10446 do
10447   IFS=$as_save_IFS
10448   test -z "$as_dir" && as_dir=.
10449     for ac_exec_ext in '' $ac_executable_extensions; do
10450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10451     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10453     break 2
10454   fi
10455 done
10456   done
10457 IFS=$as_save_IFS
10458 
10459   ;;
10460 esac
10461 fi
10462 UNAME=$ac_cv_path_UNAME
10463 if test -n "$UNAME"; then
10464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10465 $as_echo "$UNAME" >&6; }
10466 else
10467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468 $as_echo "no" >&6; }
10469 fi
10470 
10471 
10472   test -n "$UNAME" && break
10473 done
10474 
10475     else
10476       # If it succeeded, then it was overridden by the user. We will use it
10477       # for the tool.
10478 
10479       # First remove it from the list of overridden variables, so we can test
10480       # for unknown variables in the end.
10481       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10482 
10483       # Check if the provided tool contains a complete path.
10484       tool_specified="$UNAME"
10485       tool_basename="${tool_specified##*/}"
10486       if test "x$tool_basename" = "x$tool_specified"; then
10487         # A command without a complete path is provided, search $PATH.
10488         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10489 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10490         # Extract the first word of "$tool_basename", so it can be a program name with args.
10491 set dummy $tool_basename; ac_word=$2
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10493 $as_echo_n "checking for $ac_word... " >&6; }
10494 if ${ac_cv_path_UNAME+:} false; then :
10495   $as_echo_n "(cached) " >&6
10496 else
10497   case $UNAME in
10498   [\\/]* | ?:[\\/]*)
10499   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10500   ;;
10501   *)
10502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10503 for as_dir in $PATH
10504 do
10505   IFS=$as_save_IFS
10506   test -z "$as_dir" && as_dir=.
10507     for ac_exec_ext in '' $ac_executable_extensions; do
10508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10509     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10511     break 2
10512   fi
10513 done
10514   done
10515 IFS=$as_save_IFS
10516 
10517   ;;
10518 esac
10519 fi
10520 UNAME=$ac_cv_path_UNAME
10521 if test -n "$UNAME"; then
10522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10523 $as_echo "$UNAME" >&6; }
10524 else
10525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10526 $as_echo "no" >&6; }
10527 fi
10528 
10529 
10530         if test "x$UNAME" = x; then
10531           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10532         fi
10533       else
10534         # Otherwise we believe it is a complete path. Use it as it is.
10535         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10536 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10537         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10538 $as_echo_n "checking for UNAME... " >&6; }
10539         if test ! -x "$tool_specified"; then
10540           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10541 $as_echo "not found" >&6; }
10542           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10543         fi
10544         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10545 $as_echo "$tool_specified" >&6; }
10546       fi
10547     fi
10548   fi
10549 
10550 
10551 
10552   if test "x$UNAME" = x; then
10553     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10554   fi
10555 
10556 
10557 
10558 
10559 
10560   # Publish this variable in the help.
10561 
10562 
10563   if test "x$UNIQ" = x; then
10564     # The variable is not set by user, try to locate tool using the code snippet
10565     for ac_prog in uniq
10566 do
10567   # Extract the first word of "$ac_prog", so it can be a program name with args.
10568 set dummy $ac_prog; ac_word=$2
10569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10570 $as_echo_n "checking for $ac_word... " >&6; }
10571 if ${ac_cv_path_UNIQ+:} false; then :
10572   $as_echo_n "(cached) " >&6
10573 else
10574   case $UNIQ in
10575   [\\/]* | ?:[\\/]*)
10576   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10577   ;;
10578   *)
10579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10580 for as_dir in $PATH
10581 do
10582   IFS=$as_save_IFS
10583   test -z "$as_dir" && as_dir=.
10584     for ac_exec_ext in '' $ac_executable_extensions; do
10585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10586     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10588     break 2
10589   fi
10590 done
10591   done
10592 IFS=$as_save_IFS
10593 
10594   ;;
10595 esac
10596 fi
10597 UNIQ=$ac_cv_path_UNIQ
10598 if test -n "$UNIQ"; then
10599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10600 $as_echo "$UNIQ" >&6; }
10601 else
10602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603 $as_echo "no" >&6; }
10604 fi
10605 
10606 
10607   test -n "$UNIQ" && break
10608 done
10609 
10610   else
10611     # The variable is set, but is it from the command line or the environment?
10612 
10613     # Try to remove the string !UNIQ! from our list.
10614     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10615     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10616       # If it failed, the variable was not from the command line. Ignore it,
10617       # but warn the user (except for BASH, which is always set by the calling BASH).
10618       if test "xUNIQ" != xBASH; then
10619         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10620 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10621       fi
10622       # Try to locate tool using the code snippet
10623       for ac_prog in uniq
10624 do
10625   # Extract the first word of "$ac_prog", so it can be a program name with args.
10626 set dummy $ac_prog; ac_word=$2
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10628 $as_echo_n "checking for $ac_word... " >&6; }
10629 if ${ac_cv_path_UNIQ+:} false; then :
10630   $as_echo_n "(cached) " >&6
10631 else
10632   case $UNIQ in
10633   [\\/]* | ?:[\\/]*)
10634   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10635   ;;
10636   *)
10637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10638 for as_dir in $PATH
10639 do
10640   IFS=$as_save_IFS
10641   test -z "$as_dir" && as_dir=.
10642     for ac_exec_ext in '' $ac_executable_extensions; do
10643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10644     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10646     break 2
10647   fi
10648 done
10649   done
10650 IFS=$as_save_IFS
10651 
10652   ;;
10653 esac
10654 fi
10655 UNIQ=$ac_cv_path_UNIQ
10656 if test -n "$UNIQ"; then
10657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10658 $as_echo "$UNIQ" >&6; }
10659 else
10660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661 $as_echo "no" >&6; }
10662 fi
10663 
10664 
10665   test -n "$UNIQ" && break
10666 done
10667 
10668     else
10669       # If it succeeded, then it was overridden by the user. We will use it
10670       # for the tool.
10671 
10672       # First remove it from the list of overridden variables, so we can test
10673       # for unknown variables in the end.
10674       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10675 
10676       # Check if the provided tool contains a complete path.
10677       tool_specified="$UNIQ"
10678       tool_basename="${tool_specified##*/}"
10679       if test "x$tool_basename" = "x$tool_specified"; then
10680         # A command without a complete path is provided, search $PATH.
10681         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10682 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10683         # Extract the first word of "$tool_basename", so it can be a program name with args.
10684 set dummy $tool_basename; ac_word=$2
10685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10686 $as_echo_n "checking for $ac_word... " >&6; }
10687 if ${ac_cv_path_UNIQ+:} false; then :
10688   $as_echo_n "(cached) " >&6
10689 else
10690   case $UNIQ in
10691   [\\/]* | ?:[\\/]*)
10692   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10693   ;;
10694   *)
10695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10696 for as_dir in $PATH
10697 do
10698   IFS=$as_save_IFS
10699   test -z "$as_dir" && as_dir=.
10700     for ac_exec_ext in '' $ac_executable_extensions; do
10701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10702     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10704     break 2
10705   fi
10706 done
10707   done
10708 IFS=$as_save_IFS
10709 
10710   ;;
10711 esac
10712 fi
10713 UNIQ=$ac_cv_path_UNIQ
10714 if test -n "$UNIQ"; then
10715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10716 $as_echo "$UNIQ" >&6; }
10717 else
10718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719 $as_echo "no" >&6; }
10720 fi
10721 
10722 
10723         if test "x$UNIQ" = x; then
10724           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10725         fi
10726       else
10727         # Otherwise we believe it is a complete path. Use it as it is.
10728         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10729 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10731 $as_echo_n "checking for UNIQ... " >&6; }
10732         if test ! -x "$tool_specified"; then
10733           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10734 $as_echo "not found" >&6; }
10735           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10736         fi
10737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10738 $as_echo "$tool_specified" >&6; }
10739       fi
10740     fi
10741   fi
10742 
10743 
10744 
10745   if test "x$UNIQ" = x; then
10746     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10747   fi
10748 
10749 
10750 
10751 
10752 
10753   # Publish this variable in the help.
10754 
10755 
10756   if test "x$WC" = x; then
10757     # The variable is not set by user, try to locate tool using the code snippet
10758     for ac_prog in wc
10759 do
10760   # Extract the first word of "$ac_prog", so it can be a program name with args.
10761 set dummy $ac_prog; ac_word=$2
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10763 $as_echo_n "checking for $ac_word... " >&6; }
10764 if ${ac_cv_path_WC+:} false; then :
10765   $as_echo_n "(cached) " >&6
10766 else
10767   case $WC in
10768   [\\/]* | ?:[\\/]*)
10769   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10770   ;;
10771   *)
10772   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10773 for as_dir in $PATH
10774 do
10775   IFS=$as_save_IFS
10776   test -z "$as_dir" && as_dir=.
10777     for ac_exec_ext in '' $ac_executable_extensions; do
10778   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10779     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10780     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10781     break 2
10782   fi
10783 done
10784   done
10785 IFS=$as_save_IFS
10786 
10787   ;;
10788 esac
10789 fi
10790 WC=$ac_cv_path_WC
10791 if test -n "$WC"; then
10792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10793 $as_echo "$WC" >&6; }
10794 else
10795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796 $as_echo "no" >&6; }
10797 fi
10798 
10799 
10800   test -n "$WC" && break
10801 done
10802 
10803   else
10804     # The variable is set, but is it from the command line or the environment?
10805 
10806     # Try to remove the string !WC! from our list.
10807     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10808     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10809       # If it failed, the variable was not from the command line. Ignore it,
10810       # but warn the user (except for BASH, which is always set by the calling BASH).
10811       if test "xWC" != xBASH; then
10812         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10813 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10814       fi
10815       # Try to locate tool using the code snippet
10816       for ac_prog in wc
10817 do
10818   # Extract the first word of "$ac_prog", so it can be a program name with args.
10819 set dummy $ac_prog; ac_word=$2
10820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10821 $as_echo_n "checking for $ac_word... " >&6; }
10822 if ${ac_cv_path_WC+:} false; then :
10823   $as_echo_n "(cached) " >&6
10824 else
10825   case $WC in
10826   [\\/]* | ?:[\\/]*)
10827   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10828   ;;
10829   *)
10830   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10831 for as_dir in $PATH
10832 do
10833   IFS=$as_save_IFS
10834   test -z "$as_dir" && as_dir=.
10835     for ac_exec_ext in '' $ac_executable_extensions; do
10836   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10837     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10838     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10839     break 2
10840   fi
10841 done
10842   done
10843 IFS=$as_save_IFS
10844 
10845   ;;
10846 esac
10847 fi
10848 WC=$ac_cv_path_WC
10849 if test -n "$WC"; then
10850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10851 $as_echo "$WC" >&6; }
10852 else
10853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10854 $as_echo "no" >&6; }
10855 fi
10856 
10857 
10858   test -n "$WC" && break
10859 done
10860 
10861     else
10862       # If it succeeded, then it was overridden by the user. We will use it
10863       # for the tool.
10864 
10865       # First remove it from the list of overridden variables, so we can test
10866       # for unknown variables in the end.
10867       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10868 
10869       # Check if the provided tool contains a complete path.
10870       tool_specified="$WC"
10871       tool_basename="${tool_specified##*/}"
10872       if test "x$tool_basename" = "x$tool_specified"; then
10873         # A command without a complete path is provided, search $PATH.
10874         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10875 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10876         # Extract the first word of "$tool_basename", so it can be a program name with args.
10877 set dummy $tool_basename; ac_word=$2
10878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879 $as_echo_n "checking for $ac_word... " >&6; }
10880 if ${ac_cv_path_WC+:} false; then :
10881   $as_echo_n "(cached) " >&6
10882 else
10883   case $WC in
10884   [\\/]* | ?:[\\/]*)
10885   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10886   ;;
10887   *)
10888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889 for as_dir in $PATH
10890 do
10891   IFS=$as_save_IFS
10892   test -z "$as_dir" && as_dir=.
10893     for ac_exec_ext in '' $ac_executable_extensions; do
10894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897     break 2
10898   fi
10899 done
10900   done
10901 IFS=$as_save_IFS
10902 
10903   ;;
10904 esac
10905 fi
10906 WC=$ac_cv_path_WC
10907 if test -n "$WC"; then
10908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10909 $as_echo "$WC" >&6; }
10910 else
10911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912 $as_echo "no" >&6; }
10913 fi
10914 
10915 
10916         if test "x$WC" = x; then
10917           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10918         fi
10919       else
10920         # Otherwise we believe it is a complete path. Use it as it is.
10921         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10922 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10923         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10924 $as_echo_n "checking for WC... " >&6; }
10925         if test ! -x "$tool_specified"; then
10926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10927 $as_echo "not found" >&6; }
10928           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10929         fi
10930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10931 $as_echo "$tool_specified" >&6; }
10932       fi
10933     fi
10934   fi
10935 
10936 
10937 
10938   if test "x$WC" = x; then
10939     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10940   fi
10941 
10942 
10943 
10944 
10945 
10946   # Publish this variable in the help.
10947 
10948 
10949   if test "x$WHICH" = x; then
10950     # The variable is not set by user, try to locate tool using the code snippet
10951     for ac_prog in which
10952 do
10953   # Extract the first word of "$ac_prog", so it can be a program name with args.
10954 set dummy $ac_prog; ac_word=$2
10955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10956 $as_echo_n "checking for $ac_word... " >&6; }
10957 if ${ac_cv_path_WHICH+:} false; then :
10958   $as_echo_n "(cached) " >&6
10959 else
10960   case $WHICH in
10961   [\\/]* | ?:[\\/]*)
10962   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10963   ;;
10964   *)
10965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10966 for as_dir in $PATH
10967 do
10968   IFS=$as_save_IFS
10969   test -z "$as_dir" && as_dir=.
10970     for ac_exec_ext in '' $ac_executable_extensions; do
10971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10972     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10974     break 2
10975   fi
10976 done
10977   done
10978 IFS=$as_save_IFS
10979 
10980   ;;
10981 esac
10982 fi
10983 WHICH=$ac_cv_path_WHICH
10984 if test -n "$WHICH"; then
10985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10986 $as_echo "$WHICH" >&6; }
10987 else
10988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989 $as_echo "no" >&6; }
10990 fi
10991 
10992 
10993   test -n "$WHICH" && break
10994 done
10995 
10996   else
10997     # The variable is set, but is it from the command line or the environment?
10998 
10999     # Try to remove the string !WHICH! from our list.
11000     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11001     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11002       # If it failed, the variable was not from the command line. Ignore it,
11003       # but warn the user (except for BASH, which is always set by the calling BASH).
11004       if test "xWHICH" != xBASH; then
11005         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11006 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11007       fi
11008       # Try to locate tool using the code snippet
11009       for ac_prog in which
11010 do
11011   # Extract the first word of "$ac_prog", so it can be a program name with args.
11012 set dummy $ac_prog; ac_word=$2
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11014 $as_echo_n "checking for $ac_word... " >&6; }
11015 if ${ac_cv_path_WHICH+:} false; then :
11016   $as_echo_n "(cached) " >&6
11017 else
11018   case $WHICH in
11019   [\\/]* | ?:[\\/]*)
11020   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11021   ;;
11022   *)
11023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11024 for as_dir in $PATH
11025 do
11026   IFS=$as_save_IFS
11027   test -z "$as_dir" && as_dir=.
11028     for ac_exec_ext in '' $ac_executable_extensions; do
11029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11030     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11032     break 2
11033   fi
11034 done
11035   done
11036 IFS=$as_save_IFS
11037 
11038   ;;
11039 esac
11040 fi
11041 WHICH=$ac_cv_path_WHICH
11042 if test -n "$WHICH"; then
11043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11044 $as_echo "$WHICH" >&6; }
11045 else
11046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047 $as_echo "no" >&6; }
11048 fi
11049 
11050 
11051   test -n "$WHICH" && break
11052 done
11053 
11054     else
11055       # If it succeeded, then it was overridden by the user. We will use it
11056       # for the tool.
11057 
11058       # First remove it from the list of overridden variables, so we can test
11059       # for unknown variables in the end.
11060       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11061 
11062       # Check if the provided tool contains a complete path.
11063       tool_specified="$WHICH"
11064       tool_basename="${tool_specified##*/}"
11065       if test "x$tool_basename" = "x$tool_specified"; then
11066         # A command without a complete path is provided, search $PATH.
11067         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11068 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11069         # Extract the first word of "$tool_basename", so it can be a program name with args.
11070 set dummy $tool_basename; ac_word=$2
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11072 $as_echo_n "checking for $ac_word... " >&6; }
11073 if ${ac_cv_path_WHICH+:} false; then :
11074   $as_echo_n "(cached) " >&6
11075 else
11076   case $WHICH in
11077   [\\/]* | ?:[\\/]*)
11078   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11079   ;;
11080   *)
11081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11082 for as_dir in $PATH
11083 do
11084   IFS=$as_save_IFS
11085   test -z "$as_dir" && as_dir=.
11086     for ac_exec_ext in '' $ac_executable_extensions; do
11087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11088     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11090     break 2
11091   fi
11092 done
11093   done
11094 IFS=$as_save_IFS
11095 
11096   ;;
11097 esac
11098 fi
11099 WHICH=$ac_cv_path_WHICH
11100 if test -n "$WHICH"; then
11101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11102 $as_echo "$WHICH" >&6; }
11103 else
11104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105 $as_echo "no" >&6; }
11106 fi
11107 
11108 
11109         if test "x$WHICH" = x; then
11110           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11111         fi
11112       else
11113         # Otherwise we believe it is a complete path. Use it as it is.
11114         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11115 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11116         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11117 $as_echo_n "checking for WHICH... " >&6; }
11118         if test ! -x "$tool_specified"; then
11119           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11120 $as_echo "not found" >&6; }
11121           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11122         fi
11123         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11124 $as_echo "$tool_specified" >&6; }
11125       fi
11126     fi
11127   fi
11128 
11129 
11130 
11131   if test "x$WHICH" = x; then
11132     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11133   fi
11134 
11135 
11136 
11137 
11138 
11139   # Publish this variable in the help.
11140 
11141 
11142   if test "x$XARGS" = x; then
11143     # The variable is not set by user, try to locate tool using the code snippet
11144     for ac_prog in xargs
11145 do
11146   # Extract the first word of "$ac_prog", so it can be a program name with args.
11147 set dummy $ac_prog; ac_word=$2
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11149 $as_echo_n "checking for $ac_word... " >&6; }
11150 if ${ac_cv_path_XARGS+:} false; then :
11151   $as_echo_n "(cached) " >&6
11152 else
11153   case $XARGS in
11154   [\\/]* | ?:[\\/]*)
11155   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11156   ;;
11157   *)
11158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11159 for as_dir in $PATH
11160 do
11161   IFS=$as_save_IFS
11162   test -z "$as_dir" && as_dir=.
11163     for ac_exec_ext in '' $ac_executable_extensions; do
11164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11165     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11167     break 2
11168   fi
11169 done
11170   done
11171 IFS=$as_save_IFS
11172 
11173   ;;
11174 esac
11175 fi
11176 XARGS=$ac_cv_path_XARGS
11177 if test -n "$XARGS"; then
11178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11179 $as_echo "$XARGS" >&6; }
11180 else
11181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11182 $as_echo "no" >&6; }
11183 fi
11184 
11185 
11186   test -n "$XARGS" && break
11187 done
11188 
11189   else
11190     # The variable is set, but is it from the command line or the environment?
11191 
11192     # Try to remove the string !XARGS! from our list.
11193     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11194     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11195       # If it failed, the variable was not from the command line. Ignore it,
11196       # but warn the user (except for BASH, which is always set by the calling BASH).
11197       if test "xXARGS" != xBASH; then
11198         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11199 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11200       fi
11201       # Try to locate tool using the code snippet
11202       for ac_prog in xargs
11203 do
11204   # Extract the first word of "$ac_prog", so it can be a program name with args.
11205 set dummy $ac_prog; ac_word=$2
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11207 $as_echo_n "checking for $ac_word... " >&6; }
11208 if ${ac_cv_path_XARGS+:} false; then :
11209   $as_echo_n "(cached) " >&6
11210 else
11211   case $XARGS in
11212   [\\/]* | ?:[\\/]*)
11213   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11214   ;;
11215   *)
11216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11217 for as_dir in $PATH
11218 do
11219   IFS=$as_save_IFS
11220   test -z "$as_dir" && as_dir=.
11221     for ac_exec_ext in '' $ac_executable_extensions; do
11222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11223     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11225     break 2
11226   fi
11227 done
11228   done
11229 IFS=$as_save_IFS
11230 
11231   ;;
11232 esac
11233 fi
11234 XARGS=$ac_cv_path_XARGS
11235 if test -n "$XARGS"; then
11236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11237 $as_echo "$XARGS" >&6; }
11238 else
11239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11240 $as_echo "no" >&6; }
11241 fi
11242 
11243 
11244   test -n "$XARGS" && break
11245 done
11246 
11247     else
11248       # If it succeeded, then it was overridden by the user. We will use it
11249       # for the tool.
11250 
11251       # First remove it from the list of overridden variables, so we can test
11252       # for unknown variables in the end.
11253       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11254 
11255       # Check if the provided tool contains a complete path.
11256       tool_specified="$XARGS"
11257       tool_basename="${tool_specified##*/}"
11258       if test "x$tool_basename" = "x$tool_specified"; then
11259         # A command without a complete path is provided, search $PATH.
11260         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11261 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11262         # Extract the first word of "$tool_basename", so it can be a program name with args.
11263 set dummy $tool_basename; ac_word=$2
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11265 $as_echo_n "checking for $ac_word... " >&6; }
11266 if ${ac_cv_path_XARGS+:} false; then :
11267   $as_echo_n "(cached) " >&6
11268 else
11269   case $XARGS in
11270   [\\/]* | ?:[\\/]*)
11271   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11272   ;;
11273   *)
11274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11275 for as_dir in $PATH
11276 do
11277   IFS=$as_save_IFS
11278   test -z "$as_dir" && as_dir=.
11279     for ac_exec_ext in '' $ac_executable_extensions; do
11280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11281     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11283     break 2
11284   fi
11285 done
11286   done
11287 IFS=$as_save_IFS
11288 
11289   ;;
11290 esac
11291 fi
11292 XARGS=$ac_cv_path_XARGS
11293 if test -n "$XARGS"; then
11294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11295 $as_echo "$XARGS" >&6; }
11296 else
11297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298 $as_echo "no" >&6; }
11299 fi
11300 
11301 
11302         if test "x$XARGS" = x; then
11303           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11304         fi
11305       else
11306         # Otherwise we believe it is a complete path. Use it as it is.
11307         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11308 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11310 $as_echo_n "checking for XARGS... " >&6; }
11311         if test ! -x "$tool_specified"; then
11312           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11313 $as_echo "not found" >&6; }
11314           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11315         fi
11316         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11317 $as_echo "$tool_specified" >&6; }
11318       fi
11319     fi
11320   fi
11321 
11322 
11323 
11324   if test "x$XARGS" = x; then
11325     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11326   fi
11327 
11328 
11329 
11330   # Then required tools that require some special treatment.
11331 
11332 
11333   # Publish this variable in the help.
11334 
11335 
11336   if test "x$AWK" = x; then
11337     # The variable is not set by user, try to locate tool using the code snippet
11338     for ac_prog in gawk mawk nawk awk
11339 do
11340   # Extract the first word of "$ac_prog", so it can be a program name with args.
11341 set dummy $ac_prog; ac_word=$2
11342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11343 $as_echo_n "checking for $ac_word... " >&6; }
11344 if ${ac_cv_prog_AWK+:} false; then :
11345   $as_echo_n "(cached) " >&6
11346 else
11347   if test -n "$AWK"; then
11348   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11349 else
11350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11351 for as_dir in $PATH
11352 do
11353   IFS=$as_save_IFS
11354   test -z "$as_dir" && as_dir=.
11355     for ac_exec_ext in '' $ac_executable_extensions; do
11356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11357     ac_cv_prog_AWK="$ac_prog"
11358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11359     break 2
11360   fi
11361 done
11362   done
11363 IFS=$as_save_IFS
11364 
11365 fi
11366 fi
11367 AWK=$ac_cv_prog_AWK
11368 if test -n "$AWK"; then
11369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11370 $as_echo "$AWK" >&6; }
11371 else
11372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11373 $as_echo "no" >&6; }
11374 fi
11375 
11376 
11377   test -n "$AWK" && break
11378 done
11379 
11380   else
11381     # The variable is set, but is it from the command line or the environment?
11382 
11383     # Try to remove the string !AWK! from our list.
11384     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11385     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11386       # If it failed, the variable was not from the command line. Ignore it,
11387       # but warn the user (except for BASH, which is always set by the calling BASH).
11388       if test "xAWK" != xBASH; then
11389         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11390 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11391       fi
11392       # Try to locate tool using the code snippet
11393       for ac_prog in gawk mawk nawk awk
11394 do
11395   # Extract the first word of "$ac_prog", so it can be a program name with args.
11396 set dummy $ac_prog; ac_word=$2
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11398 $as_echo_n "checking for $ac_word... " >&6; }
11399 if ${ac_cv_prog_AWK+:} false; then :
11400   $as_echo_n "(cached) " >&6
11401 else
11402   if test -n "$AWK"; then
11403   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11404 else
11405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11406 for as_dir in $PATH
11407 do
11408   IFS=$as_save_IFS
11409   test -z "$as_dir" && as_dir=.
11410     for ac_exec_ext in '' $ac_executable_extensions; do
11411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11412     ac_cv_prog_AWK="$ac_prog"
11413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11414     break 2
11415   fi
11416 done
11417   done
11418 IFS=$as_save_IFS
11419 
11420 fi
11421 fi
11422 AWK=$ac_cv_prog_AWK
11423 if test -n "$AWK"; then
11424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11425 $as_echo "$AWK" >&6; }
11426 else
11427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11428 $as_echo "no" >&6; }
11429 fi
11430 
11431 
11432   test -n "$AWK" && break
11433 done
11434 
11435     else
11436       # If it succeeded, then it was overridden by the user. We will use it
11437       # for the tool.
11438 
11439       # First remove it from the list of overridden variables, so we can test
11440       # for unknown variables in the end.
11441       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11442 
11443       # Check if the provided tool contains a complete path.
11444       tool_specified="$AWK"
11445       tool_basename="${tool_specified##*/}"
11446       if test "x$tool_basename" = "x$tool_specified"; then
11447         # A command without a complete path is provided, search $PATH.
11448         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11449 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11450         # Extract the first word of "$tool_basename", so it can be a program name with args.
11451 set dummy $tool_basename; ac_word=$2
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11453 $as_echo_n "checking for $ac_word... " >&6; }
11454 if ${ac_cv_path_AWK+:} false; then :
11455   $as_echo_n "(cached) " >&6
11456 else
11457   case $AWK in
11458   [\\/]* | ?:[\\/]*)
11459   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11460   ;;
11461   *)
11462   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11463 for as_dir in $PATH
11464 do
11465   IFS=$as_save_IFS
11466   test -z "$as_dir" && as_dir=.
11467     for ac_exec_ext in '' $ac_executable_extensions; do
11468   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11469     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11470     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11471     break 2
11472   fi
11473 done
11474   done
11475 IFS=$as_save_IFS
11476 
11477   ;;
11478 esac
11479 fi
11480 AWK=$ac_cv_path_AWK
11481 if test -n "$AWK"; then
11482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11483 $as_echo "$AWK" >&6; }
11484 else
11485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11486 $as_echo "no" >&6; }
11487 fi
11488 
11489 
11490         if test "x$AWK" = x; then
11491           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11492         fi
11493       else
11494         # Otherwise we believe it is a complete path. Use it as it is.
11495         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11496 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11497         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11498 $as_echo_n "checking for AWK... " >&6; }
11499         if test ! -x "$tool_specified"; then
11500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11501 $as_echo "not found" >&6; }
11502           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11503         fi
11504         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11505 $as_echo "$tool_specified" >&6; }
11506       fi
11507     fi
11508   fi
11509 
11510 
11511   if test "x$AWK" = x; then
11512     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11513   fi
11514 
11515 
11516 
11517 
11518   # Publish this variable in the help.
11519 
11520 
11521   if test "x$GREP" = x; then
11522     # The variable is not set by user, try to locate tool using the code snippet
11523     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11524 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11525 if ${ac_cv_path_GREP+:} false; then :
11526   $as_echo_n "(cached) " >&6
11527 else
11528   if test -z "$GREP"; then
11529   ac_path_GREP_found=false
11530   # Loop through the user's path and test for each of PROGNAME-LIST
11531   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11532 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11533 do
11534   IFS=$as_save_IFS
11535   test -z "$as_dir" && as_dir=.
11536     for ac_prog in grep ggrep; do
11537     for ac_exec_ext in '' $ac_executable_extensions; do
11538       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11539       as_fn_executable_p "$ac_path_GREP" || continue
11540 # Check for GNU ac_path_GREP and select it if it is found.
11541   # Check for GNU $ac_path_GREP
11542 case `"$ac_path_GREP" --version 2>&1` in
11543 *GNU*)
11544   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11545 *)
11546   ac_count=0
11547   $as_echo_n 0123456789 >"conftest.in"
11548   while :
11549   do
11550     cat "conftest.in" "conftest.in" >"conftest.tmp"
11551     mv "conftest.tmp" "conftest.in"
11552     cp "conftest.in" "conftest.nl"
11553     $as_echo 'GREP' >> "conftest.nl"
11554     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11555     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11556     as_fn_arith $ac_count + 1 && ac_count=$as_val
11557     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11558       # Best one so far, save it but keep looking for a better one
11559       ac_cv_path_GREP="$ac_path_GREP"
11560       ac_path_GREP_max=$ac_count
11561     fi
11562     # 10*(2^10) chars as input seems more than enough
11563     test $ac_count -gt 10 && break
11564   done
11565   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11566 esac
11567 
11568       $ac_path_GREP_found && break 3
11569     done
11570   done
11571   done
11572 IFS=$as_save_IFS
11573   if test -z "$ac_cv_path_GREP"; then
11574     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11575   fi
11576 else
11577   ac_cv_path_GREP=$GREP
11578 fi
11579 
11580 fi
11581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11582 $as_echo "$ac_cv_path_GREP" >&6; }
11583  GREP="$ac_cv_path_GREP"
11584 
11585 
11586   else
11587     # The variable is set, but is it from the command line or the environment?
11588 
11589     # Try to remove the string !GREP! from our list.
11590     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11591     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11592       # If it failed, the variable was not from the command line. Ignore it,
11593       # but warn the user (except for BASH, which is always set by the calling BASH).
11594       if test "xGREP" != xBASH; then
11595         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11596 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11597       fi
11598       # Try to locate tool using the code snippet
11599       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11600 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11601 if ${ac_cv_path_GREP+:} false; then :
11602   $as_echo_n "(cached) " >&6
11603 else
11604   if test -z "$GREP"; then
11605   ac_path_GREP_found=false
11606   # Loop through the user's path and test for each of PROGNAME-LIST
11607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11608 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11609 do
11610   IFS=$as_save_IFS
11611   test -z "$as_dir" && as_dir=.
11612     for ac_prog in grep ggrep; do
11613     for ac_exec_ext in '' $ac_executable_extensions; do
11614       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11615       as_fn_executable_p "$ac_path_GREP" || continue
11616 # Check for GNU ac_path_GREP and select it if it is found.
11617   # Check for GNU $ac_path_GREP
11618 case `"$ac_path_GREP" --version 2>&1` in
11619 *GNU*)
11620   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11621 *)
11622   ac_count=0
11623   $as_echo_n 0123456789 >"conftest.in"
11624   while :
11625   do
11626     cat "conftest.in" "conftest.in" >"conftest.tmp"
11627     mv "conftest.tmp" "conftest.in"
11628     cp "conftest.in" "conftest.nl"
11629     $as_echo 'GREP' >> "conftest.nl"
11630     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11631     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11632     as_fn_arith $ac_count + 1 && ac_count=$as_val
11633     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11634       # Best one so far, save it but keep looking for a better one
11635       ac_cv_path_GREP="$ac_path_GREP"
11636       ac_path_GREP_max=$ac_count
11637     fi
11638     # 10*(2^10) chars as input seems more than enough
11639     test $ac_count -gt 10 && break
11640   done
11641   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11642 esac
11643 
11644       $ac_path_GREP_found && break 3
11645     done
11646   done
11647   done
11648 IFS=$as_save_IFS
11649   if test -z "$ac_cv_path_GREP"; then
11650     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11651   fi
11652 else
11653   ac_cv_path_GREP=$GREP
11654 fi
11655 
11656 fi
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11658 $as_echo "$ac_cv_path_GREP" >&6; }
11659  GREP="$ac_cv_path_GREP"
11660 
11661 
11662     else
11663       # If it succeeded, then it was overridden by the user. We will use it
11664       # for the tool.
11665 
11666       # First remove it from the list of overridden variables, so we can test
11667       # for unknown variables in the end.
11668       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11669 
11670       # Check if the provided tool contains a complete path.
11671       tool_specified="$GREP"
11672       tool_basename="${tool_specified##*/}"
11673       if test "x$tool_basename" = "x$tool_specified"; then
11674         # A command without a complete path is provided, search $PATH.
11675         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11676 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11677         # Extract the first word of "$tool_basename", so it can be a program name with args.
11678 set dummy $tool_basename; 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_GREP+:} false; then :
11682   $as_echo_n "(cached) " >&6
11683 else
11684   case $GREP in
11685   [\\/]* | ?:[\\/]*)
11686   ac_cv_path_GREP="$GREP" # 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_GREP="$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 GREP=$ac_cv_path_GREP
11708 if test -n "$GREP"; then
11709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11710 $as_echo "$GREP" >&6; }
11711 else
11712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713 $as_echo "no" >&6; }
11714 fi
11715 
11716 
11717         if test "x$GREP" = x; then
11718           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11719         fi
11720       else
11721         # Otherwise we believe it is a complete path. Use it as it is.
11722         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11723 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11724         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11725 $as_echo_n "checking for GREP... " >&6; }
11726         if test ! -x "$tool_specified"; then
11727           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11728 $as_echo "not found" >&6; }
11729           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11730         fi
11731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11732 $as_echo "$tool_specified" >&6; }
11733       fi
11734     fi
11735   fi
11736 
11737 
11738   if test "x$GREP" = x; then
11739     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11740   fi
11741 
11742 
11743 
11744 
11745   # Publish this variable in the help.
11746 
11747 
11748   if test "x$EGREP" = x; then
11749     # The variable is not set by user, try to locate tool using the code snippet
11750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11751 $as_echo_n "checking for egrep... " >&6; }
11752 if ${ac_cv_path_EGREP+:} false; then :
11753   $as_echo_n "(cached) " >&6
11754 else
11755   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11756    then ac_cv_path_EGREP="$GREP -E"
11757    else
11758      if test -z "$EGREP"; then
11759   ac_path_EGREP_found=false
11760   # Loop through the user's path and test for each of PROGNAME-LIST
11761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11762 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11763 do
11764   IFS=$as_save_IFS
11765   test -z "$as_dir" && as_dir=.
11766     for ac_prog in egrep; do
11767     for ac_exec_ext in '' $ac_executable_extensions; do
11768       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11769       as_fn_executable_p "$ac_path_EGREP" || continue
11770 # Check for GNU ac_path_EGREP and select it if it is found.
11771   # Check for GNU $ac_path_EGREP
11772 case `"$ac_path_EGREP" --version 2>&1` in
11773 *GNU*)
11774   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11775 *)
11776   ac_count=0
11777   $as_echo_n 0123456789 >"conftest.in"
11778   while :
11779   do
11780     cat "conftest.in" "conftest.in" >"conftest.tmp"
11781     mv "conftest.tmp" "conftest.in"
11782     cp "conftest.in" "conftest.nl"
11783     $as_echo 'EGREP' >> "conftest.nl"
11784     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11785     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11786     as_fn_arith $ac_count + 1 && ac_count=$as_val
11787     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11788       # Best one so far, save it but keep looking for a better one
11789       ac_cv_path_EGREP="$ac_path_EGREP"
11790       ac_path_EGREP_max=$ac_count
11791     fi
11792     # 10*(2^10) chars as input seems more than enough
11793     test $ac_count -gt 10 && break
11794   done
11795   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11796 esac
11797 
11798       $ac_path_EGREP_found && break 3
11799     done
11800   done
11801   done
11802 IFS=$as_save_IFS
11803   if test -z "$ac_cv_path_EGREP"; then
11804     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11805   fi
11806 else
11807   ac_cv_path_EGREP=$EGREP
11808 fi
11809 
11810    fi
11811 fi
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11813 $as_echo "$ac_cv_path_EGREP" >&6; }
11814  EGREP="$ac_cv_path_EGREP"
11815 
11816 
11817   else
11818     # The variable is set, but is it from the command line or the environment?
11819 
11820     # Try to remove the string !EGREP! from our list.
11821     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11822     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11823       # If it failed, the variable was not from the command line. Ignore it,
11824       # but warn the user (except for BASH, which is always set by the calling BASH).
11825       if test "xEGREP" != xBASH; then
11826         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11827 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11828       fi
11829       # Try to locate tool using the code snippet
11830       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11831 $as_echo_n "checking for egrep... " >&6; }
11832 if ${ac_cv_path_EGREP+:} false; then :
11833   $as_echo_n "(cached) " >&6
11834 else
11835   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11836    then ac_cv_path_EGREP="$GREP -E"
11837    else
11838      if test -z "$EGREP"; then
11839   ac_path_EGREP_found=false
11840   # Loop through the user's path and test for each of PROGNAME-LIST
11841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11842 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11843 do
11844   IFS=$as_save_IFS
11845   test -z "$as_dir" && as_dir=.
11846     for ac_prog in egrep; do
11847     for ac_exec_ext in '' $ac_executable_extensions; do
11848       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11849       as_fn_executable_p "$ac_path_EGREP" || continue
11850 # Check for GNU ac_path_EGREP and select it if it is found.
11851   # Check for GNU $ac_path_EGREP
11852 case `"$ac_path_EGREP" --version 2>&1` in
11853 *GNU*)
11854   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11855 *)
11856   ac_count=0
11857   $as_echo_n 0123456789 >"conftest.in"
11858   while :
11859   do
11860     cat "conftest.in" "conftest.in" >"conftest.tmp"
11861     mv "conftest.tmp" "conftest.in"
11862     cp "conftest.in" "conftest.nl"
11863     $as_echo 'EGREP' >> "conftest.nl"
11864     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11865     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11866     as_fn_arith $ac_count + 1 && ac_count=$as_val
11867     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11868       # Best one so far, save it but keep looking for a better one
11869       ac_cv_path_EGREP="$ac_path_EGREP"
11870       ac_path_EGREP_max=$ac_count
11871     fi
11872     # 10*(2^10) chars as input seems more than enough
11873     test $ac_count -gt 10 && break
11874   done
11875   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11876 esac
11877 
11878       $ac_path_EGREP_found && break 3
11879     done
11880   done
11881   done
11882 IFS=$as_save_IFS
11883   if test -z "$ac_cv_path_EGREP"; then
11884     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11885   fi
11886 else
11887   ac_cv_path_EGREP=$EGREP
11888 fi
11889 
11890    fi
11891 fi
11892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11893 $as_echo "$ac_cv_path_EGREP" >&6; }
11894  EGREP="$ac_cv_path_EGREP"
11895 
11896 
11897     else
11898       # If it succeeded, then it was overridden by the user. We will use it
11899       # for the tool.
11900 
11901       # First remove it from the list of overridden variables, so we can test
11902       # for unknown variables in the end.
11903       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11904 
11905       # Check if the provided tool contains a complete path.
11906       tool_specified="$EGREP"
11907       tool_basename="${tool_specified##*/}"
11908       if test "x$tool_basename" = "x$tool_specified"; then
11909         # A command without a complete path is provided, search $PATH.
11910         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11911 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11912         # Extract the first word of "$tool_basename", so it can be a program name with args.
11913 set dummy $tool_basename; ac_word=$2
11914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11915 $as_echo_n "checking for $ac_word... " >&6; }
11916 if ${ac_cv_path_EGREP+:} false; then :
11917   $as_echo_n "(cached) " >&6
11918 else
11919   case $EGREP in
11920   [\\/]* | ?:[\\/]*)
11921   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11922   ;;
11923   *)
11924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11925 for as_dir in $PATH
11926 do
11927   IFS=$as_save_IFS
11928   test -z "$as_dir" && as_dir=.
11929     for ac_exec_ext in '' $ac_executable_extensions; do
11930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11931     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11933     break 2
11934   fi
11935 done
11936   done
11937 IFS=$as_save_IFS
11938 
11939   ;;
11940 esac
11941 fi
11942 EGREP=$ac_cv_path_EGREP
11943 if test -n "$EGREP"; then
11944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11945 $as_echo "$EGREP" >&6; }
11946 else
11947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948 $as_echo "no" >&6; }
11949 fi
11950 
11951 
11952         if test "x$EGREP" = x; then
11953           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11954         fi
11955       else
11956         # Otherwise we believe it is a complete path. Use it as it is.
11957         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11958 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11959         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11960 $as_echo_n "checking for EGREP... " >&6; }
11961         if test ! -x "$tool_specified"; then
11962           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11963 $as_echo "not found" >&6; }
11964           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11965         fi
11966         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11967 $as_echo "$tool_specified" >&6; }
11968       fi
11969     fi
11970   fi
11971 
11972 
11973   if test "x$EGREP" = x; then
11974     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11975   fi
11976 
11977 
11978 
11979 
11980   # Publish this variable in the help.
11981 
11982 
11983   if test "x$FGREP" = x; then
11984     # The variable is not set by user, try to locate tool using the code snippet
11985     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11986 $as_echo_n "checking for fgrep... " >&6; }
11987 if ${ac_cv_path_FGREP+:} false; then :
11988   $as_echo_n "(cached) " >&6
11989 else
11990   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11991    then ac_cv_path_FGREP="$GREP -F"
11992    else
11993      if test -z "$FGREP"; then
11994   ac_path_FGREP_found=false
11995   # Loop through the user's path and test for each of PROGNAME-LIST
11996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11997 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11998 do
11999   IFS=$as_save_IFS
12000   test -z "$as_dir" && as_dir=.
12001     for ac_prog in fgrep; do
12002     for ac_exec_ext in '' $ac_executable_extensions; do
12003       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12004       as_fn_executable_p "$ac_path_FGREP" || continue
12005 # Check for GNU ac_path_FGREP and select it if it is found.
12006   # Check for GNU $ac_path_FGREP
12007 case `"$ac_path_FGREP" --version 2>&1` in
12008 *GNU*)
12009   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12010 *)
12011   ac_count=0
12012   $as_echo_n 0123456789 >"conftest.in"
12013   while :
12014   do
12015     cat "conftest.in" "conftest.in" >"conftest.tmp"
12016     mv "conftest.tmp" "conftest.in"
12017     cp "conftest.in" "conftest.nl"
12018     $as_echo 'FGREP' >> "conftest.nl"
12019     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12020     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12021     as_fn_arith $ac_count + 1 && ac_count=$as_val
12022     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12023       # Best one so far, save it but keep looking for a better one
12024       ac_cv_path_FGREP="$ac_path_FGREP"
12025       ac_path_FGREP_max=$ac_count
12026     fi
12027     # 10*(2^10) chars as input seems more than enough
12028     test $ac_count -gt 10 && break
12029   done
12030   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12031 esac
12032 
12033       $ac_path_FGREP_found && break 3
12034     done
12035   done
12036   done
12037 IFS=$as_save_IFS
12038   if test -z "$ac_cv_path_FGREP"; then
12039     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12040   fi
12041 else
12042   ac_cv_path_FGREP=$FGREP
12043 fi
12044 
12045    fi
12046 fi
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12048 $as_echo "$ac_cv_path_FGREP" >&6; }
12049  FGREP="$ac_cv_path_FGREP"
12050 
12051 
12052   else
12053     # The variable is set, but is it from the command line or the environment?
12054 
12055     # Try to remove the string !FGREP! from our list.
12056     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12057     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12058       # If it failed, the variable was not from the command line. Ignore it,
12059       # but warn the user (except for BASH, which is always set by the calling BASH).
12060       if test "xFGREP" != xBASH; then
12061         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12062 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12063       fi
12064       # Try to locate tool using the code snippet
12065       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12066 $as_echo_n "checking for fgrep... " >&6; }
12067 if ${ac_cv_path_FGREP+:} false; then :
12068   $as_echo_n "(cached) " >&6
12069 else
12070   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12071    then ac_cv_path_FGREP="$GREP -F"
12072    else
12073      if test -z "$FGREP"; then
12074   ac_path_FGREP_found=false
12075   # Loop through the user's path and test for each of PROGNAME-LIST
12076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12077 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12078 do
12079   IFS=$as_save_IFS
12080   test -z "$as_dir" && as_dir=.
12081     for ac_prog in fgrep; do
12082     for ac_exec_ext in '' $ac_executable_extensions; do
12083       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12084       as_fn_executable_p "$ac_path_FGREP" || continue
12085 # Check for GNU ac_path_FGREP and select it if it is found.
12086   # Check for GNU $ac_path_FGREP
12087 case `"$ac_path_FGREP" --version 2>&1` in
12088 *GNU*)
12089   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12090 *)
12091   ac_count=0
12092   $as_echo_n 0123456789 >"conftest.in"
12093   while :
12094   do
12095     cat "conftest.in" "conftest.in" >"conftest.tmp"
12096     mv "conftest.tmp" "conftest.in"
12097     cp "conftest.in" "conftest.nl"
12098     $as_echo 'FGREP' >> "conftest.nl"
12099     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12100     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12101     as_fn_arith $ac_count + 1 && ac_count=$as_val
12102     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12103       # Best one so far, save it but keep looking for a better one
12104       ac_cv_path_FGREP="$ac_path_FGREP"
12105       ac_path_FGREP_max=$ac_count
12106     fi
12107     # 10*(2^10) chars as input seems more than enough
12108     test $ac_count -gt 10 && break
12109   done
12110   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12111 esac
12112 
12113       $ac_path_FGREP_found && break 3
12114     done
12115   done
12116   done
12117 IFS=$as_save_IFS
12118   if test -z "$ac_cv_path_FGREP"; then
12119     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12120   fi
12121 else
12122   ac_cv_path_FGREP=$FGREP
12123 fi
12124 
12125    fi
12126 fi
12127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12128 $as_echo "$ac_cv_path_FGREP" >&6; }
12129  FGREP="$ac_cv_path_FGREP"
12130 
12131 
12132     else
12133       # If it succeeded, then it was overridden by the user. We will use it
12134       # for the tool.
12135 
12136       # First remove it from the list of overridden variables, so we can test
12137       # for unknown variables in the end.
12138       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12139 
12140       # Check if the provided tool contains a complete path.
12141       tool_specified="$FGREP"
12142       tool_basename="${tool_specified##*/}"
12143       if test "x$tool_basename" = "x$tool_specified"; then
12144         # A command without a complete path is provided, search $PATH.
12145         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12146 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12147         # Extract the first word of "$tool_basename", so it can be a program name with args.
12148 set dummy $tool_basename; ac_word=$2
12149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12150 $as_echo_n "checking for $ac_word... " >&6; }
12151 if ${ac_cv_path_FGREP+:} false; then :
12152   $as_echo_n "(cached) " >&6
12153 else
12154   case $FGREP in
12155   [\\/]* | ?:[\\/]*)
12156   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12157   ;;
12158   *)
12159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12160 for as_dir in $PATH
12161 do
12162   IFS=$as_save_IFS
12163   test -z "$as_dir" && as_dir=.
12164     for ac_exec_ext in '' $ac_executable_extensions; do
12165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12166     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12168     break 2
12169   fi
12170 done
12171   done
12172 IFS=$as_save_IFS
12173 
12174   ;;
12175 esac
12176 fi
12177 FGREP=$ac_cv_path_FGREP
12178 if test -n "$FGREP"; then
12179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12180 $as_echo "$FGREP" >&6; }
12181 else
12182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12183 $as_echo "no" >&6; }
12184 fi
12185 
12186 
12187         if test "x$FGREP" = x; then
12188           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12189         fi
12190       else
12191         # Otherwise we believe it is a complete path. Use it as it is.
12192         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12193 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12195 $as_echo_n "checking for FGREP... " >&6; }
12196         if test ! -x "$tool_specified"; then
12197           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12198 $as_echo "not found" >&6; }
12199           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12200         fi
12201         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12202 $as_echo "$tool_specified" >&6; }
12203       fi
12204     fi
12205   fi
12206 
12207 
12208   if test "x$FGREP" = x; then
12209     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12210   fi
12211 
12212 
12213 
12214 
12215   # Publish this variable in the help.
12216 
12217 
12218   if test "x$SED" = x; then
12219     # The variable is not set by user, try to locate tool using the code snippet
12220     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12221 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12222 if ${ac_cv_path_SED+:} false; then :
12223   $as_echo_n "(cached) " >&6
12224 else
12225             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12226      for ac_i in 1 2 3 4 5 6 7; do
12227        ac_script="$ac_script$as_nl$ac_script"
12228      done
12229      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12230      { ac_script=; unset ac_script;}
12231      if test -z "$SED"; then
12232   ac_path_SED_found=false
12233   # Loop through the user's path and test for each of PROGNAME-LIST
12234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12235 for as_dir in $PATH
12236 do
12237   IFS=$as_save_IFS
12238   test -z "$as_dir" && as_dir=.
12239     for ac_prog in sed gsed; do
12240     for ac_exec_ext in '' $ac_executable_extensions; do
12241       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12242       as_fn_executable_p "$ac_path_SED" || continue
12243 # Check for GNU ac_path_SED and select it if it is found.
12244   # Check for GNU $ac_path_SED
12245 case `"$ac_path_SED" --version 2>&1` in
12246 *GNU*)
12247   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12248 *)
12249   ac_count=0
12250   $as_echo_n 0123456789 >"conftest.in"
12251   while :
12252   do
12253     cat "conftest.in" "conftest.in" >"conftest.tmp"
12254     mv "conftest.tmp" "conftest.in"
12255     cp "conftest.in" "conftest.nl"
12256     $as_echo '' >> "conftest.nl"
12257     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12258     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12259     as_fn_arith $ac_count + 1 && ac_count=$as_val
12260     if test $ac_count -gt ${ac_path_SED_max-0}; then
12261       # Best one so far, save it but keep looking for a better one
12262       ac_cv_path_SED="$ac_path_SED"
12263       ac_path_SED_max=$ac_count
12264     fi
12265     # 10*(2^10) chars as input seems more than enough
12266     test $ac_count -gt 10 && break
12267   done
12268   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12269 esac
12270 
12271       $ac_path_SED_found && break 3
12272     done
12273   done
12274   done
12275 IFS=$as_save_IFS
12276   if test -z "$ac_cv_path_SED"; then
12277     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12278   fi
12279 else
12280   ac_cv_path_SED=$SED
12281 fi
12282 
12283 fi
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12285 $as_echo "$ac_cv_path_SED" >&6; }
12286  SED="$ac_cv_path_SED"
12287   rm -f conftest.sed
12288 
12289   else
12290     # The variable is set, but is it from the command line or the environment?
12291 
12292     # Try to remove the string !SED! from our list.
12293     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12294     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12295       # If it failed, the variable was not from the command line. Ignore it,
12296       # but warn the user (except for BASH, which is always set by the calling BASH).
12297       if test "xSED" != xBASH; then
12298         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12299 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12300       fi
12301       # Try to locate tool using the code snippet
12302       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12303 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12304 if ${ac_cv_path_SED+:} false; then :
12305   $as_echo_n "(cached) " >&6
12306 else
12307             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12308      for ac_i in 1 2 3 4 5 6 7; do
12309        ac_script="$ac_script$as_nl$ac_script"
12310      done
12311      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12312      { ac_script=; unset ac_script;}
12313      if test -z "$SED"; then
12314   ac_path_SED_found=false
12315   # Loop through the user's path and test for each of PROGNAME-LIST
12316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317 for as_dir in $PATH
12318 do
12319   IFS=$as_save_IFS
12320   test -z "$as_dir" && as_dir=.
12321     for ac_prog in sed gsed; do
12322     for ac_exec_ext in '' $ac_executable_extensions; do
12323       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12324       as_fn_executable_p "$ac_path_SED" || continue
12325 # Check for GNU ac_path_SED and select it if it is found.
12326   # Check for GNU $ac_path_SED
12327 case `"$ac_path_SED" --version 2>&1` in
12328 *GNU*)
12329   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12330 *)
12331   ac_count=0
12332   $as_echo_n 0123456789 >"conftest.in"
12333   while :
12334   do
12335     cat "conftest.in" "conftest.in" >"conftest.tmp"
12336     mv "conftest.tmp" "conftest.in"
12337     cp "conftest.in" "conftest.nl"
12338     $as_echo '' >> "conftest.nl"
12339     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12340     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12341     as_fn_arith $ac_count + 1 && ac_count=$as_val
12342     if test $ac_count -gt ${ac_path_SED_max-0}; then
12343       # Best one so far, save it but keep looking for a better one
12344       ac_cv_path_SED="$ac_path_SED"
12345       ac_path_SED_max=$ac_count
12346     fi
12347     # 10*(2^10) chars as input seems more than enough
12348     test $ac_count -gt 10 && break
12349   done
12350   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12351 esac
12352 
12353       $ac_path_SED_found && break 3
12354     done
12355   done
12356   done
12357 IFS=$as_save_IFS
12358   if test -z "$ac_cv_path_SED"; then
12359     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12360   fi
12361 else
12362   ac_cv_path_SED=$SED
12363 fi
12364 
12365 fi
12366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12367 $as_echo "$ac_cv_path_SED" >&6; }
12368  SED="$ac_cv_path_SED"
12369   rm -f conftest.sed
12370 
12371     else
12372       # If it succeeded, then it was overridden by the user. We will use it
12373       # for the tool.
12374 
12375       # First remove it from the list of overridden variables, so we can test
12376       # for unknown variables in the end.
12377       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12378 
12379       # Check if the provided tool contains a complete path.
12380       tool_specified="$SED"
12381       tool_basename="${tool_specified##*/}"
12382       if test "x$tool_basename" = "x$tool_specified"; then
12383         # A command without a complete path is provided, search $PATH.
12384         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12385 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12386         # Extract the first word of "$tool_basename", so it can be a program name with args.
12387 set dummy $tool_basename; ac_word=$2
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12389 $as_echo_n "checking for $ac_word... " >&6; }
12390 if ${ac_cv_path_SED+:} false; then :
12391   $as_echo_n "(cached) " >&6
12392 else
12393   case $SED in
12394   [\\/]* | ?:[\\/]*)
12395   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12396   ;;
12397   *)
12398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12399 for as_dir in $PATH
12400 do
12401   IFS=$as_save_IFS
12402   test -z "$as_dir" && as_dir=.
12403     for ac_exec_ext in '' $ac_executable_extensions; do
12404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12405     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12407     break 2
12408   fi
12409 done
12410   done
12411 IFS=$as_save_IFS
12412 
12413   ;;
12414 esac
12415 fi
12416 SED=$ac_cv_path_SED
12417 if test -n "$SED"; then
12418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12419 $as_echo "$SED" >&6; }
12420 else
12421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422 $as_echo "no" >&6; }
12423 fi
12424 
12425 
12426         if test "x$SED" = x; then
12427           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12428         fi
12429       else
12430         # Otherwise we believe it is a complete path. Use it as it is.
12431         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12432 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12433         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12434 $as_echo_n "checking for SED... " >&6; }
12435         if test ! -x "$tool_specified"; then
12436           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12437 $as_echo "not found" >&6; }
12438           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12439         fi
12440         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12441 $as_echo "$tool_specified" >&6; }
12442       fi
12443     fi
12444   fi
12445 
12446 
12447   if test "x$SED" = x; then
12448     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12449   fi
12450 
12451 
12452 
12453   # Always force rm.
12454   RM="$RM -f"
12455 
12456   # pwd behaves differently on various platforms and some don't support the -L flag.
12457   # Always use the bash builtin pwd to get uniform behavior.
12458   THEPWDCMD=pwd
12459 
12460   # These are not required on all platforms
12461 
12462 
12463   # Publish this variable in the help.
12464 
12465 
12466   if test "x$CYGPATH" = x; then
12467     # The variable is not set by user, try to locate tool using the code snippet
12468     for ac_prog in cygpath
12469 do
12470   # Extract the first word of "$ac_prog", so it can be a program name with args.
12471 set dummy $ac_prog; ac_word=$2
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12473 $as_echo_n "checking for $ac_word... " >&6; }
12474 if ${ac_cv_path_CYGPATH+:} false; then :
12475   $as_echo_n "(cached) " >&6
12476 else
12477   case $CYGPATH in
12478   [\\/]* | ?:[\\/]*)
12479   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12480   ;;
12481   *)
12482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12483 for as_dir in $PATH
12484 do
12485   IFS=$as_save_IFS
12486   test -z "$as_dir" && as_dir=.
12487     for ac_exec_ext in '' $ac_executable_extensions; do
12488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12489     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12491     break 2
12492   fi
12493 done
12494   done
12495 IFS=$as_save_IFS
12496 
12497   ;;
12498 esac
12499 fi
12500 CYGPATH=$ac_cv_path_CYGPATH
12501 if test -n "$CYGPATH"; then
12502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12503 $as_echo "$CYGPATH" >&6; }
12504 else
12505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12506 $as_echo "no" >&6; }
12507 fi
12508 
12509 
12510   test -n "$CYGPATH" && break
12511 done
12512 
12513   else
12514     # The variable is set, but is it from the command line or the environment?
12515 
12516     # Try to remove the string !CYGPATH! from our list.
12517     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12518     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12519       # If it failed, the variable was not from the command line. Ignore it,
12520       # but warn the user (except for BASH, which is always set by the calling BASH).
12521       if test "xCYGPATH" != xBASH; then
12522         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12523 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12524       fi
12525       # Try to locate tool using the code snippet
12526       for ac_prog in cygpath
12527 do
12528   # Extract the first word of "$ac_prog", so it can be a program name with args.
12529 set dummy $ac_prog; ac_word=$2
12530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12531 $as_echo_n "checking for $ac_word... " >&6; }
12532 if ${ac_cv_path_CYGPATH+:} false; then :
12533   $as_echo_n "(cached) " >&6
12534 else
12535   case $CYGPATH in
12536   [\\/]* | ?:[\\/]*)
12537   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12538   ;;
12539   *)
12540   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12541 for as_dir in $PATH
12542 do
12543   IFS=$as_save_IFS
12544   test -z "$as_dir" && as_dir=.
12545     for ac_exec_ext in '' $ac_executable_extensions; do
12546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12547     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12549     break 2
12550   fi
12551 done
12552   done
12553 IFS=$as_save_IFS
12554 
12555   ;;
12556 esac
12557 fi
12558 CYGPATH=$ac_cv_path_CYGPATH
12559 if test -n "$CYGPATH"; then
12560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12561 $as_echo "$CYGPATH" >&6; }
12562 else
12563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12564 $as_echo "no" >&6; }
12565 fi
12566 
12567 
12568   test -n "$CYGPATH" && break
12569 done
12570 
12571     else
12572       # If it succeeded, then it was overridden by the user. We will use it
12573       # for the tool.
12574 
12575       # First remove it from the list of overridden variables, so we can test
12576       # for unknown variables in the end.
12577       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12578 
12579       # Check if the provided tool contains a complete path.
12580       tool_specified="$CYGPATH"
12581       tool_basename="${tool_specified##*/}"
12582       if test "x$tool_basename" = "x$tool_specified"; then
12583         # A command without a complete path is provided, search $PATH.
12584         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12585 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12586         # Extract the first word of "$tool_basename", so it can be a program name with args.
12587 set dummy $tool_basename; ac_word=$2
12588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12589 $as_echo_n "checking for $ac_word... " >&6; }
12590 if ${ac_cv_path_CYGPATH+:} false; then :
12591   $as_echo_n "(cached) " >&6
12592 else
12593   case $CYGPATH in
12594   [\\/]* | ?:[\\/]*)
12595   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12596   ;;
12597   *)
12598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12599 for as_dir in $PATH
12600 do
12601   IFS=$as_save_IFS
12602   test -z "$as_dir" && as_dir=.
12603     for ac_exec_ext in '' $ac_executable_extensions; do
12604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12605     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12607     break 2
12608   fi
12609 done
12610   done
12611 IFS=$as_save_IFS
12612 
12613   ;;
12614 esac
12615 fi
12616 CYGPATH=$ac_cv_path_CYGPATH
12617 if test -n "$CYGPATH"; then
12618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12619 $as_echo "$CYGPATH" >&6; }
12620 else
12621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12622 $as_echo "no" >&6; }
12623 fi
12624 
12625 
12626         if test "x$CYGPATH" = x; then
12627           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12628         fi
12629       else
12630         # Otherwise we believe it is a complete path. Use it as it is.
12631         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12632 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12633         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12634 $as_echo_n "checking for CYGPATH... " >&6; }
12635         if test ! -x "$tool_specified"; then
12636           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12637 $as_echo "not found" >&6; }
12638           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12639         fi
12640         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12641 $as_echo "$tool_specified" >&6; }
12642       fi
12643     fi
12644   fi
12645 
12646 
12647 
12648 
12649   # Publish this variable in the help.
12650 
12651 
12652   if test "x$READLINK" = x; then
12653     # The variable is not set by user, try to locate tool using the code snippet
12654     for ac_prog in greadlink readlink
12655 do
12656   # Extract the first word of "$ac_prog", so it can be a program name with args.
12657 set dummy $ac_prog; ac_word=$2
12658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12659 $as_echo_n "checking for $ac_word... " >&6; }
12660 if ${ac_cv_path_READLINK+:} false; then :
12661   $as_echo_n "(cached) " >&6
12662 else
12663   case $READLINK in
12664   [\\/]* | ?:[\\/]*)
12665   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12666   ;;
12667   *)
12668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12669 for as_dir in $PATH
12670 do
12671   IFS=$as_save_IFS
12672   test -z "$as_dir" && as_dir=.
12673     for ac_exec_ext in '' $ac_executable_extensions; do
12674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12675     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12677     break 2
12678   fi
12679 done
12680   done
12681 IFS=$as_save_IFS
12682 
12683   ;;
12684 esac
12685 fi
12686 READLINK=$ac_cv_path_READLINK
12687 if test -n "$READLINK"; then
12688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12689 $as_echo "$READLINK" >&6; }
12690 else
12691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12692 $as_echo "no" >&6; }
12693 fi
12694 
12695 
12696   test -n "$READLINK" && break
12697 done
12698 
12699   else
12700     # The variable is set, but is it from the command line or the environment?
12701 
12702     # Try to remove the string !READLINK! from our list.
12703     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12704     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12705       # If it failed, the variable was not from the command line. Ignore it,
12706       # but warn the user (except for BASH, which is always set by the calling BASH).
12707       if test "xREADLINK" != xBASH; then
12708         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12709 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12710       fi
12711       # Try to locate tool using the code snippet
12712       for ac_prog in greadlink readlink
12713 do
12714   # Extract the first word of "$ac_prog", so it can be a program name with args.
12715 set dummy $ac_prog; ac_word=$2
12716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12717 $as_echo_n "checking for $ac_word... " >&6; }
12718 if ${ac_cv_path_READLINK+:} false; then :
12719   $as_echo_n "(cached) " >&6
12720 else
12721   case $READLINK in
12722   [\\/]* | ?:[\\/]*)
12723   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12724   ;;
12725   *)
12726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12727 for as_dir in $PATH
12728 do
12729   IFS=$as_save_IFS
12730   test -z "$as_dir" && as_dir=.
12731     for ac_exec_ext in '' $ac_executable_extensions; do
12732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12733     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12735     break 2
12736   fi
12737 done
12738   done
12739 IFS=$as_save_IFS
12740 
12741   ;;
12742 esac
12743 fi
12744 READLINK=$ac_cv_path_READLINK
12745 if test -n "$READLINK"; then
12746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12747 $as_echo "$READLINK" >&6; }
12748 else
12749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750 $as_echo "no" >&6; }
12751 fi
12752 
12753 
12754   test -n "$READLINK" && break
12755 done
12756 
12757     else
12758       # If it succeeded, then it was overridden by the user. We will use it
12759       # for the tool.
12760 
12761       # First remove it from the list of overridden variables, so we can test
12762       # for unknown variables in the end.
12763       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12764 
12765       # Check if the provided tool contains a complete path.
12766       tool_specified="$READLINK"
12767       tool_basename="${tool_specified##*/}"
12768       if test "x$tool_basename" = "x$tool_specified"; then
12769         # A command without a complete path is provided, search $PATH.
12770         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12771 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12772         # Extract the first word of "$tool_basename", so it can be a program name with args.
12773 set dummy $tool_basename; ac_word=$2
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12775 $as_echo_n "checking for $ac_word... " >&6; }
12776 if ${ac_cv_path_READLINK+:} false; then :
12777   $as_echo_n "(cached) " >&6
12778 else
12779   case $READLINK in
12780   [\\/]* | ?:[\\/]*)
12781   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12782   ;;
12783   *)
12784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12785 for as_dir in $PATH
12786 do
12787   IFS=$as_save_IFS
12788   test -z "$as_dir" && as_dir=.
12789     for ac_exec_ext in '' $ac_executable_extensions; do
12790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12791     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12793     break 2
12794   fi
12795 done
12796   done
12797 IFS=$as_save_IFS
12798 
12799   ;;
12800 esac
12801 fi
12802 READLINK=$ac_cv_path_READLINK
12803 if test -n "$READLINK"; then
12804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12805 $as_echo "$READLINK" >&6; }
12806 else
12807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12808 $as_echo "no" >&6; }
12809 fi
12810 
12811 
12812         if test "x$READLINK" = x; then
12813           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12814         fi
12815       else
12816         # Otherwise we believe it is a complete path. Use it as it is.
12817         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12818 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12819         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12820 $as_echo_n "checking for READLINK... " >&6; }
12821         if test ! -x "$tool_specified"; then
12822           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12823 $as_echo "not found" >&6; }
12824           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12825         fi
12826         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12827 $as_echo "$tool_specified" >&6; }
12828       fi
12829     fi
12830   fi
12831 
12832 
12833 
12834 
12835   # Publish this variable in the help.
12836 
12837 
12838   if test "x$DF" = x; then
12839     # The variable is not set by user, try to locate tool using the code snippet
12840     for ac_prog in df
12841 do
12842   # Extract the first word of "$ac_prog", so it can be a program name with args.
12843 set dummy $ac_prog; ac_word=$2
12844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12845 $as_echo_n "checking for $ac_word... " >&6; }
12846 if ${ac_cv_path_DF+:} false; then :
12847   $as_echo_n "(cached) " >&6
12848 else
12849   case $DF in
12850   [\\/]* | ?:[\\/]*)
12851   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12852   ;;
12853   *)
12854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12855 for as_dir in $PATH
12856 do
12857   IFS=$as_save_IFS
12858   test -z "$as_dir" && as_dir=.
12859     for ac_exec_ext in '' $ac_executable_extensions; do
12860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12861     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12863     break 2
12864   fi
12865 done
12866   done
12867 IFS=$as_save_IFS
12868 
12869   ;;
12870 esac
12871 fi
12872 DF=$ac_cv_path_DF
12873 if test -n "$DF"; then
12874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12875 $as_echo "$DF" >&6; }
12876 else
12877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12878 $as_echo "no" >&6; }
12879 fi
12880 
12881 
12882   test -n "$DF" && break
12883 done
12884 
12885   else
12886     # The variable is set, but is it from the command line or the environment?
12887 
12888     # Try to remove the string !DF! from our list.
12889     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12890     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12891       # If it failed, the variable was not from the command line. Ignore it,
12892       # but warn the user (except for BASH, which is always set by the calling BASH).
12893       if test "xDF" != xBASH; then
12894         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12895 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12896       fi
12897       # Try to locate tool using the code snippet
12898       for ac_prog in df
12899 do
12900   # Extract the first word of "$ac_prog", so it can be a program name with args.
12901 set dummy $ac_prog; ac_word=$2
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12903 $as_echo_n "checking for $ac_word... " >&6; }
12904 if ${ac_cv_path_DF+:} false; then :
12905   $as_echo_n "(cached) " >&6
12906 else
12907   case $DF in
12908   [\\/]* | ?:[\\/]*)
12909   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12910   ;;
12911   *)
12912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12913 for as_dir in $PATH
12914 do
12915   IFS=$as_save_IFS
12916   test -z "$as_dir" && as_dir=.
12917     for ac_exec_ext in '' $ac_executable_extensions; do
12918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12919     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12921     break 2
12922   fi
12923 done
12924   done
12925 IFS=$as_save_IFS
12926 
12927   ;;
12928 esac
12929 fi
12930 DF=$ac_cv_path_DF
12931 if test -n "$DF"; then
12932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12933 $as_echo "$DF" >&6; }
12934 else
12935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12936 $as_echo "no" >&6; }
12937 fi
12938 
12939 
12940   test -n "$DF" && break
12941 done
12942 
12943     else
12944       # If it succeeded, then it was overridden by the user. We will use it
12945       # for the tool.
12946 
12947       # First remove it from the list of overridden variables, so we can test
12948       # for unknown variables in the end.
12949       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12950 
12951       # Check if the provided tool contains a complete path.
12952       tool_specified="$DF"
12953       tool_basename="${tool_specified##*/}"
12954       if test "x$tool_basename" = "x$tool_specified"; then
12955         # A command without a complete path is provided, search $PATH.
12956         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12957 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12958         # Extract the first word of "$tool_basename", so it can be a program name with args.
12959 set dummy $tool_basename; ac_word=$2
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12961 $as_echo_n "checking for $ac_word... " >&6; }
12962 if ${ac_cv_path_DF+:} false; then :
12963   $as_echo_n "(cached) " >&6
12964 else
12965   case $DF in
12966   [\\/]* | ?:[\\/]*)
12967   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12968   ;;
12969   *)
12970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12971 for as_dir in $PATH
12972 do
12973   IFS=$as_save_IFS
12974   test -z "$as_dir" && as_dir=.
12975     for ac_exec_ext in '' $ac_executable_extensions; do
12976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12977     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12979     break 2
12980   fi
12981 done
12982   done
12983 IFS=$as_save_IFS
12984 
12985   ;;
12986 esac
12987 fi
12988 DF=$ac_cv_path_DF
12989 if test -n "$DF"; then
12990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12991 $as_echo "$DF" >&6; }
12992 else
12993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12994 $as_echo "no" >&6; }
12995 fi
12996 
12997 
12998         if test "x$DF" = x; then
12999           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13000         fi
13001       else
13002         # Otherwise we believe it is a complete path. Use it as it is.
13003         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13004 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13005         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13006 $as_echo_n "checking for DF... " >&6; }
13007         if test ! -x "$tool_specified"; then
13008           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13009 $as_echo "not found" >&6; }
13010           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13011         fi
13012         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13013 $as_echo "$tool_specified" >&6; }
13014       fi
13015     fi
13016   fi
13017 
13018 
13019 
13020 
13021   # Publish this variable in the help.
13022 
13023 
13024   if test "x$SETFILE" = x; then
13025     # The variable is not set by user, try to locate tool using the code snippet
13026     for ac_prog in SetFile
13027 do
13028   # Extract the first word of "$ac_prog", so it can be a program name with args.
13029 set dummy $ac_prog; ac_word=$2
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13031 $as_echo_n "checking for $ac_word... " >&6; }
13032 if ${ac_cv_path_SETFILE+:} false; then :
13033   $as_echo_n "(cached) " >&6
13034 else
13035   case $SETFILE in
13036   [\\/]* | ?:[\\/]*)
13037   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13038   ;;
13039   *)
13040   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13041 for as_dir in $PATH
13042 do
13043   IFS=$as_save_IFS
13044   test -z "$as_dir" && as_dir=.
13045     for ac_exec_ext in '' $ac_executable_extensions; do
13046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13047     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13049     break 2
13050   fi
13051 done
13052   done
13053 IFS=$as_save_IFS
13054 
13055   ;;
13056 esac
13057 fi
13058 SETFILE=$ac_cv_path_SETFILE
13059 if test -n "$SETFILE"; then
13060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13061 $as_echo "$SETFILE" >&6; }
13062 else
13063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13064 $as_echo "no" >&6; }
13065 fi
13066 
13067 
13068   test -n "$SETFILE" && break
13069 done
13070 
13071   else
13072     # The variable is set, but is it from the command line or the environment?
13073 
13074     # Try to remove the string !SETFILE! from our list.
13075     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13076     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13077       # If it failed, the variable was not from the command line. Ignore it,
13078       # but warn the user (except for BASH, which is always set by the calling BASH).
13079       if test "xSETFILE" != xBASH; then
13080         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13081 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13082       fi
13083       # Try to locate tool using the code snippet
13084       for ac_prog in SetFile
13085 do
13086   # Extract the first word of "$ac_prog", so it can be a program name with args.
13087 set dummy $ac_prog; ac_word=$2
13088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13089 $as_echo_n "checking for $ac_word... " >&6; }
13090 if ${ac_cv_path_SETFILE+:} false; then :
13091   $as_echo_n "(cached) " >&6
13092 else
13093   case $SETFILE in
13094   [\\/]* | ?:[\\/]*)
13095   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13096   ;;
13097   *)
13098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13099 for as_dir in $PATH
13100 do
13101   IFS=$as_save_IFS
13102   test -z "$as_dir" && as_dir=.
13103     for ac_exec_ext in '' $ac_executable_extensions; do
13104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13105     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13107     break 2
13108   fi
13109 done
13110   done
13111 IFS=$as_save_IFS
13112 
13113   ;;
13114 esac
13115 fi
13116 SETFILE=$ac_cv_path_SETFILE
13117 if test -n "$SETFILE"; then
13118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13119 $as_echo "$SETFILE" >&6; }
13120 else
13121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13122 $as_echo "no" >&6; }
13123 fi
13124 
13125 
13126   test -n "$SETFILE" && break
13127 done
13128 
13129     else
13130       # If it succeeded, then it was overridden by the user. We will use it
13131       # for the tool.
13132 
13133       # First remove it from the list of overridden variables, so we can test
13134       # for unknown variables in the end.
13135       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13136 
13137       # Check if the provided tool contains a complete path.
13138       tool_specified="$SETFILE"
13139       tool_basename="${tool_specified##*/}"
13140       if test "x$tool_basename" = "x$tool_specified"; then
13141         # A command without a complete path is provided, search $PATH.
13142         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13143 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13144         # Extract the first word of "$tool_basename", so it can be a program name with args.
13145 set dummy $tool_basename; ac_word=$2
13146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13147 $as_echo_n "checking for $ac_word... " >&6; }
13148 if ${ac_cv_path_SETFILE+:} false; then :
13149   $as_echo_n "(cached) " >&6
13150 else
13151   case $SETFILE in
13152   [\\/]* | ?:[\\/]*)
13153   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13154   ;;
13155   *)
13156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13157 for as_dir in $PATH
13158 do
13159   IFS=$as_save_IFS
13160   test -z "$as_dir" && as_dir=.
13161     for ac_exec_ext in '' $ac_executable_extensions; do
13162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13163     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13165     break 2
13166   fi
13167 done
13168   done
13169 IFS=$as_save_IFS
13170 
13171   ;;
13172 esac
13173 fi
13174 SETFILE=$ac_cv_path_SETFILE
13175 if test -n "$SETFILE"; then
13176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13177 $as_echo "$SETFILE" >&6; }
13178 else
13179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13180 $as_echo "no" >&6; }
13181 fi
13182 
13183 
13184         if test "x$SETFILE" = x; then
13185           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13186         fi
13187       else
13188         # Otherwise we believe it is a complete path. Use it as it is.
13189         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13190 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13191         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13192 $as_echo_n "checking for SETFILE... " >&6; }
13193         if test ! -x "$tool_specified"; then
13194           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13195 $as_echo "not found" >&6; }
13196           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13197         fi
13198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13199 $as_echo "$tool_specified" >&6; }
13200       fi
13201     fi
13202   fi
13203 
13204 
13205 
13206 
13207   # Publish this variable in the help.
13208 
13209 
13210   if test "x$CPIO" = x; then
13211     # The variable is not set by user, try to locate tool using the code snippet
13212     for ac_prog in cpio bsdcpio
13213 do
13214   # Extract the first word of "$ac_prog", so it can be a program name with args.
13215 set dummy $ac_prog; ac_word=$2
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13217 $as_echo_n "checking for $ac_word... " >&6; }
13218 if ${ac_cv_path_CPIO+:} false; then :
13219   $as_echo_n "(cached) " >&6
13220 else
13221   case $CPIO in
13222   [\\/]* | ?:[\\/]*)
13223   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13224   ;;
13225   *)
13226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13227 for as_dir in $PATH
13228 do
13229   IFS=$as_save_IFS
13230   test -z "$as_dir" && as_dir=.
13231     for ac_exec_ext in '' $ac_executable_extensions; do
13232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13233     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13235     break 2
13236   fi
13237 done
13238   done
13239 IFS=$as_save_IFS
13240 
13241   ;;
13242 esac
13243 fi
13244 CPIO=$ac_cv_path_CPIO
13245 if test -n "$CPIO"; then
13246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13247 $as_echo "$CPIO" >&6; }
13248 else
13249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13250 $as_echo "no" >&6; }
13251 fi
13252 
13253 
13254   test -n "$CPIO" && break
13255 done
13256 
13257   else
13258     # The variable is set, but is it from the command line or the environment?
13259 
13260     # Try to remove the string !CPIO! from our list.
13261     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13262     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13263       # If it failed, the variable was not from the command line. Ignore it,
13264       # but warn the user (except for BASH, which is always set by the calling BASH).
13265       if test "xCPIO" != xBASH; then
13266         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13267 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13268       fi
13269       # Try to locate tool using the code snippet
13270       for ac_prog in cpio bsdcpio
13271 do
13272   # Extract the first word of "$ac_prog", so it can be a program name with args.
13273 set dummy $ac_prog; ac_word=$2
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13275 $as_echo_n "checking for $ac_word... " >&6; }
13276 if ${ac_cv_path_CPIO+:} false; then :
13277   $as_echo_n "(cached) " >&6
13278 else
13279   case $CPIO in
13280   [\\/]* | ?:[\\/]*)
13281   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13282   ;;
13283   *)
13284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13285 for as_dir in $PATH
13286 do
13287   IFS=$as_save_IFS
13288   test -z "$as_dir" && as_dir=.
13289     for ac_exec_ext in '' $ac_executable_extensions; do
13290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13291     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13293     break 2
13294   fi
13295 done
13296   done
13297 IFS=$as_save_IFS
13298 
13299   ;;
13300 esac
13301 fi
13302 CPIO=$ac_cv_path_CPIO
13303 if test -n "$CPIO"; then
13304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13305 $as_echo "$CPIO" >&6; }
13306 else
13307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13308 $as_echo "no" >&6; }
13309 fi
13310 
13311 
13312   test -n "$CPIO" && break
13313 done
13314 
13315     else
13316       # If it succeeded, then it was overridden by the user. We will use it
13317       # for the tool.
13318 
13319       # First remove it from the list of overridden variables, so we can test
13320       # for unknown variables in the end.
13321       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13322 
13323       # Check if the provided tool contains a complete path.
13324       tool_specified="$CPIO"
13325       tool_basename="${tool_specified##*/}"
13326       if test "x$tool_basename" = "x$tool_specified"; then
13327         # A command without a complete path is provided, search $PATH.
13328         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13329 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13330         # Extract the first word of "$tool_basename", so it can be a program name with args.
13331 set dummy $tool_basename; ac_word=$2
13332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13333 $as_echo_n "checking for $ac_word... " >&6; }
13334 if ${ac_cv_path_CPIO+:} false; then :
13335   $as_echo_n "(cached) " >&6
13336 else
13337   case $CPIO in
13338   [\\/]* | ?:[\\/]*)
13339   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13340   ;;
13341   *)
13342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13343 for as_dir in $PATH
13344 do
13345   IFS=$as_save_IFS
13346   test -z "$as_dir" && as_dir=.
13347     for ac_exec_ext in '' $ac_executable_extensions; do
13348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13349     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13351     break 2
13352   fi
13353 done
13354   done
13355 IFS=$as_save_IFS
13356 
13357   ;;
13358 esac
13359 fi
13360 CPIO=$ac_cv_path_CPIO
13361 if test -n "$CPIO"; then
13362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13363 $as_echo "$CPIO" >&6; }
13364 else
13365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13366 $as_echo "no" >&6; }
13367 fi
13368 
13369 
13370         if test "x$CPIO" = x; then
13371           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13372         fi
13373       else
13374         # Otherwise we believe it is a complete path. Use it as it is.
13375         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13376 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13377         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13378 $as_echo_n "checking for CPIO... " >&6; }
13379         if test ! -x "$tool_specified"; then
13380           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13381 $as_echo "not found" >&6; }
13382           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13383         fi
13384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13385 $as_echo "$tool_specified" >&6; }
13386       fi
13387     fi
13388   fi
13389 
13390 
13391 
13392 
13393 # Now we can determine OpenJDK build and target platforms. This is required to
13394 # have early on.
13395 # Make sure we can run config.sub.
13396 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13397   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13398 
13399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13400 $as_echo_n "checking build system type... " >&6; }
13401 if ${ac_cv_build+:} false; then :
13402   $as_echo_n "(cached) " >&6
13403 else
13404   ac_build_alias=$build_alias
13405 test "x$ac_build_alias" = x &&
13406   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13407 test "x$ac_build_alias" = x &&
13408   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13409 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13410   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13411 
13412 fi
13413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13414 $as_echo "$ac_cv_build" >&6; }
13415 case $ac_cv_build in
13416 *-*-*) ;;
13417 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13418 esac
13419 build=$ac_cv_build
13420 ac_save_IFS=$IFS; IFS='-'
13421 set x $ac_cv_build
13422 shift
13423 build_cpu=$1
13424 build_vendor=$2
13425 shift; shift
13426 # Remember, the first character of IFS is used to create $*,
13427 # except with old shells:
13428 build_os=$*
13429 IFS=$ac_save_IFS
13430 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13431 
13432 
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13434 $as_echo_n "checking host system type... " >&6; }
13435 if ${ac_cv_host+:} false; then :
13436   $as_echo_n "(cached) " >&6
13437 else
13438   if test "x$host_alias" = x; then
13439   ac_cv_host=$ac_cv_build
13440 else
13441   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13442     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13443 fi
13444 
13445 fi
13446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13447 $as_echo "$ac_cv_host" >&6; }
13448 case $ac_cv_host in
13449 *-*-*) ;;
13450 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13451 esac
13452 host=$ac_cv_host
13453 ac_save_IFS=$IFS; IFS='-'
13454 set x $ac_cv_host
13455 shift
13456 host_cpu=$1
13457 host_vendor=$2
13458 shift; shift
13459 # Remember, the first character of IFS is used to create $*,
13460 # except with old shells:
13461 host_os=$*
13462 IFS=$ac_save_IFS
13463 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13464 
13465 
13466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13467 $as_echo_n "checking target system type... " >&6; }
13468 if ${ac_cv_target+:} false; then :
13469   $as_echo_n "(cached) " >&6
13470 else
13471   if test "x$target_alias" = x; then
13472   ac_cv_target=$ac_cv_host
13473 else
13474   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13475     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13476 fi
13477 
13478 fi
13479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13480 $as_echo "$ac_cv_target" >&6; }
13481 case $ac_cv_target in
13482 *-*-*) ;;
13483 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13484 esac
13485 target=$ac_cv_target
13486 ac_save_IFS=$IFS; IFS='-'
13487 set x $ac_cv_target
13488 shift
13489 target_cpu=$1
13490 target_vendor=$2
13491 shift; shift
13492 # Remember, the first character of IFS is used to create $*,
13493 # except with old shells:
13494 target_os=$*
13495 IFS=$ac_save_IFS
13496 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13497 
13498 
13499 # The aliases save the names the user supplied, while $host etc.
13500 # will get canonicalized.
13501 test -n "$target_alias" &&
13502   test "$program_prefix$program_suffix$program_transform_name" = \
13503     NONENONEs,x,x, &&
13504   program_prefix=${target_alias}-
13505 
13506   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13507   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13508   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13509   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13510   # to use the configure naming style.
13511 
13512 
13513 
13514 
13515 
13516   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13517   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13518   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13519   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13520   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13521   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13522 
13523 
13524 
13525   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13526 
13527   case "$build_os" in
13528     *linux*)
13529       VAR_OS=linux
13530       VAR_OS_TYPE=unix
13531       ;;
13532     *solaris*)
13533       VAR_OS=solaris
13534       VAR_OS_TYPE=unix
13535       ;;
13536     *darwin*)
13537       VAR_OS=macosx
13538       VAR_OS_TYPE=unix
13539       ;;
13540     *bsd*)
13541       VAR_OS=bsd
13542       VAR_OS_TYPE=unix
13543       ;;
13544     *cygwin*)
13545       VAR_OS=windows
13546       VAR_OS_ENV=windows.cygwin
13547       ;;
13548     *mingw*)
13549       VAR_OS=windows
13550       VAR_OS_ENV=windows.msys
13551       ;;
13552     *aix*)
13553       VAR_OS=aix
13554       VAR_OS_TYPE=unix
13555       ;;
13556     *)
13557       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13558       ;;
13559   esac
13560 
13561 
13562   # First argument is the cpu name from the trip/quad
13563   case "$build_cpu" in
13564     x86_64)
13565       VAR_CPU=x86_64
13566       VAR_CPU_ARCH=x86
13567       VAR_CPU_BITS=64
13568       VAR_CPU_ENDIAN=little
13569       ;;
13570     i?86)
13571       VAR_CPU=x86
13572       VAR_CPU_ARCH=x86
13573       VAR_CPU_BITS=32
13574       VAR_CPU_ENDIAN=little
13575       ;;
13576     arm*)
13577       VAR_CPU=arm
13578       VAR_CPU_ARCH=arm
13579       VAR_CPU_BITS=32
13580       VAR_CPU_ENDIAN=little
13581       ;;
13582     powerpc)
13583       VAR_CPU=ppc
13584       VAR_CPU_ARCH=ppc
13585       VAR_CPU_BITS=32
13586       VAR_CPU_ENDIAN=big
13587       ;;
13588     powerpc64)
13589       VAR_CPU=ppc64
13590       VAR_CPU_ARCH=ppc
13591       VAR_CPU_BITS=64
13592       VAR_CPU_ENDIAN=big
13593       ;;
13594     powerpc64le)
13595       VAR_CPU=ppc64
13596       VAR_CPU_ARCH=ppc
13597       VAR_CPU_BITS=64
13598       VAR_CPU_ENDIAN=little
13599       ;;
13600     s390)
13601       VAR_CPU=s390
13602       VAR_CPU_ARCH=s390
13603       VAR_CPU_BITS=32
13604       VAR_CPU_ENDIAN=big
13605       ;;
13606     s390x)
13607       VAR_CPU=s390x
13608       VAR_CPU_ARCH=s390
13609       VAR_CPU_BITS=64
13610       VAR_CPU_ENDIAN=big
13611       ;;
13612     sparc)
13613       VAR_CPU=sparc
13614       VAR_CPU_ARCH=sparc
13615       VAR_CPU_BITS=32
13616       VAR_CPU_ENDIAN=big
13617       ;;
13618     sparcv9|sparc64)
13619       VAR_CPU=sparcv9
13620       VAR_CPU_ARCH=sparc
13621       VAR_CPU_BITS=64
13622       VAR_CPU_ENDIAN=big
13623       ;;
13624     *)
13625       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13626       ;;
13627   esac
13628 
13629   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13630   OPENJDK_BUILD_OS="$VAR_OS"
13631   if test "x$VAR_OS_TYPE" != x; then
13632     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13633   else
13634     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13635   fi
13636   if test "x$VAR_OS_ENV" != x; then
13637     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13638   else
13639     OPENJDK_BUILD_OS_ENV="$VAR_OS"
13640   fi
13641   OPENJDK_BUILD_CPU="$VAR_CPU"
13642   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13643   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13644   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13645 
13646 
13647 
13648 
13649 
13650 
13651 
13652 
13653   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13654 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13656 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13657 
13658   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13659 
13660   case "$host_os" in
13661     *linux*)
13662       VAR_OS=linux
13663       VAR_OS_TYPE=unix
13664       ;;
13665     *solaris*)
13666       VAR_OS=solaris
13667       VAR_OS_TYPE=unix
13668       ;;
13669     *darwin*)
13670       VAR_OS=macosx
13671       VAR_OS_TYPE=unix
13672       ;;
13673     *bsd*)
13674       VAR_OS=bsd
13675       VAR_OS_TYPE=unix
13676       ;;
13677     *cygwin*)
13678       VAR_OS=windows
13679       VAR_OS_ENV=windows.cygwin
13680       ;;
13681     *mingw*)
13682       VAR_OS=windows
13683       VAR_OS_ENV=windows.msys
13684       ;;
13685     *aix*)
13686       VAR_OS=aix
13687       VAR_OS_TYPE=unix
13688       ;;
13689     *)
13690       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13691       ;;
13692   esac
13693 
13694 
13695   # First argument is the cpu name from the trip/quad
13696   case "$host_cpu" in
13697     x86_64)
13698       VAR_CPU=x86_64
13699       VAR_CPU_ARCH=x86
13700       VAR_CPU_BITS=64
13701       VAR_CPU_ENDIAN=little
13702       ;;
13703     i?86)
13704       VAR_CPU=x86
13705       VAR_CPU_ARCH=x86
13706       VAR_CPU_BITS=32
13707       VAR_CPU_ENDIAN=little
13708       ;;
13709     arm*)
13710       VAR_CPU=arm
13711       VAR_CPU_ARCH=arm
13712       VAR_CPU_BITS=32
13713       VAR_CPU_ENDIAN=little
13714       ;;
13715     powerpc)
13716       VAR_CPU=ppc
13717       VAR_CPU_ARCH=ppc
13718       VAR_CPU_BITS=32
13719       VAR_CPU_ENDIAN=big
13720       ;;
13721     powerpc64)
13722       VAR_CPU=ppc64
13723       VAR_CPU_ARCH=ppc
13724       VAR_CPU_BITS=64
13725       VAR_CPU_ENDIAN=big
13726       ;;
13727     powerpc64le)
13728       VAR_CPU=ppc64
13729       VAR_CPU_ARCH=ppc
13730       VAR_CPU_BITS=64
13731       VAR_CPU_ENDIAN=little
13732       ;;
13733     s390)
13734       VAR_CPU=s390
13735       VAR_CPU_ARCH=s390
13736       VAR_CPU_BITS=32
13737       VAR_CPU_ENDIAN=big
13738       ;;
13739     s390x)
13740       VAR_CPU=s390x
13741       VAR_CPU_ARCH=s390
13742       VAR_CPU_BITS=64
13743       VAR_CPU_ENDIAN=big
13744       ;;
13745     sparc)
13746       VAR_CPU=sparc
13747       VAR_CPU_ARCH=sparc
13748       VAR_CPU_BITS=32
13749       VAR_CPU_ENDIAN=big
13750       ;;
13751     sparcv9|sparc64)
13752       VAR_CPU=sparcv9
13753       VAR_CPU_ARCH=sparc
13754       VAR_CPU_BITS=64
13755       VAR_CPU_ENDIAN=big
13756       ;;
13757     *)
13758       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13759       ;;
13760   esac
13761 
13762   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13763   OPENJDK_TARGET_OS="$VAR_OS"
13764   if test "x$VAR_OS_TYPE" != x; then
13765     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13766   else
13767     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13768   fi
13769   if test "x$VAR_OS_ENV" != x; then
13770     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13771   else
13772     OPENJDK_TARGET_OS_ENV="$VAR_OS"
13773   fi
13774   OPENJDK_TARGET_CPU="$VAR_CPU"
13775   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13776   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13777   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13778 
13779 
13780 
13781 
13782 
13783 
13784 
13785 
13786   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13787 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13789 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13790 
13791 
13792 
13793 # Check whether --with-target-bits was given.
13794 if test "${with_target_bits+set}" = set; then :
13795   withval=$with_target_bits;
13796 fi
13797 
13798 
13799   # We have three types of compiles:
13800   # native  == normal compilation, target system == build system
13801   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13802   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13803   #
13804   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13805     # We're doing a proper cross-compilation
13806     COMPILE_TYPE="cross"
13807   else
13808     COMPILE_TYPE="native"
13809   fi
13810 
13811   if test "x$with_target_bits" != x; then
13812     if test "x$COMPILE_TYPE" = "xcross"; then
13813       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13814     fi
13815 
13816     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13817       # A reduced build is requested
13818       COMPILE_TYPE="reduced"
13819       OPENJDK_TARGET_CPU_BITS=32
13820       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13821         OPENJDK_TARGET_CPU=x86
13822       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13823         OPENJDK_TARGET_CPU=sparc
13824       else
13825         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13826       fi
13827     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13828       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
13829     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13830       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13831 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13832     else
13833       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13834     fi
13835   fi
13836 
13837 
13838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13839 $as_echo_n "checking compilation type... " >&6; }
13840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13841 $as_echo "$COMPILE_TYPE" >&6; }
13842 
13843 
13844   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13845     REQUIRED_OS_NAME=SunOS
13846     REQUIRED_OS_VERSION=5.10
13847   fi
13848   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13849     REQUIRED_OS_NAME=Linux
13850     REQUIRED_OS_VERSION=2.6
13851   fi
13852   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13853     REQUIRED_OS_NAME=Windows
13854     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13855       REQUIRED_OS_VERSION=5.2
13856     else
13857       REQUIRED_OS_VERSION=5.1
13858     fi
13859   fi
13860   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13861     REQUIRED_OS_NAME=Darwin
13862     REQUIRED_OS_VERSION=11.2
13863   fi
13864 
13865 
13866 
13867 
13868 
13869   # Also store the legacy naming of the cpu.
13870   # Ie i586 and amd64 instead of x86 and x86_64
13871   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13872   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13873     OPENJDK_TARGET_CPU_LEGACY="i586"
13874   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13875     # On all platforms except MacOSX replace x86_64 with amd64.
13876     OPENJDK_TARGET_CPU_LEGACY="amd64"
13877   fi
13878 
13879 
13880   # And the second legacy naming of the cpu.
13881   # Ie i386 and amd64 instead of x86 and x86_64.
13882   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13883   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13884     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13885   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13886     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13887   fi
13888 
13889 
13890   # This is the name of the cpu (but using i386 and amd64 instead of
13891   # x86 and x86_64, respectively), preceeded by a /, to be used when
13892   # locating libraries. On macosx, it's empty, though.
13893   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13894   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13895     OPENJDK_TARGET_CPU_LIBDIR=""
13896   fi
13897 
13898 
13899   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13900   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13901   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13902   OPENJDK_TARGET_CPU_ISADIR=""
13903   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13904     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13905       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13906     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13907       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13908     fi
13909   fi
13910 
13911 
13912   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13913   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13914   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13915     # On linux only, we replace x86 with i386.
13916     OPENJDK_TARGET_CPU_OSARCH="i386"
13917   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13918     # On all platforms except macosx, we replace x86_64 with amd64.
13919     OPENJDK_TARGET_CPU_OSARCH="amd64"
13920   fi
13921 
13922 
13923   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13924   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13925     OPENJDK_TARGET_CPU_JLI="i386"
13926   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13927     # On all platforms except macosx, we replace x86_64 with amd64.
13928     OPENJDK_TARGET_CPU_JLI="amd64"
13929   fi
13930   # Now setup the -D flags for building libjli.
13931   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13932   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13933     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13934       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13935     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13936       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13937     fi
13938   fi
13939 
13940 
13941   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13942       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13943   else
13944       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13945   fi
13946 
13947 
13948   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13949     A_LP64="LP64:="
13950     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13951     # unpack200.exe
13952     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13953       ADD_LP64="-D_LP64=1"
13954     fi
13955   fi
13956   LP64=$A_LP64
13957 
13958 
13959   if test "x$COMPILE_TYPE" = "xcross"; then
13960     # FIXME: ... or should this include reduced builds..?
13961     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13962   else
13963     DEFINE_CROSS_COMPILE_ARCH=""
13964   fi
13965 
13966 
13967   # ZERO_ARCHDEF is used to enable architecture-specific code
13968   case "${OPENJDK_TARGET_CPU}" in
13969     ppc)     ZERO_ARCHDEF=PPC32 ;;
13970     ppc64)   ZERO_ARCHDEF=PPC64 ;;
13971     s390*)   ZERO_ARCHDEF=S390  ;;
13972     sparc*)  ZERO_ARCHDEF=SPARC ;;
13973     x86_64*) ZERO_ARCHDEF=AMD64 ;;
13974     x86)     ZERO_ARCHDEF=IA32  ;;
13975     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13976   esac
13977 
13978 
13979 
13980 
13981 # Continue setting up basic stuff. Most remaining code require fundamental tools.
13982 
13983   # Save the current directory this script was started from
13984   CURDIR="$PWD"
13985 
13986   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13987     PATH_SEP=";"
13988 
13989   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13990   if test $SRC_ROOT_LENGTH -gt 100; then
13991     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13992   fi
13993 
13994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13995     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13996 $as_echo_n "checking cygwin release... " >&6; }
13997     CYGWIN_VERSION=`$UNAME -r`
13998     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13999 $as_echo "$CYGWIN_VERSION" >&6; }
14000     WINDOWS_ENV_VENDOR='cygwin'
14001     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14002 
14003     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14004     if test "x$CYGWIN_VERSION_OK" = x; then
14005       { $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
14006 $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;}
14007       as_fn_error $? "Cannot continue" "$LINENO" 5
14008     fi
14009     if test "x$CYGPATH" = x; then
14010       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14011     fi
14012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14013 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14014     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14015     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14016     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14017     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14019 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
14020     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14021     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14022     if test "x$test_cygdrive_prefix" = x; then
14023       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14024     fi
14025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14026     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14027 $as_echo_n "checking msys release... " >&6; }
14028     MSYS_VERSION=`$UNAME -r`
14029     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14030 $as_echo "$MSYS_VERSION" >&6; }
14031 
14032     WINDOWS_ENV_VENDOR='msys'
14033     WINDOWS_ENV_VERSION="$MSYS_VERSION"
14034 
14035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14036 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
14037     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14038     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14039 
14040   windows_path="$MSYS_ROOT_PATH"
14041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14042     unix_path=`$CYGPATH -u "$windows_path"`
14043     MSYS_ROOT_PATH="$unix_path"
14044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14046     MSYS_ROOT_PATH="$unix_path"
14047   fi
14048 
14049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14050 $as_echo "$MSYS_ROOT_PATH" >&6; }
14051     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14052   else
14053     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14054   fi
14055 
14056   # Test if windows or unix (cygwin/msys) find is first in path.
14057   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14058 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14059   FIND_BINARY_OUTPUT=`find --version 2>&1`
14060   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14061     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14062 $as_echo "unix style" >&6; }
14063   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14065 $as_echo "Windows" >&6; }
14066     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14067 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14068     { $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
14069 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14070     as_fn_error $? "Cannot continue" "$LINENO" 5
14071   else
14072     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14073 $as_echo "unknown" >&6; }
14074     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14075 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14076   fi
14077 
14078   else
14079     PATH_SEP=":"
14080   fi
14081 
14082 
14083   # We get the top-level directory from the supporting wrappers.
14084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14085 $as_echo_n "checking for top-level directory... " >&6; }
14086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14087 $as_echo "$TOPDIR" >&6; }
14088 
14089 
14090   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14091 
14092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14093 
14094   # Input might be given as Windows format, start by converting to
14095   # unix format.
14096   path="$CURDIR"
14097   new_path=`$CYGPATH -u "$path"`
14098 
14099   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14100   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14101   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14102   # "foo.exe" is OK but "foo" is an error.
14103   #
14104   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14105   # It is also a way to make sure we got the proper file name for the real test later on.
14106   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14107   if test "x$test_shortpath" = x; then
14108     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14109 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14110     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14111   fi
14112 
14113   # Call helper function which possibly converts this using DOS-style short mode.
14114   # If so, the updated path is stored in $new_path.
14115 
14116   input_path="$new_path"
14117   # Check if we need to convert this using DOS-style short mode. If the path
14118   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14119   # take no chances and rewrite it.
14120   # Note: m4 eats our [], so we need to use [ and ] instead.
14121   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14122   if test "x$has_forbidden_chars" != x; then
14123     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14124     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14125     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14126     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14127       # Going to short mode and back again did indeed matter. Since short mode is
14128       # case insensitive, let's make it lowercase to improve readability.
14129       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14130       # Now convert it back to Unix-stile (cygpath)
14131       input_path=`$CYGPATH -u "$shortmode_path"`
14132       new_path="$input_path"
14133     fi
14134   fi
14135 
14136   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14137   if test "x$test_cygdrive_prefix" = x; then
14138     # As a simple fix, exclude /usr/bin since it's not a real path.
14139     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14140       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14141       # a path prefixed by /cygdrive for fixpath to work.
14142       new_path="$CYGWIN_ROOT_PATH$input_path"
14143     fi
14144   fi
14145 
14146 
14147   if test "x$path" != "x$new_path"; then
14148     CURDIR="$new_path"
14149     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14150 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14151   fi
14152 
14153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14154 
14155   path="$CURDIR"
14156   has_colon=`$ECHO $path | $GREP ^.:`
14157   new_path="$path"
14158   if test "x$has_colon" = x; then
14159     # Not in mixed or Windows style, start by that.
14160     new_path=`cmd //c echo $path`
14161   fi
14162 
14163 
14164   input_path="$new_path"
14165   # Check if we need to convert this using DOS-style short mode. If the path
14166   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14167   # take no chances and rewrite it.
14168   # Note: m4 eats our [], so we need to use [ and ] instead.
14169   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14170   if test "x$has_forbidden_chars" != x; then
14171     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14172     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14173   fi
14174 
14175 
14176   windows_path="$new_path"
14177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14178     unix_path=`$CYGPATH -u "$windows_path"`
14179     new_path="$unix_path"
14180   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14181     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14182     new_path="$unix_path"
14183   fi
14184 
14185   if test "x$path" != "x$new_path"; then
14186     CURDIR="$new_path"
14187     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14188 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14189   fi
14190 
14191   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14192   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14193 
14194   else
14195     # We're on a unix platform. Hooray! :)
14196     path="$CURDIR"
14197     has_space=`$ECHO "$path" | $GREP " "`
14198     if test "x$has_space" != x; then
14199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14200 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14201       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14202     fi
14203 
14204     # Use eval to expand a potential ~
14205     eval path="$path"
14206     if test ! -f "$path" && test ! -d "$path"; then
14207       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14208     fi
14209 
14210     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14211   fi
14212 
14213 
14214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14215 
14216   # Input might be given as Windows format, start by converting to
14217   # unix format.
14218   path="$TOPDIR"
14219   new_path=`$CYGPATH -u "$path"`
14220 
14221   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14222   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14223   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14224   # "foo.exe" is OK but "foo" is an error.
14225   #
14226   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14227   # It is also a way to make sure we got the proper file name for the real test later on.
14228   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14229   if test "x$test_shortpath" = x; then
14230     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14231 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14232     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14233   fi
14234 
14235   # Call helper function which possibly converts this using DOS-style short mode.
14236   # If so, the updated path is stored in $new_path.
14237 
14238   input_path="$new_path"
14239   # Check if we need to convert this using DOS-style short mode. If the path
14240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14241   # take no chances and rewrite it.
14242   # Note: m4 eats our [], so we need to use [ and ] instead.
14243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14244   if test "x$has_forbidden_chars" != x; then
14245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14249       # Going to short mode and back again did indeed matter. Since short mode is
14250       # case insensitive, let's make it lowercase to improve readability.
14251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14252       # Now convert it back to Unix-stile (cygpath)
14253       input_path=`$CYGPATH -u "$shortmode_path"`
14254       new_path="$input_path"
14255     fi
14256   fi
14257 
14258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14259   if test "x$test_cygdrive_prefix" = x; then
14260     # As a simple fix, exclude /usr/bin since it's not a real path.
14261     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14263       # a path prefixed by /cygdrive for fixpath to work.
14264       new_path="$CYGWIN_ROOT_PATH$input_path"
14265     fi
14266   fi
14267 
14268 
14269   if test "x$path" != "x$new_path"; then
14270     TOPDIR="$new_path"
14271     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14272 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14273   fi
14274 
14275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14276 
14277   path="$TOPDIR"
14278   has_colon=`$ECHO $path | $GREP ^.:`
14279   new_path="$path"
14280   if test "x$has_colon" = x; then
14281     # Not in mixed or Windows style, start by that.
14282     new_path=`cmd //c echo $path`
14283   fi
14284 
14285 
14286   input_path="$new_path"
14287   # Check if we need to convert this using DOS-style short mode. If the path
14288   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14289   # take no chances and rewrite it.
14290   # Note: m4 eats our [], so we need to use [ and ] instead.
14291   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14292   if test "x$has_forbidden_chars" != x; then
14293     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14294     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14295   fi
14296 
14297 
14298   windows_path="$new_path"
14299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14300     unix_path=`$CYGPATH -u "$windows_path"`
14301     new_path="$unix_path"
14302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14304     new_path="$unix_path"
14305   fi
14306 
14307   if test "x$path" != "x$new_path"; then
14308     TOPDIR="$new_path"
14309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14310 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14311   fi
14312 
14313   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14314   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14315 
14316   else
14317     # We're on a unix platform. Hooray! :)
14318     path="$TOPDIR"
14319     has_space=`$ECHO "$path" | $GREP " "`
14320     if test "x$has_space" != x; then
14321       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14322 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14323       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14324     fi
14325 
14326     # Use eval to expand a potential ~
14327     eval path="$path"
14328     if test ! -f "$path" && test ! -d "$path"; then
14329       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14330     fi
14331 
14332     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14333   fi
14334 
14335   # SRC_ROOT is a traditional alias for TOPDIR.
14336   SRC_ROOT=$TOPDIR
14337 
14338   # Locate the directory of this script.
14339   AUTOCONF_DIR=$TOPDIR/common/autoconf
14340 
14341 
14342   # Setup default logging of stdout and stderr to build.log in the output root.
14343   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14344   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14345   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14346 
14347 
14348 
14349 
14350 
14351 # Check if it's a pure open build or if custom sources are to be used.
14352 
14353   # Check whether --enable-openjdk-only was given.
14354 if test "${enable_openjdk_only+set}" = set; then :
14355   enableval=$enable_openjdk_only;
14356 else
14357   enable_openjdk_only="no"
14358 fi
14359 
14360 
14361   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14362 $as_echo_n "checking for presence of closed sources... " >&6; }
14363   if test -d "$SRC_ROOT/jdk/src/closed"; then
14364     CLOSED_SOURCE_PRESENT=yes
14365   else
14366     CLOSED_SOURCE_PRESENT=no
14367   fi
14368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14369 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14370 
14371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14372 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14373   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14375 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14376 
14377   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14378     OPENJDK=true
14379     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14380       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14381 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14382     fi
14383   else
14384     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14385       OPENJDK=true
14386     else
14387       OPENJDK=false
14388     fi
14389   fi
14390 
14391   if test "x$OPENJDK" = "xtrue"; then
14392     SET_OPENJDK="OPENJDK=true"
14393   fi
14394 
14395 
14396 
14397   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14398   # the IncludeCustomExtension macro.
14399 
14400 
14401 # Check whether --with-custom-make-dir was given.
14402 if test "${with_custom_make_dir+set}" = set; then :
14403   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
14404 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14405 fi
14406 
14407 
14408 
14409 
14410 # These are needed to be able to create a configuration name (and thus the output directory)
14411 
14412   ###############################################################################
14413   #
14414   # Check which variant of the JDK that we want to build.
14415   # Currently we have:
14416   #    normal:   standard edition
14417   # but the custom make system may add other variants
14418   #
14419   # Effectively the JDK variant gives a name to a specific set of
14420   # modules to compile into the JDK. In the future, these modules
14421   # might even be Jigsaw modules.
14422   #
14423   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14424 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14425 
14426 # Check whether --with-jdk-variant was given.
14427 if test "${with_jdk_variant+set}" = set; then :
14428   withval=$with_jdk_variant;
14429 fi
14430 
14431 
14432   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14433     JDK_VARIANT="normal"
14434   else
14435     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14436   fi
14437 
14438 
14439 
14440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14441 $as_echo "$JDK_VARIANT" >&6; }
14442 
14443 
14444 ###############################################################################
14445 #
14446 # Check which interpreter of the JVM we want to build.
14447 # Currently we have:
14448 #    template: Template interpreter (the default)
14449 #    cpp     : C++ interpreter
14450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14451 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14452 
14453 # Check whether --with-jvm-interpreter was given.
14454 if test "${with_jvm_interpreter+set}" = set; then :
14455   withval=$with_jvm_interpreter;
14456 fi
14457 
14458 
14459 if test "x$with_jvm_interpreter" = x; then
14460      with_jvm_interpreter="template"
14461 fi
14462 
14463 JVM_INTERPRETER="$with_jvm_interpreter"
14464 
14465 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14466    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14467 fi
14468 
14469 
14470 
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14472 $as_echo "$with_jvm_interpreter" >&6; }
14473 
14474 
14475 
14476   ###############################################################################
14477   #
14478   # Check which variants of the JVM that we want to build.
14479   # Currently we have:
14480   #    server: normal interpreter and a tiered C1/C2 compiler
14481   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14482   #    minimal1: reduced form of client with optional VM services and features stripped out
14483   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14484   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14485   #    zero: no machine code interpreter, no compiler
14486   #    zeroshark: zero interpreter and shark/llvm compiler backend
14487 #    core: interpreter only, no compiler (only works on some platforms)
14488   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14489 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14490 
14491 # Check whether --with-jvm-variants was given.
14492 if test "${with_jvm_variants+set}" = set; then :
14493   withval=$with_jvm_variants;
14494 fi
14495 
14496 
14497   if test "x$with_jvm_variants" = x; then
14498     with_jvm_variants="server"
14499   fi
14500 
14501   JVM_VARIANTS=",$with_jvm_variants,"
14502   TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14503 
14504   if test "x$TEST_VARIANTS" != "x,"; then
14505      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14506   fi
14507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14508 $as_echo "$with_jvm_variants" >&6; }
14509 
14510   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14511   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14512   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14513   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14514   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14515   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14516   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14517 
14518   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14519     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14520       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14521     fi
14522   fi
14523   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14524     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14525       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14526     fi
14527   fi
14528   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14529     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14530       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14531     fi
14532   fi
14533 
14534   # Replace the commas with AND for use in the build directory name.
14535   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14536   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14537   if test "x$COUNT_VARIANTS" != "x,1"; then
14538     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14539   else
14540     BUILDING_MULTIPLE_JVM_VARIANTS=no
14541   fi
14542 
14543 
14544 
14545 
14546 
14547 
14548 
14549 
14550 
14551 
14552   INCLUDE_SA=true
14553   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14554     INCLUDE_SA=false
14555   fi
14556   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14557     INCLUDE_SA=false
14558   fi
14559   if test "x$OPENJDK_TARGET_OS" = xaix ; then
14560     INCLUDE_SA=false
14561   fi
14562 
14563 
14564   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14565     MACOSX_UNIVERSAL="true"
14566   fi
14567 
14568 
14569 
14570 
14571   ###############################################################################
14572   #
14573   # Set the debug level
14574   #    release: no debug information, all optimizations, no asserts.
14575   #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14576   #    fastdebug: debug information (-g), all optimizations, all asserts
14577   #    slowdebug: debug information (-g), no optimizations, all asserts
14578   #
14579   DEBUG_LEVEL="release"
14580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14581 $as_echo_n "checking which debug level to use... " >&6; }
14582   # Check whether --enable-debug was given.
14583 if test "${enable_debug+set}" = set; then :
14584   enableval=$enable_debug;
14585         ENABLE_DEBUG="${enableval}"
14586         DEBUG_LEVEL="fastdebug"
14587 
14588 else
14589   ENABLE_DEBUG="no"
14590 fi
14591 
14592 
14593 
14594 # Check whether --with-debug-level was given.
14595 if test "${with_debug_level+set}" = set; then :
14596   withval=$with_debug_level;
14597         DEBUG_LEVEL="${withval}"
14598         if test "x$ENABLE_DEBUG" = xyes; then
14599           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14600         fi
14601 
14602 fi
14603 
14604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14605 $as_echo "$DEBUG_LEVEL" >&6; }
14606 
14607   if test "x$DEBUG_LEVEL" != xrelease && \
14608       test "x$DEBUG_LEVEL" != xoptimized && \
14609       test "x$DEBUG_LEVEL" != xfastdebug && \
14610       test "x$DEBUG_LEVEL" != xslowdebug; then
14611     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14612   fi
14613 
14614 
14615   ###############################################################################
14616   #
14617   # Setup legacy vars/targets and new vars to deal with different debug levels.
14618   #
14619 
14620   case $DEBUG_LEVEL in
14621     release )
14622       VARIANT="OPT"
14623       FASTDEBUG="false"
14624       DEBUG_CLASSFILES="false"
14625       BUILD_VARIANT_RELEASE=""
14626       HOTSPOT_DEBUG_LEVEL="product"
14627       HOTSPOT_EXPORT="product"
14628       ;;
14629     fastdebug )
14630       VARIANT="DBG"
14631       FASTDEBUG="true"
14632       DEBUG_CLASSFILES="true"
14633       BUILD_VARIANT_RELEASE="-fastdebug"
14634       HOTSPOT_DEBUG_LEVEL="fastdebug"
14635       HOTSPOT_EXPORT="fastdebug"
14636       ;;
14637     slowdebug )
14638       VARIANT="DBG"
14639       FASTDEBUG="false"
14640       DEBUG_CLASSFILES="true"
14641       BUILD_VARIANT_RELEASE="-debug"
14642       HOTSPOT_DEBUG_LEVEL="debug"
14643       HOTSPOT_EXPORT="debug"
14644       ;;
14645     optimized )
14646       VARIANT="OPT"
14647       FASTDEBUG="false"
14648       DEBUG_CLASSFILES="false"
14649       BUILD_VARIANT_RELEASE="-optimized"
14650       HOTSPOT_DEBUG_LEVEL="optimized"
14651       HOTSPOT_EXPORT="optimized"
14652       ;;
14653   esac
14654 
14655   # The debug level 'optimized' is a little special because it is currently only
14656   # applicable to the HotSpot build where it means to build a completely
14657   # optimized version of the VM without any debugging code (like for the
14658   # 'release' debug level which is called 'product' in the HotSpot build) but
14659   # with the exception that it can contain additional code which is otherwise
14660   # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14661   # test new and/or experimental features which are not intended for customer
14662   # shipment. Because these new features need to be tested and benchmarked in
14663   # real world scenarios, we want to build the containing JDK at the 'release'
14664   # debug level.
14665   if test "x$DEBUG_LEVEL" = xoptimized; then
14666     DEBUG_LEVEL="release"
14667   fi
14668 
14669   #####
14670   # Generate the legacy makefile targets for hotspot.
14671   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14672   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14673   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14674   # But until then ...
14675   HOTSPOT_TARGET=""
14676 
14677   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14678     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14679   fi
14680 
14681   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14682     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14683   fi
14684 
14685   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14686     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14687   fi
14688 
14689   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14690     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14691   fi
14692 
14693   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14694     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14695   fi
14696 
14697   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14698     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14699   fi
14700 
14701   if test "x$JVM_VARIANT_CORE" = xtrue; then
14702     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14703   fi
14704 
14705   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14706 
14707   # On Macosx universal binaries are produced, but they only contain
14708   # 64 bit intel. This invalidates control of which jvms are built
14709   # from configure, but only server is valid anyway. Fix this
14710   # when hotspot makefiles are rewritten.
14711   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14712     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14713   fi
14714 
14715   #####
14716 
14717 
14718 
14719 
14720 
14721 
14722 
14723 
14724 # With basic setup done, call the custom early hook.
14725 
14726 
14727 # Check if we have devkits, extra paths or sysroot set.
14728 
14729 
14730 # Check whether --with-devkit was given.
14731 if test "${with_devkit+set}" = set; then :
14732   withval=$with_devkit;
14733 
14734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14735 
14736   # Input might be given as Windows format, start by converting to
14737   # unix format.
14738   path="$with_devkit"
14739   new_path=`$CYGPATH -u "$path"`
14740 
14741   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14742   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14743   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14744   # "foo.exe" is OK but "foo" is an error.
14745   #
14746   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14747   # It is also a way to make sure we got the proper file name for the real test later on.
14748   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14749   if test "x$test_shortpath" = x; then
14750     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14751 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14752     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14753   fi
14754 
14755   # Call helper function which possibly converts this using DOS-style short mode.
14756   # If so, the updated path is stored in $new_path.
14757 
14758   input_path="$new_path"
14759   # Check if we need to convert this using DOS-style short mode. If the path
14760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14761   # take no chances and rewrite it.
14762   # Note: m4 eats our [], so we need to use [ and ] instead.
14763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14764   if test "x$has_forbidden_chars" != x; then
14765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14766     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14767     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14768     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14769       # Going to short mode and back again did indeed matter. Since short mode is
14770       # case insensitive, let's make it lowercase to improve readability.
14771       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14772       # Now convert it back to Unix-stile (cygpath)
14773       input_path=`$CYGPATH -u "$shortmode_path"`
14774       new_path="$input_path"
14775     fi
14776   fi
14777 
14778   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14779   if test "x$test_cygdrive_prefix" = x; then
14780     # As a simple fix, exclude /usr/bin since it's not a real path.
14781     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14782       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14783       # a path prefixed by /cygdrive for fixpath to work.
14784       new_path="$CYGWIN_ROOT_PATH$input_path"
14785     fi
14786   fi
14787 
14788 
14789   if test "x$path" != "x$new_path"; then
14790     with_devkit="$new_path"
14791     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14792 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14793   fi
14794 
14795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14796 
14797   path="$with_devkit"
14798   has_colon=`$ECHO $path | $GREP ^.:`
14799   new_path="$path"
14800   if test "x$has_colon" = x; then
14801     # Not in mixed or Windows style, start by that.
14802     new_path=`cmd //c echo $path`
14803   fi
14804 
14805 
14806   input_path="$new_path"
14807   # Check if we need to convert this using DOS-style short mode. If the path
14808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14809   # take no chances and rewrite it.
14810   # Note: m4 eats our [], so we need to use [ and ] instead.
14811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14812   if test "x$has_forbidden_chars" != x; then
14813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14814     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14815   fi
14816 
14817 
14818   windows_path="$new_path"
14819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14820     unix_path=`$CYGPATH -u "$windows_path"`
14821     new_path="$unix_path"
14822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14824     new_path="$unix_path"
14825   fi
14826 
14827   if test "x$path" != "x$new_path"; then
14828     with_devkit="$new_path"
14829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14830 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14831   fi
14832 
14833   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14834   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14835 
14836   else
14837     # We're on a unix platform. Hooray! :)
14838     path="$with_devkit"
14839     has_space=`$ECHO "$path" | $GREP " "`
14840     if test "x$has_space" != x; then
14841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14842 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14843       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14844     fi
14845 
14846     # Use eval to expand a potential ~
14847     eval path="$path"
14848     if test ! -f "$path" && test ! -d "$path"; then
14849       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14850     fi
14851 
14852     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14853   fi
14854 
14855         DEVKIT_ROOT="$with_devkit"
14856         # Check for a meta data info file in the root of the devkit
14857         if test -f "$DEVKIT_ROOT/devkit.info"; then
14858           # This potentially sets the following:
14859           # DEVKIT_NAME: A descriptive name of the devkit
14860           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14861           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14862           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14863           . $DEVKIT_ROOT/devkit.info
14864         fi
14865 
14866         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14867 $as_echo_n "checking for devkit... " >&6; }
14868         if test "x$DEVKIT_NAME" != x; then
14869           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14870 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14871         else
14872           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14873 $as_echo "$DEVKIT_ROOT" >&6; }
14874         fi
14875 
14876         if test "x$DEVKIT_EXTRA_PATH" != x; then
14877 
14878   if test "x$DEVKIT_EXTRA_PATH" != x; then
14879     if test "x$EXTRA_PATH" = x; then
14880       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14881     else
14882       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14883     fi
14884   fi
14885 
14886         fi
14887 
14888         # Fallback default of just /bin if DEVKIT_PATH is not defined
14889         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14890           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14891         fi
14892 
14893   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14894     if test "x$TOOLCHAIN_PATH" = x; then
14895       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14896     else
14897       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14898     fi
14899   fi
14900 
14901 
14902         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14903         # places for backwards compatiblity.
14904         if test "x$DEVKIT_SYSROOT" != x; then
14905           SYSROOT="$DEVKIT_SYSROOT"
14906         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14907           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14908         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14909           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14910         fi
14911 
14912 
14913 fi
14914 
14915 
14916   # You can force the sysroot if the sysroot encoded into the compiler tools
14917   # is not correct.
14918 
14919 # Check whether --with-sys-root was given.
14920 if test "${with_sys_root+set}" = set; then :
14921   withval=$with_sys_root; SYSROOT=$with_sys_root
14922 
14923 fi
14924 
14925 
14926 
14927 # Check whether --with-sysroot was given.
14928 if test "${with_sysroot+set}" = set; then :
14929   withval=$with_sysroot; SYSROOT=$with_sysroot
14930 
14931 fi
14932 
14933 
14934 
14935 # Check whether --with-tools-dir was given.
14936 if test "${with_tools_dir+set}" = set; then :
14937   withval=$with_tools_dir;
14938   if test "x$with_tools_dir" != x; then
14939     if test "x$TOOLCHAIN_PATH" = x; then
14940       TOOLCHAIN_PATH="$with_tools_dir"
14941     else
14942       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14943     fi
14944   fi
14945 
14946 
14947 fi
14948 
14949 
14950 
14951 # Check whether --with-toolchain-path was given.
14952 if test "${with_toolchain_path+set}" = set; then :
14953   withval=$with_toolchain_path;
14954   if test "x$with_toolchain_path" != x; then
14955     if test "x$TOOLCHAIN_PATH" = x; then
14956       TOOLCHAIN_PATH="$with_toolchain_path"
14957     else
14958       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14959     fi
14960   fi
14961 
14962 
14963 fi
14964 
14965 
14966 
14967 # Check whether --with-extra-path was given.
14968 if test "${with_extra_path+set}" = set; then :
14969   withval=$with_extra_path;
14970   if test "x$with_extra_path" != x; then
14971     if test "x$EXTRA_PATH" = x; then
14972       EXTRA_PATH="$with_extra_path"
14973     else
14974       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14975     fi
14976   fi
14977 
14978 
14979 fi
14980 
14981 
14982   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14983     # detect if Xcode is installed by running xcodebuild -version
14984     # if no Xcode installed, xcodebuild exits with 1
14985     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14986     if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14987       # We need to use xcodebuild in the toolchain dir provided by the user, this will
14988       # fall back on the stub binary in /usr/bin/xcodebuild
14989       # Extract the first word of "xcodebuild", so it can be a program name with args.
14990 set dummy xcodebuild; ac_word=$2
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14992 $as_echo_n "checking for $ac_word... " >&6; }
14993 if ${ac_cv_path_XCODEBUILD+:} false; then :
14994   $as_echo_n "(cached) " >&6
14995 else
14996   case $XCODEBUILD in
14997   [\\/]* | ?:[\\/]*)
14998   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14999   ;;
15000   *)
15001   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15002 for as_dir in $TOOLCHAIN_PATH
15003 do
15004   IFS=$as_save_IFS
15005   test -z "$as_dir" && as_dir=.
15006     for ac_exec_ext in '' $ac_executable_extensions; do
15007   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15008     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15009     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15010     break 2
15011   fi
15012 done
15013   done
15014 IFS=$as_save_IFS
15015 
15016   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15017   ;;
15018 esac
15019 fi
15020 XCODEBUILD=$ac_cv_path_XCODEBUILD
15021 if test -n "$XCODEBUILD"; then
15022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15023 $as_echo "$XCODEBUILD" >&6; }
15024 else
15025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15026 $as_echo "no" >&6; }
15027 fi
15028 
15029 
15030     else
15031       # this should result in SYSROOT being empty, unless --with-sysroot is provided
15032       # when only the command line tools are installed there are no SDKs, so headers
15033       # are copied into the system frameworks
15034       XCODEBUILD=
15035 
15036     fi
15037 
15038     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15039 $as_echo_n "checking for sdk name... " >&6; }
15040 
15041 # Check whether --with-sdk-name was given.
15042 if test "${with_sdk_name+set}" = set; then :
15043   withval=$with_sdk_name; SDKNAME=$with_sdk_name
15044 
15045 fi
15046 
15047     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15048 $as_echo "$SDKNAME" >&6; }
15049 
15050     # if toolchain path is specified then don't rely on system headers, they may not compile
15051     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15052     test -z "$TOOLCHAIN_PATH" && \
15053       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15054 
15055     if test -z "$SYSROOT"; then
15056       if test -n "$XCODEBUILD"; then
15057         # if we don't have system headers, use default SDK name (last resort)
15058         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15059           SDKNAME=${SDKNAME:-macosx}
15060         fi
15061 
15062         if test -n "$SDKNAME"; then
15063           # Call xcodebuild to determine SYSROOT
15064           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15065         fi
15066       else
15067         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15068           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
15069         fi
15070       fi
15071     else
15072       # warn user if --with-sdk-name was also set
15073       if test -n "$with_sdk_name"; then
15074         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15075 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15076       fi
15077     fi
15078 
15079     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15080       # If no system framework headers, then SYSROOT must be set, or we won't build
15081       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
15082     fi
15083 
15084     # Perform a basic sanity test
15085     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15086       if test -z "$SYSROOT"; then
15087         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
15088       else
15089         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15090       fi
15091     fi
15092 
15093     # set SDKROOT too, Xcode tools will pick it up
15094     SDKROOT=$SYSROOT
15095 
15096   fi
15097 
15098   # Prepend the extra path to the global path
15099 
15100   if test "x$EXTRA_PATH" != x; then
15101     if test "x$PATH" = x; then
15102       PATH="$EXTRA_PATH"
15103     else
15104       PATH="$EXTRA_PATH:$PATH"
15105     fi
15106   fi
15107 
15108 
15109   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15110     # Add extra search paths on solaris for utilities like ar and as etc...
15111     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15112   fi
15113 
15114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15115 $as_echo_n "checking for sysroot... " >&6; }
15116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15117 $as_echo "$SYSROOT" >&6; }
15118   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15119 $as_echo_n "checking for toolchain path... " >&6; }
15120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15121 $as_echo "$TOOLCHAIN_PATH" >&6; }
15122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15123 $as_echo_n "checking for extra path... " >&6; }
15124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15125 $as_echo "$EXTRA_PATH" >&6; }
15126 
15127 
15128 # To properly create a configuration name, we need to have the OpenJDK target
15129 # and options (variants and debug level) parsed.
15130 
15131 
15132 
15133 # Check whether --with-conf-name was given.
15134 if test "${with_conf_name+set}" = set; then :
15135   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15136 fi
15137 
15138 
15139   # Test from where we are running configure, in or outside of src root.
15140   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15141 $as_echo_n "checking where to store configuration... " >&6; }
15142   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15143       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15144       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15145     # We are running configure from the src root.
15146     # Create a default ./build/target-variant-debuglevel output root.
15147     if test "x${CONF_NAME}" = x; then
15148       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15149 $as_echo "in default location" >&6; }
15150       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15151     else
15152       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15153 $as_echo "in build directory with custom name" >&6; }
15154     fi
15155     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15156     $MKDIR -p "$OUTPUT_ROOT"
15157     if test ! -d "$OUTPUT_ROOT"; then
15158       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15159     fi
15160   else
15161     # We are running configure from outside of the src dir.
15162     # Then use the current directory as output dir!
15163     # If configuration is situated in normal build directory, just use the build
15164     # directory name as configuration name, otherwise use the complete path.
15165     if test "x${CONF_NAME}" = x; then
15166       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15167     fi
15168     OUTPUT_ROOT="$CURDIR"
15169     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15170 $as_echo "in current directory" >&6; }
15171 
15172     # WARNING: This might be a bad thing to do. You need to be sure you want to
15173     # have a configuration in this directory. Do some sanity checks!
15174 
15175     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15176       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15177       # other files
15178       files_present=`$LS $OUTPUT_ROOT`
15179       # Configure has already touched config.log and confdefs.h in the current dir when this check
15180       # is performed.
15181       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15182       | $TR -d '\n'`
15183       if test "x$filtered_files" != x; then
15184         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15185 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
15186         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15187 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15188         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15189 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15190         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15191 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15192         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15193 $as_echo "$as_me: seriously mess up just about everything." >&6;}
15194         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15195 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15196         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15197 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15198         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15199       fi
15200     fi
15201   fi
15202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15203 $as_echo_n "checking what configuration name to use... " >&6; }
15204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15205 $as_echo "$CONF_NAME" >&6; }
15206 
15207 
15208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15209 
15210   # Input might be given as Windows format, start by converting to
15211   # unix format.
15212   path="$OUTPUT_ROOT"
15213   new_path=`$CYGPATH -u "$path"`
15214 
15215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15218   # "foo.exe" is OK but "foo" is an error.
15219   #
15220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15221   # It is also a way to make sure we got the proper file name for the real test later on.
15222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15223   if test "x$test_shortpath" = x; then
15224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15225 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15226     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15227   fi
15228 
15229   # Call helper function which possibly converts this using DOS-style short mode.
15230   # If so, the updated path is stored in $new_path.
15231 
15232   input_path="$new_path"
15233   # Check if we need to convert this using DOS-style short mode. If the path
15234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15235   # take no chances and rewrite it.
15236   # Note: m4 eats our [], so we need to use [ and ] instead.
15237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15238   if test "x$has_forbidden_chars" != x; then
15239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15243       # Going to short mode and back again did indeed matter. Since short mode is
15244       # case insensitive, let's make it lowercase to improve readability.
15245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15246       # Now convert it back to Unix-stile (cygpath)
15247       input_path=`$CYGPATH -u "$shortmode_path"`
15248       new_path="$input_path"
15249     fi
15250   fi
15251 
15252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15253   if test "x$test_cygdrive_prefix" = x; then
15254     # As a simple fix, exclude /usr/bin since it's not a real path.
15255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15257       # a path prefixed by /cygdrive for fixpath to work.
15258       new_path="$CYGWIN_ROOT_PATH$input_path"
15259     fi
15260   fi
15261 
15262 
15263   if test "x$path" != "x$new_path"; then
15264     OUTPUT_ROOT="$new_path"
15265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15266 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15267   fi
15268 
15269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15270 
15271   path="$OUTPUT_ROOT"
15272   has_colon=`$ECHO $path | $GREP ^.:`
15273   new_path="$path"
15274   if test "x$has_colon" = x; then
15275     # Not in mixed or Windows style, start by that.
15276     new_path=`cmd //c echo $path`
15277   fi
15278 
15279 
15280   input_path="$new_path"
15281   # Check if we need to convert this using DOS-style short mode. If the path
15282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15283   # take no chances and rewrite it.
15284   # Note: m4 eats our [], so we need to use [ and ] instead.
15285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15286   if test "x$has_forbidden_chars" != x; then
15287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15289   fi
15290 
15291 
15292   windows_path="$new_path"
15293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294     unix_path=`$CYGPATH -u "$windows_path"`
15295     new_path="$unix_path"
15296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298     new_path="$unix_path"
15299   fi
15300 
15301   if test "x$path" != "x$new_path"; then
15302     OUTPUT_ROOT="$new_path"
15303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15304 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15305   fi
15306 
15307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15309 
15310   else
15311     # We're on a unix platform. Hooray! :)
15312     path="$OUTPUT_ROOT"
15313     has_space=`$ECHO "$path" | $GREP " "`
15314     if test "x$has_space" != x; then
15315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15316 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15317       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15318     fi
15319 
15320     # Use eval to expand a potential ~
15321     eval path="$path"
15322     if test ! -f "$path" && test ! -d "$path"; then
15323       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15324     fi
15325 
15326     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15327   fi
15328 
15329 
15330   SPEC=$OUTPUT_ROOT/spec.gmk
15331 
15332   CONF_NAME=$CONF_NAME
15333 
15334   OUTPUT_ROOT=$OUTPUT_ROOT
15335 
15336 
15337   # The spec.gmk file contains all variables for the make system.
15338   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15339 
15340   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15341   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15342 
15343   # The bootcycle-spec.gmk file contains support for boot cycle builds.
15344   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15345 
15346   # The compare.sh is used to compare the build output to other builds.
15347   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15348 
15349   # The generated Makefile knows where the spec.gmk is and where the source is.
15350   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15351   # which will look for generated configurations
15352   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15353 
15354 
15355 
15356 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15357 
15358   for ac_prog in apt-get yum port pkgutil pkgadd
15359 do
15360   # Extract the first word of "$ac_prog", so it can be a program name with args.
15361 set dummy $ac_prog; ac_word=$2
15362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15363 $as_echo_n "checking for $ac_word... " >&6; }
15364 if ${ac_cv_prog_PKGHANDLER+:} false; then :
15365   $as_echo_n "(cached) " >&6
15366 else
15367   if test -n "$PKGHANDLER"; then
15368   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15369 else
15370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15371 for as_dir in $PATH
15372 do
15373   IFS=$as_save_IFS
15374   test -z "$as_dir" && as_dir=.
15375     for ac_exec_ext in '' $ac_executable_extensions; do
15376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15377     ac_cv_prog_PKGHANDLER="$ac_prog"
15378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15379     break 2
15380   fi
15381 done
15382   done
15383 IFS=$as_save_IFS
15384 
15385 fi
15386 fi
15387 PKGHANDLER=$ac_cv_prog_PKGHANDLER
15388 if test -n "$PKGHANDLER"; then
15389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15390 $as_echo "$PKGHANDLER" >&6; }
15391 else
15392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15393 $as_echo "no" >&6; }
15394 fi
15395 
15396 
15397   test -n "$PKGHANDLER" && break
15398 done
15399 
15400 
15401 
15402 # Setup tools that requires more complex handling, or that is not needed by the configure script.
15403 
15404 
15405   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15406   if test "x$MAKE" != x; then
15407     # User has supplied a make, test it.
15408     if test ! -f "$MAKE"; then
15409       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15410     fi
15411 
15412   MAKE_CANDIDATE=""$MAKE""
15413   DESCRIPTION="user supplied MAKE=$MAKE"
15414   if test "x$MAKE_CANDIDATE" != x; then
15415     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15416 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15417     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15418     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15419     if test "x$IS_GNU_MAKE" = x; then
15420       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15421 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15422     else
15423       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15424       if test "x$IS_MODERN_MAKE" = x; then
15425         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15426 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15427       else
15428         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15429           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15430             MAKE_EXPECTED_ENV='cygwin'
15431           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15432             MAKE_EXPECTED_ENV='msys'
15433           else
15434             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15435           fi
15436           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15437           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15438         else
15439           # Not relevant for non-Windows
15440           IS_MAKE_CORRECT_ENV=true
15441         fi
15442         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15443           { $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
15444 $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;}
15445         else
15446           FOUND_MAKE=$MAKE_CANDIDATE
15447 
15448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15449 
15450   # First separate the path from the arguments. This will split at the first
15451   # space.
15452   complete="$FOUND_MAKE"
15453   path="${complete%% *}"
15454   tmp="$complete EOL"
15455   arguments="${tmp#* }"
15456 
15457   # Input might be given as Windows format, start by converting to
15458   # unix format.
15459   new_path=`$CYGPATH -u "$path"`
15460 
15461   # Now try to locate executable using which
15462   new_path=`$WHICH "$new_path" 2> /dev/null`
15463   # bat and cmd files are not always considered executable in cygwin causing which
15464   # to not find them
15465   if test "x$new_path" = x \
15466       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15467       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15468     new_path=`$CYGPATH -u "$path"`
15469   fi
15470   if test "x$new_path" = x; then
15471     # Oops. Which didn't find the executable.
15472     # The splitting of arguments from the executable at a space might have been incorrect,
15473     # since paths with space are more likely in Windows. Give it another try with the whole
15474     # argument.
15475     path="$complete"
15476     arguments="EOL"
15477     new_path=`$CYGPATH -u "$path"`
15478     new_path=`$WHICH "$new_path" 2> /dev/null`
15479     # bat and cmd files are not always considered executable in cygwin causing which
15480     # to not find them
15481     if test "x$new_path" = x \
15482         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15483         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15484       new_path=`$CYGPATH -u "$path"`
15485     fi
15486     if test "x$new_path" = x; then
15487       # It's still not found. Now this is an unrecoverable error.
15488       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15489 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15490       has_space=`$ECHO "$complete" | $GREP " "`
15491       if test "x$has_space" != x; then
15492         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15493 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15494       fi
15495       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15496     fi
15497   fi
15498 
15499   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15500   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15501   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15502   # "foo.exe" is OK but "foo" is an error.
15503   #
15504   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15505   # It is also a way to make sure we got the proper file name for the real test later on.
15506   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15507   if test "x$test_shortpath" = x; then
15508     # Short path failed, file does not exist as specified.
15509     # Try adding .exe or .cmd
15510     if test -f "${new_path}.exe"; then
15511       input_to_shortpath="${new_path}.exe"
15512     elif test -f "${new_path}.cmd"; then
15513       input_to_shortpath="${new_path}.cmd"
15514     else
15515       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15516 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15517       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15518 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15519       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15520     fi
15521   else
15522     input_to_shortpath="$new_path"
15523   fi
15524 
15525   # Call helper function which possibly converts this using DOS-style short mode.
15526   # If so, the updated path is stored in $new_path.
15527   new_path="$input_to_shortpath"
15528 
15529   input_path="$input_to_shortpath"
15530   # Check if we need to convert this using DOS-style short mode. If the path
15531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15532   # take no chances and rewrite it.
15533   # Note: m4 eats our [], so we need to use [ and ] instead.
15534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15535   if test "x$has_forbidden_chars" != x; then
15536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15537     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15538     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15539     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15540       # Going to short mode and back again did indeed matter. Since short mode is
15541       # case insensitive, let's make it lowercase to improve readability.
15542       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15543       # Now convert it back to Unix-stile (cygpath)
15544       input_path=`$CYGPATH -u "$shortmode_path"`
15545       new_path="$input_path"
15546     fi
15547   fi
15548 
15549   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15550   if test "x$test_cygdrive_prefix" = x; then
15551     # As a simple fix, exclude /usr/bin since it's not a real path.
15552     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15553       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15554       # a path prefixed by /cygdrive for fixpath to work.
15555       new_path="$CYGWIN_ROOT_PATH$input_path"
15556     fi
15557   fi
15558 
15559   # remove trailing .exe if any
15560   new_path="${new_path/%.exe/}"
15561 
15562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15563 
15564   # First separate the path from the arguments. This will split at the first
15565   # space.
15566   complete="$FOUND_MAKE"
15567   path="${complete%% *}"
15568   tmp="$complete EOL"
15569   arguments="${tmp#* }"
15570 
15571   # Input might be given as Windows format, start by converting to
15572   # unix format.
15573   new_path="$path"
15574 
15575   windows_path="$new_path"
15576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15577     unix_path=`$CYGPATH -u "$windows_path"`
15578     new_path="$unix_path"
15579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15581     new_path="$unix_path"
15582   fi
15583 
15584 
15585   # Now try to locate executable using which
15586   new_path=`$WHICH "$new_path" 2> /dev/null`
15587 
15588   if test "x$new_path" = x; then
15589     # Oops. Which didn't find the executable.
15590     # The splitting of arguments from the executable at a space might have been incorrect,
15591     # since paths with space are more likely in Windows. Give it another try with the whole
15592     # argument.
15593     path="$complete"
15594     arguments="EOL"
15595     new_path="$path"
15596 
15597   windows_path="$new_path"
15598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15599     unix_path=`$CYGPATH -u "$windows_path"`
15600     new_path="$unix_path"
15601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15603     new_path="$unix_path"
15604   fi
15605 
15606 
15607     new_path=`$WHICH "$new_path" 2> /dev/null`
15608     # bat and cmd files are not always considered executable in MSYS causing which
15609     # to not find them
15610     if test "x$new_path" = x \
15611         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15612         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15613       new_path="$path"
15614 
15615   windows_path="$new_path"
15616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15617     unix_path=`$CYGPATH -u "$windows_path"`
15618     new_path="$unix_path"
15619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15621     new_path="$unix_path"
15622   fi
15623 
15624     fi
15625 
15626     if test "x$new_path" = x; then
15627       # It's still not found. Now this is an unrecoverable error.
15628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15629 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15630       has_space=`$ECHO "$complete" | $GREP " "`
15631       if test "x$has_space" != x; then
15632         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15633 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15634       fi
15635       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15636     fi
15637   fi
15638 
15639   # Now new_path has a complete unix path to the binary
15640   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15641     # Keep paths in /bin as-is, but remove trailing .exe if any
15642     new_path="${new_path/%.exe/}"
15643     # Do not save /bin paths to all_fixpath_prefixes!
15644   else
15645     # Not in mixed or Windows style, start by that.
15646     new_path=`cmd //c echo $new_path`
15647 
15648   input_path="$new_path"
15649   # Check if we need to convert this using DOS-style short mode. If the path
15650   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15651   # take no chances and rewrite it.
15652   # Note: m4 eats our [], so we need to use [ and ] instead.
15653   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15654   if test "x$has_forbidden_chars" != x; then
15655     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15656     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15657   fi
15658 
15659     # Output is in $new_path
15660 
15661   windows_path="$new_path"
15662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15663     unix_path=`$CYGPATH -u "$windows_path"`
15664     new_path="$unix_path"
15665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15667     new_path="$unix_path"
15668   fi
15669 
15670     # remove trailing .exe if any
15671     new_path="${new_path/%.exe/}"
15672 
15673     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15674     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15675   fi
15676 
15677   else
15678     # We're on a unix platform. Hooray! :)
15679     # First separate the path from the arguments. This will split at the first
15680     # space.
15681     complete="$FOUND_MAKE"
15682     path="${complete%% *}"
15683     tmp="$complete EOL"
15684     arguments="${tmp#* }"
15685 
15686     # Cannot rely on the command "which" here since it doesn't always work.
15687     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15688     if test -z "$is_absolute_path"; then
15689       # Path to executable is not absolute. Find it.
15690       IFS_save="$IFS"
15691       IFS=:
15692       for p in $PATH; do
15693         if test -f "$p/$path" && test -x "$p/$path"; then
15694           new_path="$p/$path"
15695           break
15696         fi
15697       done
15698       IFS="$IFS_save"
15699     else
15700       # This is an absolute path, we can use it without further modifications.
15701       new_path="$path"
15702     fi
15703 
15704     if test "x$new_path" = x; then
15705       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15706 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15707       has_space=`$ECHO "$complete" | $GREP " "`
15708       if test "x$has_space" != x; then
15709         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15710 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15711       fi
15712       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15713     fi
15714   fi
15715 
15716   # Now join together the path and the arguments once again
15717   if test "x$arguments" != xEOL; then
15718     new_complete="$new_path ${arguments% *}"
15719   else
15720     new_complete="$new_path"
15721   fi
15722 
15723   if test "x$complete" != "x$new_complete"; then
15724     FOUND_MAKE="$new_complete"
15725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15726 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15727   fi
15728 
15729         fi
15730       fi
15731     fi
15732   fi
15733 
15734     if test "x$FOUND_MAKE" = x; then
15735       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15736     fi
15737   else
15738     # Try our hardest to locate a correct version of GNU make
15739     for ac_prog in gmake
15740 do
15741   # Extract the first word of "$ac_prog", so it can be a program name with args.
15742 set dummy $ac_prog; ac_word=$2
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15744 $as_echo_n "checking for $ac_word... " >&6; }
15745 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15746   $as_echo_n "(cached) " >&6
15747 else
15748   case $CHECK_GMAKE in
15749   [\\/]* | ?:[\\/]*)
15750   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15751   ;;
15752   *)
15753   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15754 for as_dir in $PATH
15755 do
15756   IFS=$as_save_IFS
15757   test -z "$as_dir" && as_dir=.
15758     for ac_exec_ext in '' $ac_executable_extensions; do
15759   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15760     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15761     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15762     break 2
15763   fi
15764 done
15765   done
15766 IFS=$as_save_IFS
15767 
15768   ;;
15769 esac
15770 fi
15771 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15772 if test -n "$CHECK_GMAKE"; then
15773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15774 $as_echo "$CHECK_GMAKE" >&6; }
15775 else
15776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15777 $as_echo "no" >&6; }
15778 fi
15779 
15780 
15781   test -n "$CHECK_GMAKE" && break
15782 done
15783 
15784 
15785   MAKE_CANDIDATE=""$CHECK_GMAKE""
15786   DESCRIPTION="gmake in PATH"
15787   if test "x$MAKE_CANDIDATE" != x; then
15788     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15789 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15790     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15791     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15792     if test "x$IS_GNU_MAKE" = x; then
15793       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15794 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15795     else
15796       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15797       if test "x$IS_MODERN_MAKE" = x; then
15798         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15799 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15800       else
15801         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15802           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15803             MAKE_EXPECTED_ENV='cygwin'
15804           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15805             MAKE_EXPECTED_ENV='msys'
15806           else
15807             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15808           fi
15809           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15810           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15811         else
15812           # Not relevant for non-Windows
15813           IS_MAKE_CORRECT_ENV=true
15814         fi
15815         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15816           { $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
15817 $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;}
15818         else
15819           FOUND_MAKE=$MAKE_CANDIDATE
15820 
15821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15822 
15823   # First separate the path from the arguments. This will split at the first
15824   # space.
15825   complete="$FOUND_MAKE"
15826   path="${complete%% *}"
15827   tmp="$complete EOL"
15828   arguments="${tmp#* }"
15829 
15830   # Input might be given as Windows format, start by converting to
15831   # unix format.
15832   new_path=`$CYGPATH -u "$path"`
15833 
15834   # Now try to locate executable using which
15835   new_path=`$WHICH "$new_path" 2> /dev/null`
15836   # bat and cmd files are not always considered executable in cygwin causing which
15837   # to not find them
15838   if test "x$new_path" = x \
15839       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15840       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15841     new_path=`$CYGPATH -u "$path"`
15842   fi
15843   if test "x$new_path" = x; then
15844     # Oops. Which didn't find the executable.
15845     # The splitting of arguments from the executable at a space might have been incorrect,
15846     # since paths with space are more likely in Windows. Give it another try with the whole
15847     # argument.
15848     path="$complete"
15849     arguments="EOL"
15850     new_path=`$CYGPATH -u "$path"`
15851     new_path=`$WHICH "$new_path" 2> /dev/null`
15852     # bat and cmd files are not always considered executable in cygwin causing which
15853     # to not find them
15854     if test "x$new_path" = x \
15855         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15856         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15857       new_path=`$CYGPATH -u "$path"`
15858     fi
15859     if test "x$new_path" = x; then
15860       # It's still not found. Now this is an unrecoverable error.
15861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15862 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15863       has_space=`$ECHO "$complete" | $GREP " "`
15864       if test "x$has_space" != x; then
15865         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15866 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15867       fi
15868       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15869     fi
15870   fi
15871 
15872   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15873   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15874   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15875   # "foo.exe" is OK but "foo" is an error.
15876   #
15877   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15878   # It is also a way to make sure we got the proper file name for the real test later on.
15879   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15880   if test "x$test_shortpath" = x; then
15881     # Short path failed, file does not exist as specified.
15882     # Try adding .exe or .cmd
15883     if test -f "${new_path}.exe"; then
15884       input_to_shortpath="${new_path}.exe"
15885     elif test -f "${new_path}.cmd"; then
15886       input_to_shortpath="${new_path}.cmd"
15887     else
15888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15889 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15890       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15891 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15892       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15893     fi
15894   else
15895     input_to_shortpath="$new_path"
15896   fi
15897 
15898   # Call helper function which possibly converts this using DOS-style short mode.
15899   # If so, the updated path is stored in $new_path.
15900   new_path="$input_to_shortpath"
15901 
15902   input_path="$input_to_shortpath"
15903   # Check if we need to convert this using DOS-style short mode. If the path
15904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15905   # take no chances and rewrite it.
15906   # Note: m4 eats our [], so we need to use [ and ] instead.
15907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15908   if test "x$has_forbidden_chars" != x; then
15909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15913       # Going to short mode and back again did indeed matter. Since short mode is
15914       # case insensitive, let's make it lowercase to improve readability.
15915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15916       # Now convert it back to Unix-stile (cygpath)
15917       input_path=`$CYGPATH -u "$shortmode_path"`
15918       new_path="$input_path"
15919     fi
15920   fi
15921 
15922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15923   if test "x$test_cygdrive_prefix" = x; then
15924     # As a simple fix, exclude /usr/bin since it's not a real path.
15925     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15927       # a path prefixed by /cygdrive for fixpath to work.
15928       new_path="$CYGWIN_ROOT_PATH$input_path"
15929     fi
15930   fi
15931 
15932   # remove trailing .exe if any
15933   new_path="${new_path/%.exe/}"
15934 
15935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15936 
15937   # First separate the path from the arguments. This will split at the first
15938   # space.
15939   complete="$FOUND_MAKE"
15940   path="${complete%% *}"
15941   tmp="$complete EOL"
15942   arguments="${tmp#* }"
15943 
15944   # Input might be given as Windows format, start by converting to
15945   # unix format.
15946   new_path="$path"
15947 
15948   windows_path="$new_path"
15949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15950     unix_path=`$CYGPATH -u "$windows_path"`
15951     new_path="$unix_path"
15952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15954     new_path="$unix_path"
15955   fi
15956 
15957 
15958   # Now try to locate executable using which
15959   new_path=`$WHICH "$new_path" 2> /dev/null`
15960 
15961   if test "x$new_path" = x; then
15962     # Oops. Which didn't find the executable.
15963     # The splitting of arguments from the executable at a space might have been incorrect,
15964     # since paths with space are more likely in Windows. Give it another try with the whole
15965     # argument.
15966     path="$complete"
15967     arguments="EOL"
15968     new_path="$path"
15969 
15970   windows_path="$new_path"
15971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15972     unix_path=`$CYGPATH -u "$windows_path"`
15973     new_path="$unix_path"
15974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15976     new_path="$unix_path"
15977   fi
15978 
15979 
15980     new_path=`$WHICH "$new_path" 2> /dev/null`
15981     # bat and cmd files are not always considered executable in MSYS causing which
15982     # to not find them
15983     if test "x$new_path" = x \
15984         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15985         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15986       new_path="$path"
15987 
15988   windows_path="$new_path"
15989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15990     unix_path=`$CYGPATH -u "$windows_path"`
15991     new_path="$unix_path"
15992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15994     new_path="$unix_path"
15995   fi
15996 
15997     fi
15998 
15999     if test "x$new_path" = x; then
16000       # It's still not found. Now this is an unrecoverable error.
16001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16002 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16003       has_space=`$ECHO "$complete" | $GREP " "`
16004       if test "x$has_space" != x; then
16005         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16006 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16007       fi
16008       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16009     fi
16010   fi
16011 
16012   # Now new_path has a complete unix path to the binary
16013   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16014     # Keep paths in /bin as-is, but remove trailing .exe if any
16015     new_path="${new_path/%.exe/}"
16016     # Do not save /bin paths to all_fixpath_prefixes!
16017   else
16018     # Not in mixed or Windows style, start by that.
16019     new_path=`cmd //c echo $new_path`
16020 
16021   input_path="$new_path"
16022   # Check if we need to convert this using DOS-style short mode. If the path
16023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16024   # take no chances and rewrite it.
16025   # Note: m4 eats our [], so we need to use [ and ] instead.
16026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16027   if test "x$has_forbidden_chars" != x; then
16028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16029     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16030   fi
16031 
16032     # Output is in $new_path
16033 
16034   windows_path="$new_path"
16035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16036     unix_path=`$CYGPATH -u "$windows_path"`
16037     new_path="$unix_path"
16038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16040     new_path="$unix_path"
16041   fi
16042 
16043     # remove trailing .exe if any
16044     new_path="${new_path/%.exe/}"
16045 
16046     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16047     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16048   fi
16049 
16050   else
16051     # We're on a unix platform. Hooray! :)
16052     # First separate the path from the arguments. This will split at the first
16053     # space.
16054     complete="$FOUND_MAKE"
16055     path="${complete%% *}"
16056     tmp="$complete EOL"
16057     arguments="${tmp#* }"
16058 
16059     # Cannot rely on the command "which" here since it doesn't always work.
16060     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16061     if test -z "$is_absolute_path"; then
16062       # Path to executable is not absolute. Find it.
16063       IFS_save="$IFS"
16064       IFS=:
16065       for p in $PATH; do
16066         if test -f "$p/$path" && test -x "$p/$path"; then
16067           new_path="$p/$path"
16068           break
16069         fi
16070       done
16071       IFS="$IFS_save"
16072     else
16073       # This is an absolute path, we can use it without further modifications.
16074       new_path="$path"
16075     fi
16076 
16077     if test "x$new_path" = x; then
16078       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16079 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16080       has_space=`$ECHO "$complete" | $GREP " "`
16081       if test "x$has_space" != x; then
16082         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16083 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16084       fi
16085       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16086     fi
16087   fi
16088 
16089   # Now join together the path and the arguments once again
16090   if test "x$arguments" != xEOL; then
16091     new_complete="$new_path ${arguments% *}"
16092   else
16093     new_complete="$new_path"
16094   fi
16095 
16096   if test "x$complete" != "x$new_complete"; then
16097     FOUND_MAKE="$new_complete"
16098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16099 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16100   fi
16101 
16102         fi
16103       fi
16104     fi
16105   fi
16106 
16107 
16108     if test "x$FOUND_MAKE" = x; then
16109       for ac_prog in make
16110 do
16111   # Extract the first word of "$ac_prog", so it can be a program name with args.
16112 set dummy $ac_prog; ac_word=$2
16113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16114 $as_echo_n "checking for $ac_word... " >&6; }
16115 if ${ac_cv_path_CHECK_MAKE+:} false; then :
16116   $as_echo_n "(cached) " >&6
16117 else
16118   case $CHECK_MAKE in
16119   [\\/]* | ?:[\\/]*)
16120   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16121   ;;
16122   *)
16123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16124 for as_dir in $PATH
16125 do
16126   IFS=$as_save_IFS
16127   test -z "$as_dir" && as_dir=.
16128     for ac_exec_ext in '' $ac_executable_extensions; do
16129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16130     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16132     break 2
16133   fi
16134 done
16135   done
16136 IFS=$as_save_IFS
16137 
16138   ;;
16139 esac
16140 fi
16141 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16142 if test -n "$CHECK_MAKE"; then
16143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16144 $as_echo "$CHECK_MAKE" >&6; }
16145 else
16146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16147 $as_echo "no" >&6; }
16148 fi
16149 
16150 
16151   test -n "$CHECK_MAKE" && break
16152 done
16153 
16154 
16155   MAKE_CANDIDATE=""$CHECK_MAKE""
16156   DESCRIPTION="make in PATH"
16157   if test "x$MAKE_CANDIDATE" != x; then
16158     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16159 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16160     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16161     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16162     if test "x$IS_GNU_MAKE" = x; then
16163       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16164 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16165     else
16166       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16167       if test "x$IS_MODERN_MAKE" = x; then
16168         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16169 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16170       else
16171         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16172           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16173             MAKE_EXPECTED_ENV='cygwin'
16174           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16175             MAKE_EXPECTED_ENV='msys'
16176           else
16177             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16178           fi
16179           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16180           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16181         else
16182           # Not relevant for non-Windows
16183           IS_MAKE_CORRECT_ENV=true
16184         fi
16185         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16186           { $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
16187 $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;}
16188         else
16189           FOUND_MAKE=$MAKE_CANDIDATE
16190 
16191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16192 
16193   # First separate the path from the arguments. This will split at the first
16194   # space.
16195   complete="$FOUND_MAKE"
16196   path="${complete%% *}"
16197   tmp="$complete EOL"
16198   arguments="${tmp#* }"
16199 
16200   # Input might be given as Windows format, start by converting to
16201   # unix format.
16202   new_path=`$CYGPATH -u "$path"`
16203 
16204   # Now try to locate executable using which
16205   new_path=`$WHICH "$new_path" 2> /dev/null`
16206   # bat and cmd files are not always considered executable in cygwin causing which
16207   # to not find them
16208   if test "x$new_path" = x \
16209       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16210       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16211     new_path=`$CYGPATH -u "$path"`
16212   fi
16213   if test "x$new_path" = x; then
16214     # Oops. Which didn't find the executable.
16215     # The splitting of arguments from the executable at a space might have been incorrect,
16216     # since paths with space are more likely in Windows. Give it another try with the whole
16217     # argument.
16218     path="$complete"
16219     arguments="EOL"
16220     new_path=`$CYGPATH -u "$path"`
16221     new_path=`$WHICH "$new_path" 2> /dev/null`
16222     # bat and cmd files are not always considered executable in cygwin causing which
16223     # to not find them
16224     if test "x$new_path" = x \
16225         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16226         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16227       new_path=`$CYGPATH -u "$path"`
16228     fi
16229     if test "x$new_path" = x; then
16230       # It's still not found. Now this is an unrecoverable error.
16231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16232 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16233       has_space=`$ECHO "$complete" | $GREP " "`
16234       if test "x$has_space" != x; then
16235         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16236 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16237       fi
16238       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16239     fi
16240   fi
16241 
16242   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16243   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16244   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16245   # "foo.exe" is OK but "foo" is an error.
16246   #
16247   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16248   # It is also a way to make sure we got the proper file name for the real test later on.
16249   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16250   if test "x$test_shortpath" = x; then
16251     # Short path failed, file does not exist as specified.
16252     # Try adding .exe or .cmd
16253     if test -f "${new_path}.exe"; then
16254       input_to_shortpath="${new_path}.exe"
16255     elif test -f "${new_path}.cmd"; then
16256       input_to_shortpath="${new_path}.cmd"
16257     else
16258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16259 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16260       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16261 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16262       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16263     fi
16264   else
16265     input_to_shortpath="$new_path"
16266   fi
16267 
16268   # Call helper function which possibly converts this using DOS-style short mode.
16269   # If so, the updated path is stored in $new_path.
16270   new_path="$input_to_shortpath"
16271 
16272   input_path="$input_to_shortpath"
16273   # Check if we need to convert this using DOS-style short mode. If the path
16274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16275   # take no chances and rewrite it.
16276   # Note: m4 eats our [], so we need to use [ and ] instead.
16277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16278   if test "x$has_forbidden_chars" != x; then
16279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16283       # Going to short mode and back again did indeed matter. Since short mode is
16284       # case insensitive, let's make it lowercase to improve readability.
16285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16286       # Now convert it back to Unix-stile (cygpath)
16287       input_path=`$CYGPATH -u "$shortmode_path"`
16288       new_path="$input_path"
16289     fi
16290   fi
16291 
16292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16293   if test "x$test_cygdrive_prefix" = x; then
16294     # As a simple fix, exclude /usr/bin since it's not a real path.
16295     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16297       # a path prefixed by /cygdrive for fixpath to work.
16298       new_path="$CYGWIN_ROOT_PATH$input_path"
16299     fi
16300   fi
16301 
16302   # remove trailing .exe if any
16303   new_path="${new_path/%.exe/}"
16304 
16305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16306 
16307   # First separate the path from the arguments. This will split at the first
16308   # space.
16309   complete="$FOUND_MAKE"
16310   path="${complete%% *}"
16311   tmp="$complete EOL"
16312   arguments="${tmp#* }"
16313 
16314   # Input might be given as Windows format, start by converting to
16315   # unix format.
16316   new_path="$path"
16317 
16318   windows_path="$new_path"
16319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16320     unix_path=`$CYGPATH -u "$windows_path"`
16321     new_path="$unix_path"
16322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16324     new_path="$unix_path"
16325   fi
16326 
16327 
16328   # Now try to locate executable using which
16329   new_path=`$WHICH "$new_path" 2> /dev/null`
16330 
16331   if test "x$new_path" = x; then
16332     # Oops. Which didn't find the executable.
16333     # The splitting of arguments from the executable at a space might have been incorrect,
16334     # since paths with space are more likely in Windows. Give it another try with the whole
16335     # argument.
16336     path="$complete"
16337     arguments="EOL"
16338     new_path="$path"
16339 
16340   windows_path="$new_path"
16341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16342     unix_path=`$CYGPATH -u "$windows_path"`
16343     new_path="$unix_path"
16344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16346     new_path="$unix_path"
16347   fi
16348 
16349 
16350     new_path=`$WHICH "$new_path" 2> /dev/null`
16351     # bat and cmd files are not always considered executable in MSYS causing which
16352     # to not find them
16353     if test "x$new_path" = x \
16354         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16355         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16356       new_path="$path"
16357 
16358   windows_path="$new_path"
16359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16360     unix_path=`$CYGPATH -u "$windows_path"`
16361     new_path="$unix_path"
16362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16364     new_path="$unix_path"
16365   fi
16366 
16367     fi
16368 
16369     if test "x$new_path" = x; then
16370       # It's still not found. Now this is an unrecoverable error.
16371       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16372 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16373       has_space=`$ECHO "$complete" | $GREP " "`
16374       if test "x$has_space" != x; then
16375         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16376 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16377       fi
16378       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16379     fi
16380   fi
16381 
16382   # Now new_path has a complete unix path to the binary
16383   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16384     # Keep paths in /bin as-is, but remove trailing .exe if any
16385     new_path="${new_path/%.exe/}"
16386     # Do not save /bin paths to all_fixpath_prefixes!
16387   else
16388     # Not in mixed or Windows style, start by that.
16389     new_path=`cmd //c echo $new_path`
16390 
16391   input_path="$new_path"
16392   # Check if we need to convert this using DOS-style short mode. If the path
16393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16394   # take no chances and rewrite it.
16395   # Note: m4 eats our [], so we need to use [ and ] instead.
16396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16397   if test "x$has_forbidden_chars" != x; then
16398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16400   fi
16401 
16402     # Output is in $new_path
16403 
16404   windows_path="$new_path"
16405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16406     unix_path=`$CYGPATH -u "$windows_path"`
16407     new_path="$unix_path"
16408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16410     new_path="$unix_path"
16411   fi
16412 
16413     # remove trailing .exe if any
16414     new_path="${new_path/%.exe/}"
16415 
16416     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16417     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16418   fi
16419 
16420   else
16421     # We're on a unix platform. Hooray! :)
16422     # First separate the path from the arguments. This will split at the first
16423     # space.
16424     complete="$FOUND_MAKE"
16425     path="${complete%% *}"
16426     tmp="$complete EOL"
16427     arguments="${tmp#* }"
16428 
16429     # Cannot rely on the command "which" here since it doesn't always work.
16430     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16431     if test -z "$is_absolute_path"; then
16432       # Path to executable is not absolute. Find it.
16433       IFS_save="$IFS"
16434       IFS=:
16435       for p in $PATH; do
16436         if test -f "$p/$path" && test -x "$p/$path"; then
16437           new_path="$p/$path"
16438           break
16439         fi
16440       done
16441       IFS="$IFS_save"
16442     else
16443       # This is an absolute path, we can use it without further modifications.
16444       new_path="$path"
16445     fi
16446 
16447     if test "x$new_path" = x; then
16448       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16449 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16450       has_space=`$ECHO "$complete" | $GREP " "`
16451       if test "x$has_space" != x; then
16452         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16453 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16454       fi
16455       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16456     fi
16457   fi
16458 
16459   # Now join together the path and the arguments once again
16460   if test "x$arguments" != xEOL; then
16461     new_complete="$new_path ${arguments% *}"
16462   else
16463     new_complete="$new_path"
16464   fi
16465 
16466   if test "x$complete" != "x$new_complete"; then
16467     FOUND_MAKE="$new_complete"
16468     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16469 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16470   fi
16471 
16472         fi
16473       fi
16474     fi
16475   fi
16476 
16477     fi
16478 
16479     if test "x$FOUND_MAKE" = x; then
16480       if test "x$TOOLCHAIN_PATH" != x; then
16481         # We have a toolchain path, check that as well before giving up.
16482         OLD_PATH=$PATH
16483         PATH=$TOOLCHAIN_PATH:$PATH
16484         for ac_prog in gmake
16485 do
16486   # Extract the first word of "$ac_prog", so it can be a program name with args.
16487 set dummy $ac_prog; ac_word=$2
16488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16489 $as_echo_n "checking for $ac_word... " >&6; }
16490 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16491   $as_echo_n "(cached) " >&6
16492 else
16493   case $CHECK_TOOLSDIR_GMAKE in
16494   [\\/]* | ?:[\\/]*)
16495   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16496   ;;
16497   *)
16498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16499 for as_dir in $PATH
16500 do
16501   IFS=$as_save_IFS
16502   test -z "$as_dir" && as_dir=.
16503     for ac_exec_ext in '' $ac_executable_extensions; do
16504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16505     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16507     break 2
16508   fi
16509 done
16510   done
16511 IFS=$as_save_IFS
16512 
16513   ;;
16514 esac
16515 fi
16516 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16517 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16519 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16520 else
16521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16522 $as_echo "no" >&6; }
16523 fi
16524 
16525 
16526   test -n "$CHECK_TOOLSDIR_GMAKE" && break
16527 done
16528 
16529 
16530   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16531   DESCRIPTION="gmake in tools-dir"
16532   if test "x$MAKE_CANDIDATE" != x; then
16533     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16534 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16535     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16536     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16537     if test "x$IS_GNU_MAKE" = x; then
16538       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16539 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16540     else
16541       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16542       if test "x$IS_MODERN_MAKE" = x; then
16543         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16544 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16545       else
16546         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16547           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16548             MAKE_EXPECTED_ENV='cygwin'
16549           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16550             MAKE_EXPECTED_ENV='msys'
16551           else
16552             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16553           fi
16554           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16555           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16556         else
16557           # Not relevant for non-Windows
16558           IS_MAKE_CORRECT_ENV=true
16559         fi
16560         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16561           { $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
16562 $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;}
16563         else
16564           FOUND_MAKE=$MAKE_CANDIDATE
16565 
16566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16567 
16568   # First separate the path from the arguments. This will split at the first
16569   # space.
16570   complete="$FOUND_MAKE"
16571   path="${complete%% *}"
16572   tmp="$complete EOL"
16573   arguments="${tmp#* }"
16574 
16575   # Input might be given as Windows format, start by converting to
16576   # unix format.
16577   new_path=`$CYGPATH -u "$path"`
16578 
16579   # Now try to locate executable using which
16580   new_path=`$WHICH "$new_path" 2> /dev/null`
16581   # bat and cmd files are not always considered executable in cygwin causing which
16582   # to not find them
16583   if test "x$new_path" = x \
16584       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16585       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16586     new_path=`$CYGPATH -u "$path"`
16587   fi
16588   if test "x$new_path" = x; then
16589     # Oops. Which didn't find the executable.
16590     # The splitting of arguments from the executable at a space might have been incorrect,
16591     # since paths with space are more likely in Windows. Give it another try with the whole
16592     # argument.
16593     path="$complete"
16594     arguments="EOL"
16595     new_path=`$CYGPATH -u "$path"`
16596     new_path=`$WHICH "$new_path" 2> /dev/null`
16597     # bat and cmd files are not always considered executable in cygwin causing which
16598     # to not find them
16599     if test "x$new_path" = x \
16600         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16601         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16602       new_path=`$CYGPATH -u "$path"`
16603     fi
16604     if test "x$new_path" = x; then
16605       # It's still not found. Now this is an unrecoverable error.
16606       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16607 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16608       has_space=`$ECHO "$complete" | $GREP " "`
16609       if test "x$has_space" != x; then
16610         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16611 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16612       fi
16613       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16614     fi
16615   fi
16616 
16617   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16618   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16619   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16620   # "foo.exe" is OK but "foo" is an error.
16621   #
16622   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16623   # It is also a way to make sure we got the proper file name for the real test later on.
16624   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16625   if test "x$test_shortpath" = x; then
16626     # Short path failed, file does not exist as specified.
16627     # Try adding .exe or .cmd
16628     if test -f "${new_path}.exe"; then
16629       input_to_shortpath="${new_path}.exe"
16630     elif test -f "${new_path}.cmd"; then
16631       input_to_shortpath="${new_path}.cmd"
16632     else
16633       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16634 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16635       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16636 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16637       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16638     fi
16639   else
16640     input_to_shortpath="$new_path"
16641   fi
16642 
16643   # Call helper function which possibly converts this using DOS-style short mode.
16644   # If so, the updated path is stored in $new_path.
16645   new_path="$input_to_shortpath"
16646 
16647   input_path="$input_to_shortpath"
16648   # Check if we need to convert this using DOS-style short mode. If the path
16649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16650   # take no chances and rewrite it.
16651   # Note: m4 eats our [], so we need to use [ and ] instead.
16652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16653   if test "x$has_forbidden_chars" != x; then
16654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16655     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16656     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16657     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16658       # Going to short mode and back again did indeed matter. Since short mode is
16659       # case insensitive, let's make it lowercase to improve readability.
16660       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16661       # Now convert it back to Unix-stile (cygpath)
16662       input_path=`$CYGPATH -u "$shortmode_path"`
16663       new_path="$input_path"
16664     fi
16665   fi
16666 
16667   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16668   if test "x$test_cygdrive_prefix" = x; then
16669     # As a simple fix, exclude /usr/bin since it's not a real path.
16670     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16671       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16672       # a path prefixed by /cygdrive for fixpath to work.
16673       new_path="$CYGWIN_ROOT_PATH$input_path"
16674     fi
16675   fi
16676 
16677   # remove trailing .exe if any
16678   new_path="${new_path/%.exe/}"
16679 
16680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16681 
16682   # First separate the path from the arguments. This will split at the first
16683   # space.
16684   complete="$FOUND_MAKE"
16685   path="${complete%% *}"
16686   tmp="$complete EOL"
16687   arguments="${tmp#* }"
16688 
16689   # Input might be given as Windows format, start by converting to
16690   # unix format.
16691   new_path="$path"
16692 
16693   windows_path="$new_path"
16694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16695     unix_path=`$CYGPATH -u "$windows_path"`
16696     new_path="$unix_path"
16697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16699     new_path="$unix_path"
16700   fi
16701 
16702 
16703   # Now try to locate executable using which
16704   new_path=`$WHICH "$new_path" 2> /dev/null`
16705 
16706   if test "x$new_path" = x; then
16707     # Oops. Which didn't find the executable.
16708     # The splitting of arguments from the executable at a space might have been incorrect,
16709     # since paths with space are more likely in Windows. Give it another try with the whole
16710     # argument.
16711     path="$complete"
16712     arguments="EOL"
16713     new_path="$path"
16714 
16715   windows_path="$new_path"
16716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16717     unix_path=`$CYGPATH -u "$windows_path"`
16718     new_path="$unix_path"
16719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16721     new_path="$unix_path"
16722   fi
16723 
16724 
16725     new_path=`$WHICH "$new_path" 2> /dev/null`
16726     # bat and cmd files are not always considered executable in MSYS causing which
16727     # to not find them
16728     if test "x$new_path" = x \
16729         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16730         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16731       new_path="$path"
16732 
16733   windows_path="$new_path"
16734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16735     unix_path=`$CYGPATH -u "$windows_path"`
16736     new_path="$unix_path"
16737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16738     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16739     new_path="$unix_path"
16740   fi
16741 
16742     fi
16743 
16744     if test "x$new_path" = x; then
16745       # It's still not found. Now this is an unrecoverable error.
16746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16747 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16748       has_space=`$ECHO "$complete" | $GREP " "`
16749       if test "x$has_space" != x; then
16750         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16751 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16752       fi
16753       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16754     fi
16755   fi
16756 
16757   # Now new_path has a complete unix path to the binary
16758   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16759     # Keep paths in /bin as-is, but remove trailing .exe if any
16760     new_path="${new_path/%.exe/}"
16761     # Do not save /bin paths to all_fixpath_prefixes!
16762   else
16763     # Not in mixed or Windows style, start by that.
16764     new_path=`cmd //c echo $new_path`
16765 
16766   input_path="$new_path"
16767   # Check if we need to convert this using DOS-style short mode. If the path
16768   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16769   # take no chances and rewrite it.
16770   # Note: m4 eats our [], so we need to use [ and ] instead.
16771   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16772   if test "x$has_forbidden_chars" != x; then
16773     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16774     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16775   fi
16776 
16777     # Output is in $new_path
16778 
16779   windows_path="$new_path"
16780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16781     unix_path=`$CYGPATH -u "$windows_path"`
16782     new_path="$unix_path"
16783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16785     new_path="$unix_path"
16786   fi
16787 
16788     # remove trailing .exe if any
16789     new_path="${new_path/%.exe/}"
16790 
16791     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16792     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16793   fi
16794 
16795   else
16796     # We're on a unix platform. Hooray! :)
16797     # First separate the path from the arguments. This will split at the first
16798     # space.
16799     complete="$FOUND_MAKE"
16800     path="${complete%% *}"
16801     tmp="$complete EOL"
16802     arguments="${tmp#* }"
16803 
16804     # Cannot rely on the command "which" here since it doesn't always work.
16805     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16806     if test -z "$is_absolute_path"; then
16807       # Path to executable is not absolute. Find it.
16808       IFS_save="$IFS"
16809       IFS=:
16810       for p in $PATH; do
16811         if test -f "$p/$path" && test -x "$p/$path"; then
16812           new_path="$p/$path"
16813           break
16814         fi
16815       done
16816       IFS="$IFS_save"
16817     else
16818       # This is an absolute path, we can use it without further modifications.
16819       new_path="$path"
16820     fi
16821 
16822     if test "x$new_path" = x; then
16823       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16824 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16825       has_space=`$ECHO "$complete" | $GREP " "`
16826       if test "x$has_space" != x; then
16827         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16828 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16829       fi
16830       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16831     fi
16832   fi
16833 
16834   # Now join together the path and the arguments once again
16835   if test "x$arguments" != xEOL; then
16836     new_complete="$new_path ${arguments% *}"
16837   else
16838     new_complete="$new_path"
16839   fi
16840 
16841   if test "x$complete" != "x$new_complete"; then
16842     FOUND_MAKE="$new_complete"
16843     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16844 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16845   fi
16846 
16847         fi
16848       fi
16849     fi
16850   fi
16851 
16852         if test "x$FOUND_MAKE" = x; then
16853           for ac_prog in make
16854 do
16855   # Extract the first word of "$ac_prog", so it can be a program name with args.
16856 set dummy $ac_prog; ac_word=$2
16857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16858 $as_echo_n "checking for $ac_word... " >&6; }
16859 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16860   $as_echo_n "(cached) " >&6
16861 else
16862   case $CHECK_TOOLSDIR_MAKE in
16863   [\\/]* | ?:[\\/]*)
16864   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16865   ;;
16866   *)
16867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16868 for as_dir in $PATH
16869 do
16870   IFS=$as_save_IFS
16871   test -z "$as_dir" && as_dir=.
16872     for ac_exec_ext in '' $ac_executable_extensions; do
16873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16874     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16876     break 2
16877   fi
16878 done
16879   done
16880 IFS=$as_save_IFS
16881 
16882   ;;
16883 esac
16884 fi
16885 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16886 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16888 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16889 else
16890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16891 $as_echo "no" >&6; }
16892 fi
16893 
16894 
16895   test -n "$CHECK_TOOLSDIR_MAKE" && break
16896 done
16897 
16898 
16899   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16900   DESCRIPTION="make in tools-dir"
16901   if test "x$MAKE_CANDIDATE" != x; then
16902     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16903 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16904     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16905     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16906     if test "x$IS_GNU_MAKE" = x; then
16907       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16908 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16909     else
16910       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16911       if test "x$IS_MODERN_MAKE" = x; then
16912         { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16913 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16914       else
16915         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16916           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16917             MAKE_EXPECTED_ENV='cygwin'
16918           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16919             MAKE_EXPECTED_ENV='msys'
16920           else
16921             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16922           fi
16923           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16924           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16925         else
16926           # Not relevant for non-Windows
16927           IS_MAKE_CORRECT_ENV=true
16928         fi
16929         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16930           { $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
16931 $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;}
16932         else
16933           FOUND_MAKE=$MAKE_CANDIDATE
16934 
16935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16936 
16937   # First separate the path from the arguments. This will split at the first
16938   # space.
16939   complete="$FOUND_MAKE"
16940   path="${complete%% *}"
16941   tmp="$complete EOL"
16942   arguments="${tmp#* }"
16943 
16944   # Input might be given as Windows format, start by converting to
16945   # unix format.
16946   new_path=`$CYGPATH -u "$path"`
16947 
16948   # Now try to locate executable using which
16949   new_path=`$WHICH "$new_path" 2> /dev/null`
16950   # bat and cmd files are not always considered executable in cygwin causing which
16951   # to not find them
16952   if test "x$new_path" = x \
16953       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16954       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16955     new_path=`$CYGPATH -u "$path"`
16956   fi
16957   if test "x$new_path" = x; then
16958     # Oops. Which didn't find the executable.
16959     # The splitting of arguments from the executable at a space might have been incorrect,
16960     # since paths with space are more likely in Windows. Give it another try with the whole
16961     # argument.
16962     path="$complete"
16963     arguments="EOL"
16964     new_path=`$CYGPATH -u "$path"`
16965     new_path=`$WHICH "$new_path" 2> /dev/null`
16966     # bat and cmd files are not always considered executable in cygwin causing which
16967     # to not find them
16968     if test "x$new_path" = x \
16969         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16970         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16971       new_path=`$CYGPATH -u "$path"`
16972     fi
16973     if test "x$new_path" = x; then
16974       # It's still not found. Now this is an unrecoverable error.
16975       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16976 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16977       has_space=`$ECHO "$complete" | $GREP " "`
16978       if test "x$has_space" != x; then
16979         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16980 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16981       fi
16982       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16983     fi
16984   fi
16985 
16986   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16987   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16988   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16989   # "foo.exe" is OK but "foo" is an error.
16990   #
16991   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16992   # It is also a way to make sure we got the proper file name for the real test later on.
16993   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16994   if test "x$test_shortpath" = x; then
16995     # Short path failed, file does not exist as specified.
16996     # Try adding .exe or .cmd
16997     if test -f "${new_path}.exe"; then
16998       input_to_shortpath="${new_path}.exe"
16999     elif test -f "${new_path}.cmd"; then
17000       input_to_shortpath="${new_path}.cmd"
17001     else
17002       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17003 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17004       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17005 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17006       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17007     fi
17008   else
17009     input_to_shortpath="$new_path"
17010   fi
17011 
17012   # Call helper function which possibly converts this using DOS-style short mode.
17013   # If so, the updated path is stored in $new_path.
17014   new_path="$input_to_shortpath"
17015 
17016   input_path="$input_to_shortpath"
17017   # Check if we need to convert this using DOS-style short mode. If the path
17018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17019   # take no chances and rewrite it.
17020   # Note: m4 eats our [], so we need to use [ and ] instead.
17021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17022   if test "x$has_forbidden_chars" != x; then
17023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17024     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17025     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17026     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17027       # Going to short mode and back again did indeed matter. Since short mode is
17028       # case insensitive, let's make it lowercase to improve readability.
17029       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17030       # Now convert it back to Unix-stile (cygpath)
17031       input_path=`$CYGPATH -u "$shortmode_path"`
17032       new_path="$input_path"
17033     fi
17034   fi
17035 
17036   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17037   if test "x$test_cygdrive_prefix" = x; then
17038     # As a simple fix, exclude /usr/bin since it's not a real path.
17039     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17040       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17041       # a path prefixed by /cygdrive for fixpath to work.
17042       new_path="$CYGWIN_ROOT_PATH$input_path"
17043     fi
17044   fi
17045 
17046   # remove trailing .exe if any
17047   new_path="${new_path/%.exe/}"
17048 
17049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17050 
17051   # First separate the path from the arguments. This will split at the first
17052   # space.
17053   complete="$FOUND_MAKE"
17054   path="${complete%% *}"
17055   tmp="$complete EOL"
17056   arguments="${tmp#* }"
17057 
17058   # Input might be given as Windows format, start by converting to
17059   # unix format.
17060   new_path="$path"
17061 
17062   windows_path="$new_path"
17063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064     unix_path=`$CYGPATH -u "$windows_path"`
17065     new_path="$unix_path"
17066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17068     new_path="$unix_path"
17069   fi
17070 
17071 
17072   # Now try to locate executable using which
17073   new_path=`$WHICH "$new_path" 2> /dev/null`
17074 
17075   if test "x$new_path" = x; then
17076     # Oops. Which didn't find the executable.
17077     # The splitting of arguments from the executable at a space might have been incorrect,
17078     # since paths with space are more likely in Windows. Give it another try with the whole
17079     # argument.
17080     path="$complete"
17081     arguments="EOL"
17082     new_path="$path"
17083 
17084   windows_path="$new_path"
17085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17086     unix_path=`$CYGPATH -u "$windows_path"`
17087     new_path="$unix_path"
17088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17090     new_path="$unix_path"
17091   fi
17092 
17093 
17094     new_path=`$WHICH "$new_path" 2> /dev/null`
17095     # bat and cmd files are not always considered executable in MSYS causing which
17096     # to not find them
17097     if test "x$new_path" = x \
17098         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17099         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17100       new_path="$path"
17101 
17102   windows_path="$new_path"
17103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17104     unix_path=`$CYGPATH -u "$windows_path"`
17105     new_path="$unix_path"
17106   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17107     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17108     new_path="$unix_path"
17109   fi
17110 
17111     fi
17112 
17113     if test "x$new_path" = x; then
17114       # It's still not found. Now this is an unrecoverable error.
17115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17116 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17117       has_space=`$ECHO "$complete" | $GREP " "`
17118       if test "x$has_space" != x; then
17119         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17120 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17121       fi
17122       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17123     fi
17124   fi
17125 
17126   # Now new_path has a complete unix path to the binary
17127   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17128     # Keep paths in /bin as-is, but remove trailing .exe if any
17129     new_path="${new_path/%.exe/}"
17130     # Do not save /bin paths to all_fixpath_prefixes!
17131   else
17132     # Not in mixed or Windows style, start by that.
17133     new_path=`cmd //c echo $new_path`
17134 
17135   input_path="$new_path"
17136   # Check if we need to convert this using DOS-style short mode. If the path
17137   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17138   # take no chances and rewrite it.
17139   # Note: m4 eats our [], so we need to use [ and ] instead.
17140   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17141   if test "x$has_forbidden_chars" != x; then
17142     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17143     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17144   fi
17145 
17146     # Output is in $new_path
17147 
17148   windows_path="$new_path"
17149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17150     unix_path=`$CYGPATH -u "$windows_path"`
17151     new_path="$unix_path"
17152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17154     new_path="$unix_path"
17155   fi
17156 
17157     # remove trailing .exe if any
17158     new_path="${new_path/%.exe/}"
17159 
17160     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17161     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17162   fi
17163 
17164   else
17165     # We're on a unix platform. Hooray! :)
17166     # First separate the path from the arguments. This will split at the first
17167     # space.
17168     complete="$FOUND_MAKE"
17169     path="${complete%% *}"
17170     tmp="$complete EOL"
17171     arguments="${tmp#* }"
17172 
17173     # Cannot rely on the command "which" here since it doesn't always work.
17174     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17175     if test -z "$is_absolute_path"; then
17176       # Path to executable is not absolute. Find it.
17177       IFS_save="$IFS"
17178       IFS=:
17179       for p in $PATH; do
17180         if test -f "$p/$path" && test -x "$p/$path"; then
17181           new_path="$p/$path"
17182           break
17183         fi
17184       done
17185       IFS="$IFS_save"
17186     else
17187       # This is an absolute path, we can use it without further modifications.
17188       new_path="$path"
17189     fi
17190 
17191     if test "x$new_path" = x; then
17192       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17193 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17194       has_space=`$ECHO "$complete" | $GREP " "`
17195       if test "x$has_space" != x; then
17196         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17197 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17198       fi
17199       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17200     fi
17201   fi
17202 
17203   # Now join together the path and the arguments once again
17204   if test "x$arguments" != xEOL; then
17205     new_complete="$new_path ${arguments% *}"
17206   else
17207     new_complete="$new_path"
17208   fi
17209 
17210   if test "x$complete" != "x$new_complete"; then
17211     FOUND_MAKE="$new_complete"
17212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17213 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17214   fi
17215 
17216         fi
17217       fi
17218     fi
17219   fi
17220 
17221         fi
17222         PATH=$OLD_PATH
17223       fi
17224     fi
17225 
17226     if test "x$FOUND_MAKE" = x; then
17227       as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17228     fi
17229   fi
17230 
17231   MAKE=$FOUND_MAKE
17232 
17233   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17234 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17235 
17236 
17237   # Check if make supports the output sync option and if so, setup using it.
17238   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17239 $as_echo_n "checking if make --output-sync is supported... " >&6; }
17240   if $MAKE --version -O > /dev/null 2>&1; then
17241     OUTPUT_SYNC_SUPPORTED=true
17242     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17243 $as_echo "yes" >&6; }
17244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17245 $as_echo_n "checking for output-sync value... " >&6; }
17246 
17247 # Check whether --with-output-sync was given.
17248 if test "${with_output_sync+set}" = set; then :
17249   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17250 fi
17251 
17252     if test "x$OUTPUT_SYNC" = "x"; then
17253       OUTPUT_SYNC=none
17254     fi
17255     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17256 $as_echo "$OUTPUT_SYNC" >&6; }
17257     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17258       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17259     fi
17260   else
17261     OUTPUT_SYNC_SUPPORTED=false
17262     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17263 $as_echo "no" >&6; }
17264   fi
17265 
17266 
17267 
17268 
17269 
17270 
17271   # Test if find supports -delete
17272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17273 $as_echo_n "checking if find supports -delete... " >&6; }
17274   FIND_DELETE="-delete"
17275 
17276   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17277 
17278   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17279 
17280   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17281   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17282     # No, it does not.
17283     rm $DELETEDIR/TestIfFindSupportsDelete
17284     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17285       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17286       FIND_DELETE="-print | xargs rm"
17287     else
17288       FIND_DELETE="-exec rm \{\} \+"
17289     fi
17290     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17291 $as_echo "no" >&6; }
17292   else
17293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17294 $as_echo "yes" >&6; }
17295   fi
17296   rmdir $DELETEDIR
17297 
17298 
17299 
17300   # These tools might not be installed by default,
17301   # need hint on how to install them.
17302 
17303 
17304 
17305   # Publish this variable in the help.
17306 
17307 
17308   if test "x$UNZIP" = x; then
17309     # The variable is not set by user, try to locate tool using the code snippet
17310     for ac_prog in unzip
17311 do
17312   # Extract the first word of "$ac_prog", so it can be a program name with args.
17313 set dummy $ac_prog; ac_word=$2
17314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17315 $as_echo_n "checking for $ac_word... " >&6; }
17316 if ${ac_cv_path_UNZIP+:} false; then :
17317   $as_echo_n "(cached) " >&6
17318 else
17319   case $UNZIP in
17320   [\\/]* | ?:[\\/]*)
17321   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17322   ;;
17323   *)
17324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17325 for as_dir in $PATH
17326 do
17327   IFS=$as_save_IFS
17328   test -z "$as_dir" && as_dir=.
17329     for ac_exec_ext in '' $ac_executable_extensions; do
17330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17331     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17333     break 2
17334   fi
17335 done
17336   done
17337 IFS=$as_save_IFS
17338 
17339   ;;
17340 esac
17341 fi
17342 UNZIP=$ac_cv_path_UNZIP
17343 if test -n "$UNZIP"; then
17344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17345 $as_echo "$UNZIP" >&6; }
17346 else
17347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348 $as_echo "no" >&6; }
17349 fi
17350 
17351 
17352   test -n "$UNZIP" && break
17353 done
17354 
17355   else
17356     # The variable is set, but is it from the command line or the environment?
17357 
17358     # Try to remove the string !UNZIP! from our list.
17359     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17360     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17361       # If it failed, the variable was not from the command line. Ignore it,
17362       # but warn the user (except for BASH, which is always set by the calling BASH).
17363       if test "xUNZIP" != xBASH; then
17364         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17365 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17366       fi
17367       # Try to locate tool using the code snippet
17368       for ac_prog in unzip
17369 do
17370   # Extract the first word of "$ac_prog", so it can be a program name with args.
17371 set dummy $ac_prog; ac_word=$2
17372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17373 $as_echo_n "checking for $ac_word... " >&6; }
17374 if ${ac_cv_path_UNZIP+:} false; then :
17375   $as_echo_n "(cached) " >&6
17376 else
17377   case $UNZIP in
17378   [\\/]* | ?:[\\/]*)
17379   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17380   ;;
17381   *)
17382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17383 for as_dir in $PATH
17384 do
17385   IFS=$as_save_IFS
17386   test -z "$as_dir" && as_dir=.
17387     for ac_exec_ext in '' $ac_executable_extensions; do
17388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17389     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17391     break 2
17392   fi
17393 done
17394   done
17395 IFS=$as_save_IFS
17396 
17397   ;;
17398 esac
17399 fi
17400 UNZIP=$ac_cv_path_UNZIP
17401 if test -n "$UNZIP"; then
17402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17403 $as_echo "$UNZIP" >&6; }
17404 else
17405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17406 $as_echo "no" >&6; }
17407 fi
17408 
17409 
17410   test -n "$UNZIP" && break
17411 done
17412 
17413     else
17414       # If it succeeded, then it was overridden by the user. We will use it
17415       # for the tool.
17416 
17417       # First remove it from the list of overridden variables, so we can test
17418       # for unknown variables in the end.
17419       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17420 
17421       # Check if the provided tool contains a complete path.
17422       tool_specified="$UNZIP"
17423       tool_basename="${tool_specified##*/}"
17424       if test "x$tool_basename" = "x$tool_specified"; then
17425         # A command without a complete path is provided, search $PATH.
17426         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17427 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17428         # Extract the first word of "$tool_basename", so it can be a program name with args.
17429 set dummy $tool_basename; ac_word=$2
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17431 $as_echo_n "checking for $ac_word... " >&6; }
17432 if ${ac_cv_path_UNZIP+:} false; then :
17433   $as_echo_n "(cached) " >&6
17434 else
17435   case $UNZIP in
17436   [\\/]* | ?:[\\/]*)
17437   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17438   ;;
17439   *)
17440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17441 for as_dir in $PATH
17442 do
17443   IFS=$as_save_IFS
17444   test -z "$as_dir" && as_dir=.
17445     for ac_exec_ext in '' $ac_executable_extensions; do
17446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17447     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17449     break 2
17450   fi
17451 done
17452   done
17453 IFS=$as_save_IFS
17454 
17455   ;;
17456 esac
17457 fi
17458 UNZIP=$ac_cv_path_UNZIP
17459 if test -n "$UNZIP"; then
17460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17461 $as_echo "$UNZIP" >&6; }
17462 else
17463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17464 $as_echo "no" >&6; }
17465 fi
17466 
17467 
17468         if test "x$UNZIP" = x; then
17469           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17470         fi
17471       else
17472         # Otherwise we believe it is a complete path. Use it as it is.
17473         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17474 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17475         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17476 $as_echo_n "checking for UNZIP... " >&6; }
17477         if test ! -x "$tool_specified"; then
17478           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17479 $as_echo "not found" >&6; }
17480           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17481         fi
17482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17483 $as_echo "$tool_specified" >&6; }
17484       fi
17485     fi
17486   fi
17487 
17488 
17489 
17490   if test "x$UNZIP" = x; then
17491     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17492   fi
17493 
17494 
17495 
17496 
17497 
17498   # Publish this variable in the help.
17499 
17500 
17501   if test "x$ZIP" = x; then
17502     # The variable is not set by user, try to locate tool using the code snippet
17503     for ac_prog in zip
17504 do
17505   # Extract the first word of "$ac_prog", so it can be a program name with args.
17506 set dummy $ac_prog; ac_word=$2
17507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17508 $as_echo_n "checking for $ac_word... " >&6; }
17509 if ${ac_cv_path_ZIP+:} false; then :
17510   $as_echo_n "(cached) " >&6
17511 else
17512   case $ZIP in
17513   [\\/]* | ?:[\\/]*)
17514   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17515   ;;
17516   *)
17517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17518 for as_dir in $PATH
17519 do
17520   IFS=$as_save_IFS
17521   test -z "$as_dir" && as_dir=.
17522     for ac_exec_ext in '' $ac_executable_extensions; do
17523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17524     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17526     break 2
17527   fi
17528 done
17529   done
17530 IFS=$as_save_IFS
17531 
17532   ;;
17533 esac
17534 fi
17535 ZIP=$ac_cv_path_ZIP
17536 if test -n "$ZIP"; then
17537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17538 $as_echo "$ZIP" >&6; }
17539 else
17540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17541 $as_echo "no" >&6; }
17542 fi
17543 
17544 
17545   test -n "$ZIP" && break
17546 done
17547 
17548   else
17549     # The variable is set, but is it from the command line or the environment?
17550 
17551     # Try to remove the string !ZIP! from our list.
17552     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17553     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17554       # If it failed, the variable was not from the command line. Ignore it,
17555       # but warn the user (except for BASH, which is always set by the calling BASH).
17556       if test "xZIP" != xBASH; then
17557         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17558 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17559       fi
17560       # Try to locate tool using the code snippet
17561       for ac_prog in zip
17562 do
17563   # Extract the first word of "$ac_prog", so it can be a program name with args.
17564 set dummy $ac_prog; ac_word=$2
17565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17566 $as_echo_n "checking for $ac_word... " >&6; }
17567 if ${ac_cv_path_ZIP+:} false; then :
17568   $as_echo_n "(cached) " >&6
17569 else
17570   case $ZIP in
17571   [\\/]* | ?:[\\/]*)
17572   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17573   ;;
17574   *)
17575   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17576 for as_dir in $PATH
17577 do
17578   IFS=$as_save_IFS
17579   test -z "$as_dir" && as_dir=.
17580     for ac_exec_ext in '' $ac_executable_extensions; do
17581   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17582     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17583     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17584     break 2
17585   fi
17586 done
17587   done
17588 IFS=$as_save_IFS
17589 
17590   ;;
17591 esac
17592 fi
17593 ZIP=$ac_cv_path_ZIP
17594 if test -n "$ZIP"; then
17595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17596 $as_echo "$ZIP" >&6; }
17597 else
17598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17599 $as_echo "no" >&6; }
17600 fi
17601 
17602 
17603   test -n "$ZIP" && break
17604 done
17605 
17606     else
17607       # If it succeeded, then it was overridden by the user. We will use it
17608       # for the tool.
17609 
17610       # First remove it from the list of overridden variables, so we can test
17611       # for unknown variables in the end.
17612       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17613 
17614       # Check if the provided tool contains a complete path.
17615       tool_specified="$ZIP"
17616       tool_basename="${tool_specified##*/}"
17617       if test "x$tool_basename" = "x$tool_specified"; then
17618         # A command without a complete path is provided, search $PATH.
17619         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17620 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17621         # Extract the first word of "$tool_basename", so it can be a program name with args.
17622 set dummy $tool_basename; ac_word=$2
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17624 $as_echo_n "checking for $ac_word... " >&6; }
17625 if ${ac_cv_path_ZIP+:} false; then :
17626   $as_echo_n "(cached) " >&6
17627 else
17628   case $ZIP in
17629   [\\/]* | ?:[\\/]*)
17630   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17631   ;;
17632   *)
17633   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17634 for as_dir in $PATH
17635 do
17636   IFS=$as_save_IFS
17637   test -z "$as_dir" && as_dir=.
17638     for ac_exec_ext in '' $ac_executable_extensions; do
17639   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17640     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17641     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17642     break 2
17643   fi
17644 done
17645   done
17646 IFS=$as_save_IFS
17647 
17648   ;;
17649 esac
17650 fi
17651 ZIP=$ac_cv_path_ZIP
17652 if test -n "$ZIP"; then
17653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17654 $as_echo "$ZIP" >&6; }
17655 else
17656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17657 $as_echo "no" >&6; }
17658 fi
17659 
17660 
17661         if test "x$ZIP" = x; then
17662           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17663         fi
17664       else
17665         # Otherwise we believe it is a complete path. Use it as it is.
17666         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17667 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17668         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17669 $as_echo_n "checking for ZIP... " >&6; }
17670         if test ! -x "$tool_specified"; then
17671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17672 $as_echo "not found" >&6; }
17673           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17674         fi
17675         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17676 $as_echo "$tool_specified" >&6; }
17677       fi
17678     fi
17679   fi
17680 
17681 
17682 
17683   if test "x$ZIP" = x; then
17684     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17685   fi
17686 
17687 
17688 
17689   # Non-required basic tools
17690 
17691 
17692 
17693   # Publish this variable in the help.
17694 
17695 
17696   if test "x$LDD" = x; then
17697     # The variable is not set by user, try to locate tool using the code snippet
17698     for ac_prog in ldd
17699 do
17700   # Extract the first word of "$ac_prog", so it can be a program name with args.
17701 set dummy $ac_prog; ac_word=$2
17702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17703 $as_echo_n "checking for $ac_word... " >&6; }
17704 if ${ac_cv_path_LDD+:} false; then :
17705   $as_echo_n "(cached) " >&6
17706 else
17707   case $LDD in
17708   [\\/]* | ?:[\\/]*)
17709   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17710   ;;
17711   *)
17712   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17713 for as_dir in $PATH
17714 do
17715   IFS=$as_save_IFS
17716   test -z "$as_dir" && as_dir=.
17717     for ac_exec_ext in '' $ac_executable_extensions; do
17718   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17719     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17721     break 2
17722   fi
17723 done
17724   done
17725 IFS=$as_save_IFS
17726 
17727   ;;
17728 esac
17729 fi
17730 LDD=$ac_cv_path_LDD
17731 if test -n "$LDD"; then
17732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17733 $as_echo "$LDD" >&6; }
17734 else
17735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17736 $as_echo "no" >&6; }
17737 fi
17738 
17739 
17740   test -n "$LDD" && break
17741 done
17742 
17743   else
17744     # The variable is set, but is it from the command line or the environment?
17745 
17746     # Try to remove the string !LDD! from our list.
17747     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17748     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17749       # If it failed, the variable was not from the command line. Ignore it,
17750       # but warn the user (except for BASH, which is always set by the calling BASH).
17751       if test "xLDD" != xBASH; then
17752         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17753 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17754       fi
17755       # Try to locate tool using the code snippet
17756       for ac_prog in ldd
17757 do
17758   # Extract the first word of "$ac_prog", so it can be a program name with args.
17759 set dummy $ac_prog; ac_word=$2
17760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17761 $as_echo_n "checking for $ac_word... " >&6; }
17762 if ${ac_cv_path_LDD+:} false; then :
17763   $as_echo_n "(cached) " >&6
17764 else
17765   case $LDD in
17766   [\\/]* | ?:[\\/]*)
17767   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17768   ;;
17769   *)
17770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17771 for as_dir in $PATH
17772 do
17773   IFS=$as_save_IFS
17774   test -z "$as_dir" && as_dir=.
17775     for ac_exec_ext in '' $ac_executable_extensions; do
17776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17777     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17779     break 2
17780   fi
17781 done
17782   done
17783 IFS=$as_save_IFS
17784 
17785   ;;
17786 esac
17787 fi
17788 LDD=$ac_cv_path_LDD
17789 if test -n "$LDD"; then
17790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17791 $as_echo "$LDD" >&6; }
17792 else
17793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17794 $as_echo "no" >&6; }
17795 fi
17796 
17797 
17798   test -n "$LDD" && break
17799 done
17800 
17801     else
17802       # If it succeeded, then it was overridden by the user. We will use it
17803       # for the tool.
17804 
17805       # First remove it from the list of overridden variables, so we can test
17806       # for unknown variables in the end.
17807       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17808 
17809       # Check if the provided tool contains a complete path.
17810       tool_specified="$LDD"
17811       tool_basename="${tool_specified##*/}"
17812       if test "x$tool_basename" = "x$tool_specified"; then
17813         # A command without a complete path is provided, search $PATH.
17814         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17815 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17816         # Extract the first word of "$tool_basename", so it can be a program name with args.
17817 set dummy $tool_basename; ac_word=$2
17818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17819 $as_echo_n "checking for $ac_word... " >&6; }
17820 if ${ac_cv_path_LDD+:} false; then :
17821   $as_echo_n "(cached) " >&6
17822 else
17823   case $LDD in
17824   [\\/]* | ?:[\\/]*)
17825   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17826   ;;
17827   *)
17828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17829 for as_dir in $PATH
17830 do
17831   IFS=$as_save_IFS
17832   test -z "$as_dir" && as_dir=.
17833     for ac_exec_ext in '' $ac_executable_extensions; do
17834   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17835     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17837     break 2
17838   fi
17839 done
17840   done
17841 IFS=$as_save_IFS
17842 
17843   ;;
17844 esac
17845 fi
17846 LDD=$ac_cv_path_LDD
17847 if test -n "$LDD"; then
17848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17849 $as_echo "$LDD" >&6; }
17850 else
17851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17852 $as_echo "no" >&6; }
17853 fi
17854 
17855 
17856         if test "x$LDD" = x; then
17857           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17858         fi
17859       else
17860         # Otherwise we believe it is a complete path. Use it as it is.
17861         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17862 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17863         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17864 $as_echo_n "checking for LDD... " >&6; }
17865         if test ! -x "$tool_specified"; then
17866           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17867 $as_echo "not found" >&6; }
17868           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17869         fi
17870         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17871 $as_echo "$tool_specified" >&6; }
17872       fi
17873     fi
17874   fi
17875 
17876 
17877   if test "x$LDD" = "x"; then
17878     # List shared lib dependencies is used for
17879     # debug output and checking for forbidden dependencies.
17880     # We can build without it.
17881     LDD="true"
17882   fi
17883 
17884 
17885   # Publish this variable in the help.
17886 
17887 
17888   if test "x$OTOOL" = x; then
17889     # The variable is not set by user, try to locate tool using the code snippet
17890     for ac_prog in otool
17891 do
17892   # Extract the first word of "$ac_prog", so it can be a program name with args.
17893 set dummy $ac_prog; ac_word=$2
17894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17895 $as_echo_n "checking for $ac_word... " >&6; }
17896 if ${ac_cv_path_OTOOL+:} false; then :
17897   $as_echo_n "(cached) " >&6
17898 else
17899   case $OTOOL in
17900   [\\/]* | ?:[\\/]*)
17901   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17902   ;;
17903   *)
17904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17905 for as_dir in $PATH
17906 do
17907   IFS=$as_save_IFS
17908   test -z "$as_dir" && as_dir=.
17909     for ac_exec_ext in '' $ac_executable_extensions; do
17910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17911     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17913     break 2
17914   fi
17915 done
17916   done
17917 IFS=$as_save_IFS
17918 
17919   ;;
17920 esac
17921 fi
17922 OTOOL=$ac_cv_path_OTOOL
17923 if test -n "$OTOOL"; then
17924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17925 $as_echo "$OTOOL" >&6; }
17926 else
17927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17928 $as_echo "no" >&6; }
17929 fi
17930 
17931 
17932   test -n "$OTOOL" && break
17933 done
17934 
17935   else
17936     # The variable is set, but is it from the command line or the environment?
17937 
17938     # Try to remove the string !OTOOL! from our list.
17939     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17940     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17941       # If it failed, the variable was not from the command line. Ignore it,
17942       # but warn the user (except for BASH, which is always set by the calling BASH).
17943       if test "xOTOOL" != xBASH; then
17944         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17945 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17946       fi
17947       # Try to locate tool using the code snippet
17948       for ac_prog in otool
17949 do
17950   # Extract the first word of "$ac_prog", so it can be a program name with args.
17951 set dummy $ac_prog; ac_word=$2
17952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17953 $as_echo_n "checking for $ac_word... " >&6; }
17954 if ${ac_cv_path_OTOOL+:} false; then :
17955   $as_echo_n "(cached) " >&6
17956 else
17957   case $OTOOL in
17958   [\\/]* | ?:[\\/]*)
17959   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17960   ;;
17961   *)
17962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17963 for as_dir in $PATH
17964 do
17965   IFS=$as_save_IFS
17966   test -z "$as_dir" && as_dir=.
17967     for ac_exec_ext in '' $ac_executable_extensions; do
17968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17969     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17971     break 2
17972   fi
17973 done
17974   done
17975 IFS=$as_save_IFS
17976 
17977   ;;
17978 esac
17979 fi
17980 OTOOL=$ac_cv_path_OTOOL
17981 if test -n "$OTOOL"; then
17982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17983 $as_echo "$OTOOL" >&6; }
17984 else
17985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17986 $as_echo "no" >&6; }
17987 fi
17988 
17989 
17990   test -n "$OTOOL" && break
17991 done
17992 
17993     else
17994       # If it succeeded, then it was overridden by the user. We will use it
17995       # for the tool.
17996 
17997       # First remove it from the list of overridden variables, so we can test
17998       # for unknown variables in the end.
17999       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18000 
18001       # Check if the provided tool contains a complete path.
18002       tool_specified="$OTOOL"
18003       tool_basename="${tool_specified##*/}"
18004       if test "x$tool_basename" = "x$tool_specified"; then
18005         # A command without a complete path is provided, search $PATH.
18006         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18007 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18008         # Extract the first word of "$tool_basename", so it can be a program name with args.
18009 set dummy $tool_basename; ac_word=$2
18010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18011 $as_echo_n "checking for $ac_word... " >&6; }
18012 if ${ac_cv_path_OTOOL+:} false; then :
18013   $as_echo_n "(cached) " >&6
18014 else
18015   case $OTOOL in
18016   [\\/]* | ?:[\\/]*)
18017   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18018   ;;
18019   *)
18020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18021 for as_dir in $PATH
18022 do
18023   IFS=$as_save_IFS
18024   test -z "$as_dir" && as_dir=.
18025     for ac_exec_ext in '' $ac_executable_extensions; do
18026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18027     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18029     break 2
18030   fi
18031 done
18032   done
18033 IFS=$as_save_IFS
18034 
18035   ;;
18036 esac
18037 fi
18038 OTOOL=$ac_cv_path_OTOOL
18039 if test -n "$OTOOL"; then
18040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18041 $as_echo "$OTOOL" >&6; }
18042 else
18043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18044 $as_echo "no" >&6; }
18045 fi
18046 
18047 
18048         if test "x$OTOOL" = x; then
18049           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18050         fi
18051       else
18052         # Otherwise we believe it is a complete path. Use it as it is.
18053         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18054 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18055         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18056 $as_echo_n "checking for OTOOL... " >&6; }
18057         if test ! -x "$tool_specified"; then
18058           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18059 $as_echo "not found" >&6; }
18060           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18061         fi
18062         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18063 $as_echo "$tool_specified" >&6; }
18064       fi
18065     fi
18066   fi
18067 
18068 
18069   if test "x$OTOOL" = "x"; then
18070     OTOOL="true"
18071   fi
18072 
18073 
18074   # Publish this variable in the help.
18075 
18076 
18077   if test "x$READELF" = x; then
18078     # The variable is not set by user, try to locate tool using the code snippet
18079     for ac_prog in greadelf readelf
18080 do
18081   # Extract the first word of "$ac_prog", so it can be a program name with args.
18082 set dummy $ac_prog; ac_word=$2
18083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18084 $as_echo_n "checking for $ac_word... " >&6; }
18085 if ${ac_cv_path_READELF+:} false; then :
18086   $as_echo_n "(cached) " >&6
18087 else
18088   case $READELF in
18089   [\\/]* | ?:[\\/]*)
18090   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18091   ;;
18092   *)
18093   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18094 for as_dir in $PATH
18095 do
18096   IFS=$as_save_IFS
18097   test -z "$as_dir" && as_dir=.
18098     for ac_exec_ext in '' $ac_executable_extensions; do
18099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18100     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18102     break 2
18103   fi
18104 done
18105   done
18106 IFS=$as_save_IFS
18107 
18108   ;;
18109 esac
18110 fi
18111 READELF=$ac_cv_path_READELF
18112 if test -n "$READELF"; then
18113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18114 $as_echo "$READELF" >&6; }
18115 else
18116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18117 $as_echo "no" >&6; }
18118 fi
18119 
18120 
18121   test -n "$READELF" && break
18122 done
18123 
18124   else
18125     # The variable is set, but is it from the command line or the environment?
18126 
18127     # Try to remove the string !READELF! from our list.
18128     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18129     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18130       # If it failed, the variable was not from the command line. Ignore it,
18131       # but warn the user (except for BASH, which is always set by the calling BASH).
18132       if test "xREADELF" != xBASH; then
18133         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18134 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18135       fi
18136       # Try to locate tool using the code snippet
18137       for ac_prog in greadelf readelf
18138 do
18139   # Extract the first word of "$ac_prog", so it can be a program name with args.
18140 set dummy $ac_prog; ac_word=$2
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18142 $as_echo_n "checking for $ac_word... " >&6; }
18143 if ${ac_cv_path_READELF+:} false; then :
18144   $as_echo_n "(cached) " >&6
18145 else
18146   case $READELF in
18147   [\\/]* | ?:[\\/]*)
18148   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18149   ;;
18150   *)
18151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18152 for as_dir in $PATH
18153 do
18154   IFS=$as_save_IFS
18155   test -z "$as_dir" && as_dir=.
18156     for ac_exec_ext in '' $ac_executable_extensions; do
18157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18158     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18160     break 2
18161   fi
18162 done
18163   done
18164 IFS=$as_save_IFS
18165 
18166   ;;
18167 esac
18168 fi
18169 READELF=$ac_cv_path_READELF
18170 if test -n "$READELF"; then
18171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18172 $as_echo "$READELF" >&6; }
18173 else
18174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175 $as_echo "no" >&6; }
18176 fi
18177 
18178 
18179   test -n "$READELF" && break
18180 done
18181 
18182     else
18183       # If it succeeded, then it was overridden by the user. We will use it
18184       # for the tool.
18185 
18186       # First remove it from the list of overridden variables, so we can test
18187       # for unknown variables in the end.
18188       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18189 
18190       # Check if the provided tool contains a complete path.
18191       tool_specified="$READELF"
18192       tool_basename="${tool_specified##*/}"
18193       if test "x$tool_basename" = "x$tool_specified"; then
18194         # A command without a complete path is provided, search $PATH.
18195         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18196 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18197         # Extract the first word of "$tool_basename", so it can be a program name with args.
18198 set dummy $tool_basename; ac_word=$2
18199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18200 $as_echo_n "checking for $ac_word... " >&6; }
18201 if ${ac_cv_path_READELF+:} false; then :
18202   $as_echo_n "(cached) " >&6
18203 else
18204   case $READELF in
18205   [\\/]* | ?:[\\/]*)
18206   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18207   ;;
18208   *)
18209   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18210 for as_dir in $PATH
18211 do
18212   IFS=$as_save_IFS
18213   test -z "$as_dir" && as_dir=.
18214     for ac_exec_ext in '' $ac_executable_extensions; do
18215   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18216     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18218     break 2
18219   fi
18220 done
18221   done
18222 IFS=$as_save_IFS
18223 
18224   ;;
18225 esac
18226 fi
18227 READELF=$ac_cv_path_READELF
18228 if test -n "$READELF"; then
18229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18230 $as_echo "$READELF" >&6; }
18231 else
18232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18233 $as_echo "no" >&6; }
18234 fi
18235 
18236 
18237         if test "x$READELF" = x; then
18238           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18239         fi
18240       else
18241         # Otherwise we believe it is a complete path. Use it as it is.
18242         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18243 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18244         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18245 $as_echo_n "checking for READELF... " >&6; }
18246         if test ! -x "$tool_specified"; then
18247           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18248 $as_echo "not found" >&6; }
18249           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18250         fi
18251         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18252 $as_echo "$tool_specified" >&6; }
18253       fi
18254     fi
18255   fi
18256 
18257 
18258 
18259 
18260   # Publish this variable in the help.
18261 
18262 
18263   if test "x$HG" = x; then
18264     # The variable is not set by user, try to locate tool using the code snippet
18265     for ac_prog in hg
18266 do
18267   # Extract the first word of "$ac_prog", so it can be a program name with args.
18268 set dummy $ac_prog; ac_word=$2
18269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18270 $as_echo_n "checking for $ac_word... " >&6; }
18271 if ${ac_cv_path_HG+:} false; then :
18272   $as_echo_n "(cached) " >&6
18273 else
18274   case $HG in
18275   [\\/]* | ?:[\\/]*)
18276   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18277   ;;
18278   *)
18279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18280 for as_dir in $PATH
18281 do
18282   IFS=$as_save_IFS
18283   test -z "$as_dir" && as_dir=.
18284     for ac_exec_ext in '' $ac_executable_extensions; do
18285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18286     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18288     break 2
18289   fi
18290 done
18291   done
18292 IFS=$as_save_IFS
18293 
18294   ;;
18295 esac
18296 fi
18297 HG=$ac_cv_path_HG
18298 if test -n "$HG"; then
18299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18300 $as_echo "$HG" >&6; }
18301 else
18302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18303 $as_echo "no" >&6; }
18304 fi
18305 
18306 
18307   test -n "$HG" && break
18308 done
18309 
18310   else
18311     # The variable is set, but is it from the command line or the environment?
18312 
18313     # Try to remove the string !HG! from our list.
18314     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18315     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18316       # If it failed, the variable was not from the command line. Ignore it,
18317       # but warn the user (except for BASH, which is always set by the calling BASH).
18318       if test "xHG" != xBASH; then
18319         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18320 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18321       fi
18322       # Try to locate tool using the code snippet
18323       for ac_prog in hg
18324 do
18325   # Extract the first word of "$ac_prog", so it can be a program name with args.
18326 set dummy $ac_prog; ac_word=$2
18327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18328 $as_echo_n "checking for $ac_word... " >&6; }
18329 if ${ac_cv_path_HG+:} false; then :
18330   $as_echo_n "(cached) " >&6
18331 else
18332   case $HG in
18333   [\\/]* | ?:[\\/]*)
18334   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18335   ;;
18336   *)
18337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18338 for as_dir in $PATH
18339 do
18340   IFS=$as_save_IFS
18341   test -z "$as_dir" && as_dir=.
18342     for ac_exec_ext in '' $ac_executable_extensions; do
18343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18344     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18346     break 2
18347   fi
18348 done
18349   done
18350 IFS=$as_save_IFS
18351 
18352   ;;
18353 esac
18354 fi
18355 HG=$ac_cv_path_HG
18356 if test -n "$HG"; then
18357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18358 $as_echo "$HG" >&6; }
18359 else
18360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18361 $as_echo "no" >&6; }
18362 fi
18363 
18364 
18365   test -n "$HG" && break
18366 done
18367 
18368     else
18369       # If it succeeded, then it was overridden by the user. We will use it
18370       # for the tool.
18371 
18372       # First remove it from the list of overridden variables, so we can test
18373       # for unknown variables in the end.
18374       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18375 
18376       # Check if the provided tool contains a complete path.
18377       tool_specified="$HG"
18378       tool_basename="${tool_specified##*/}"
18379       if test "x$tool_basename" = "x$tool_specified"; then
18380         # A command without a complete path is provided, search $PATH.
18381         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18382 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18383         # Extract the first word of "$tool_basename", so it can be a program name with args.
18384 set dummy $tool_basename; ac_word=$2
18385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18386 $as_echo_n "checking for $ac_word... " >&6; }
18387 if ${ac_cv_path_HG+:} false; then :
18388   $as_echo_n "(cached) " >&6
18389 else
18390   case $HG in
18391   [\\/]* | ?:[\\/]*)
18392   ac_cv_path_HG="$HG" # Let the user override the test with a path.
18393   ;;
18394   *)
18395   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18396 for as_dir in $PATH
18397 do
18398   IFS=$as_save_IFS
18399   test -z "$as_dir" && as_dir=.
18400     for ac_exec_ext in '' $ac_executable_extensions; do
18401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18402     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18404     break 2
18405   fi
18406 done
18407   done
18408 IFS=$as_save_IFS
18409 
18410   ;;
18411 esac
18412 fi
18413 HG=$ac_cv_path_HG
18414 if test -n "$HG"; then
18415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18416 $as_echo "$HG" >&6; }
18417 else
18418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18419 $as_echo "no" >&6; }
18420 fi
18421 
18422 
18423         if test "x$HG" = x; then
18424           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18425         fi
18426       else
18427         # Otherwise we believe it is a complete path. Use it as it is.
18428         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18429 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18430         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18431 $as_echo_n "checking for HG... " >&6; }
18432         if test ! -x "$tool_specified"; then
18433           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18434 $as_echo "not found" >&6; }
18435           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18436         fi
18437         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18438 $as_echo "$tool_specified" >&6; }
18439       fi
18440     fi
18441   fi
18442 
18443 
18444 
18445 
18446   # Publish this variable in the help.
18447 
18448 
18449   if test "x$STAT" = x; then
18450     # The variable is not set by user, try to locate tool using the code snippet
18451     for ac_prog in stat
18452 do
18453   # Extract the first word of "$ac_prog", so it can be a program name with args.
18454 set dummy $ac_prog; ac_word=$2
18455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18456 $as_echo_n "checking for $ac_word... " >&6; }
18457 if ${ac_cv_path_STAT+:} false; then :
18458   $as_echo_n "(cached) " >&6
18459 else
18460   case $STAT in
18461   [\\/]* | ?:[\\/]*)
18462   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18463   ;;
18464   *)
18465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18466 for as_dir in $PATH
18467 do
18468   IFS=$as_save_IFS
18469   test -z "$as_dir" && as_dir=.
18470     for ac_exec_ext in '' $ac_executable_extensions; do
18471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18472     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18474     break 2
18475   fi
18476 done
18477   done
18478 IFS=$as_save_IFS
18479 
18480   ;;
18481 esac
18482 fi
18483 STAT=$ac_cv_path_STAT
18484 if test -n "$STAT"; then
18485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18486 $as_echo "$STAT" >&6; }
18487 else
18488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18489 $as_echo "no" >&6; }
18490 fi
18491 
18492 
18493   test -n "$STAT" && break
18494 done
18495 
18496   else
18497     # The variable is set, but is it from the command line or the environment?
18498 
18499     # Try to remove the string !STAT! from our list.
18500     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18501     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18502       # If it failed, the variable was not from the command line. Ignore it,
18503       # but warn the user (except for BASH, which is always set by the calling BASH).
18504       if test "xSTAT" != xBASH; then
18505         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18506 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18507       fi
18508       # Try to locate tool using the code snippet
18509       for ac_prog in stat
18510 do
18511   # Extract the first word of "$ac_prog", so it can be a program name with args.
18512 set dummy $ac_prog; ac_word=$2
18513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18514 $as_echo_n "checking for $ac_word... " >&6; }
18515 if ${ac_cv_path_STAT+:} false; then :
18516   $as_echo_n "(cached) " >&6
18517 else
18518   case $STAT in
18519   [\\/]* | ?:[\\/]*)
18520   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18521   ;;
18522   *)
18523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18524 for as_dir in $PATH
18525 do
18526   IFS=$as_save_IFS
18527   test -z "$as_dir" && as_dir=.
18528     for ac_exec_ext in '' $ac_executable_extensions; do
18529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18530     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18532     break 2
18533   fi
18534 done
18535   done
18536 IFS=$as_save_IFS
18537 
18538   ;;
18539 esac
18540 fi
18541 STAT=$ac_cv_path_STAT
18542 if test -n "$STAT"; then
18543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18544 $as_echo "$STAT" >&6; }
18545 else
18546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547 $as_echo "no" >&6; }
18548 fi
18549 
18550 
18551   test -n "$STAT" && break
18552 done
18553 
18554     else
18555       # If it succeeded, then it was overridden by the user. We will use it
18556       # for the tool.
18557 
18558       # First remove it from the list of overridden variables, so we can test
18559       # for unknown variables in the end.
18560       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18561 
18562       # Check if the provided tool contains a complete path.
18563       tool_specified="$STAT"
18564       tool_basename="${tool_specified##*/}"
18565       if test "x$tool_basename" = "x$tool_specified"; then
18566         # A command without a complete path is provided, search $PATH.
18567         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18568 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18569         # Extract the first word of "$tool_basename", so it can be a program name with args.
18570 set dummy $tool_basename; ac_word=$2
18571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18572 $as_echo_n "checking for $ac_word... " >&6; }
18573 if ${ac_cv_path_STAT+:} false; then :
18574   $as_echo_n "(cached) " >&6
18575 else
18576   case $STAT in
18577   [\\/]* | ?:[\\/]*)
18578   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18579   ;;
18580   *)
18581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18582 for as_dir in $PATH
18583 do
18584   IFS=$as_save_IFS
18585   test -z "$as_dir" && as_dir=.
18586     for ac_exec_ext in '' $ac_executable_extensions; do
18587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18588     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18590     break 2
18591   fi
18592 done
18593   done
18594 IFS=$as_save_IFS
18595 
18596   ;;
18597 esac
18598 fi
18599 STAT=$ac_cv_path_STAT
18600 if test -n "$STAT"; then
18601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18602 $as_echo "$STAT" >&6; }
18603 else
18604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18605 $as_echo "no" >&6; }
18606 fi
18607 
18608 
18609         if test "x$STAT" = x; then
18610           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18611         fi
18612       else
18613         # Otherwise we believe it is a complete path. Use it as it is.
18614         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18615 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18616         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18617 $as_echo_n "checking for STAT... " >&6; }
18618         if test ! -x "$tool_specified"; then
18619           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18620 $as_echo "not found" >&6; }
18621           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18622         fi
18623         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18624 $as_echo "$tool_specified" >&6; }
18625       fi
18626     fi
18627   fi
18628 
18629 
18630 
18631 
18632   # Publish this variable in the help.
18633 
18634 
18635   if test "x$TIME" = x; then
18636     # The variable is not set by user, try to locate tool using the code snippet
18637     for ac_prog in time
18638 do
18639   # Extract the first word of "$ac_prog", so it can be a program name with args.
18640 set dummy $ac_prog; ac_word=$2
18641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18642 $as_echo_n "checking for $ac_word... " >&6; }
18643 if ${ac_cv_path_TIME+:} false; then :
18644   $as_echo_n "(cached) " >&6
18645 else
18646   case $TIME in
18647   [\\/]* | ?:[\\/]*)
18648   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18649   ;;
18650   *)
18651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18652 for as_dir in $PATH
18653 do
18654   IFS=$as_save_IFS
18655   test -z "$as_dir" && as_dir=.
18656     for ac_exec_ext in '' $ac_executable_extensions; do
18657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18658     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18660     break 2
18661   fi
18662 done
18663   done
18664 IFS=$as_save_IFS
18665 
18666   ;;
18667 esac
18668 fi
18669 TIME=$ac_cv_path_TIME
18670 if test -n "$TIME"; then
18671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18672 $as_echo "$TIME" >&6; }
18673 else
18674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18675 $as_echo "no" >&6; }
18676 fi
18677 
18678 
18679   test -n "$TIME" && break
18680 done
18681 
18682   else
18683     # The variable is set, but is it from the command line or the environment?
18684 
18685     # Try to remove the string !TIME! from our list.
18686     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18687     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18688       # If it failed, the variable was not from the command line. Ignore it,
18689       # but warn the user (except for BASH, which is always set by the calling BASH).
18690       if test "xTIME" != xBASH; then
18691         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18692 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18693       fi
18694       # Try to locate tool using the code snippet
18695       for ac_prog in time
18696 do
18697   # Extract the first word of "$ac_prog", so it can be a program name with args.
18698 set dummy $ac_prog; ac_word=$2
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18700 $as_echo_n "checking for $ac_word... " >&6; }
18701 if ${ac_cv_path_TIME+:} false; then :
18702   $as_echo_n "(cached) " >&6
18703 else
18704   case $TIME in
18705   [\\/]* | ?:[\\/]*)
18706   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18707   ;;
18708   *)
18709   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18710 for as_dir in $PATH
18711 do
18712   IFS=$as_save_IFS
18713   test -z "$as_dir" && as_dir=.
18714     for ac_exec_ext in '' $ac_executable_extensions; do
18715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18716     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18718     break 2
18719   fi
18720 done
18721   done
18722 IFS=$as_save_IFS
18723 
18724   ;;
18725 esac
18726 fi
18727 TIME=$ac_cv_path_TIME
18728 if test -n "$TIME"; then
18729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18730 $as_echo "$TIME" >&6; }
18731 else
18732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18733 $as_echo "no" >&6; }
18734 fi
18735 
18736 
18737   test -n "$TIME" && break
18738 done
18739 
18740     else
18741       # If it succeeded, then it was overridden by the user. We will use it
18742       # for the tool.
18743 
18744       # First remove it from the list of overridden variables, so we can test
18745       # for unknown variables in the end.
18746       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18747 
18748       # Check if the provided tool contains a complete path.
18749       tool_specified="$TIME"
18750       tool_basename="${tool_specified##*/}"
18751       if test "x$tool_basename" = "x$tool_specified"; then
18752         # A command without a complete path is provided, search $PATH.
18753         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18754 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18755         # Extract the first word of "$tool_basename", so it can be a program name with args.
18756 set dummy $tool_basename; ac_word=$2
18757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18758 $as_echo_n "checking for $ac_word... " >&6; }
18759 if ${ac_cv_path_TIME+:} false; then :
18760   $as_echo_n "(cached) " >&6
18761 else
18762   case $TIME in
18763   [\\/]* | ?:[\\/]*)
18764   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18765   ;;
18766   *)
18767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18768 for as_dir in $PATH
18769 do
18770   IFS=$as_save_IFS
18771   test -z "$as_dir" && as_dir=.
18772     for ac_exec_ext in '' $ac_executable_extensions; do
18773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18774     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18776     break 2
18777   fi
18778 done
18779   done
18780 IFS=$as_save_IFS
18781 
18782   ;;
18783 esac
18784 fi
18785 TIME=$ac_cv_path_TIME
18786 if test -n "$TIME"; then
18787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18788 $as_echo "$TIME" >&6; }
18789 else
18790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18791 $as_echo "no" >&6; }
18792 fi
18793 
18794 
18795         if test "x$TIME" = x; then
18796           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18797         fi
18798       else
18799         # Otherwise we believe it is a complete path. Use it as it is.
18800         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18801 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18802         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18803 $as_echo_n "checking for TIME... " >&6; }
18804         if test ! -x "$tool_specified"; then
18805           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18806 $as_echo "not found" >&6; }
18807           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18808         fi
18809         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18810 $as_echo "$tool_specified" >&6; }
18811       fi
18812     fi
18813   fi
18814 
18815 
18816   # Check if it's GNU time
18817   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18818   if test "x$IS_GNU_TIME" != x; then
18819     IS_GNU_TIME=yes
18820   else
18821     IS_GNU_TIME=no
18822   fi
18823 
18824 
18825   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18826 
18827 
18828 
18829   # Publish this variable in the help.
18830 
18831 
18832   if test "x$COMM" = x; then
18833     # The variable is not set by user, try to locate tool using the code snippet
18834     for ac_prog in comm
18835 do
18836   # Extract the first word of "$ac_prog", so it can be a program name with args.
18837 set dummy $ac_prog; ac_word=$2
18838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18839 $as_echo_n "checking for $ac_word... " >&6; }
18840 if ${ac_cv_path_COMM+:} false; then :
18841   $as_echo_n "(cached) " >&6
18842 else
18843   case $COMM in
18844   [\\/]* | ?:[\\/]*)
18845   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18846   ;;
18847   *)
18848   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18849 for as_dir in $PATH
18850 do
18851   IFS=$as_save_IFS
18852   test -z "$as_dir" && as_dir=.
18853     for ac_exec_ext in '' $ac_executable_extensions; do
18854   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18855     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18856     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18857     break 2
18858   fi
18859 done
18860   done
18861 IFS=$as_save_IFS
18862 
18863   ;;
18864 esac
18865 fi
18866 COMM=$ac_cv_path_COMM
18867 if test -n "$COMM"; then
18868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18869 $as_echo "$COMM" >&6; }
18870 else
18871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18872 $as_echo "no" >&6; }
18873 fi
18874 
18875 
18876   test -n "$COMM" && break
18877 done
18878 
18879   else
18880     # The variable is set, but is it from the command line or the environment?
18881 
18882     # Try to remove the string !COMM! from our list.
18883     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18884     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18885       # If it failed, the variable was not from the command line. Ignore it,
18886       # but warn the user (except for BASH, which is always set by the calling BASH).
18887       if test "xCOMM" != xBASH; then
18888         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18889 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18890       fi
18891       # Try to locate tool using the code snippet
18892       for ac_prog in comm
18893 do
18894   # Extract the first word of "$ac_prog", so it can be a program name with args.
18895 set dummy $ac_prog; ac_word=$2
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18897 $as_echo_n "checking for $ac_word... " >&6; }
18898 if ${ac_cv_path_COMM+:} false; then :
18899   $as_echo_n "(cached) " >&6
18900 else
18901   case $COMM in
18902   [\\/]* | ?:[\\/]*)
18903   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18904   ;;
18905   *)
18906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18907 for as_dir in $PATH
18908 do
18909   IFS=$as_save_IFS
18910   test -z "$as_dir" && as_dir=.
18911     for ac_exec_ext in '' $ac_executable_extensions; do
18912   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18913     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18914     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18915     break 2
18916   fi
18917 done
18918   done
18919 IFS=$as_save_IFS
18920 
18921   ;;
18922 esac
18923 fi
18924 COMM=$ac_cv_path_COMM
18925 if test -n "$COMM"; then
18926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18927 $as_echo "$COMM" >&6; }
18928 else
18929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18930 $as_echo "no" >&6; }
18931 fi
18932 
18933 
18934   test -n "$COMM" && break
18935 done
18936 
18937     else
18938       # If it succeeded, then it was overridden by the user. We will use it
18939       # for the tool.
18940 
18941       # First remove it from the list of overridden variables, so we can test
18942       # for unknown variables in the end.
18943       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18944 
18945       # Check if the provided tool contains a complete path.
18946       tool_specified="$COMM"
18947       tool_basename="${tool_specified##*/}"
18948       if test "x$tool_basename" = "x$tool_specified"; then
18949         # A command without a complete path is provided, search $PATH.
18950         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18951 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18952         # Extract the first word of "$tool_basename", so it can be a program name with args.
18953 set dummy $tool_basename; ac_word=$2
18954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18955 $as_echo_n "checking for $ac_word... " >&6; }
18956 if ${ac_cv_path_COMM+:} false; then :
18957   $as_echo_n "(cached) " >&6
18958 else
18959   case $COMM in
18960   [\\/]* | ?:[\\/]*)
18961   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18962   ;;
18963   *)
18964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18965 for as_dir in $PATH
18966 do
18967   IFS=$as_save_IFS
18968   test -z "$as_dir" && as_dir=.
18969     for ac_exec_ext in '' $ac_executable_extensions; do
18970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18971     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18973     break 2
18974   fi
18975 done
18976   done
18977 IFS=$as_save_IFS
18978 
18979   ;;
18980 esac
18981 fi
18982 COMM=$ac_cv_path_COMM
18983 if test -n "$COMM"; then
18984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18985 $as_echo "$COMM" >&6; }
18986 else
18987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18988 $as_echo "no" >&6; }
18989 fi
18990 
18991 
18992         if test "x$COMM" = x; then
18993           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18994         fi
18995       else
18996         # Otherwise we believe it is a complete path. Use it as it is.
18997         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18998 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18999         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
19000 $as_echo_n "checking for COMM... " >&6; }
19001         if test ! -x "$tool_specified"; then
19002           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19003 $as_echo "not found" >&6; }
19004           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
19005         fi
19006         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19007 $as_echo "$tool_specified" >&6; }
19008       fi
19009     fi
19010   fi
19011 
19012 
19013 
19014   if test "x$COMM" = x; then
19015     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
19016   fi
19017 
19018 
19019   fi
19020 
19021   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19022 
19023 
19024 
19025   # Publish this variable in the help.
19026 
19027 
19028   if test "x$DSYMUTIL" = x; then
19029     # The variable is not set by user, try to locate tool using the code snippet
19030     for ac_prog in dsymutil
19031 do
19032   # Extract the first word of "$ac_prog", so it can be a program name with args.
19033 set dummy $ac_prog; ac_word=$2
19034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19035 $as_echo_n "checking for $ac_word... " >&6; }
19036 if ${ac_cv_path_DSYMUTIL+:} false; then :
19037   $as_echo_n "(cached) " >&6
19038 else
19039   case $DSYMUTIL in
19040   [\\/]* | ?:[\\/]*)
19041   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19042   ;;
19043   *)
19044   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19045 for as_dir in $PATH
19046 do
19047   IFS=$as_save_IFS
19048   test -z "$as_dir" && as_dir=.
19049     for ac_exec_ext in '' $ac_executable_extensions; do
19050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19051     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19053     break 2
19054   fi
19055 done
19056   done
19057 IFS=$as_save_IFS
19058 
19059   ;;
19060 esac
19061 fi
19062 DSYMUTIL=$ac_cv_path_DSYMUTIL
19063 if test -n "$DSYMUTIL"; then
19064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19065 $as_echo "$DSYMUTIL" >&6; }
19066 else
19067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19068 $as_echo "no" >&6; }
19069 fi
19070 
19071 
19072   test -n "$DSYMUTIL" && break
19073 done
19074 
19075   else
19076     # The variable is set, but is it from the command line or the environment?
19077 
19078     # Try to remove the string !DSYMUTIL! from our list.
19079     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19080     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19081       # If it failed, the variable was not from the command line. Ignore it,
19082       # but warn the user (except for BASH, which is always set by the calling BASH).
19083       if test "xDSYMUTIL" != xBASH; then
19084         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19085 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19086       fi
19087       # Try to locate tool using the code snippet
19088       for ac_prog in dsymutil
19089 do
19090   # Extract the first word of "$ac_prog", so it can be a program name with args.
19091 set dummy $ac_prog; ac_word=$2
19092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19093 $as_echo_n "checking for $ac_word... " >&6; }
19094 if ${ac_cv_path_DSYMUTIL+:} false; then :
19095   $as_echo_n "(cached) " >&6
19096 else
19097   case $DSYMUTIL in
19098   [\\/]* | ?:[\\/]*)
19099   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19100   ;;
19101   *)
19102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19103 for as_dir in $PATH
19104 do
19105   IFS=$as_save_IFS
19106   test -z "$as_dir" && as_dir=.
19107     for ac_exec_ext in '' $ac_executable_extensions; do
19108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19109     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19111     break 2
19112   fi
19113 done
19114   done
19115 IFS=$as_save_IFS
19116 
19117   ;;
19118 esac
19119 fi
19120 DSYMUTIL=$ac_cv_path_DSYMUTIL
19121 if test -n "$DSYMUTIL"; then
19122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19123 $as_echo "$DSYMUTIL" >&6; }
19124 else
19125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19126 $as_echo "no" >&6; }
19127 fi
19128 
19129 
19130   test -n "$DSYMUTIL" && break
19131 done
19132 
19133     else
19134       # If it succeeded, then it was overridden by the user. We will use it
19135       # for the tool.
19136 
19137       # First remove it from the list of overridden variables, so we can test
19138       # for unknown variables in the end.
19139       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19140 
19141       # Check if the provided tool contains a complete path.
19142       tool_specified="$DSYMUTIL"
19143       tool_basename="${tool_specified##*/}"
19144       if test "x$tool_basename" = "x$tool_specified"; then
19145         # A command without a complete path is provided, search $PATH.
19146         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19147 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19148         # Extract the first word of "$tool_basename", so it can be a program name with args.
19149 set dummy $tool_basename; ac_word=$2
19150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19151 $as_echo_n "checking for $ac_word... " >&6; }
19152 if ${ac_cv_path_DSYMUTIL+:} false; then :
19153   $as_echo_n "(cached) " >&6
19154 else
19155   case $DSYMUTIL in
19156   [\\/]* | ?:[\\/]*)
19157   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19158   ;;
19159   *)
19160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19161 for as_dir in $PATH
19162 do
19163   IFS=$as_save_IFS
19164   test -z "$as_dir" && as_dir=.
19165     for ac_exec_ext in '' $ac_executable_extensions; do
19166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19167     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19169     break 2
19170   fi
19171 done
19172   done
19173 IFS=$as_save_IFS
19174 
19175   ;;
19176 esac
19177 fi
19178 DSYMUTIL=$ac_cv_path_DSYMUTIL
19179 if test -n "$DSYMUTIL"; then
19180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19181 $as_echo "$DSYMUTIL" >&6; }
19182 else
19183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19184 $as_echo "no" >&6; }
19185 fi
19186 
19187 
19188         if test "x$DSYMUTIL" = x; then
19189           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19190         fi
19191       else
19192         # Otherwise we believe it is a complete path. Use it as it is.
19193         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19194 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19195         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19196 $as_echo_n "checking for DSYMUTIL... " >&6; }
19197         if test ! -x "$tool_specified"; then
19198           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19199 $as_echo "not found" >&6; }
19200           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19201         fi
19202         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19203 $as_echo "$tool_specified" >&6; }
19204       fi
19205     fi
19206   fi
19207 
19208 
19209 
19210   if test "x$DSYMUTIL" = x; then
19211     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19212   fi
19213 
19214 
19215 
19216 
19217 
19218   # Publish this variable in the help.
19219 
19220 
19221   if test "x$XATTR" = x; then
19222     # The variable is not set by user, try to locate tool using the code snippet
19223     for ac_prog in xattr
19224 do
19225   # Extract the first word of "$ac_prog", so it can be a program name with args.
19226 set dummy $ac_prog; ac_word=$2
19227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19228 $as_echo_n "checking for $ac_word... " >&6; }
19229 if ${ac_cv_path_XATTR+:} false; then :
19230   $as_echo_n "(cached) " >&6
19231 else
19232   case $XATTR in
19233   [\\/]* | ?:[\\/]*)
19234   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19235   ;;
19236   *)
19237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19238 for as_dir in $PATH
19239 do
19240   IFS=$as_save_IFS
19241   test -z "$as_dir" && as_dir=.
19242     for ac_exec_ext in '' $ac_executable_extensions; do
19243   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19244     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19245     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19246     break 2
19247   fi
19248 done
19249   done
19250 IFS=$as_save_IFS
19251 
19252   ;;
19253 esac
19254 fi
19255 XATTR=$ac_cv_path_XATTR
19256 if test -n "$XATTR"; then
19257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19258 $as_echo "$XATTR" >&6; }
19259 else
19260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19261 $as_echo "no" >&6; }
19262 fi
19263 
19264 
19265   test -n "$XATTR" && break
19266 done
19267 
19268   else
19269     # The variable is set, but is it from the command line or the environment?
19270 
19271     # Try to remove the string !XATTR! from our list.
19272     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19273     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19274       # If it failed, the variable was not from the command line. Ignore it,
19275       # but warn the user (except for BASH, which is always set by the calling BASH).
19276       if test "xXATTR" != xBASH; then
19277         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19278 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19279       fi
19280       # Try to locate tool using the code snippet
19281       for ac_prog in xattr
19282 do
19283   # Extract the first word of "$ac_prog", so it can be a program name with args.
19284 set dummy $ac_prog; ac_word=$2
19285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19286 $as_echo_n "checking for $ac_word... " >&6; }
19287 if ${ac_cv_path_XATTR+:} false; then :
19288   $as_echo_n "(cached) " >&6
19289 else
19290   case $XATTR in
19291   [\\/]* | ?:[\\/]*)
19292   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19293   ;;
19294   *)
19295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19296 for as_dir in $PATH
19297 do
19298   IFS=$as_save_IFS
19299   test -z "$as_dir" && as_dir=.
19300     for ac_exec_ext in '' $ac_executable_extensions; do
19301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19302     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19304     break 2
19305   fi
19306 done
19307   done
19308 IFS=$as_save_IFS
19309 
19310   ;;
19311 esac
19312 fi
19313 XATTR=$ac_cv_path_XATTR
19314 if test -n "$XATTR"; then
19315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19316 $as_echo "$XATTR" >&6; }
19317 else
19318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19319 $as_echo "no" >&6; }
19320 fi
19321 
19322 
19323   test -n "$XATTR" && break
19324 done
19325 
19326     else
19327       # If it succeeded, then it was overridden by the user. We will use it
19328       # for the tool.
19329 
19330       # First remove it from the list of overridden variables, so we can test
19331       # for unknown variables in the end.
19332       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19333 
19334       # Check if the provided tool contains a complete path.
19335       tool_specified="$XATTR"
19336       tool_basename="${tool_specified##*/}"
19337       if test "x$tool_basename" = "x$tool_specified"; then
19338         # A command without a complete path is provided, search $PATH.
19339         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19340 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19341         # Extract the first word of "$tool_basename", so it can be a program name with args.
19342 set dummy $tool_basename; ac_word=$2
19343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19344 $as_echo_n "checking for $ac_word... " >&6; }
19345 if ${ac_cv_path_XATTR+:} false; then :
19346   $as_echo_n "(cached) " >&6
19347 else
19348   case $XATTR in
19349   [\\/]* | ?:[\\/]*)
19350   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19351   ;;
19352   *)
19353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19354 for as_dir in $PATH
19355 do
19356   IFS=$as_save_IFS
19357   test -z "$as_dir" && as_dir=.
19358     for ac_exec_ext in '' $ac_executable_extensions; do
19359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19360     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19362     break 2
19363   fi
19364 done
19365   done
19366 IFS=$as_save_IFS
19367 
19368   ;;
19369 esac
19370 fi
19371 XATTR=$ac_cv_path_XATTR
19372 if test -n "$XATTR"; then
19373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19374 $as_echo "$XATTR" >&6; }
19375 else
19376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19377 $as_echo "no" >&6; }
19378 fi
19379 
19380 
19381         if test "x$XATTR" = x; then
19382           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19383         fi
19384       else
19385         # Otherwise we believe it is a complete path. Use it as it is.
19386         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19387 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19388         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19389 $as_echo_n "checking for XATTR... " >&6; }
19390         if test ! -x "$tool_specified"; then
19391           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19392 $as_echo "not found" >&6; }
19393           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19394         fi
19395         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19396 $as_echo "$tool_specified" >&6; }
19397       fi
19398     fi
19399   fi
19400 
19401 
19402 
19403   if test "x$XATTR" = x; then
19404     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19405   fi
19406 
19407 
19408 
19409 
19410   # Publish this variable in the help.
19411 
19412 
19413   if test "x$CODESIGN" = x; then
19414     # The variable is not set by user, try to locate tool using the code snippet
19415     for ac_prog in codesign
19416 do
19417   # Extract the first word of "$ac_prog", so it can be a program name with args.
19418 set dummy $ac_prog; ac_word=$2
19419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19420 $as_echo_n "checking for $ac_word... " >&6; }
19421 if ${ac_cv_path_CODESIGN+:} false; then :
19422   $as_echo_n "(cached) " >&6
19423 else
19424   case $CODESIGN in
19425   [\\/]* | ?:[\\/]*)
19426   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19427   ;;
19428   *)
19429   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19430 for as_dir in $PATH
19431 do
19432   IFS=$as_save_IFS
19433   test -z "$as_dir" && as_dir=.
19434     for ac_exec_ext in '' $ac_executable_extensions; do
19435   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19436     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19437     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19438     break 2
19439   fi
19440 done
19441   done
19442 IFS=$as_save_IFS
19443 
19444   ;;
19445 esac
19446 fi
19447 CODESIGN=$ac_cv_path_CODESIGN
19448 if test -n "$CODESIGN"; then
19449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19450 $as_echo "$CODESIGN" >&6; }
19451 else
19452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19453 $as_echo "no" >&6; }
19454 fi
19455 
19456 
19457   test -n "$CODESIGN" && break
19458 done
19459 
19460   else
19461     # The variable is set, but is it from the command line or the environment?
19462 
19463     # Try to remove the string !CODESIGN! from our list.
19464     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19465     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19466       # If it failed, the variable was not from the command line. Ignore it,
19467       # but warn the user (except for BASH, which is always set by the calling BASH).
19468       if test "xCODESIGN" != xBASH; then
19469         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19470 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19471       fi
19472       # Try to locate tool using the code snippet
19473       for ac_prog in codesign
19474 do
19475   # Extract the first word of "$ac_prog", so it can be a program name with args.
19476 set dummy $ac_prog; ac_word=$2
19477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19478 $as_echo_n "checking for $ac_word... " >&6; }
19479 if ${ac_cv_path_CODESIGN+:} false; then :
19480   $as_echo_n "(cached) " >&6
19481 else
19482   case $CODESIGN in
19483   [\\/]* | ?:[\\/]*)
19484   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19485   ;;
19486   *)
19487   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19488 for as_dir in $PATH
19489 do
19490   IFS=$as_save_IFS
19491   test -z "$as_dir" && as_dir=.
19492     for ac_exec_ext in '' $ac_executable_extensions; do
19493   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19494     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19496     break 2
19497   fi
19498 done
19499   done
19500 IFS=$as_save_IFS
19501 
19502   ;;
19503 esac
19504 fi
19505 CODESIGN=$ac_cv_path_CODESIGN
19506 if test -n "$CODESIGN"; then
19507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19508 $as_echo "$CODESIGN" >&6; }
19509 else
19510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19511 $as_echo "no" >&6; }
19512 fi
19513 
19514 
19515   test -n "$CODESIGN" && break
19516 done
19517 
19518     else
19519       # If it succeeded, then it was overridden by the user. We will use it
19520       # for the tool.
19521 
19522       # First remove it from the list of overridden variables, so we can test
19523       # for unknown variables in the end.
19524       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19525 
19526       # Check if the provided tool contains a complete path.
19527       tool_specified="$CODESIGN"
19528       tool_basename="${tool_specified##*/}"
19529       if test "x$tool_basename" = "x$tool_specified"; then
19530         # A command without a complete path is provided, search $PATH.
19531         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19532 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19533         # Extract the first word of "$tool_basename", so it can be a program name with args.
19534 set dummy $tool_basename; ac_word=$2
19535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19536 $as_echo_n "checking for $ac_word... " >&6; }
19537 if ${ac_cv_path_CODESIGN+:} false; then :
19538   $as_echo_n "(cached) " >&6
19539 else
19540   case $CODESIGN in
19541   [\\/]* | ?:[\\/]*)
19542   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19543   ;;
19544   *)
19545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19546 for as_dir in $PATH
19547 do
19548   IFS=$as_save_IFS
19549   test -z "$as_dir" && as_dir=.
19550     for ac_exec_ext in '' $ac_executable_extensions; do
19551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19552     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19554     break 2
19555   fi
19556 done
19557   done
19558 IFS=$as_save_IFS
19559 
19560   ;;
19561 esac
19562 fi
19563 CODESIGN=$ac_cv_path_CODESIGN
19564 if test -n "$CODESIGN"; then
19565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19566 $as_echo "$CODESIGN" >&6; }
19567 else
19568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19569 $as_echo "no" >&6; }
19570 fi
19571 
19572 
19573         if test "x$CODESIGN" = x; then
19574           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19575         fi
19576       else
19577         # Otherwise we believe it is a complete path. Use it as it is.
19578         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19579 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19580         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19581 $as_echo_n "checking for CODESIGN... " >&6; }
19582         if test ! -x "$tool_specified"; then
19583           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19584 $as_echo "not found" >&6; }
19585           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19586         fi
19587         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19588 $as_echo "$tool_specified" >&6; }
19589       fi
19590     fi
19591   fi
19592 
19593 
19594     if test "x$CODESIGN" != "x"; then
19595       # Verify that the openjdk_codesign certificate is present
19596       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19597 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19598       rm -f codesign-testfile
19599       touch codesign-testfile
19600       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19601       rm -f codesign-testfile
19602       if test "x$CODESIGN" = x; then
19603         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19604 $as_echo "no" >&6; }
19605       else
19606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19607 $as_echo "yes" >&6; }
19608       fi
19609     fi
19610   fi
19611 
19612 
19613 # Check if pkg-config is available.
19614 
19615 
19616 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19617         if test -n "$ac_tool_prefix"; then
19618   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19619 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19621 $as_echo_n "checking for $ac_word... " >&6; }
19622 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19623   $as_echo_n "(cached) " >&6
19624 else
19625   case $PKG_CONFIG in
19626   [\\/]* | ?:[\\/]*)
19627   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19628   ;;
19629   *)
19630   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19631 for as_dir in $PATH
19632 do
19633   IFS=$as_save_IFS
19634   test -z "$as_dir" && as_dir=.
19635     for ac_exec_ext in '' $ac_executable_extensions; do
19636   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19637     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19638     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19639     break 2
19640   fi
19641 done
19642   done
19643 IFS=$as_save_IFS
19644 
19645   ;;
19646 esac
19647 fi
19648 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19649 if test -n "$PKG_CONFIG"; then
19650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19651 $as_echo "$PKG_CONFIG" >&6; }
19652 else
19653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19654 $as_echo "no" >&6; }
19655 fi
19656 
19657 
19658 fi
19659 if test -z "$ac_cv_path_PKG_CONFIG"; then
19660   ac_pt_PKG_CONFIG=$PKG_CONFIG
19661   # Extract the first word of "pkg-config", so it can be a program name with args.
19662 set dummy pkg-config; ac_word=$2
19663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19664 $as_echo_n "checking for $ac_word... " >&6; }
19665 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19666   $as_echo_n "(cached) " >&6
19667 else
19668   case $ac_pt_PKG_CONFIG in
19669   [\\/]* | ?:[\\/]*)
19670   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19671   ;;
19672   *)
19673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19674 for as_dir in $PATH
19675 do
19676   IFS=$as_save_IFS
19677   test -z "$as_dir" && as_dir=.
19678     for ac_exec_ext in '' $ac_executable_extensions; do
19679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19680     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19682     break 2
19683   fi
19684 done
19685   done
19686 IFS=$as_save_IFS
19687 
19688   ;;
19689 esac
19690 fi
19691 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19692 if test -n "$ac_pt_PKG_CONFIG"; then
19693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19694 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19695 else
19696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19697 $as_echo "no" >&6; }
19698 fi
19699 
19700   if test "x$ac_pt_PKG_CONFIG" = x; then
19701     PKG_CONFIG=""
19702   else
19703     case $cross_compiling:$ac_tool_warned in
19704 yes:)
19705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19706 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19707 ac_tool_warned=yes ;;
19708 esac
19709     PKG_CONFIG=$ac_pt_PKG_CONFIG
19710   fi
19711 else
19712   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19713 fi
19714 
19715 fi
19716 if test -n "$PKG_CONFIG"; then
19717         _pkg_min_version=0.9.0
19718         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19719 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19720         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19721                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19722 $as_echo "yes" >&6; }
19723         else
19724                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19725 $as_echo "no" >&6; }
19726                 PKG_CONFIG=""
19727         fi
19728 
19729 fi
19730 
19731 # After basic tools have been setup, we can check build os specific details.
19732 
19733   ###############################################################################
19734 
19735   # Note that this is the build platform OS version!
19736 
19737   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19738   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19739   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19740   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19741 
19742 
19743 
19744 
19745 
19746 # Setup builddeps, for automatic downloading of tools we need.
19747 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19748 # boot-jdk setup, but we need to have basic tools setup first.
19749 
19750 
19751 # Check whether --with-builddeps-conf was given.
19752 if test "${with_builddeps_conf+set}" = set; then :
19753   withval=$with_builddeps_conf;
19754 fi
19755 
19756 
19757 
19758 # Check whether --with-builddeps-server was given.
19759 if test "${with_builddeps_server+set}" = set; then :
19760   withval=$with_builddeps_server;
19761 fi
19762 
19763 
19764 
19765 # Check whether --with-builddeps-dir was given.
19766 if test "${with_builddeps_dir+set}" = set; then :
19767   withval=$with_builddeps_dir;
19768 else
19769   with_builddeps_dir=/localhome/builddeps
19770 fi
19771 
19772 
19773 
19774 # Check whether --with-builddeps-group was given.
19775 if test "${with_builddeps_group+set}" = set; then :
19776   withval=$with_builddeps_group;
19777 fi
19778 
19779 
19780 
19781 
19782   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19783     if test "x$with_builddeps_conf" != x; then
19784       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19785 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19786       builddepsfile=$with_builddeps_conf
19787       if test -s $builddepsfile; then
19788         . $builddepsfile
19789         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19790 $as_echo "loaded!" >&6; }
19791       else
19792         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19793       fi
19794     else
19795       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19796 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19797       builddepsfile=`mktemp`
19798       touch $builddepsfile
19799       # Put all found confs into a single file.
19800       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19801       # Source the file to acquire the variables
19802       if test -s $builddepsfile; then
19803         . $builddepsfile
19804         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19805 $as_echo "found at least one!" >&6; }
19806       else
19807         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19808       fi
19809     fi
19810     # Create build and target names that use _ instead of "-" and ".".
19811     # This is necessary to use them in variable names.
19812     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19813     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19814     # Extract rewrite information for build and target
19815     eval rewritten_build=\${REWRITE_${build_var}}
19816     if test "x$rewritten_build" = x; then
19817       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19818       echo Build stays the same $rewritten_build
19819     else
19820       echo Rewriting build for builddeps into $rewritten_build
19821     fi
19822     eval rewritten_target=\${REWRITE_${target_var}}
19823     if test "x$rewritten_target" = x; then
19824       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19825       echo Target stays the same $rewritten_target
19826     else
19827       echo Rewriting target for builddeps into $rewritten_target
19828     fi
19829     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19830     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19831   fi
19832   for ac_prog in 7z unzip
19833 do
19834   # Extract the first word of "$ac_prog", so it can be a program name with args.
19835 set dummy $ac_prog; ac_word=$2
19836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19837 $as_echo_n "checking for $ac_word... " >&6; }
19838 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19839   $as_echo_n "(cached) " >&6
19840 else
19841   if test -n "$BDEPS_UNZIP"; then
19842   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19843 else
19844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19845 for as_dir in $PATH
19846 do
19847   IFS=$as_save_IFS
19848   test -z "$as_dir" && as_dir=.
19849     for ac_exec_ext in '' $ac_executable_extensions; do
19850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19851     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19853     break 2
19854   fi
19855 done
19856   done
19857 IFS=$as_save_IFS
19858 
19859 fi
19860 fi
19861 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19862 if test -n "$BDEPS_UNZIP"; then
19863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19864 $as_echo "$BDEPS_UNZIP" >&6; }
19865 else
19866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19867 $as_echo "no" >&6; }
19868 fi
19869 
19870 
19871   test -n "$BDEPS_UNZIP" && break
19872 done
19873 
19874   if test "x$BDEPS_UNZIP" = x7z; then
19875     BDEPS_UNZIP="7z x"
19876   fi
19877 
19878   for ac_prog in wget lftp ftp
19879 do
19880   # Extract the first word of "$ac_prog", so it can be a program name with args.
19881 set dummy $ac_prog; ac_word=$2
19882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19883 $as_echo_n "checking for $ac_word... " >&6; }
19884 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19885   $as_echo_n "(cached) " >&6
19886 else
19887   if test -n "$BDEPS_FTP"; then
19888   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19889 else
19890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19891 for as_dir in $PATH
19892 do
19893   IFS=$as_save_IFS
19894   test -z "$as_dir" && as_dir=.
19895     for ac_exec_ext in '' $ac_executable_extensions; do
19896   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19897     ac_cv_prog_BDEPS_FTP="$ac_prog"
19898     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19899     break 2
19900   fi
19901 done
19902   done
19903 IFS=$as_save_IFS
19904 
19905 fi
19906 fi
19907 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19908 if test -n "$BDEPS_FTP"; then
19909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19910 $as_echo "$BDEPS_FTP" >&6; }
19911 else
19912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19913 $as_echo "no" >&6; }
19914 fi
19915 
19916 
19917   test -n "$BDEPS_FTP" && break
19918 done
19919 
19920 
19921 
19922 ###############################################################################
19923 #
19924 # Determine OpenJDK variants, options and version numbers.
19925 #
19926 ###############################################################################
19927 
19928 # We need build & target for this.
19929 
19930 
19931   ###############################################################################
19932   #
19933   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19934   # We always build headless support.
19935   #
19936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19937 $as_echo_n "checking headful support... " >&6; }
19938   # Check whether --enable-headful was given.
19939 if test "${enable_headful+set}" = set; then :
19940   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19941 else
19942   SUPPORT_HEADFUL=yes
19943 fi
19944 
19945 
19946   SUPPORT_HEADLESS=yes
19947   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19948 
19949   if test "x$SUPPORT_HEADFUL" = xyes; then
19950     # We are building both headful and headless.
19951     headful_msg="include support for both headful and headless"
19952   fi
19953 
19954   if test "x$SUPPORT_HEADFUL" = xno; then
19955     # Thus we are building headless only.
19956     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19957     headful_msg="headless only"
19958   fi
19959 
19960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19961 $as_echo "$headful_msg" >&6; }
19962 
19963 
19964 
19965 
19966 
19967   # Control wether Hotspot runs Queens test after build.
19968   # Check whether --enable-hotspot-test-in-build was given.
19969 if test "${enable_hotspot_test_in_build+set}" = set; then :
19970   enableval=$enable_hotspot_test_in_build;
19971 else
19972   enable_hotspot_test_in_build=no
19973 fi
19974 
19975   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19976     TEST_IN_BUILD=true
19977   else
19978     TEST_IN_BUILD=false
19979   fi
19980 
19981 
19982   ###############################################################################
19983   #
19984   # Choose cacerts source file
19985   #
19986 
19987 # Check whether --with-cacerts-file was given.
19988 if test "${with_cacerts_file+set}" = set; then :
19989   withval=$with_cacerts_file;
19990 fi
19991 
19992   if test "x$with_cacerts_file" != x; then
19993     CACERTS_FILE=$with_cacerts_file
19994   fi
19995 
19996 
19997   ###############################################################################
19998   #
19999   # Enable or disable unlimited crypto
20000   #
20001   # Check whether --enable-unlimited-crypto was given.
20002 if test "${enable_unlimited_crypto+set}" = set; then :
20003   enableval=$enable_unlimited_crypto;
20004 else
20005   enable_unlimited_crypto=no
20006 fi
20007 
20008   if test "x$enable_unlimited_crypto" = "xyes"; then
20009     UNLIMITED_CRYPTO=true
20010   else
20011     UNLIMITED_CRYPTO=false
20012   fi
20013 
20014 
20015   ###############################################################################
20016   #
20017   # Enable or disable the elliptic curve crypto implementation
20018   #
20019 
20020 
20021   ###############################################################################
20022   #
20023   # --enable-rmiconnector-iiop
20024   #
20025   # Check whether --enable-rmiconnector-iiop was given.
20026 if test "${enable_rmiconnector_iiop+set}" = set; then :
20027   enableval=$enable_rmiconnector_iiop;
20028 fi
20029 
20030   if test "x$enable_rmiconnector_iiop" = "xyes"; then
20031     RMICONNECTOR_IIOP=true
20032   else
20033     RMICONNECTOR_IIOP=false
20034   fi
20035 
20036 
20037   ###############################################################################
20038   #
20039   # Compress jars
20040   #
20041   COMPRESS_JARS=false
20042 
20043 
20044 
20045 
20046   # Source the version numbers
20047   . $AUTOCONF_DIR/version-numbers
20048 
20049   # Get the settings from parameters
20050 
20051 # Check whether --with-milestone was given.
20052 if test "${with_milestone+set}" = set; then :
20053   withval=$with_milestone;
20054 fi
20055 
20056   if test "x$with_milestone" = xyes; then
20057     as_fn_error $? "Milestone must have a value" "$LINENO" 5
20058   elif test "x$with_milestone" != x; then
20059     MILESTONE="$with_milestone"
20060   fi
20061   if test "x$MILESTONE" = x; then
20062     MILESTONE=internal
20063   fi
20064 
20065 
20066 # Check whether --with-update-version was given.
20067 if test "${with_update_version+set}" = set; then :
20068   withval=$with_update_version;
20069 fi
20070 
20071   if test "x$with_update_version" = xyes; then
20072     as_fn_error $? "Update version must have a value" "$LINENO" 5
20073   elif test "x$with_update_version" != x; then
20074     JDK_UPDATE_VERSION="$with_update_version"
20075     # On macosx 10.7, it's not possible to set --with-update-version=0X due
20076     # to a bug in expr (which reduces it to just X). To work around this, we
20077     # always add a 0 to one digit update versions.
20078     if test "${#JDK_UPDATE_VERSION}" = "1"; then
20079       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20080     fi
20081   fi
20082 
20083 
20084 # Check whether --with-user-release-suffix was given.
20085 if test "${with_user_release_suffix+set}" = set; then :
20086   withval=$with_user_release_suffix;
20087 fi
20088 
20089   if test "x$with_user_release_suffix" = xyes; then
20090     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20091   elif test "x$with_user_release_suffix" != x; then
20092     USER_RELEASE_SUFFIX="$with_user_release_suffix"
20093   fi
20094 
20095 
20096 # Check whether --with-build-number was given.
20097 if test "${with_build_number+set}" = set; then :
20098   withval=$with_build_number;
20099 fi
20100 
20101   if test "x$with_build_number" = xyes; then
20102     as_fn_error $? "Build number must have a value" "$LINENO" 5
20103   elif test "x$with_build_number" != x; then
20104     JDK_BUILD_NUMBER="$with_build_number"
20105   fi
20106   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20107   if test "x$JDK_BUILD_NUMBER" = x; then
20108     JDK_BUILD_NUMBER=b00
20109     if test "x$USER_RELEASE_SUFFIX" = x; then
20110       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20111       # Avoid [:alnum:] since it depends on the locale.
20112       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20113       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20114     fi
20115   fi
20116 
20117   # Now set the JDK version, milestone, build number etc.
20118 
20119 
20120 
20121 
20122 
20123 
20124 
20125 
20126 
20127 
20128 
20129 
20130 
20131 
20132 
20133 
20134 # Check whether --with-copyright-year was given.
20135 if test "${with_copyright_year+set}" = set; then :
20136   withval=$with_copyright_year;
20137 fi
20138 
20139   if test "x$with_copyright_year" = xyes; then
20140     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20141   elif test "x$with_copyright_year" != x; then
20142     COPYRIGHT_YEAR="$with_copyright_year"
20143   else
20144     COPYRIGHT_YEAR=`date +'%Y'`
20145   fi
20146 
20147 
20148   if test "x$JDK_UPDATE_VERSION" != x; then
20149     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20150   else
20151     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20152   fi
20153 
20154 
20155   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20156 
20157 
20158 
20159 ###############################################################################
20160 #
20161 # Setup BootJDK, used to bootstrap the build.
20162 #
20163 ###############################################################################
20164 
20165 
20166   BOOT_JDK_FOUND=no
20167 
20168 # Check whether --with-boot-jdk was given.
20169 if test "${with_boot_jdk+set}" = set; then :
20170   withval=$with_boot_jdk;
20171 fi
20172 
20173 
20174   # We look for the Boot JDK through various means, going from more certain to
20175   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20176   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20177   # must check if this is indeed valid; otherwise we'll continue looking.
20178 
20179   # Test: Is bootjdk explicitely set by command line arguments?
20180 
20181   if test "x$BOOT_JDK_FOUND" = xno; then
20182     # Now execute the test
20183 
20184   if test "x$with_boot_jdk" != x; then
20185     BOOT_JDK=$with_boot_jdk
20186     BOOT_JDK_FOUND=maybe
20187     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20188 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20189   fi
20190 
20191 
20192     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20193     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20194       # Do we have a bin/java?
20195       if test ! -x "$BOOT_JDK/bin/java"; then
20196         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20198         BOOT_JDK_FOUND=no
20199       else
20200         # Do we have a bin/javac?
20201         if test ! -x "$BOOT_JDK/bin/javac"; then
20202           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20204           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20205 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20206           BOOT_JDK_FOUND=no
20207         else
20208           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20209           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20210 
20211           # Extra M4 quote needed to protect [] in grep expression.
20212           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20213           if test "x$FOUND_CORRECT_VERSION" = x; then
20214             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20215 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20216             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20217 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20218             BOOT_JDK_FOUND=no
20219           else
20220             # We're done! :-)
20221             BOOT_JDK_FOUND=yes
20222 
20223   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20224 
20225   # Input might be given as Windows format, start by converting to
20226   # unix format.
20227   path="$BOOT_JDK"
20228   new_path=`$CYGPATH -u "$path"`
20229 
20230   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20231   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20232   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20233   # "foo.exe" is OK but "foo" is an error.
20234   #
20235   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20236   # It is also a way to make sure we got the proper file name for the real test later on.
20237   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20238   if test "x$test_shortpath" = x; then
20239     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20240 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20241     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20242   fi
20243 
20244   # Call helper function which possibly converts this using DOS-style short mode.
20245   # If so, the updated path is stored in $new_path.
20246 
20247   input_path="$new_path"
20248   # Check if we need to convert this using DOS-style short mode. If the path
20249   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20250   # take no chances and rewrite it.
20251   # Note: m4 eats our [], so we need to use [ and ] instead.
20252   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20253   if test "x$has_forbidden_chars" != x; then
20254     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20255     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20256     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20257     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20258       # Going to short mode and back again did indeed matter. Since short mode is
20259       # case insensitive, let's make it lowercase to improve readability.
20260       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20261       # Now convert it back to Unix-stile (cygpath)
20262       input_path=`$CYGPATH -u "$shortmode_path"`
20263       new_path="$input_path"
20264     fi
20265   fi
20266 
20267   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20268   if test "x$test_cygdrive_prefix" = x; then
20269     # As a simple fix, exclude /usr/bin since it's not a real path.
20270     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20271       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20272       # a path prefixed by /cygdrive for fixpath to work.
20273       new_path="$CYGWIN_ROOT_PATH$input_path"
20274     fi
20275   fi
20276 
20277 
20278   if test "x$path" != "x$new_path"; then
20279     BOOT_JDK="$new_path"
20280     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20281 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20282   fi
20283 
20284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20285 
20286   path="$BOOT_JDK"
20287   has_colon=`$ECHO $path | $GREP ^.:`
20288   new_path="$path"
20289   if test "x$has_colon" = x; then
20290     # Not in mixed or Windows style, start by that.
20291     new_path=`cmd //c echo $path`
20292   fi
20293 
20294 
20295   input_path="$new_path"
20296   # Check if we need to convert this using DOS-style short mode. If the path
20297   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20298   # take no chances and rewrite it.
20299   # Note: m4 eats our [], so we need to use [ and ] instead.
20300   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20301   if test "x$has_forbidden_chars" != x; then
20302     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20303     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20304   fi
20305 
20306 
20307   windows_path="$new_path"
20308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20309     unix_path=`$CYGPATH -u "$windows_path"`
20310     new_path="$unix_path"
20311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20313     new_path="$unix_path"
20314   fi
20315 
20316   if test "x$path" != "x$new_path"; then
20317     BOOT_JDK="$new_path"
20318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20319 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20320   fi
20321 
20322   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20323   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20324 
20325   else
20326     # We're on a unix platform. Hooray! :)
20327     path="$BOOT_JDK"
20328     has_space=`$ECHO "$path" | $GREP " "`
20329     if test "x$has_space" != x; then
20330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20331 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20332       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20333     fi
20334 
20335     # Use eval to expand a potential ~
20336     eval path="$path"
20337     if test ! -f "$path" && test ! -d "$path"; then
20338       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20339     fi
20340 
20341     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20342   fi
20343 
20344             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20345 $as_echo_n "checking for Boot JDK... " >&6; }
20346             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20347 $as_echo "$BOOT_JDK" >&6; }
20348             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20349 $as_echo_n "checking Boot JDK version... " >&6; }
20350             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20351             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20352 $as_echo "$BOOT_JDK_VERSION" >&6; }
20353           fi # end check jdk version
20354         fi # end check javac
20355       fi # end check java
20356     fi # end check boot jdk found
20357   fi
20358 
20359   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20360     # Having specified an argument which is incorrect will produce an instant failure;
20361     # we should not go on looking
20362     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20363   fi
20364 
20365   # Test: Is bootjdk available from builddeps?
20366 
20367   if test "x$BOOT_JDK_FOUND" = xno; then
20368     # Now execute the test
20369 
20370 
20371 
20372   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20373     # Source the builddeps file again, to make sure it uses the latest variables!
20374     . $builddepsfile
20375     # Look for a target and build machine specific resource!
20376     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20377     if test "x$resource" = x; then
20378       # Ok, lets instead look for a target specific resource
20379       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20380     fi
20381     if test "x$resource" = x; then
20382       # Ok, lets instead look for a build specific resource
20383       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20384     fi
20385     if test "x$resource" = x; then
20386       # Ok, lets instead look for a generic resource
20387       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20388       resource=${builddep_bootjdk}
20389     fi
20390     if test "x$resource" != x; then
20391       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20392 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20393       # If the resource in the builddeps.conf file is an existing directory,
20394       # for example /java/linux/cups
20395       if test -d ${resource}; then
20396         depdir=${resource}
20397       else
20398 
20399   # bootjdk is for example mymodule
20400   # $resource is for example libs/general/libmymod_1_2_3.zip
20401   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20402   # $with_builddeps_dir is for example /localhome/builddeps
20403   # depdir is the name of the variable into which we store the depdir, eg MYMOD
20404   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20405   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20406   filename=`basename $resource`
20407   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20408   filebase=${filename%%.*}
20409   extension=${filename#*.}
20410   installdir=$with_builddeps_dir/$filebase
20411   if test ! -f $installdir/$filename.unpacked; then
20412     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20413 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20414     if test ! -d $installdir; then
20415       mkdir -p $installdir
20416     fi
20417     if test ! -d $installdir; then
20418       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20419     fi
20420     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20421     touch $tmpfile
20422     if test ! -f $tmpfile; then
20423       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20424     fi
20425 
20426   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20427   # $tmpfile is the local file name for the downloaded file.
20428   VALID_TOOL=no
20429   if test "x$BDEPS_FTP" = xwget; then
20430     VALID_TOOL=yes
20431     wget -O $tmpfile $with_builddeps_server/$resource
20432   fi
20433   if test "x$BDEPS_FTP" = xlftp; then
20434     VALID_TOOL=yes
20435     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20436   fi
20437   if test "x$BDEPS_FTP" = xftp; then
20438     VALID_TOOL=yes
20439     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20440     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20441     FTPUSERPWD=${FTPSERVER%%@*}
20442     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20443       FTPUSER=${userpwd%%:*}
20444       FTPPWD=${userpwd#*@}
20445       FTPSERVER=${FTPSERVER#*@}
20446     else
20447       FTPUSER=ftp
20448       FTPPWD=ftp
20449     fi
20450     # the "pass" command does not work on some
20451     # ftp clients (read ftp.exe) but if it works,
20452     # passive mode is better!
20453     ( \
20454         echo "user $FTPUSER $FTPPWD"        ; \
20455         echo "pass"                         ; \
20456         echo "bin"                          ; \
20457         echo "get $FTPPATH $tmpfile"              ; \
20458     ) | ftp -in $FTPSERVER
20459   fi
20460   if test "x$VALID_TOOL" != xyes; then
20461     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20462   fi
20463 
20464     mv $tmpfile $installdir/$filename
20465     if test ! -s $installdir/$filename; then
20466       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20467     fi
20468     case "$extension" in
20469       zip)  echo "Unzipping $installdir/$filename..."
20470         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20471         ;;
20472       tar.gz) echo "Untaring $installdir/$filename..."
20473         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20474         ;;
20475       tgz) echo "Untaring $installdir/$filename..."
20476         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20477         ;;
20478       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20479         ;;
20480     esac
20481   fi
20482   if test -f $installdir/$filename.unpacked; then
20483     depdir=$installdir
20484   fi
20485 
20486       fi
20487       # Source the builddeps file again, because in the previous command, the depdir
20488       # was updated to point at the current build dependency install directory.
20489       . $builddepsfile
20490       # Now extract variables from the builddeps.conf files.
20491       theroot=${builddep_bootjdk_ROOT}
20492       thecflags=${builddep_bootjdk_CFLAGS}
20493       thelibs=${builddep_bootjdk_LIBS}
20494       if test "x$depdir" = x; then
20495         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20496       fi
20497       BOOT_JDK=$depdir
20498       if test "x$theroot" != x; then
20499         BOOT_JDK="$theroot"
20500       fi
20501       if test "x$thecflags" != x; then
20502         BOOT_JDK_CFLAGS="$thecflags"
20503       fi
20504       if test "x$thelibs" != x; then
20505         BOOT_JDK_LIBS="$thelibs"
20506       fi
20507       BOOT_JDK_FOUND=maybe
20508       else BOOT_JDK_FOUND=no
20509 
20510     fi
20511     else BOOT_JDK_FOUND=no
20512 
20513   fi
20514 
20515 
20516 
20517     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20518     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20519       # Do we have a bin/java?
20520       if test ! -x "$BOOT_JDK/bin/java"; then
20521         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20522 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20523         BOOT_JDK_FOUND=no
20524       else
20525         # Do we have a bin/javac?
20526         if test ! -x "$BOOT_JDK/bin/javac"; then
20527           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20528 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20529           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20530 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20531           BOOT_JDK_FOUND=no
20532         else
20533           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20534           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20535 
20536           # Extra M4 quote needed to protect [] in grep expression.
20537           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20538           if test "x$FOUND_CORRECT_VERSION" = x; then
20539             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20540 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20541             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20542 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20543             BOOT_JDK_FOUND=no
20544           else
20545             # We're done! :-)
20546             BOOT_JDK_FOUND=yes
20547 
20548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20549 
20550   # Input might be given as Windows format, start by converting to
20551   # unix format.
20552   path="$BOOT_JDK"
20553   new_path=`$CYGPATH -u "$path"`
20554 
20555   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20556   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20557   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20558   # "foo.exe" is OK but "foo" is an error.
20559   #
20560   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20561   # It is also a way to make sure we got the proper file name for the real test later on.
20562   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20563   if test "x$test_shortpath" = x; then
20564     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20565 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20566     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20567   fi
20568 
20569   # Call helper function which possibly converts this using DOS-style short mode.
20570   # If so, the updated path is stored in $new_path.
20571 
20572   input_path="$new_path"
20573   # Check if we need to convert this using DOS-style short mode. If the path
20574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20575   # take no chances and rewrite it.
20576   # Note: m4 eats our [], so we need to use [ and ] instead.
20577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20578   if test "x$has_forbidden_chars" != x; then
20579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20580     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20581     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20582     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20583       # Going to short mode and back again did indeed matter. Since short mode is
20584       # case insensitive, let's make it lowercase to improve readability.
20585       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20586       # Now convert it back to Unix-stile (cygpath)
20587       input_path=`$CYGPATH -u "$shortmode_path"`
20588       new_path="$input_path"
20589     fi
20590   fi
20591 
20592   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20593   if test "x$test_cygdrive_prefix" = x; then
20594     # As a simple fix, exclude /usr/bin since it's not a real path.
20595     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20596       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20597       # a path prefixed by /cygdrive for fixpath to work.
20598       new_path="$CYGWIN_ROOT_PATH$input_path"
20599     fi
20600   fi
20601 
20602 
20603   if test "x$path" != "x$new_path"; then
20604     BOOT_JDK="$new_path"
20605     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20606 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20607   fi
20608 
20609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20610 
20611   path="$BOOT_JDK"
20612   has_colon=`$ECHO $path | $GREP ^.:`
20613   new_path="$path"
20614   if test "x$has_colon" = x; then
20615     # Not in mixed or Windows style, start by that.
20616     new_path=`cmd //c echo $path`
20617   fi
20618 
20619 
20620   input_path="$new_path"
20621   # Check if we need to convert this using DOS-style short mode. If the path
20622   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20623   # take no chances and rewrite it.
20624   # Note: m4 eats our [], so we need to use [ and ] instead.
20625   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20626   if test "x$has_forbidden_chars" != x; then
20627     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20628     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20629   fi
20630 
20631 
20632   windows_path="$new_path"
20633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20634     unix_path=`$CYGPATH -u "$windows_path"`
20635     new_path="$unix_path"
20636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20638     new_path="$unix_path"
20639   fi
20640 
20641   if test "x$path" != "x$new_path"; then
20642     BOOT_JDK="$new_path"
20643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20644 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20645   fi
20646 
20647   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20648   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20649 
20650   else
20651     # We're on a unix platform. Hooray! :)
20652     path="$BOOT_JDK"
20653     has_space=`$ECHO "$path" | $GREP " "`
20654     if test "x$has_space" != x; then
20655       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20656 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20657       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20658     fi
20659 
20660     # Use eval to expand a potential ~
20661     eval path="$path"
20662     if test ! -f "$path" && test ! -d "$path"; then
20663       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20664     fi
20665 
20666     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20667   fi
20668 
20669             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20670 $as_echo_n "checking for Boot JDK... " >&6; }
20671             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20672 $as_echo "$BOOT_JDK" >&6; }
20673             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20674 $as_echo_n "checking Boot JDK version... " >&6; }
20675             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20676             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20677 $as_echo "$BOOT_JDK_VERSION" >&6; }
20678           fi # end check jdk version
20679         fi # end check javac
20680       fi # end check java
20681     fi # end check boot jdk found
20682   fi
20683 
20684 
20685   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20686 
20687   if test "x$BOOT_JDK_FOUND" = xno; then
20688     # Now execute the test
20689 
20690   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20691     # First check at user selected default
20692 
20693   if test "x$BOOT_JDK_FOUND" = xno; then
20694     # Now execute the test
20695 
20696   if test -x /usr/libexec/java_home; then
20697     BOOT_JDK=`/usr/libexec/java_home `
20698     BOOT_JDK_FOUND=maybe
20699     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20700 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20701   fi
20702 
20703 
20704     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20705     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20706       # Do we have a bin/java?
20707       if test ! -x "$BOOT_JDK/bin/java"; then
20708         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20710         BOOT_JDK_FOUND=no
20711       else
20712         # Do we have a bin/javac?
20713         if test ! -x "$BOOT_JDK/bin/javac"; then
20714           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20715 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20716           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20717 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20718           BOOT_JDK_FOUND=no
20719         else
20720           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20721           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20722 
20723           # Extra M4 quote needed to protect [] in grep expression.
20724           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20725           if test "x$FOUND_CORRECT_VERSION" = x; then
20726             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20728             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20729 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20730             BOOT_JDK_FOUND=no
20731           else
20732             # We're done! :-)
20733             BOOT_JDK_FOUND=yes
20734 
20735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20736 
20737   # Input might be given as Windows format, start by converting to
20738   # unix format.
20739   path="$BOOT_JDK"
20740   new_path=`$CYGPATH -u "$path"`
20741 
20742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20745   # "foo.exe" is OK but "foo" is an error.
20746   #
20747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20748   # It is also a way to make sure we got the proper file name for the real test later on.
20749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20750   if test "x$test_shortpath" = x; then
20751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20753     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20754   fi
20755 
20756   # Call helper function which possibly converts this using DOS-style short mode.
20757   # If so, the updated path is stored in $new_path.
20758 
20759   input_path="$new_path"
20760   # Check if we need to convert this using DOS-style short mode. If the path
20761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20762   # take no chances and rewrite it.
20763   # Note: m4 eats our [], so we need to use [ and ] instead.
20764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20765   if test "x$has_forbidden_chars" != x; then
20766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20770       # Going to short mode and back again did indeed matter. Since short mode is
20771       # case insensitive, let's make it lowercase to improve readability.
20772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20773       # Now convert it back to Unix-stile (cygpath)
20774       input_path=`$CYGPATH -u "$shortmode_path"`
20775       new_path="$input_path"
20776     fi
20777   fi
20778 
20779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20780   if test "x$test_cygdrive_prefix" = x; then
20781     # As a simple fix, exclude /usr/bin since it's not a real path.
20782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20784       # a path prefixed by /cygdrive for fixpath to work.
20785       new_path="$CYGWIN_ROOT_PATH$input_path"
20786     fi
20787   fi
20788 
20789 
20790   if test "x$path" != "x$new_path"; then
20791     BOOT_JDK="$new_path"
20792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20794   fi
20795 
20796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20797 
20798   path="$BOOT_JDK"
20799   has_colon=`$ECHO $path | $GREP ^.:`
20800   new_path="$path"
20801   if test "x$has_colon" = x; then
20802     # Not in mixed or Windows style, start by that.
20803     new_path=`cmd //c echo $path`
20804   fi
20805 
20806 
20807   input_path="$new_path"
20808   # Check if we need to convert this using DOS-style short mode. If the path
20809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20810   # take no chances and rewrite it.
20811   # Note: m4 eats our [], so we need to use [ and ] instead.
20812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20813   if test "x$has_forbidden_chars" != x; then
20814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20816   fi
20817 
20818 
20819   windows_path="$new_path"
20820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20821     unix_path=`$CYGPATH -u "$windows_path"`
20822     new_path="$unix_path"
20823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20825     new_path="$unix_path"
20826   fi
20827 
20828   if test "x$path" != "x$new_path"; then
20829     BOOT_JDK="$new_path"
20830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20832   fi
20833 
20834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20836 
20837   else
20838     # We're on a unix platform. Hooray! :)
20839     path="$BOOT_JDK"
20840     has_space=`$ECHO "$path" | $GREP " "`
20841     if test "x$has_space" != x; then
20842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20844       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20845     fi
20846 
20847     # Use eval to expand a potential ~
20848     eval path="$path"
20849     if test ! -f "$path" && test ! -d "$path"; then
20850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20851     fi
20852 
20853     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20854   fi
20855 
20856             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20857 $as_echo_n "checking for Boot JDK... " >&6; }
20858             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20859 $as_echo "$BOOT_JDK" >&6; }
20860             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20861 $as_echo_n "checking Boot JDK version... " >&6; }
20862             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20863             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20864 $as_echo "$BOOT_JDK_VERSION" >&6; }
20865           fi # end check jdk version
20866         fi # end check javac
20867       fi # end check java
20868     fi # end check boot jdk found
20869   fi
20870 
20871     # If that did not work out (e.g. too old), try explicit versions instead
20872 
20873   if test "x$BOOT_JDK_FOUND" = xno; then
20874     # Now execute the test
20875 
20876   if test -x /usr/libexec/java_home; then
20877     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20878     BOOT_JDK_FOUND=maybe
20879     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20880 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20881   fi
20882 
20883 
20884     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20885     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20886       # Do we have a bin/java?
20887       if test ! -x "$BOOT_JDK/bin/java"; then
20888         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20889 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20890         BOOT_JDK_FOUND=no
20891       else
20892         # Do we have a bin/javac?
20893         if test ! -x "$BOOT_JDK/bin/javac"; then
20894           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20895 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20896           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20897 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20898           BOOT_JDK_FOUND=no
20899         else
20900           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20901           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20902 
20903           # Extra M4 quote needed to protect [] in grep expression.
20904           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20905           if test "x$FOUND_CORRECT_VERSION" = x; then
20906             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20907 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20908             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20909 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20910             BOOT_JDK_FOUND=no
20911           else
20912             # We're done! :-)
20913             BOOT_JDK_FOUND=yes
20914 
20915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20916 
20917   # Input might be given as Windows format, start by converting to
20918   # unix format.
20919   path="$BOOT_JDK"
20920   new_path=`$CYGPATH -u "$path"`
20921 
20922   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20923   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20924   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20925   # "foo.exe" is OK but "foo" is an error.
20926   #
20927   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20928   # It is also a way to make sure we got the proper file name for the real test later on.
20929   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20930   if test "x$test_shortpath" = x; then
20931     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20932 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20933     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20934   fi
20935 
20936   # Call helper function which possibly converts this using DOS-style short mode.
20937   # If so, the updated path is stored in $new_path.
20938 
20939   input_path="$new_path"
20940   # Check if we need to convert this using DOS-style short mode. If the path
20941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20942   # take no chances and rewrite it.
20943   # Note: m4 eats our [], so we need to use [ and ] instead.
20944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20945   if test "x$has_forbidden_chars" != x; then
20946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20947     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20948     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20949     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20950       # Going to short mode and back again did indeed matter. Since short mode is
20951       # case insensitive, let's make it lowercase to improve readability.
20952       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20953       # Now convert it back to Unix-stile (cygpath)
20954       input_path=`$CYGPATH -u "$shortmode_path"`
20955       new_path="$input_path"
20956     fi
20957   fi
20958 
20959   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20960   if test "x$test_cygdrive_prefix" = x; then
20961     # As a simple fix, exclude /usr/bin since it's not a real path.
20962     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20963       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20964       # a path prefixed by /cygdrive for fixpath to work.
20965       new_path="$CYGWIN_ROOT_PATH$input_path"
20966     fi
20967   fi
20968 
20969 
20970   if test "x$path" != "x$new_path"; then
20971     BOOT_JDK="$new_path"
20972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20973 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20974   fi
20975 
20976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20977 
20978   path="$BOOT_JDK"
20979   has_colon=`$ECHO $path | $GREP ^.:`
20980   new_path="$path"
20981   if test "x$has_colon" = x; then
20982     # Not in mixed or Windows style, start by that.
20983     new_path=`cmd //c echo $path`
20984   fi
20985 
20986 
20987   input_path="$new_path"
20988   # Check if we need to convert this using DOS-style short mode. If the path
20989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20990   # take no chances and rewrite it.
20991   # Note: m4 eats our [], so we need to use [ and ] instead.
20992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20993   if test "x$has_forbidden_chars" != x; then
20994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20995     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20996   fi
20997 
20998 
20999   windows_path="$new_path"
21000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21001     unix_path=`$CYGPATH -u "$windows_path"`
21002     new_path="$unix_path"
21003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21005     new_path="$unix_path"
21006   fi
21007 
21008   if test "x$path" != "x$new_path"; then
21009     BOOT_JDK="$new_path"
21010     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21011 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21012   fi
21013 
21014   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21015   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21016 
21017   else
21018     # We're on a unix platform. Hooray! :)
21019     path="$BOOT_JDK"
21020     has_space=`$ECHO "$path" | $GREP " "`
21021     if test "x$has_space" != x; then
21022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21023 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21024       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21025     fi
21026 
21027     # Use eval to expand a potential ~
21028     eval path="$path"
21029     if test ! -f "$path" && test ! -d "$path"; then
21030       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21031     fi
21032 
21033     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21034   fi
21035 
21036             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21037 $as_echo_n "checking for Boot JDK... " >&6; }
21038             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21039 $as_echo "$BOOT_JDK" >&6; }
21040             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21041 $as_echo_n "checking Boot JDK version... " >&6; }
21042             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21043             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21044 $as_echo "$BOOT_JDK_VERSION" >&6; }
21045           fi # end check jdk version
21046         fi # end check javac
21047       fi # end check java
21048     fi # end check boot jdk found
21049   fi
21050 
21051 
21052   if test "x$BOOT_JDK_FOUND" = xno; then
21053     # Now execute the test
21054 
21055   if test -x /usr/libexec/java_home; then
21056     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21057     BOOT_JDK_FOUND=maybe
21058     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21059 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21060   fi
21061 
21062 
21063     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21064     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21065       # Do we have a bin/java?
21066       if test ! -x "$BOOT_JDK/bin/java"; then
21067         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21068 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21069         BOOT_JDK_FOUND=no
21070       else
21071         # Do we have a bin/javac?
21072         if test ! -x "$BOOT_JDK/bin/javac"; then
21073           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21074 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21075           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21076 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21077           BOOT_JDK_FOUND=no
21078         else
21079           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21080           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21081 
21082           # Extra M4 quote needed to protect [] in grep expression.
21083           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21084           if test "x$FOUND_CORRECT_VERSION" = x; then
21085             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21087             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21088 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21089             BOOT_JDK_FOUND=no
21090           else
21091             # We're done! :-)
21092             BOOT_JDK_FOUND=yes
21093 
21094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21095 
21096   # Input might be given as Windows format, start by converting to
21097   # unix format.
21098   path="$BOOT_JDK"
21099   new_path=`$CYGPATH -u "$path"`
21100 
21101   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21102   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21103   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21104   # "foo.exe" is OK but "foo" is an error.
21105   #
21106   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21107   # It is also a way to make sure we got the proper file name for the real test later on.
21108   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21109   if test "x$test_shortpath" = x; then
21110     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21111 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21112     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21113   fi
21114 
21115   # Call helper function which possibly converts this using DOS-style short mode.
21116   # If so, the updated path is stored in $new_path.
21117 
21118   input_path="$new_path"
21119   # Check if we need to convert this using DOS-style short mode. If the path
21120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21121   # take no chances and rewrite it.
21122   # Note: m4 eats our [], so we need to use [ and ] instead.
21123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21124   if test "x$has_forbidden_chars" != x; then
21125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21126     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21127     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21128     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21129       # Going to short mode and back again did indeed matter. Since short mode is
21130       # case insensitive, let's make it lowercase to improve readability.
21131       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21132       # Now convert it back to Unix-stile (cygpath)
21133       input_path=`$CYGPATH -u "$shortmode_path"`
21134       new_path="$input_path"
21135     fi
21136   fi
21137 
21138   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21139   if test "x$test_cygdrive_prefix" = x; then
21140     # As a simple fix, exclude /usr/bin since it's not a real path.
21141     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21142       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21143       # a path prefixed by /cygdrive for fixpath to work.
21144       new_path="$CYGWIN_ROOT_PATH$input_path"
21145     fi
21146   fi
21147 
21148 
21149   if test "x$path" != "x$new_path"; then
21150     BOOT_JDK="$new_path"
21151     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21152 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21153   fi
21154 
21155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21156 
21157   path="$BOOT_JDK"
21158   has_colon=`$ECHO $path | $GREP ^.:`
21159   new_path="$path"
21160   if test "x$has_colon" = x; then
21161     # Not in mixed or Windows style, start by that.
21162     new_path=`cmd //c echo $path`
21163   fi
21164 
21165 
21166   input_path="$new_path"
21167   # Check if we need to convert this using DOS-style short mode. If the path
21168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21169   # take no chances and rewrite it.
21170   # Note: m4 eats our [], so we need to use [ and ] instead.
21171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21172   if test "x$has_forbidden_chars" != x; then
21173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21174     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21175   fi
21176 
21177 
21178   windows_path="$new_path"
21179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21180     unix_path=`$CYGPATH -u "$windows_path"`
21181     new_path="$unix_path"
21182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21183     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21184     new_path="$unix_path"
21185   fi
21186 
21187   if test "x$path" != "x$new_path"; then
21188     BOOT_JDK="$new_path"
21189     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21190 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21191   fi
21192 
21193   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21194   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21195 
21196   else
21197     # We're on a unix platform. Hooray! :)
21198     path="$BOOT_JDK"
21199     has_space=`$ECHO "$path" | $GREP " "`
21200     if test "x$has_space" != x; then
21201       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21202 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21203       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21204     fi
21205 
21206     # Use eval to expand a potential ~
21207     eval path="$path"
21208     if test ! -f "$path" && test ! -d "$path"; then
21209       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21210     fi
21211 
21212     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21213   fi
21214 
21215             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21216 $as_echo_n "checking for Boot JDK... " >&6; }
21217             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21218 $as_echo "$BOOT_JDK" >&6; }
21219             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21220 $as_echo_n "checking Boot JDK version... " >&6; }
21221             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21222             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21223 $as_echo "$BOOT_JDK_VERSION" >&6; }
21224           fi # end check jdk version
21225         fi # end check javac
21226       fi # end check java
21227     fi # end check boot jdk found
21228   fi
21229 
21230 
21231   if test "x$BOOT_JDK_FOUND" = xno; then
21232     # Now execute the test
21233 
21234   if test -x /usr/libexec/java_home; then
21235     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21236     BOOT_JDK_FOUND=maybe
21237     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21238 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21239   fi
21240 
21241 
21242     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21243     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21244       # Do we have a bin/java?
21245       if test ! -x "$BOOT_JDK/bin/java"; then
21246         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21247 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21248         BOOT_JDK_FOUND=no
21249       else
21250         # Do we have a bin/javac?
21251         if test ! -x "$BOOT_JDK/bin/javac"; then
21252           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21253 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21254           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21255 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21256           BOOT_JDK_FOUND=no
21257         else
21258           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21259           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21260 
21261           # Extra M4 quote needed to protect [] in grep expression.
21262           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21263           if test "x$FOUND_CORRECT_VERSION" = x; then
21264             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21265 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21266             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21267 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21268             BOOT_JDK_FOUND=no
21269           else
21270             # We're done! :-)
21271             BOOT_JDK_FOUND=yes
21272 
21273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21274 
21275   # Input might be given as Windows format, start by converting to
21276   # unix format.
21277   path="$BOOT_JDK"
21278   new_path=`$CYGPATH -u "$path"`
21279 
21280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21283   # "foo.exe" is OK but "foo" is an error.
21284   #
21285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21286   # It is also a way to make sure we got the proper file name for the real test later on.
21287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21288   if test "x$test_shortpath" = x; then
21289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21290 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21291     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21292   fi
21293 
21294   # Call helper function which possibly converts this using DOS-style short mode.
21295   # If so, the updated path is stored in $new_path.
21296 
21297   input_path="$new_path"
21298   # Check if we need to convert this using DOS-style short mode. If the path
21299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21300   # take no chances and rewrite it.
21301   # Note: m4 eats our [], so we need to use [ and ] instead.
21302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21303   if test "x$has_forbidden_chars" != x; then
21304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21308       # Going to short mode and back again did indeed matter. Since short mode is
21309       # case insensitive, let's make it lowercase to improve readability.
21310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21311       # Now convert it back to Unix-stile (cygpath)
21312       input_path=`$CYGPATH -u "$shortmode_path"`
21313       new_path="$input_path"
21314     fi
21315   fi
21316 
21317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21318   if test "x$test_cygdrive_prefix" = x; then
21319     # As a simple fix, exclude /usr/bin since it's not a real path.
21320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21322       # a path prefixed by /cygdrive for fixpath to work.
21323       new_path="$CYGWIN_ROOT_PATH$input_path"
21324     fi
21325   fi
21326 
21327 
21328   if test "x$path" != "x$new_path"; then
21329     BOOT_JDK="$new_path"
21330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21331 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21332   fi
21333 
21334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21335 
21336   path="$BOOT_JDK"
21337   has_colon=`$ECHO $path | $GREP ^.:`
21338   new_path="$path"
21339   if test "x$has_colon" = x; then
21340     # Not in mixed or Windows style, start by that.
21341     new_path=`cmd //c echo $path`
21342   fi
21343 
21344 
21345   input_path="$new_path"
21346   # Check if we need to convert this using DOS-style short mode. If the path
21347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348   # take no chances and rewrite it.
21349   # Note: m4 eats our [], so we need to use [ and ] instead.
21350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21351   if test "x$has_forbidden_chars" != x; then
21352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21354   fi
21355 
21356 
21357   windows_path="$new_path"
21358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21359     unix_path=`$CYGPATH -u "$windows_path"`
21360     new_path="$unix_path"
21361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21363     new_path="$unix_path"
21364   fi
21365 
21366   if test "x$path" != "x$new_path"; then
21367     BOOT_JDK="$new_path"
21368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21369 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21370   fi
21371 
21372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21374 
21375   else
21376     # We're on a unix platform. Hooray! :)
21377     path="$BOOT_JDK"
21378     has_space=`$ECHO "$path" | $GREP " "`
21379     if test "x$has_space" != x; then
21380       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21381 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21382       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21383     fi
21384 
21385     # Use eval to expand a potential ~
21386     eval path="$path"
21387     if test ! -f "$path" && test ! -d "$path"; then
21388       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21389     fi
21390 
21391     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21392   fi
21393 
21394             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21395 $as_echo_n "checking for Boot JDK... " >&6; }
21396             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21397 $as_echo "$BOOT_JDK" >&6; }
21398             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21399 $as_echo_n "checking Boot JDK version... " >&6; }
21400             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21401             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21402 $as_echo "$BOOT_JDK_VERSION" >&6; }
21403           fi # end check jdk version
21404         fi # end check javac
21405       fi # end check java
21406     fi # end check boot jdk found
21407   fi
21408 
21409   fi
21410 
21411 
21412     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21413     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21414       # Do we have a bin/java?
21415       if test ! -x "$BOOT_JDK/bin/java"; then
21416         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21417 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21418         BOOT_JDK_FOUND=no
21419       else
21420         # Do we have a bin/javac?
21421         if test ! -x "$BOOT_JDK/bin/javac"; then
21422           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21423 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21424           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21425 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21426           BOOT_JDK_FOUND=no
21427         else
21428           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21429           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21430 
21431           # Extra M4 quote needed to protect [] in grep expression.
21432           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21433           if test "x$FOUND_CORRECT_VERSION" = x; then
21434             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21436             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21437 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21438             BOOT_JDK_FOUND=no
21439           else
21440             # We're done! :-)
21441             BOOT_JDK_FOUND=yes
21442 
21443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21444 
21445   # Input might be given as Windows format, start by converting to
21446   # unix format.
21447   path="$BOOT_JDK"
21448   new_path=`$CYGPATH -u "$path"`
21449 
21450   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21451   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21452   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21453   # "foo.exe" is OK but "foo" is an error.
21454   #
21455   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21456   # It is also a way to make sure we got the proper file name for the real test later on.
21457   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21458   if test "x$test_shortpath" = x; then
21459     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21460 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21461     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21462   fi
21463 
21464   # Call helper function which possibly converts this using DOS-style short mode.
21465   # If so, the updated path is stored in $new_path.
21466 
21467   input_path="$new_path"
21468   # Check if we need to convert this using DOS-style short mode. If the path
21469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21470   # take no chances and rewrite it.
21471   # Note: m4 eats our [], so we need to use [ and ] instead.
21472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21473   if test "x$has_forbidden_chars" != x; then
21474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21475     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21476     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21477     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21478       # Going to short mode and back again did indeed matter. Since short mode is
21479       # case insensitive, let's make it lowercase to improve readability.
21480       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21481       # Now convert it back to Unix-stile (cygpath)
21482       input_path=`$CYGPATH -u "$shortmode_path"`
21483       new_path="$input_path"
21484     fi
21485   fi
21486 
21487   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21488   if test "x$test_cygdrive_prefix" = x; then
21489     # As a simple fix, exclude /usr/bin since it's not a real path.
21490     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21491       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21492       # a path prefixed by /cygdrive for fixpath to work.
21493       new_path="$CYGWIN_ROOT_PATH$input_path"
21494     fi
21495   fi
21496 
21497 
21498   if test "x$path" != "x$new_path"; then
21499     BOOT_JDK="$new_path"
21500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21501 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21502   fi
21503 
21504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21505 
21506   path="$BOOT_JDK"
21507   has_colon=`$ECHO $path | $GREP ^.:`
21508   new_path="$path"
21509   if test "x$has_colon" = x; then
21510     # Not in mixed or Windows style, start by that.
21511     new_path=`cmd //c echo $path`
21512   fi
21513 
21514 
21515   input_path="$new_path"
21516   # Check if we need to convert this using DOS-style short mode. If the path
21517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21518   # take no chances and rewrite it.
21519   # Note: m4 eats our [], so we need to use [ and ] instead.
21520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21521   if test "x$has_forbidden_chars" != x; then
21522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21523     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21524   fi
21525 
21526 
21527   windows_path="$new_path"
21528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21529     unix_path=`$CYGPATH -u "$windows_path"`
21530     new_path="$unix_path"
21531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21533     new_path="$unix_path"
21534   fi
21535 
21536   if test "x$path" != "x$new_path"; then
21537     BOOT_JDK="$new_path"
21538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21539 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21540   fi
21541 
21542   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21543   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21544 
21545   else
21546     # We're on a unix platform. Hooray! :)
21547     path="$BOOT_JDK"
21548     has_space=`$ECHO "$path" | $GREP " "`
21549     if test "x$has_space" != x; then
21550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21551 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21552       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21553     fi
21554 
21555     # Use eval to expand a potential ~
21556     eval path="$path"
21557     if test ! -f "$path" && test ! -d "$path"; then
21558       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21559     fi
21560 
21561     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21562   fi
21563 
21564             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21565 $as_echo_n "checking for Boot JDK... " >&6; }
21566             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21567 $as_echo "$BOOT_JDK" >&6; }
21568             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21569 $as_echo_n "checking Boot JDK version... " >&6; }
21570             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21571             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21572 $as_echo "$BOOT_JDK_VERSION" >&6; }
21573           fi # end check jdk version
21574         fi # end check javac
21575       fi # end check java
21576     fi # end check boot jdk found
21577   fi
21578 
21579 
21580   # Test: Is $JAVA_HOME set?
21581 
21582   if test "x$BOOT_JDK_FOUND" = xno; then
21583     # Now execute the test
21584 
21585   if test "x$JAVA_HOME" != x; then
21586     JAVA_HOME_PROCESSED="$JAVA_HOME"
21587 
21588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21589 
21590   # Input might be given as Windows format, start by converting to
21591   # unix format.
21592   path="$JAVA_HOME_PROCESSED"
21593   new_path=`$CYGPATH -u "$path"`
21594 
21595   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21596   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21597   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21598   # "foo.exe" is OK but "foo" is an error.
21599   #
21600   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21601   # It is also a way to make sure we got the proper file name for the real test later on.
21602   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21603   if test "x$test_shortpath" = x; then
21604     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21605 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21606     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21607   fi
21608 
21609   # Call helper function which possibly converts this using DOS-style short mode.
21610   # If so, the updated path is stored in $new_path.
21611 
21612   input_path="$new_path"
21613   # Check if we need to convert this using DOS-style short mode. If the path
21614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21615   # take no chances and rewrite it.
21616   # Note: m4 eats our [], so we need to use [ and ] instead.
21617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21618   if test "x$has_forbidden_chars" != x; then
21619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21620     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21621     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21622     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21623       # Going to short mode and back again did indeed matter. Since short mode is
21624       # case insensitive, let's make it lowercase to improve readability.
21625       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21626       # Now convert it back to Unix-stile (cygpath)
21627       input_path=`$CYGPATH -u "$shortmode_path"`
21628       new_path="$input_path"
21629     fi
21630   fi
21631 
21632   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21633   if test "x$test_cygdrive_prefix" = x; then
21634     # As a simple fix, exclude /usr/bin since it's not a real path.
21635     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21636       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21637       # a path prefixed by /cygdrive for fixpath to work.
21638       new_path="$CYGWIN_ROOT_PATH$input_path"
21639     fi
21640   fi
21641 
21642 
21643   if test "x$path" != "x$new_path"; then
21644     JAVA_HOME_PROCESSED="$new_path"
21645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21646 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21647   fi
21648 
21649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21650 
21651   path="$JAVA_HOME_PROCESSED"
21652   has_colon=`$ECHO $path | $GREP ^.:`
21653   new_path="$path"
21654   if test "x$has_colon" = x; then
21655     # Not in mixed or Windows style, start by that.
21656     new_path=`cmd //c echo $path`
21657   fi
21658 
21659 
21660   input_path="$new_path"
21661   # Check if we need to convert this using DOS-style short mode. If the path
21662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21663   # take no chances and rewrite it.
21664   # Note: m4 eats our [], so we need to use [ and ] instead.
21665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21666   if test "x$has_forbidden_chars" != x; then
21667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21669   fi
21670 
21671 
21672   windows_path="$new_path"
21673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21674     unix_path=`$CYGPATH -u "$windows_path"`
21675     new_path="$unix_path"
21676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21678     new_path="$unix_path"
21679   fi
21680 
21681   if test "x$path" != "x$new_path"; then
21682     JAVA_HOME_PROCESSED="$new_path"
21683     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21684 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21685   fi
21686 
21687   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21688   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21689 
21690   else
21691     # We're on a unix platform. Hooray! :)
21692     path="$JAVA_HOME_PROCESSED"
21693     has_space=`$ECHO "$path" | $GREP " "`
21694     if test "x$has_space" != x; then
21695       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21696 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21697       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21698     fi
21699 
21700     # Use eval to expand a potential ~
21701     eval path="$path"
21702     if test ! -f "$path" && test ! -d "$path"; then
21703       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21704     fi
21705 
21706     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21707   fi
21708 
21709     if test ! -d "$JAVA_HOME_PROCESSED"; then
21710       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21711 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21712     else
21713       # Aha, the user has set a JAVA_HOME
21714       # let us use that as the Boot JDK.
21715       BOOT_JDK="$JAVA_HOME_PROCESSED"
21716       BOOT_JDK_FOUND=maybe
21717       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21718 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21719     fi
21720   fi
21721 
21722 
21723     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21724     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21725       # Do we have a bin/java?
21726       if test ! -x "$BOOT_JDK/bin/java"; then
21727         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21728 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21729         BOOT_JDK_FOUND=no
21730       else
21731         # Do we have a bin/javac?
21732         if test ! -x "$BOOT_JDK/bin/javac"; then
21733           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21734 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21735           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21736 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21737           BOOT_JDK_FOUND=no
21738         else
21739           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21740           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21741 
21742           # Extra M4 quote needed to protect [] in grep expression.
21743           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21744           if test "x$FOUND_CORRECT_VERSION" = x; then
21745             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21746 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21747             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21748 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21749             BOOT_JDK_FOUND=no
21750           else
21751             # We're done! :-)
21752             BOOT_JDK_FOUND=yes
21753 
21754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21755 
21756   # Input might be given as Windows format, start by converting to
21757   # unix format.
21758   path="$BOOT_JDK"
21759   new_path=`$CYGPATH -u "$path"`
21760 
21761   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21762   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21763   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21764   # "foo.exe" is OK but "foo" is an error.
21765   #
21766   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21767   # It is also a way to make sure we got the proper file name for the real test later on.
21768   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21769   if test "x$test_shortpath" = x; then
21770     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21771 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21772     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21773   fi
21774 
21775   # Call helper function which possibly converts this using DOS-style short mode.
21776   # If so, the updated path is stored in $new_path.
21777 
21778   input_path="$new_path"
21779   # Check if we need to convert this using DOS-style short mode. If the path
21780   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21781   # take no chances and rewrite it.
21782   # Note: m4 eats our [], so we need to use [ and ] instead.
21783   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21784   if test "x$has_forbidden_chars" != x; then
21785     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21786     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21787     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21788     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21789       # Going to short mode and back again did indeed matter. Since short mode is
21790       # case insensitive, let's make it lowercase to improve readability.
21791       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21792       # Now convert it back to Unix-stile (cygpath)
21793       input_path=`$CYGPATH -u "$shortmode_path"`
21794       new_path="$input_path"
21795     fi
21796   fi
21797 
21798   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21799   if test "x$test_cygdrive_prefix" = x; then
21800     # As a simple fix, exclude /usr/bin since it's not a real path.
21801     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21802       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21803       # a path prefixed by /cygdrive for fixpath to work.
21804       new_path="$CYGWIN_ROOT_PATH$input_path"
21805     fi
21806   fi
21807 
21808 
21809   if test "x$path" != "x$new_path"; then
21810     BOOT_JDK="$new_path"
21811     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21812 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21813   fi
21814 
21815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21816 
21817   path="$BOOT_JDK"
21818   has_colon=`$ECHO $path | $GREP ^.:`
21819   new_path="$path"
21820   if test "x$has_colon" = x; then
21821     # Not in mixed or Windows style, start by that.
21822     new_path=`cmd //c echo $path`
21823   fi
21824 
21825 
21826   input_path="$new_path"
21827   # Check if we need to convert this using DOS-style short mode. If the path
21828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21829   # take no chances and rewrite it.
21830   # Note: m4 eats our [], so we need to use [ and ] instead.
21831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21832   if test "x$has_forbidden_chars" != x; then
21833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21835   fi
21836 
21837 
21838   windows_path="$new_path"
21839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21840     unix_path=`$CYGPATH -u "$windows_path"`
21841     new_path="$unix_path"
21842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21844     new_path="$unix_path"
21845   fi
21846 
21847   if test "x$path" != "x$new_path"; then
21848     BOOT_JDK="$new_path"
21849     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21850 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21851   fi
21852 
21853   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21854   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21855 
21856   else
21857     # We're on a unix platform. Hooray! :)
21858     path="$BOOT_JDK"
21859     has_space=`$ECHO "$path" | $GREP " "`
21860     if test "x$has_space" != x; then
21861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21862 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21863       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21864     fi
21865 
21866     # Use eval to expand a potential ~
21867     eval path="$path"
21868     if test ! -f "$path" && test ! -d "$path"; then
21869       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21870     fi
21871 
21872     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21873   fi
21874 
21875             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21876 $as_echo_n "checking for Boot JDK... " >&6; }
21877             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21878 $as_echo "$BOOT_JDK" >&6; }
21879             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21880 $as_echo_n "checking Boot JDK version... " >&6; }
21881             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21882             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21883 $as_echo "$BOOT_JDK_VERSION" >&6; }
21884           fi # end check jdk version
21885         fi # end check javac
21886       fi # end check java
21887     fi # end check boot jdk found
21888   fi
21889 
21890 
21891   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21892 
21893   if test "x$BOOT_JDK_FOUND" = xno; then
21894     # Now execute the test
21895 
21896   # Extract the first word of "javac", so it can be a program name with args.
21897 set dummy javac; ac_word=$2
21898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21899 $as_echo_n "checking for $ac_word... " >&6; }
21900 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21901   $as_echo_n "(cached) " >&6
21902 else
21903   case $JAVAC_CHECK in
21904   [\\/]* | ?:[\\/]*)
21905   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21906   ;;
21907   *)
21908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21909 for as_dir in $PATH
21910 do
21911   IFS=$as_save_IFS
21912   test -z "$as_dir" && as_dir=.
21913     for ac_exec_ext in '' $ac_executable_extensions; do
21914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21915     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21917     break 2
21918   fi
21919 done
21920   done
21921 IFS=$as_save_IFS
21922 
21923   ;;
21924 esac
21925 fi
21926 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21927 if test -n "$JAVAC_CHECK"; then
21928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21929 $as_echo "$JAVAC_CHECK" >&6; }
21930 else
21931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21932 $as_echo "no" >&6; }
21933 fi
21934 
21935 
21936   # Extract the first word of "java", so it can be a program name with args.
21937 set dummy java; ac_word=$2
21938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21939 $as_echo_n "checking for $ac_word... " >&6; }
21940 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21941   $as_echo_n "(cached) " >&6
21942 else
21943   case $JAVA_CHECK in
21944   [\\/]* | ?:[\\/]*)
21945   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21946   ;;
21947   *)
21948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21949 for as_dir in $PATH
21950 do
21951   IFS=$as_save_IFS
21952   test -z "$as_dir" && as_dir=.
21953     for ac_exec_ext in '' $ac_executable_extensions; do
21954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21955     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21957     break 2
21958   fi
21959 done
21960   done
21961 IFS=$as_save_IFS
21962 
21963   ;;
21964 esac
21965 fi
21966 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21967 if test -n "$JAVA_CHECK"; then
21968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21969 $as_echo "$JAVA_CHECK" >&6; }
21970 else
21971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21972 $as_echo "no" >&6; }
21973 fi
21974 
21975 
21976   BINARY="$JAVAC_CHECK"
21977   if test "x$JAVAC_CHECK" = x; then
21978     BINARY="$JAVA_CHECK"
21979   fi
21980   if test "x$BINARY" != x; then
21981     # So there is a java(c) binary, it might be part of a JDK.
21982     # Lets find the JDK/JRE directory by following symbolic links.
21983     # Linux/GNU systems often have links from /usr/bin/java to
21984     # /etc/alternatives/java to the real JDK binary.
21985 
21986   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21987     # Follow a chain of symbolic links. Use readlink
21988     # where it exists, else fall back to horribly
21989     # complicated shell code.
21990     if test "x$READLINK_TESTED" != yes; then
21991       # On MacOSX there is a readlink tool with a different
21992       # purpose than the GNU readlink tool. Check the found readlink.
21993       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21994       if test "x$ISGNU" = x; then
21995         # A readlink that we do not know how to use.
21996         # Are there other non-GNU readlinks out there?
21997         READLINK_TESTED=yes
21998         READLINK=
21999       fi
22000     fi
22001 
22002     if test "x$READLINK" != x; then
22003       BINARY=`$READLINK -f $BINARY`
22004     else
22005       # Save the current directory for restoring afterwards
22006       STARTDIR=$PWD
22007       COUNTER=0
22008       sym_link_dir=`$DIRNAME $BINARY`
22009       sym_link_file=`$BASENAME $BINARY`
22010       cd $sym_link_dir
22011       # Use -P flag to resolve symlinks in directories.
22012       cd `$THEPWDCMD -P`
22013       sym_link_dir=`$THEPWDCMD -P`
22014       # Resolve file symlinks
22015       while test $COUNTER -lt 20; do
22016         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22017         if test "x$ISLINK" == x; then
22018           # This is not a symbolic link! We are done!
22019           break
22020         fi
22021         # Again resolve directory symlinks since the target of the just found
22022         # link could be in a different directory
22023         cd `$DIRNAME $ISLINK`
22024         sym_link_dir=`$THEPWDCMD -P`
22025         sym_link_file=`$BASENAME $ISLINK`
22026         let COUNTER=COUNTER+1
22027       done
22028       cd $STARTDIR
22029       BINARY=$sym_link_dir/$sym_link_file
22030     fi
22031   fi
22032 
22033     BOOT_JDK=`dirname "$BINARY"`
22034     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22035     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22036       # Looks like we found ourselves an JDK
22037       BOOT_JDK_FOUND=maybe
22038       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22039 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22040     fi
22041   fi
22042 
22043 
22044     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22045     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22046       # Do we have a bin/java?
22047       if test ! -x "$BOOT_JDK/bin/java"; then
22048         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22049 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22050         BOOT_JDK_FOUND=no
22051       else
22052         # Do we have a bin/javac?
22053         if test ! -x "$BOOT_JDK/bin/javac"; then
22054           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22055 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22056           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22057 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22058           BOOT_JDK_FOUND=no
22059         else
22060           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22061           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22062 
22063           # Extra M4 quote needed to protect [] in grep expression.
22064           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22065           if test "x$FOUND_CORRECT_VERSION" = x; then
22066             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22067 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22068             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22069 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22070             BOOT_JDK_FOUND=no
22071           else
22072             # We're done! :-)
22073             BOOT_JDK_FOUND=yes
22074 
22075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22076 
22077   # Input might be given as Windows format, start by converting to
22078   # unix format.
22079   path="$BOOT_JDK"
22080   new_path=`$CYGPATH -u "$path"`
22081 
22082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22085   # "foo.exe" is OK but "foo" is an error.
22086   #
22087   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22088   # It is also a way to make sure we got the proper file name for the real test later on.
22089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22090   if test "x$test_shortpath" = x; then
22091     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22093     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22094   fi
22095 
22096   # Call helper function which possibly converts this using DOS-style short mode.
22097   # If so, the updated path is stored in $new_path.
22098 
22099   input_path="$new_path"
22100   # Check if we need to convert this using DOS-style short mode. If the path
22101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22102   # take no chances and rewrite it.
22103   # Note: m4 eats our [], so we need to use [ and ] instead.
22104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22105   if test "x$has_forbidden_chars" != x; then
22106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22110       # Going to short mode and back again did indeed matter. Since short mode is
22111       # case insensitive, let's make it lowercase to improve readability.
22112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22113       # Now convert it back to Unix-stile (cygpath)
22114       input_path=`$CYGPATH -u "$shortmode_path"`
22115       new_path="$input_path"
22116     fi
22117   fi
22118 
22119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22120   if test "x$test_cygdrive_prefix" = x; then
22121     # As a simple fix, exclude /usr/bin since it's not a real path.
22122     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22124       # a path prefixed by /cygdrive for fixpath to work.
22125       new_path="$CYGWIN_ROOT_PATH$input_path"
22126     fi
22127   fi
22128 
22129 
22130   if test "x$path" != "x$new_path"; then
22131     BOOT_JDK="$new_path"
22132     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22133 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22134   fi
22135 
22136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22137 
22138   path="$BOOT_JDK"
22139   has_colon=`$ECHO $path | $GREP ^.:`
22140   new_path="$path"
22141   if test "x$has_colon" = x; then
22142     # Not in mixed or Windows style, start by that.
22143     new_path=`cmd //c echo $path`
22144   fi
22145 
22146 
22147   input_path="$new_path"
22148   # Check if we need to convert this using DOS-style short mode. If the path
22149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22150   # take no chances and rewrite it.
22151   # Note: m4 eats our [], so we need to use [ and ] instead.
22152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22153   if test "x$has_forbidden_chars" != x; then
22154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22155     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22156   fi
22157 
22158 
22159   windows_path="$new_path"
22160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22161     unix_path=`$CYGPATH -u "$windows_path"`
22162     new_path="$unix_path"
22163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22164     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22165     new_path="$unix_path"
22166   fi
22167 
22168   if test "x$path" != "x$new_path"; then
22169     BOOT_JDK="$new_path"
22170     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22171 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22172   fi
22173 
22174   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22175   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22176 
22177   else
22178     # We're on a unix platform. Hooray! :)
22179     path="$BOOT_JDK"
22180     has_space=`$ECHO "$path" | $GREP " "`
22181     if test "x$has_space" != x; then
22182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22183 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22184       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22185     fi
22186 
22187     # Use eval to expand a potential ~
22188     eval path="$path"
22189     if test ! -f "$path" && test ! -d "$path"; then
22190       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22191     fi
22192 
22193     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22194   fi
22195 
22196             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22197 $as_echo_n "checking for Boot JDK... " >&6; }
22198             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22199 $as_echo "$BOOT_JDK" >&6; }
22200             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22201 $as_echo_n "checking Boot JDK version... " >&6; }
22202             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22203             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22204 $as_echo "$BOOT_JDK_VERSION" >&6; }
22205           fi # end check jdk version
22206         fi # end check javac
22207       fi # end check java
22208     fi # end check boot jdk found
22209   fi
22210 
22211 
22212   # Test: Is there a JDK installed in default, well-known locations?
22213 
22214   if test "x$BOOT_JDK_FOUND" = xno; then
22215     # Now execute the test
22216 
22217   if test "x$OPENJDK_TARGET_OS" = xwindows; then
22218 
22219   if test "x$BOOT_JDK_FOUND" = xno; then
22220     # Now execute the test
22221 
22222   if test "x$ProgramW6432" != x; then
22223     VIRTUAL_DIR="$ProgramW6432/Java"
22224 
22225   windows_path="$VIRTUAL_DIR"
22226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22227     unix_path=`$CYGPATH -u "$windows_path"`
22228     VIRTUAL_DIR="$unix_path"
22229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22231     VIRTUAL_DIR="$unix_path"
22232   fi
22233 
22234 
22235   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22236   BOOT_JDK_SUFFIX=""
22237   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22238   if test "x$ALL_JDKS_FOUND" != x; then
22239     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22240 
22241   if test "x$BOOT_JDK_FOUND" = xno; then
22242     # Now execute the test
22243 
22244         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22245         if test -d "$BOOT_JDK"; then
22246           BOOT_JDK_FOUND=maybe
22247           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22248 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22249         fi
22250 
22251 
22252     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22253     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22254       # Do we have a bin/java?
22255       if test ! -x "$BOOT_JDK/bin/java"; then
22256         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22257 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22258         BOOT_JDK_FOUND=no
22259       else
22260         # Do we have a bin/javac?
22261         if test ! -x "$BOOT_JDK/bin/javac"; then
22262           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22263 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22264           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22265 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22266           BOOT_JDK_FOUND=no
22267         else
22268           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22269           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22270 
22271           # Extra M4 quote needed to protect [] in grep expression.
22272           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22273           if test "x$FOUND_CORRECT_VERSION" = x; then
22274             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22275 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22276             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22277 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22278             BOOT_JDK_FOUND=no
22279           else
22280             # We're done! :-)
22281             BOOT_JDK_FOUND=yes
22282 
22283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22284 
22285   # Input might be given as Windows format, start by converting to
22286   # unix format.
22287   path="$BOOT_JDK"
22288   new_path=`$CYGPATH -u "$path"`
22289 
22290   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22291   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22292   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22293   # "foo.exe" is OK but "foo" is an error.
22294   #
22295   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22296   # It is also a way to make sure we got the proper file name for the real test later on.
22297   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22298   if test "x$test_shortpath" = x; then
22299     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22300 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22301     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22302   fi
22303 
22304   # Call helper function which possibly converts this using DOS-style short mode.
22305   # If so, the updated path is stored in $new_path.
22306 
22307   input_path="$new_path"
22308   # Check if we need to convert this using DOS-style short mode. If the path
22309   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22310   # take no chances and rewrite it.
22311   # Note: m4 eats our [], so we need to use [ and ] instead.
22312   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22313   if test "x$has_forbidden_chars" != x; then
22314     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22315     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22316     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22317     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22318       # Going to short mode and back again did indeed matter. Since short mode is
22319       # case insensitive, let's make it lowercase to improve readability.
22320       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22321       # Now convert it back to Unix-stile (cygpath)
22322       input_path=`$CYGPATH -u "$shortmode_path"`
22323       new_path="$input_path"
22324     fi
22325   fi
22326 
22327   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22328   if test "x$test_cygdrive_prefix" = x; then
22329     # As a simple fix, exclude /usr/bin since it's not a real path.
22330     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22331       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22332       # a path prefixed by /cygdrive for fixpath to work.
22333       new_path="$CYGWIN_ROOT_PATH$input_path"
22334     fi
22335   fi
22336 
22337 
22338   if test "x$path" != "x$new_path"; then
22339     BOOT_JDK="$new_path"
22340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22341 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22342   fi
22343 
22344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22345 
22346   path="$BOOT_JDK"
22347   has_colon=`$ECHO $path | $GREP ^.:`
22348   new_path="$path"
22349   if test "x$has_colon" = x; then
22350     # Not in mixed or Windows style, start by that.
22351     new_path=`cmd //c echo $path`
22352   fi
22353 
22354 
22355   input_path="$new_path"
22356   # Check if we need to convert this using DOS-style short mode. If the path
22357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22358   # take no chances and rewrite it.
22359   # Note: m4 eats our [], so we need to use [ and ] instead.
22360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22361   if test "x$has_forbidden_chars" != x; then
22362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22363     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22364   fi
22365 
22366 
22367   windows_path="$new_path"
22368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22369     unix_path=`$CYGPATH -u "$windows_path"`
22370     new_path="$unix_path"
22371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22373     new_path="$unix_path"
22374   fi
22375 
22376   if test "x$path" != "x$new_path"; then
22377     BOOT_JDK="$new_path"
22378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22379 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22380   fi
22381 
22382   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22383   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22384 
22385   else
22386     # We're on a unix platform. Hooray! :)
22387     path="$BOOT_JDK"
22388     has_space=`$ECHO "$path" | $GREP " "`
22389     if test "x$has_space" != x; then
22390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22391 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22392       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22393     fi
22394 
22395     # Use eval to expand a potential ~
22396     eval path="$path"
22397     if test ! -f "$path" && test ! -d "$path"; then
22398       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22399     fi
22400 
22401     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22402   fi
22403 
22404             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22405 $as_echo_n "checking for Boot JDK... " >&6; }
22406             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22407 $as_echo "$BOOT_JDK" >&6; }
22408             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22409 $as_echo_n "checking Boot JDK version... " >&6; }
22410             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22411             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22412 $as_echo "$BOOT_JDK_VERSION" >&6; }
22413           fi # end check jdk version
22414         fi # end check javac
22415       fi # end check java
22416     fi # end check boot jdk found
22417   fi
22418 
22419     done
22420   fi
22421 
22422   fi
22423 
22424 
22425     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22426     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22427       # Do we have a bin/java?
22428       if test ! -x "$BOOT_JDK/bin/java"; then
22429         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22430 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22431         BOOT_JDK_FOUND=no
22432       else
22433         # Do we have a bin/javac?
22434         if test ! -x "$BOOT_JDK/bin/javac"; then
22435           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22436 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22437           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22438 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22439           BOOT_JDK_FOUND=no
22440         else
22441           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22442           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22443 
22444           # Extra M4 quote needed to protect [] in grep expression.
22445           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22446           if test "x$FOUND_CORRECT_VERSION" = x; then
22447             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22448 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22449             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22450 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22451             BOOT_JDK_FOUND=no
22452           else
22453             # We're done! :-)
22454             BOOT_JDK_FOUND=yes
22455 
22456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22457 
22458   # Input might be given as Windows format, start by converting to
22459   # unix format.
22460   path="$BOOT_JDK"
22461   new_path=`$CYGPATH -u "$path"`
22462 
22463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22466   # "foo.exe" is OK but "foo" is an error.
22467   #
22468   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22469   # It is also a way to make sure we got the proper file name for the real test later on.
22470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22471   if test "x$test_shortpath" = x; then
22472     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22473 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22474     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22475   fi
22476 
22477   # Call helper function which possibly converts this using DOS-style short mode.
22478   # If so, the updated path is stored in $new_path.
22479 
22480   input_path="$new_path"
22481   # Check if we need to convert this using DOS-style short mode. If the path
22482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22483   # take no chances and rewrite it.
22484   # Note: m4 eats our [], so we need to use [ and ] instead.
22485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22486   if test "x$has_forbidden_chars" != x; then
22487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22488     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22489     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22490     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22491       # Going to short mode and back again did indeed matter. Since short mode is
22492       # case insensitive, let's make it lowercase to improve readability.
22493       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22494       # Now convert it back to Unix-stile (cygpath)
22495       input_path=`$CYGPATH -u "$shortmode_path"`
22496       new_path="$input_path"
22497     fi
22498   fi
22499 
22500   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22501   if test "x$test_cygdrive_prefix" = x; then
22502     # As a simple fix, exclude /usr/bin since it's not a real path.
22503     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22504       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22505       # a path prefixed by /cygdrive for fixpath to work.
22506       new_path="$CYGWIN_ROOT_PATH$input_path"
22507     fi
22508   fi
22509 
22510 
22511   if test "x$path" != "x$new_path"; then
22512     BOOT_JDK="$new_path"
22513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22514 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22515   fi
22516 
22517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22518 
22519   path="$BOOT_JDK"
22520   has_colon=`$ECHO $path | $GREP ^.:`
22521   new_path="$path"
22522   if test "x$has_colon" = x; then
22523     # Not in mixed or Windows style, start by that.
22524     new_path=`cmd //c echo $path`
22525   fi
22526 
22527 
22528   input_path="$new_path"
22529   # Check if we need to convert this using DOS-style short mode. If the path
22530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22531   # take no chances and rewrite it.
22532   # Note: m4 eats our [], so we need to use [ and ] instead.
22533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22534   if test "x$has_forbidden_chars" != x; then
22535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22536     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22537   fi
22538 
22539 
22540   windows_path="$new_path"
22541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22542     unix_path=`$CYGPATH -u "$windows_path"`
22543     new_path="$unix_path"
22544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22546     new_path="$unix_path"
22547   fi
22548 
22549   if test "x$path" != "x$new_path"; then
22550     BOOT_JDK="$new_path"
22551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22552 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22553   fi
22554 
22555   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22556   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22557 
22558   else
22559     # We're on a unix platform. Hooray! :)
22560     path="$BOOT_JDK"
22561     has_space=`$ECHO "$path" | $GREP " "`
22562     if test "x$has_space" != x; then
22563       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22564 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22565       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22566     fi
22567 
22568     # Use eval to expand a potential ~
22569     eval path="$path"
22570     if test ! -f "$path" && test ! -d "$path"; then
22571       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22572     fi
22573 
22574     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22575   fi
22576 
22577             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22578 $as_echo_n "checking for Boot JDK... " >&6; }
22579             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22580 $as_echo "$BOOT_JDK" >&6; }
22581             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22582 $as_echo_n "checking Boot JDK version... " >&6; }
22583             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22584             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22585 $as_echo "$BOOT_JDK_VERSION" >&6; }
22586           fi # end check jdk version
22587         fi # end check javac
22588       fi # end check java
22589     fi # end check boot jdk found
22590   fi
22591 
22592 
22593   if test "x$BOOT_JDK_FOUND" = xno; then
22594     # Now execute the test
22595 
22596   if test "x$PROGRAMW6432" != x; then
22597     VIRTUAL_DIR="$PROGRAMW6432/Java"
22598 
22599   windows_path="$VIRTUAL_DIR"
22600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22601     unix_path=`$CYGPATH -u "$windows_path"`
22602     VIRTUAL_DIR="$unix_path"
22603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22605     VIRTUAL_DIR="$unix_path"
22606   fi
22607 
22608 
22609   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22610   BOOT_JDK_SUFFIX=""
22611   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22612   if test "x$ALL_JDKS_FOUND" != x; then
22613     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22614 
22615   if test "x$BOOT_JDK_FOUND" = xno; then
22616     # Now execute the test
22617 
22618         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22619         if test -d "$BOOT_JDK"; then
22620           BOOT_JDK_FOUND=maybe
22621           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22622 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22623         fi
22624 
22625 
22626     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22627     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22628       # Do we have a bin/java?
22629       if test ! -x "$BOOT_JDK/bin/java"; then
22630         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22631 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22632         BOOT_JDK_FOUND=no
22633       else
22634         # Do we have a bin/javac?
22635         if test ! -x "$BOOT_JDK/bin/javac"; then
22636           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22637 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22638           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22639 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22640           BOOT_JDK_FOUND=no
22641         else
22642           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22643           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22644 
22645           # Extra M4 quote needed to protect [] in grep expression.
22646           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22647           if test "x$FOUND_CORRECT_VERSION" = x; then
22648             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22649 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22650             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22651 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22652             BOOT_JDK_FOUND=no
22653           else
22654             # We're done! :-)
22655             BOOT_JDK_FOUND=yes
22656 
22657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22658 
22659   # Input might be given as Windows format, start by converting to
22660   # unix format.
22661   path="$BOOT_JDK"
22662   new_path=`$CYGPATH -u "$path"`
22663 
22664   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22665   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22666   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22667   # "foo.exe" is OK but "foo" is an error.
22668   #
22669   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22670   # It is also a way to make sure we got the proper file name for the real test later on.
22671   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22672   if test "x$test_shortpath" = x; then
22673     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22674 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22675     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22676   fi
22677 
22678   # Call helper function which possibly converts this using DOS-style short mode.
22679   # If so, the updated path is stored in $new_path.
22680 
22681   input_path="$new_path"
22682   # Check if we need to convert this using DOS-style short mode. If the path
22683   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22684   # take no chances and rewrite it.
22685   # Note: m4 eats our [], so we need to use [ and ] instead.
22686   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22687   if test "x$has_forbidden_chars" != x; then
22688     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22689     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22690     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22691     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22692       # Going to short mode and back again did indeed matter. Since short mode is
22693       # case insensitive, let's make it lowercase to improve readability.
22694       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22695       # Now convert it back to Unix-stile (cygpath)
22696       input_path=`$CYGPATH -u "$shortmode_path"`
22697       new_path="$input_path"
22698     fi
22699   fi
22700 
22701   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22702   if test "x$test_cygdrive_prefix" = x; then
22703     # As a simple fix, exclude /usr/bin since it's not a real path.
22704     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22705       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22706       # a path prefixed by /cygdrive for fixpath to work.
22707       new_path="$CYGWIN_ROOT_PATH$input_path"
22708     fi
22709   fi
22710 
22711 
22712   if test "x$path" != "x$new_path"; then
22713     BOOT_JDK="$new_path"
22714     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22715 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22716   fi
22717 
22718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22719 
22720   path="$BOOT_JDK"
22721   has_colon=`$ECHO $path | $GREP ^.:`
22722   new_path="$path"
22723   if test "x$has_colon" = x; then
22724     # Not in mixed or Windows style, start by that.
22725     new_path=`cmd //c echo $path`
22726   fi
22727 
22728 
22729   input_path="$new_path"
22730   # Check if we need to convert this using DOS-style short mode. If the path
22731   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22732   # take no chances and rewrite it.
22733   # Note: m4 eats our [], so we need to use [ and ] instead.
22734   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22735   if test "x$has_forbidden_chars" != x; then
22736     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22737     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22738   fi
22739 
22740 
22741   windows_path="$new_path"
22742   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22743     unix_path=`$CYGPATH -u "$windows_path"`
22744     new_path="$unix_path"
22745   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22746     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22747     new_path="$unix_path"
22748   fi
22749 
22750   if test "x$path" != "x$new_path"; then
22751     BOOT_JDK="$new_path"
22752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22753 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22754   fi
22755 
22756   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22757   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22758 
22759   else
22760     # We're on a unix platform. Hooray! :)
22761     path="$BOOT_JDK"
22762     has_space=`$ECHO "$path" | $GREP " "`
22763     if test "x$has_space" != x; then
22764       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22765 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22766       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22767     fi
22768 
22769     # Use eval to expand a potential ~
22770     eval path="$path"
22771     if test ! -f "$path" && test ! -d "$path"; then
22772       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22773     fi
22774 
22775     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22776   fi
22777 
22778             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22779 $as_echo_n "checking for Boot JDK... " >&6; }
22780             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22781 $as_echo "$BOOT_JDK" >&6; }
22782             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22783 $as_echo_n "checking Boot JDK version... " >&6; }
22784             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22785             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22786 $as_echo "$BOOT_JDK_VERSION" >&6; }
22787           fi # end check jdk version
22788         fi # end check javac
22789       fi # end check java
22790     fi # end check boot jdk found
22791   fi
22792 
22793     done
22794   fi
22795 
22796   fi
22797 
22798 
22799     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22800     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22801       # Do we have a bin/java?
22802       if test ! -x "$BOOT_JDK/bin/java"; then
22803         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22804 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22805         BOOT_JDK_FOUND=no
22806       else
22807         # Do we have a bin/javac?
22808         if test ! -x "$BOOT_JDK/bin/javac"; then
22809           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22810 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22811           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22812 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22813           BOOT_JDK_FOUND=no
22814         else
22815           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22816           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22817 
22818           # Extra M4 quote needed to protect [] in grep expression.
22819           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22820           if test "x$FOUND_CORRECT_VERSION" = x; then
22821             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22822 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22823             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22824 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22825             BOOT_JDK_FOUND=no
22826           else
22827             # We're done! :-)
22828             BOOT_JDK_FOUND=yes
22829 
22830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22831 
22832   # Input might be given as Windows format, start by converting to
22833   # unix format.
22834   path="$BOOT_JDK"
22835   new_path=`$CYGPATH -u "$path"`
22836 
22837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22840   # "foo.exe" is OK but "foo" is an error.
22841   #
22842   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22843   # It is also a way to make sure we got the proper file name for the real test later on.
22844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22845   if test "x$test_shortpath" = x; then
22846     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22847 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22848     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22849   fi
22850 
22851   # Call helper function which possibly converts this using DOS-style short mode.
22852   # If so, the updated path is stored in $new_path.
22853 
22854   input_path="$new_path"
22855   # Check if we need to convert this using DOS-style short mode. If the path
22856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22857   # take no chances and rewrite it.
22858   # Note: m4 eats our [], so we need to use [ and ] instead.
22859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22860   if test "x$has_forbidden_chars" != x; then
22861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22865       # Going to short mode and back again did indeed matter. Since short mode is
22866       # case insensitive, let's make it lowercase to improve readability.
22867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22868       # Now convert it back to Unix-stile (cygpath)
22869       input_path=`$CYGPATH -u "$shortmode_path"`
22870       new_path="$input_path"
22871     fi
22872   fi
22873 
22874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22875   if test "x$test_cygdrive_prefix" = x; then
22876     # As a simple fix, exclude /usr/bin since it's not a real path.
22877     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22879       # a path prefixed by /cygdrive for fixpath to work.
22880       new_path="$CYGWIN_ROOT_PATH$input_path"
22881     fi
22882   fi
22883 
22884 
22885   if test "x$path" != "x$new_path"; then
22886     BOOT_JDK="$new_path"
22887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22888 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22889   fi
22890 
22891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22892 
22893   path="$BOOT_JDK"
22894   has_colon=`$ECHO $path | $GREP ^.:`
22895   new_path="$path"
22896   if test "x$has_colon" = x; then
22897     # Not in mixed or Windows style, start by that.
22898     new_path=`cmd //c echo $path`
22899   fi
22900 
22901 
22902   input_path="$new_path"
22903   # Check if we need to convert this using DOS-style short mode. If the path
22904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22905   # take no chances and rewrite it.
22906   # Note: m4 eats our [], so we need to use [ and ] instead.
22907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22908   if test "x$has_forbidden_chars" != x; then
22909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22910     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22911   fi
22912 
22913 
22914   windows_path="$new_path"
22915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22916     unix_path=`$CYGPATH -u "$windows_path"`
22917     new_path="$unix_path"
22918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22920     new_path="$unix_path"
22921   fi
22922 
22923   if test "x$path" != "x$new_path"; then
22924     BOOT_JDK="$new_path"
22925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22926 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22927   fi
22928 
22929   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22930   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22931 
22932   else
22933     # We're on a unix platform. Hooray! :)
22934     path="$BOOT_JDK"
22935     has_space=`$ECHO "$path" | $GREP " "`
22936     if test "x$has_space" != x; then
22937       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22938 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22939       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22940     fi
22941 
22942     # Use eval to expand a potential ~
22943     eval path="$path"
22944     if test ! -f "$path" && test ! -d "$path"; then
22945       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22946     fi
22947 
22948     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22949   fi
22950 
22951             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22952 $as_echo_n "checking for Boot JDK... " >&6; }
22953             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22954 $as_echo "$BOOT_JDK" >&6; }
22955             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22956 $as_echo_n "checking Boot JDK version... " >&6; }
22957             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22958             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22959 $as_echo "$BOOT_JDK_VERSION" >&6; }
22960           fi # end check jdk version
22961         fi # end check javac
22962       fi # end check java
22963     fi # end check boot jdk found
22964   fi
22965 
22966 
22967   if test "x$BOOT_JDK_FOUND" = xno; then
22968     # Now execute the test
22969 
22970   if test "x$PROGRAMFILES" != x; then
22971     VIRTUAL_DIR="$PROGRAMFILES/Java"
22972 
22973   windows_path="$VIRTUAL_DIR"
22974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22975     unix_path=`$CYGPATH -u "$windows_path"`
22976     VIRTUAL_DIR="$unix_path"
22977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22979     VIRTUAL_DIR="$unix_path"
22980   fi
22981 
22982 
22983   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22984   BOOT_JDK_SUFFIX=""
22985   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22986   if test "x$ALL_JDKS_FOUND" != x; then
22987     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22988 
22989   if test "x$BOOT_JDK_FOUND" = xno; then
22990     # Now execute the test
22991 
22992         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22993         if test -d "$BOOT_JDK"; then
22994           BOOT_JDK_FOUND=maybe
22995           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22996 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22997         fi
22998 
22999 
23000     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23001     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23002       # Do we have a bin/java?
23003       if test ! -x "$BOOT_JDK/bin/java"; then
23004         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23005 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23006         BOOT_JDK_FOUND=no
23007       else
23008         # Do we have a bin/javac?
23009         if test ! -x "$BOOT_JDK/bin/javac"; then
23010           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23011 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23012           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23013 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23014           BOOT_JDK_FOUND=no
23015         else
23016           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23017           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23018 
23019           # Extra M4 quote needed to protect [] in grep expression.
23020           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23021           if test "x$FOUND_CORRECT_VERSION" = x; then
23022             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23023 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23024             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23025 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23026             BOOT_JDK_FOUND=no
23027           else
23028             # We're done! :-)
23029             BOOT_JDK_FOUND=yes
23030 
23031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23032 
23033   # Input might be given as Windows format, start by converting to
23034   # unix format.
23035   path="$BOOT_JDK"
23036   new_path=`$CYGPATH -u "$path"`
23037 
23038   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23039   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23040   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23041   # "foo.exe" is OK but "foo" is an error.
23042   #
23043   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23044   # It is also a way to make sure we got the proper file name for the real test later on.
23045   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23046   if test "x$test_shortpath" = x; then
23047     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23048 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23049     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23050   fi
23051 
23052   # Call helper function which possibly converts this using DOS-style short mode.
23053   # If so, the updated path is stored in $new_path.
23054 
23055   input_path="$new_path"
23056   # Check if we need to convert this using DOS-style short mode. If the path
23057   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23058   # take no chances and rewrite it.
23059   # Note: m4 eats our [], so we need to use [ and ] instead.
23060   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23061   if test "x$has_forbidden_chars" != x; then
23062     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23063     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23064     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23065     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23066       # Going to short mode and back again did indeed matter. Since short mode is
23067       # case insensitive, let's make it lowercase to improve readability.
23068       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23069       # Now convert it back to Unix-stile (cygpath)
23070       input_path=`$CYGPATH -u "$shortmode_path"`
23071       new_path="$input_path"
23072     fi
23073   fi
23074 
23075   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23076   if test "x$test_cygdrive_prefix" = x; then
23077     # As a simple fix, exclude /usr/bin since it's not a real path.
23078     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23079       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23080       # a path prefixed by /cygdrive for fixpath to work.
23081       new_path="$CYGWIN_ROOT_PATH$input_path"
23082     fi
23083   fi
23084 
23085 
23086   if test "x$path" != "x$new_path"; then
23087     BOOT_JDK="$new_path"
23088     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23089 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23090   fi
23091 
23092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23093 
23094   path="$BOOT_JDK"
23095   has_colon=`$ECHO $path | $GREP ^.:`
23096   new_path="$path"
23097   if test "x$has_colon" = x; then
23098     # Not in mixed or Windows style, start by that.
23099     new_path=`cmd //c echo $path`
23100   fi
23101 
23102 
23103   input_path="$new_path"
23104   # Check if we need to convert this using DOS-style short mode. If the path
23105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23106   # take no chances and rewrite it.
23107   # Note: m4 eats our [], so we need to use [ and ] instead.
23108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23109   if test "x$has_forbidden_chars" != x; then
23110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23111     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23112   fi
23113 
23114 
23115   windows_path="$new_path"
23116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23117     unix_path=`$CYGPATH -u "$windows_path"`
23118     new_path="$unix_path"
23119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23121     new_path="$unix_path"
23122   fi
23123 
23124   if test "x$path" != "x$new_path"; then
23125     BOOT_JDK="$new_path"
23126     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23127 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23128   fi
23129 
23130   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23131   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23132 
23133   else
23134     # We're on a unix platform. Hooray! :)
23135     path="$BOOT_JDK"
23136     has_space=`$ECHO "$path" | $GREP " "`
23137     if test "x$has_space" != x; then
23138       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23139 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23140       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23141     fi
23142 
23143     # Use eval to expand a potential ~
23144     eval path="$path"
23145     if test ! -f "$path" && test ! -d "$path"; then
23146       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23147     fi
23148 
23149     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23150   fi
23151 
23152             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23153 $as_echo_n "checking for Boot JDK... " >&6; }
23154             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23155 $as_echo "$BOOT_JDK" >&6; }
23156             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23157 $as_echo_n "checking Boot JDK version... " >&6; }
23158             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23159             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23160 $as_echo "$BOOT_JDK_VERSION" >&6; }
23161           fi # end check jdk version
23162         fi # end check javac
23163       fi # end check java
23164     fi # end check boot jdk found
23165   fi
23166 
23167     done
23168   fi
23169 
23170   fi
23171 
23172 
23173     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23174     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23175       # Do we have a bin/java?
23176       if test ! -x "$BOOT_JDK/bin/java"; then
23177         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23179         BOOT_JDK_FOUND=no
23180       else
23181         # Do we have a bin/javac?
23182         if test ! -x "$BOOT_JDK/bin/javac"; then
23183           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23185           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23186 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23187           BOOT_JDK_FOUND=no
23188         else
23189           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23190           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23191 
23192           # Extra M4 quote needed to protect [] in grep expression.
23193           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23194           if test "x$FOUND_CORRECT_VERSION" = x; then
23195             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23196 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23197             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23198 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23199             BOOT_JDK_FOUND=no
23200           else
23201             # We're done! :-)
23202             BOOT_JDK_FOUND=yes
23203 
23204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23205 
23206   # Input might be given as Windows format, start by converting to
23207   # unix format.
23208   path="$BOOT_JDK"
23209   new_path=`$CYGPATH -u "$path"`
23210 
23211   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23212   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23213   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23214   # "foo.exe" is OK but "foo" is an error.
23215   #
23216   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23217   # It is also a way to make sure we got the proper file name for the real test later on.
23218   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23219   if test "x$test_shortpath" = x; then
23220     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23221 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23222     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23223   fi
23224 
23225   # Call helper function which possibly converts this using DOS-style short mode.
23226   # If so, the updated path is stored in $new_path.
23227 
23228   input_path="$new_path"
23229   # Check if we need to convert this using DOS-style short mode. If the path
23230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23231   # take no chances and rewrite it.
23232   # Note: m4 eats our [], so we need to use [ and ] instead.
23233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23234   if test "x$has_forbidden_chars" != x; then
23235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23236     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23237     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23238     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23239       # Going to short mode and back again did indeed matter. Since short mode is
23240       # case insensitive, let's make it lowercase to improve readability.
23241       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23242       # Now convert it back to Unix-stile (cygpath)
23243       input_path=`$CYGPATH -u "$shortmode_path"`
23244       new_path="$input_path"
23245     fi
23246   fi
23247 
23248   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23249   if test "x$test_cygdrive_prefix" = x; then
23250     # As a simple fix, exclude /usr/bin since it's not a real path.
23251     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23252       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23253       # a path prefixed by /cygdrive for fixpath to work.
23254       new_path="$CYGWIN_ROOT_PATH$input_path"
23255     fi
23256   fi
23257 
23258 
23259   if test "x$path" != "x$new_path"; then
23260     BOOT_JDK="$new_path"
23261     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23262 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23263   fi
23264 
23265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23266 
23267   path="$BOOT_JDK"
23268   has_colon=`$ECHO $path | $GREP ^.:`
23269   new_path="$path"
23270   if test "x$has_colon" = x; then
23271     # Not in mixed or Windows style, start by that.
23272     new_path=`cmd //c echo $path`
23273   fi
23274 
23275 
23276   input_path="$new_path"
23277   # Check if we need to convert this using DOS-style short mode. If the path
23278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23279   # take no chances and rewrite it.
23280   # Note: m4 eats our [], so we need to use [ and ] instead.
23281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23282   if test "x$has_forbidden_chars" != x; then
23283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23284     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23285   fi
23286 
23287 
23288   windows_path="$new_path"
23289   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23290     unix_path=`$CYGPATH -u "$windows_path"`
23291     new_path="$unix_path"
23292   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23293     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23294     new_path="$unix_path"
23295   fi
23296 
23297   if test "x$path" != "x$new_path"; then
23298     BOOT_JDK="$new_path"
23299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23300 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23301   fi
23302 
23303   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23304   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23305 
23306   else
23307     # We're on a unix platform. Hooray! :)
23308     path="$BOOT_JDK"
23309     has_space=`$ECHO "$path" | $GREP " "`
23310     if test "x$has_space" != x; then
23311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23312 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23313       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23314     fi
23315 
23316     # Use eval to expand a potential ~
23317     eval path="$path"
23318     if test ! -f "$path" && test ! -d "$path"; then
23319       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23320     fi
23321 
23322     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23323   fi
23324 
23325             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23326 $as_echo_n "checking for Boot JDK... " >&6; }
23327             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23328 $as_echo "$BOOT_JDK" >&6; }
23329             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23330 $as_echo_n "checking Boot JDK version... " >&6; }
23331             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23332             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23333 $as_echo "$BOOT_JDK_VERSION" >&6; }
23334           fi # end check jdk version
23335         fi # end check javac
23336       fi # end check java
23337     fi # end check boot jdk found
23338   fi
23339 
23340 
23341   if test "x$BOOT_JDK_FOUND" = xno; then
23342     # Now execute the test
23343 
23344   if test "x$ProgramFiles" != x; then
23345     VIRTUAL_DIR="$ProgramFiles/Java"
23346 
23347   windows_path="$VIRTUAL_DIR"
23348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23349     unix_path=`$CYGPATH -u "$windows_path"`
23350     VIRTUAL_DIR="$unix_path"
23351   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23352     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23353     VIRTUAL_DIR="$unix_path"
23354   fi
23355 
23356 
23357   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23358   BOOT_JDK_SUFFIX=""
23359   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23360   if test "x$ALL_JDKS_FOUND" != x; then
23361     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23362 
23363   if test "x$BOOT_JDK_FOUND" = xno; then
23364     # Now execute the test
23365 
23366         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23367         if test -d "$BOOT_JDK"; then
23368           BOOT_JDK_FOUND=maybe
23369           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23370 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23371         fi
23372 
23373 
23374     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23375     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23376       # Do we have a bin/java?
23377       if test ! -x "$BOOT_JDK/bin/java"; then
23378         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23379 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23380         BOOT_JDK_FOUND=no
23381       else
23382         # Do we have a bin/javac?
23383         if test ! -x "$BOOT_JDK/bin/javac"; then
23384           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23385 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23386           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23387 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23388           BOOT_JDK_FOUND=no
23389         else
23390           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23391           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23392 
23393           # Extra M4 quote needed to protect [] in grep expression.
23394           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23395           if test "x$FOUND_CORRECT_VERSION" = x; then
23396             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23397 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23398             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23399 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23400             BOOT_JDK_FOUND=no
23401           else
23402             # We're done! :-)
23403             BOOT_JDK_FOUND=yes
23404 
23405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23406 
23407   # Input might be given as Windows format, start by converting to
23408   # unix format.
23409   path="$BOOT_JDK"
23410   new_path=`$CYGPATH -u "$path"`
23411 
23412   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23413   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23414   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23415   # "foo.exe" is OK but "foo" is an error.
23416   #
23417   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23418   # It is also a way to make sure we got the proper file name for the real test later on.
23419   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23420   if test "x$test_shortpath" = x; then
23421     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23422 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23423     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23424   fi
23425 
23426   # Call helper function which possibly converts this using DOS-style short mode.
23427   # If so, the updated path is stored in $new_path.
23428 
23429   input_path="$new_path"
23430   # Check if we need to convert this using DOS-style short mode. If the path
23431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23432   # take no chances and rewrite it.
23433   # Note: m4 eats our [], so we need to use [ and ] instead.
23434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23435   if test "x$has_forbidden_chars" != x; then
23436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23437     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23438     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23439     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23440       # Going to short mode and back again did indeed matter. Since short mode is
23441       # case insensitive, let's make it lowercase to improve readability.
23442       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23443       # Now convert it back to Unix-stile (cygpath)
23444       input_path=`$CYGPATH -u "$shortmode_path"`
23445       new_path="$input_path"
23446     fi
23447   fi
23448 
23449   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23450   if test "x$test_cygdrive_prefix" = x; then
23451     # As a simple fix, exclude /usr/bin since it's not a real path.
23452     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23453       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23454       # a path prefixed by /cygdrive for fixpath to work.
23455       new_path="$CYGWIN_ROOT_PATH$input_path"
23456     fi
23457   fi
23458 
23459 
23460   if test "x$path" != "x$new_path"; then
23461     BOOT_JDK="$new_path"
23462     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23463 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23464   fi
23465 
23466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23467 
23468   path="$BOOT_JDK"
23469   has_colon=`$ECHO $path | $GREP ^.:`
23470   new_path="$path"
23471   if test "x$has_colon" = x; then
23472     # Not in mixed or Windows style, start by that.
23473     new_path=`cmd //c echo $path`
23474   fi
23475 
23476 
23477   input_path="$new_path"
23478   # Check if we need to convert this using DOS-style short mode. If the path
23479   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23480   # take no chances and rewrite it.
23481   # Note: m4 eats our [], so we need to use [ and ] instead.
23482   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23483   if test "x$has_forbidden_chars" != x; then
23484     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23485     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23486   fi
23487 
23488 
23489   windows_path="$new_path"
23490   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23491     unix_path=`$CYGPATH -u "$windows_path"`
23492     new_path="$unix_path"
23493   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23494     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23495     new_path="$unix_path"
23496   fi
23497 
23498   if test "x$path" != "x$new_path"; then
23499     BOOT_JDK="$new_path"
23500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23501 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23502   fi
23503 
23504   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23505   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23506 
23507   else
23508     # We're on a unix platform. Hooray! :)
23509     path="$BOOT_JDK"
23510     has_space=`$ECHO "$path" | $GREP " "`
23511     if test "x$has_space" != x; then
23512       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23513 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23514       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23515     fi
23516 
23517     # Use eval to expand a potential ~
23518     eval path="$path"
23519     if test ! -f "$path" && test ! -d "$path"; then
23520       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23521     fi
23522 
23523     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23524   fi
23525 
23526             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23527 $as_echo_n "checking for Boot JDK... " >&6; }
23528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23529 $as_echo "$BOOT_JDK" >&6; }
23530             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23531 $as_echo_n "checking Boot JDK version... " >&6; }
23532             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23533             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23534 $as_echo "$BOOT_JDK_VERSION" >&6; }
23535           fi # end check jdk version
23536         fi # end check javac
23537       fi # end check java
23538     fi # end check boot jdk found
23539   fi
23540 
23541     done
23542   fi
23543 
23544   fi
23545 
23546 
23547     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23548     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23549       # Do we have a bin/java?
23550       if test ! -x "$BOOT_JDK/bin/java"; then
23551         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23552 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23553         BOOT_JDK_FOUND=no
23554       else
23555         # Do we have a bin/javac?
23556         if test ! -x "$BOOT_JDK/bin/javac"; then
23557           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23559           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23560 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23561           BOOT_JDK_FOUND=no
23562         else
23563           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23564           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23565 
23566           # Extra M4 quote needed to protect [] in grep expression.
23567           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23568           if test "x$FOUND_CORRECT_VERSION" = x; then
23569             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23570 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23571             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23572 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23573             BOOT_JDK_FOUND=no
23574           else
23575             # We're done! :-)
23576             BOOT_JDK_FOUND=yes
23577 
23578   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23579 
23580   # Input might be given as Windows format, start by converting to
23581   # unix format.
23582   path="$BOOT_JDK"
23583   new_path=`$CYGPATH -u "$path"`
23584 
23585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23588   # "foo.exe" is OK but "foo" is an error.
23589   #
23590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23591   # It is also a way to make sure we got the proper file name for the real test later on.
23592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23593   if test "x$test_shortpath" = x; then
23594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23595 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23596     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23597   fi
23598 
23599   # Call helper function which possibly converts this using DOS-style short mode.
23600   # If so, the updated path is stored in $new_path.
23601 
23602   input_path="$new_path"
23603   # Check if we need to convert this using DOS-style short mode. If the path
23604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23605   # take no chances and rewrite it.
23606   # Note: m4 eats our [], so we need to use [ and ] instead.
23607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23608   if test "x$has_forbidden_chars" != x; then
23609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23613       # Going to short mode and back again did indeed matter. Since short mode is
23614       # case insensitive, let's make it lowercase to improve readability.
23615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23616       # Now convert it back to Unix-stile (cygpath)
23617       input_path=`$CYGPATH -u "$shortmode_path"`
23618       new_path="$input_path"
23619     fi
23620   fi
23621 
23622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23623   if test "x$test_cygdrive_prefix" = x; then
23624     # As a simple fix, exclude /usr/bin since it's not a real path.
23625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23627       # a path prefixed by /cygdrive for fixpath to work.
23628       new_path="$CYGWIN_ROOT_PATH$input_path"
23629     fi
23630   fi
23631 
23632 
23633   if test "x$path" != "x$new_path"; then
23634     BOOT_JDK="$new_path"
23635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23636 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23637   fi
23638 
23639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23640 
23641   path="$BOOT_JDK"
23642   has_colon=`$ECHO $path | $GREP ^.:`
23643   new_path="$path"
23644   if test "x$has_colon" = x; then
23645     # Not in mixed or Windows style, start by that.
23646     new_path=`cmd //c echo $path`
23647   fi
23648 
23649 
23650   input_path="$new_path"
23651   # Check if we need to convert this using DOS-style short mode. If the path
23652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23653   # take no chances and rewrite it.
23654   # Note: m4 eats our [], so we need to use [ and ] instead.
23655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23656   if test "x$has_forbidden_chars" != x; then
23657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23659   fi
23660 
23661 
23662   windows_path="$new_path"
23663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23664     unix_path=`$CYGPATH -u "$windows_path"`
23665     new_path="$unix_path"
23666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23668     new_path="$unix_path"
23669   fi
23670 
23671   if test "x$path" != "x$new_path"; then
23672     BOOT_JDK="$new_path"
23673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23674 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23675   fi
23676 
23677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23679 
23680   else
23681     # We're on a unix platform. Hooray! :)
23682     path="$BOOT_JDK"
23683     has_space=`$ECHO "$path" | $GREP " "`
23684     if test "x$has_space" != x; then
23685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23686 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23687       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23688     fi
23689 
23690     # Use eval to expand a potential ~
23691     eval path="$path"
23692     if test ! -f "$path" && test ! -d "$path"; then
23693       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23694     fi
23695 
23696     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23697   fi
23698 
23699             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23700 $as_echo_n "checking for Boot JDK... " >&6; }
23701             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23702 $as_echo "$BOOT_JDK" >&6; }
23703             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23704 $as_echo_n "checking Boot JDK version... " >&6; }
23705             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23707 $as_echo "$BOOT_JDK_VERSION" >&6; }
23708           fi # end check jdk version
23709         fi # end check javac
23710       fi # end check java
23711     fi # end check boot jdk found
23712   fi
23713 
23714 
23715   if test "x$BOOT_JDK_FOUND" = xno; then
23716     # Now execute the test
23717 
23718   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23719   BOOT_JDK_SUFFIX=""
23720   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23721   if test "x$ALL_JDKS_FOUND" != x; then
23722     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23723 
23724   if test "x$BOOT_JDK_FOUND" = xno; then
23725     # Now execute the test
23726 
23727         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23728         if test -d "$BOOT_JDK"; then
23729           BOOT_JDK_FOUND=maybe
23730           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23731 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23732         fi
23733 
23734 
23735     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23736     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23737       # Do we have a bin/java?
23738       if test ! -x "$BOOT_JDK/bin/java"; then
23739         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23740 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23741         BOOT_JDK_FOUND=no
23742       else
23743         # Do we have a bin/javac?
23744         if test ! -x "$BOOT_JDK/bin/javac"; then
23745           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23746 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23747           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23748 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23749           BOOT_JDK_FOUND=no
23750         else
23751           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23752           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23753 
23754           # Extra M4 quote needed to protect [] in grep expression.
23755           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23756           if test "x$FOUND_CORRECT_VERSION" = x; then
23757             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23758 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23759             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23760 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23761             BOOT_JDK_FOUND=no
23762           else
23763             # We're done! :-)
23764             BOOT_JDK_FOUND=yes
23765 
23766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23767 
23768   # Input might be given as Windows format, start by converting to
23769   # unix format.
23770   path="$BOOT_JDK"
23771   new_path=`$CYGPATH -u "$path"`
23772 
23773   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23774   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23775   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23776   # "foo.exe" is OK but "foo" is an error.
23777   #
23778   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23779   # It is also a way to make sure we got the proper file name for the real test later on.
23780   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23781   if test "x$test_shortpath" = x; then
23782     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23783 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23784     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23785   fi
23786 
23787   # Call helper function which possibly converts this using DOS-style short mode.
23788   # If so, the updated path is stored in $new_path.
23789 
23790   input_path="$new_path"
23791   # Check if we need to convert this using DOS-style short mode. If the path
23792   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23793   # take no chances and rewrite it.
23794   # Note: m4 eats our [], so we need to use [ and ] instead.
23795   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23796   if test "x$has_forbidden_chars" != x; then
23797     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23798     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23799     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23800     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23801       # Going to short mode and back again did indeed matter. Since short mode is
23802       # case insensitive, let's make it lowercase to improve readability.
23803       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23804       # Now convert it back to Unix-stile (cygpath)
23805       input_path=`$CYGPATH -u "$shortmode_path"`
23806       new_path="$input_path"
23807     fi
23808   fi
23809 
23810   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23811   if test "x$test_cygdrive_prefix" = x; then
23812     # As a simple fix, exclude /usr/bin since it's not a real path.
23813     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23814       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23815       # a path prefixed by /cygdrive for fixpath to work.
23816       new_path="$CYGWIN_ROOT_PATH$input_path"
23817     fi
23818   fi
23819 
23820 
23821   if test "x$path" != "x$new_path"; then
23822     BOOT_JDK="$new_path"
23823     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23824 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23825   fi
23826 
23827   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23828 
23829   path="$BOOT_JDK"
23830   has_colon=`$ECHO $path | $GREP ^.:`
23831   new_path="$path"
23832   if test "x$has_colon" = x; then
23833     # Not in mixed or Windows style, start by that.
23834     new_path=`cmd //c echo $path`
23835   fi
23836 
23837 
23838   input_path="$new_path"
23839   # Check if we need to convert this using DOS-style short mode. If the path
23840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23841   # take no chances and rewrite it.
23842   # Note: m4 eats our [], so we need to use [ and ] instead.
23843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23844   if test "x$has_forbidden_chars" != x; then
23845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23846     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23847   fi
23848 
23849 
23850   windows_path="$new_path"
23851   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23852     unix_path=`$CYGPATH -u "$windows_path"`
23853     new_path="$unix_path"
23854   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23855     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23856     new_path="$unix_path"
23857   fi
23858 
23859   if test "x$path" != "x$new_path"; then
23860     BOOT_JDK="$new_path"
23861     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23862 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23863   fi
23864 
23865   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23866   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23867 
23868   else
23869     # We're on a unix platform. Hooray! :)
23870     path="$BOOT_JDK"
23871     has_space=`$ECHO "$path" | $GREP " "`
23872     if test "x$has_space" != x; then
23873       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23874 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23875       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23876     fi
23877 
23878     # Use eval to expand a potential ~
23879     eval path="$path"
23880     if test ! -f "$path" && test ! -d "$path"; then
23881       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23882     fi
23883 
23884     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23885   fi
23886 
23887             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23888 $as_echo_n "checking for Boot JDK... " >&6; }
23889             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23890 $as_echo "$BOOT_JDK" >&6; }
23891             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23892 $as_echo_n "checking Boot JDK version... " >&6; }
23893             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23894             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23895 $as_echo "$BOOT_JDK_VERSION" >&6; }
23896           fi # end check jdk version
23897         fi # end check javac
23898       fi # end check java
23899     fi # end check boot jdk found
23900   fi
23901 
23902     done
23903   fi
23904 
23905 
23906     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23907     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23908       # Do we have a bin/java?
23909       if test ! -x "$BOOT_JDK/bin/java"; then
23910         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23912         BOOT_JDK_FOUND=no
23913       else
23914         # Do we have a bin/javac?
23915         if test ! -x "$BOOT_JDK/bin/javac"; then
23916           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23917 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23918           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23919 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23920           BOOT_JDK_FOUND=no
23921         else
23922           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23923           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23924 
23925           # Extra M4 quote needed to protect [] in grep expression.
23926           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23927           if test "x$FOUND_CORRECT_VERSION" = x; then
23928             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23929 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23930             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23931 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23932             BOOT_JDK_FOUND=no
23933           else
23934             # We're done! :-)
23935             BOOT_JDK_FOUND=yes
23936 
23937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23938 
23939   # Input might be given as Windows format, start by converting to
23940   # unix format.
23941   path="$BOOT_JDK"
23942   new_path=`$CYGPATH -u "$path"`
23943 
23944   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23945   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23946   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23947   # "foo.exe" is OK but "foo" is an error.
23948   #
23949   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23950   # It is also a way to make sure we got the proper file name for the real test later on.
23951   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23952   if test "x$test_shortpath" = x; then
23953     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23954 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23955     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23956   fi
23957 
23958   # Call helper function which possibly converts this using DOS-style short mode.
23959   # If so, the updated path is stored in $new_path.
23960 
23961   input_path="$new_path"
23962   # Check if we need to convert this using DOS-style short mode. If the path
23963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23964   # take no chances and rewrite it.
23965   # Note: m4 eats our [], so we need to use [ and ] instead.
23966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23967   if test "x$has_forbidden_chars" != x; then
23968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23969     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23970     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23971     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23972       # Going to short mode and back again did indeed matter. Since short mode is
23973       # case insensitive, let's make it lowercase to improve readability.
23974       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23975       # Now convert it back to Unix-stile (cygpath)
23976       input_path=`$CYGPATH -u "$shortmode_path"`
23977       new_path="$input_path"
23978     fi
23979   fi
23980 
23981   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23982   if test "x$test_cygdrive_prefix" = x; then
23983     # As a simple fix, exclude /usr/bin since it's not a real path.
23984     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23985       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23986       # a path prefixed by /cygdrive for fixpath to work.
23987       new_path="$CYGWIN_ROOT_PATH$input_path"
23988     fi
23989   fi
23990 
23991 
23992   if test "x$path" != "x$new_path"; then
23993     BOOT_JDK="$new_path"
23994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23996   fi
23997 
23998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23999 
24000   path="$BOOT_JDK"
24001   has_colon=`$ECHO $path | $GREP ^.:`
24002   new_path="$path"
24003   if test "x$has_colon" = x; then
24004     # Not in mixed or Windows style, start by that.
24005     new_path=`cmd //c echo $path`
24006   fi
24007 
24008 
24009   input_path="$new_path"
24010   # Check if we need to convert this using DOS-style short mode. If the path
24011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24012   # take no chances and rewrite it.
24013   # Note: m4 eats our [], so we need to use [ and ] instead.
24014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24015   if test "x$has_forbidden_chars" != x; then
24016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24017     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24018   fi
24019 
24020 
24021   windows_path="$new_path"
24022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24023     unix_path=`$CYGPATH -u "$windows_path"`
24024     new_path="$unix_path"
24025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24027     new_path="$unix_path"
24028   fi
24029 
24030   if test "x$path" != "x$new_path"; then
24031     BOOT_JDK="$new_path"
24032     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24033 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24034   fi
24035 
24036   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24037   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24038 
24039   else
24040     # We're on a unix platform. Hooray! :)
24041     path="$BOOT_JDK"
24042     has_space=`$ECHO "$path" | $GREP " "`
24043     if test "x$has_space" != x; then
24044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24045 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24046       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24047     fi
24048 
24049     # Use eval to expand a potential ~
24050     eval path="$path"
24051     if test ! -f "$path" && test ! -d "$path"; then
24052       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24053     fi
24054 
24055     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24056   fi
24057 
24058             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24059 $as_echo_n "checking for Boot JDK... " >&6; }
24060             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24061 $as_echo "$BOOT_JDK" >&6; }
24062             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24063 $as_echo_n "checking Boot JDK version... " >&6; }
24064             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24065             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24066 $as_echo "$BOOT_JDK_VERSION" >&6; }
24067           fi # end check jdk version
24068         fi # end check javac
24069       fi # end check java
24070     fi # end check boot jdk found
24071   fi
24072 
24073   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24074 
24075   if test "x$BOOT_JDK_FOUND" = xno; then
24076     # Now execute the test
24077 
24078   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24079   BOOT_JDK_SUFFIX="/Contents/Home"
24080   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24081   if test "x$ALL_JDKS_FOUND" != x; then
24082     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24083 
24084   if test "x$BOOT_JDK_FOUND" = xno; then
24085     # Now execute the test
24086 
24087         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24088         if test -d "$BOOT_JDK"; then
24089           BOOT_JDK_FOUND=maybe
24090           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24091 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24092         fi
24093 
24094 
24095     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24096     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24097       # Do we have a bin/java?
24098       if test ! -x "$BOOT_JDK/bin/java"; then
24099         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24101         BOOT_JDK_FOUND=no
24102       else
24103         # Do we have a bin/javac?
24104         if test ! -x "$BOOT_JDK/bin/javac"; then
24105           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24106 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24107           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24108 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24109           BOOT_JDK_FOUND=no
24110         else
24111           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24112           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24113 
24114           # Extra M4 quote needed to protect [] in grep expression.
24115           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24116           if test "x$FOUND_CORRECT_VERSION" = x; then
24117             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24118 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24119             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24120 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24121             BOOT_JDK_FOUND=no
24122           else
24123             # We're done! :-)
24124             BOOT_JDK_FOUND=yes
24125 
24126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24127 
24128   # Input might be given as Windows format, start by converting to
24129   # unix format.
24130   path="$BOOT_JDK"
24131   new_path=`$CYGPATH -u "$path"`
24132 
24133   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24134   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24135   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24136   # "foo.exe" is OK but "foo" is an error.
24137   #
24138   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24139   # It is also a way to make sure we got the proper file name for the real test later on.
24140   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24141   if test "x$test_shortpath" = x; then
24142     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24143 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24144     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24145   fi
24146 
24147   # Call helper function which possibly converts this using DOS-style short mode.
24148   # If so, the updated path is stored in $new_path.
24149 
24150   input_path="$new_path"
24151   # Check if we need to convert this using DOS-style short mode. If the path
24152   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24153   # take no chances and rewrite it.
24154   # Note: m4 eats our [], so we need to use [ and ] instead.
24155   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24156   if test "x$has_forbidden_chars" != x; then
24157     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24158     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24159     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24160     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24161       # Going to short mode and back again did indeed matter. Since short mode is
24162       # case insensitive, let's make it lowercase to improve readability.
24163       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24164       # Now convert it back to Unix-stile (cygpath)
24165       input_path=`$CYGPATH -u "$shortmode_path"`
24166       new_path="$input_path"
24167     fi
24168   fi
24169 
24170   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24171   if test "x$test_cygdrive_prefix" = x; then
24172     # As a simple fix, exclude /usr/bin since it's not a real path.
24173     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24174       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24175       # a path prefixed by /cygdrive for fixpath to work.
24176       new_path="$CYGWIN_ROOT_PATH$input_path"
24177     fi
24178   fi
24179 
24180 
24181   if test "x$path" != "x$new_path"; then
24182     BOOT_JDK="$new_path"
24183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24184 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24185   fi
24186 
24187   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24188 
24189   path="$BOOT_JDK"
24190   has_colon=`$ECHO $path | $GREP ^.:`
24191   new_path="$path"
24192   if test "x$has_colon" = x; then
24193     # Not in mixed or Windows style, start by that.
24194     new_path=`cmd //c echo $path`
24195   fi
24196 
24197 
24198   input_path="$new_path"
24199   # Check if we need to convert this using DOS-style short mode. If the path
24200   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24201   # take no chances and rewrite it.
24202   # Note: m4 eats our [], so we need to use [ and ] instead.
24203   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24204   if test "x$has_forbidden_chars" != x; then
24205     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24206     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24207   fi
24208 
24209 
24210   windows_path="$new_path"
24211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24212     unix_path=`$CYGPATH -u "$windows_path"`
24213     new_path="$unix_path"
24214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24216     new_path="$unix_path"
24217   fi
24218 
24219   if test "x$path" != "x$new_path"; then
24220     BOOT_JDK="$new_path"
24221     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24222 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24223   fi
24224 
24225   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24226   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24227 
24228   else
24229     # We're on a unix platform. Hooray! :)
24230     path="$BOOT_JDK"
24231     has_space=`$ECHO "$path" | $GREP " "`
24232     if test "x$has_space" != x; then
24233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24234 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24235       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24236     fi
24237 
24238     # Use eval to expand a potential ~
24239     eval path="$path"
24240     if test ! -f "$path" && test ! -d "$path"; then
24241       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24242     fi
24243 
24244     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24245   fi
24246 
24247             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24248 $as_echo_n "checking for Boot JDK... " >&6; }
24249             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24250 $as_echo "$BOOT_JDK" >&6; }
24251             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24252 $as_echo_n "checking Boot JDK version... " >&6; }
24253             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24254             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24255 $as_echo "$BOOT_JDK_VERSION" >&6; }
24256           fi # end check jdk version
24257         fi # end check javac
24258       fi # end check java
24259     fi # end check boot jdk found
24260   fi
24261 
24262     done
24263   fi
24264 
24265 
24266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24268       # Do we have a bin/java?
24269       if test ! -x "$BOOT_JDK/bin/java"; then
24270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24272         BOOT_JDK_FOUND=no
24273       else
24274         # Do we have a bin/javac?
24275         if test ! -x "$BOOT_JDK/bin/javac"; then
24276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24280           BOOT_JDK_FOUND=no
24281         else
24282           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24283           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24284 
24285           # Extra M4 quote needed to protect [] in grep expression.
24286           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24287           if test "x$FOUND_CORRECT_VERSION" = x; then
24288             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24289 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24290             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24291 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24292             BOOT_JDK_FOUND=no
24293           else
24294             # We're done! :-)
24295             BOOT_JDK_FOUND=yes
24296 
24297   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24298 
24299   # Input might be given as Windows format, start by converting to
24300   # unix format.
24301   path="$BOOT_JDK"
24302   new_path=`$CYGPATH -u "$path"`
24303 
24304   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24305   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24306   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24307   # "foo.exe" is OK but "foo" is an error.
24308   #
24309   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24310   # It is also a way to make sure we got the proper file name for the real test later on.
24311   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24312   if test "x$test_shortpath" = x; then
24313     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24314 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24315     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24316   fi
24317 
24318   # Call helper function which possibly converts this using DOS-style short mode.
24319   # If so, the updated path is stored in $new_path.
24320 
24321   input_path="$new_path"
24322   # Check if we need to convert this using DOS-style short mode. If the path
24323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24324   # take no chances and rewrite it.
24325   # Note: m4 eats our [], so we need to use [ and ] instead.
24326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24327   if test "x$has_forbidden_chars" != x; then
24328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24329     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24330     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24331     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24332       # Going to short mode and back again did indeed matter. Since short mode is
24333       # case insensitive, let's make it lowercase to improve readability.
24334       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24335       # Now convert it back to Unix-stile (cygpath)
24336       input_path=`$CYGPATH -u "$shortmode_path"`
24337       new_path="$input_path"
24338     fi
24339   fi
24340 
24341   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24342   if test "x$test_cygdrive_prefix" = x; then
24343     # As a simple fix, exclude /usr/bin since it's not a real path.
24344     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24345       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24346       # a path prefixed by /cygdrive for fixpath to work.
24347       new_path="$CYGWIN_ROOT_PATH$input_path"
24348     fi
24349   fi
24350 
24351 
24352   if test "x$path" != "x$new_path"; then
24353     BOOT_JDK="$new_path"
24354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24355 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24356   fi
24357 
24358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24359 
24360   path="$BOOT_JDK"
24361   has_colon=`$ECHO $path | $GREP ^.:`
24362   new_path="$path"
24363   if test "x$has_colon" = x; then
24364     # Not in mixed or Windows style, start by that.
24365     new_path=`cmd //c echo $path`
24366   fi
24367 
24368 
24369   input_path="$new_path"
24370   # Check if we need to convert this using DOS-style short mode. If the path
24371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24372   # take no chances and rewrite it.
24373   # Note: m4 eats our [], so we need to use [ and ] instead.
24374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24375   if test "x$has_forbidden_chars" != x; then
24376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24377     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24378   fi
24379 
24380 
24381   windows_path="$new_path"
24382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24383     unix_path=`$CYGPATH -u "$windows_path"`
24384     new_path="$unix_path"
24385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24387     new_path="$unix_path"
24388   fi
24389 
24390   if test "x$path" != "x$new_path"; then
24391     BOOT_JDK="$new_path"
24392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24393 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24394   fi
24395 
24396   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24397   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24398 
24399   else
24400     # We're on a unix platform. Hooray! :)
24401     path="$BOOT_JDK"
24402     has_space=`$ECHO "$path" | $GREP " "`
24403     if test "x$has_space" != x; then
24404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24405 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24406       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24407     fi
24408 
24409     # Use eval to expand a potential ~
24410     eval path="$path"
24411     if test ! -f "$path" && test ! -d "$path"; then
24412       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24413     fi
24414 
24415     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24416   fi
24417 
24418             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24419 $as_echo_n "checking for Boot JDK... " >&6; }
24420             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24421 $as_echo "$BOOT_JDK" >&6; }
24422             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24423 $as_echo_n "checking Boot JDK version... " >&6; }
24424             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24425             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24426 $as_echo "$BOOT_JDK_VERSION" >&6; }
24427           fi # end check jdk version
24428         fi # end check javac
24429       fi # end check java
24430     fi # end check boot jdk found
24431   fi
24432 
24433 
24434   if test "x$BOOT_JDK_FOUND" = xno; then
24435     # Now execute the test
24436 
24437   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24438   BOOT_JDK_SUFFIX="/Contents/Home"
24439   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24440   if test "x$ALL_JDKS_FOUND" != x; then
24441     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24442 
24443   if test "x$BOOT_JDK_FOUND" = xno; then
24444     # Now execute the test
24445 
24446         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24447         if test -d "$BOOT_JDK"; then
24448           BOOT_JDK_FOUND=maybe
24449           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24450 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24451         fi
24452 
24453 
24454     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24455     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24456       # Do we have a bin/java?
24457       if test ! -x "$BOOT_JDK/bin/java"; then
24458         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24460         BOOT_JDK_FOUND=no
24461       else
24462         # Do we have a bin/javac?
24463         if test ! -x "$BOOT_JDK/bin/javac"; then
24464           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24465 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24466           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24467 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24468           BOOT_JDK_FOUND=no
24469         else
24470           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24471           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24472 
24473           # Extra M4 quote needed to protect [] in grep expression.
24474           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24475           if test "x$FOUND_CORRECT_VERSION" = x; then
24476             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24477 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24478             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24479 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24480             BOOT_JDK_FOUND=no
24481           else
24482             # We're done! :-)
24483             BOOT_JDK_FOUND=yes
24484 
24485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24486 
24487   # Input might be given as Windows format, start by converting to
24488   # unix format.
24489   path="$BOOT_JDK"
24490   new_path=`$CYGPATH -u "$path"`
24491 
24492   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24493   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24494   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24495   # "foo.exe" is OK but "foo" is an error.
24496   #
24497   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24498   # It is also a way to make sure we got the proper file name for the real test later on.
24499   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24500   if test "x$test_shortpath" = x; then
24501     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24502 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24503     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24504   fi
24505 
24506   # Call helper function which possibly converts this using DOS-style short mode.
24507   # If so, the updated path is stored in $new_path.
24508 
24509   input_path="$new_path"
24510   # Check if we need to convert this using DOS-style short mode. If the path
24511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24512   # take no chances and rewrite it.
24513   # Note: m4 eats our [], so we need to use [ and ] instead.
24514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24515   if test "x$has_forbidden_chars" != x; then
24516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24520       # Going to short mode and back again did indeed matter. Since short mode is
24521       # case insensitive, let's make it lowercase to improve readability.
24522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24523       # Now convert it back to Unix-stile (cygpath)
24524       input_path=`$CYGPATH -u "$shortmode_path"`
24525       new_path="$input_path"
24526     fi
24527   fi
24528 
24529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24530   if test "x$test_cygdrive_prefix" = x; then
24531     # As a simple fix, exclude /usr/bin since it's not a real path.
24532     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24534       # a path prefixed by /cygdrive for fixpath to work.
24535       new_path="$CYGWIN_ROOT_PATH$input_path"
24536     fi
24537   fi
24538 
24539 
24540   if test "x$path" != "x$new_path"; then
24541     BOOT_JDK="$new_path"
24542     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24543 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24544   fi
24545 
24546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24547 
24548   path="$BOOT_JDK"
24549   has_colon=`$ECHO $path | $GREP ^.:`
24550   new_path="$path"
24551   if test "x$has_colon" = x; then
24552     # Not in mixed or Windows style, start by that.
24553     new_path=`cmd //c echo $path`
24554   fi
24555 
24556 
24557   input_path="$new_path"
24558   # Check if we need to convert this using DOS-style short mode. If the path
24559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24560   # take no chances and rewrite it.
24561   # Note: m4 eats our [], so we need to use [ and ] instead.
24562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24563   if test "x$has_forbidden_chars" != x; then
24564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24565     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24566   fi
24567 
24568 
24569   windows_path="$new_path"
24570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24571     unix_path=`$CYGPATH -u "$windows_path"`
24572     new_path="$unix_path"
24573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24575     new_path="$unix_path"
24576   fi
24577 
24578   if test "x$path" != "x$new_path"; then
24579     BOOT_JDK="$new_path"
24580     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24581 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24582   fi
24583 
24584   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24585   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24586 
24587   else
24588     # We're on a unix platform. Hooray! :)
24589     path="$BOOT_JDK"
24590     has_space=`$ECHO "$path" | $GREP " "`
24591     if test "x$has_space" != x; then
24592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24593 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24594       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24595     fi
24596 
24597     # Use eval to expand a potential ~
24598     eval path="$path"
24599     if test ! -f "$path" && test ! -d "$path"; then
24600       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24601     fi
24602 
24603     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24604   fi
24605 
24606             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24607 $as_echo_n "checking for Boot JDK... " >&6; }
24608             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24609 $as_echo "$BOOT_JDK" >&6; }
24610             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24611 $as_echo_n "checking Boot JDK version... " >&6; }
24612             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24613             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24614 $as_echo "$BOOT_JDK_VERSION" >&6; }
24615           fi # end check jdk version
24616         fi # end check javac
24617       fi # end check java
24618     fi # end check boot jdk found
24619   fi
24620 
24621     done
24622   fi
24623 
24624 
24625     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24626     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24627       # Do we have a bin/java?
24628       if test ! -x "$BOOT_JDK/bin/java"; then
24629         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24631         BOOT_JDK_FOUND=no
24632       else
24633         # Do we have a bin/javac?
24634         if test ! -x "$BOOT_JDK/bin/javac"; then
24635           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24637           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24638 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24639           BOOT_JDK_FOUND=no
24640         else
24641           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24642           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24643 
24644           # Extra M4 quote needed to protect [] in grep expression.
24645           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24646           if test "x$FOUND_CORRECT_VERSION" = x; then
24647             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24648 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24649             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24650 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24651             BOOT_JDK_FOUND=no
24652           else
24653             # We're done! :-)
24654             BOOT_JDK_FOUND=yes
24655 
24656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24657 
24658   # Input might be given as Windows format, start by converting to
24659   # unix format.
24660   path="$BOOT_JDK"
24661   new_path=`$CYGPATH -u "$path"`
24662 
24663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24666   # "foo.exe" is OK but "foo" is an error.
24667   #
24668   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24669   # It is also a way to make sure we got the proper file name for the real test later on.
24670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24671   if test "x$test_shortpath" = x; then
24672     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24673 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24674     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24675   fi
24676 
24677   # Call helper function which possibly converts this using DOS-style short mode.
24678   # If so, the updated path is stored in $new_path.
24679 
24680   input_path="$new_path"
24681   # Check if we need to convert this using DOS-style short mode. If the path
24682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24683   # take no chances and rewrite it.
24684   # Note: m4 eats our [], so we need to use [ and ] instead.
24685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24686   if test "x$has_forbidden_chars" != x; then
24687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24688     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24689     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24690     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24691       # Going to short mode and back again did indeed matter. Since short mode is
24692       # case insensitive, let's make it lowercase to improve readability.
24693       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24694       # Now convert it back to Unix-stile (cygpath)
24695       input_path=`$CYGPATH -u "$shortmode_path"`
24696       new_path="$input_path"
24697     fi
24698   fi
24699 
24700   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24701   if test "x$test_cygdrive_prefix" = x; then
24702     # As a simple fix, exclude /usr/bin since it's not a real path.
24703     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24704       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24705       # a path prefixed by /cygdrive for fixpath to work.
24706       new_path="$CYGWIN_ROOT_PATH$input_path"
24707     fi
24708   fi
24709 
24710 
24711   if test "x$path" != "x$new_path"; then
24712     BOOT_JDK="$new_path"
24713     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24714 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24715   fi
24716 
24717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718 
24719   path="$BOOT_JDK"
24720   has_colon=`$ECHO $path | $GREP ^.:`
24721   new_path="$path"
24722   if test "x$has_colon" = x; then
24723     # Not in mixed or Windows style, start by that.
24724     new_path=`cmd //c echo $path`
24725   fi
24726 
24727 
24728   input_path="$new_path"
24729   # Check if we need to convert this using DOS-style short mode. If the path
24730   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24731   # take no chances and rewrite it.
24732   # Note: m4 eats our [], so we need to use [ and ] instead.
24733   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24734   if test "x$has_forbidden_chars" != x; then
24735     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24736     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24737   fi
24738 
24739 
24740   windows_path="$new_path"
24741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24742     unix_path=`$CYGPATH -u "$windows_path"`
24743     new_path="$unix_path"
24744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24746     new_path="$unix_path"
24747   fi
24748 
24749   if test "x$path" != "x$new_path"; then
24750     BOOT_JDK="$new_path"
24751     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24752 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24753   fi
24754 
24755   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24756   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24757 
24758   else
24759     # We're on a unix platform. Hooray! :)
24760     path="$BOOT_JDK"
24761     has_space=`$ECHO "$path" | $GREP " "`
24762     if test "x$has_space" != x; then
24763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24764 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24765       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24766     fi
24767 
24768     # Use eval to expand a potential ~
24769     eval path="$path"
24770     if test ! -f "$path" && test ! -d "$path"; then
24771       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24772     fi
24773 
24774     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24775   fi
24776 
24777             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24778 $as_echo_n "checking for Boot JDK... " >&6; }
24779             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24780 $as_echo "$BOOT_JDK" >&6; }
24781             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24782 $as_echo_n "checking Boot JDK version... " >&6; }
24783             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24784             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24785 $as_echo "$BOOT_JDK_VERSION" >&6; }
24786           fi # end check jdk version
24787         fi # end check javac
24788       fi # end check java
24789     fi # end check boot jdk found
24790   fi
24791 
24792   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24793 
24794   if test "x$BOOT_JDK_FOUND" = xno; then
24795     # Now execute the test
24796 
24797   BOOT_JDK_PREFIX="/usr/lib/jvm"
24798   BOOT_JDK_SUFFIX=""
24799   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24800   if test "x$ALL_JDKS_FOUND" != x; then
24801     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24802 
24803   if test "x$BOOT_JDK_FOUND" = xno; then
24804     # Now execute the test
24805 
24806         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24807         if test -d "$BOOT_JDK"; then
24808           BOOT_JDK_FOUND=maybe
24809           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24810 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24811         fi
24812 
24813 
24814     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24815     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24816       # Do we have a bin/java?
24817       if test ! -x "$BOOT_JDK/bin/java"; then
24818         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24820         BOOT_JDK_FOUND=no
24821       else
24822         # Do we have a bin/javac?
24823         if test ! -x "$BOOT_JDK/bin/javac"; then
24824           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24825 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24826           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24827 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24828           BOOT_JDK_FOUND=no
24829         else
24830           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24831           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24832 
24833           # Extra M4 quote needed to protect [] in grep expression.
24834           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24835           if test "x$FOUND_CORRECT_VERSION" = x; then
24836             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24837 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24838             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24839 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24840             BOOT_JDK_FOUND=no
24841           else
24842             # We're done! :-)
24843             BOOT_JDK_FOUND=yes
24844 
24845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24846 
24847   # Input might be given as Windows format, start by converting to
24848   # unix format.
24849   path="$BOOT_JDK"
24850   new_path=`$CYGPATH -u "$path"`
24851 
24852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24855   # "foo.exe" is OK but "foo" is an error.
24856   #
24857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24858   # It is also a way to make sure we got the proper file name for the real test later on.
24859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24860   if test "x$test_shortpath" = x; then
24861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24862 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24863     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24864   fi
24865 
24866   # Call helper function which possibly converts this using DOS-style short mode.
24867   # If so, the updated path is stored in $new_path.
24868 
24869   input_path="$new_path"
24870   # Check if we need to convert this using DOS-style short mode. If the path
24871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24872   # take no chances and rewrite it.
24873   # Note: m4 eats our [], so we need to use [ and ] instead.
24874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24875   if test "x$has_forbidden_chars" != x; then
24876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24880       # Going to short mode and back again did indeed matter. Since short mode is
24881       # case insensitive, let's make it lowercase to improve readability.
24882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24883       # Now convert it back to Unix-stile (cygpath)
24884       input_path=`$CYGPATH -u "$shortmode_path"`
24885       new_path="$input_path"
24886     fi
24887   fi
24888 
24889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24890   if test "x$test_cygdrive_prefix" = x; then
24891     # As a simple fix, exclude /usr/bin since it's not a real path.
24892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24894       # a path prefixed by /cygdrive for fixpath to work.
24895       new_path="$CYGWIN_ROOT_PATH$input_path"
24896     fi
24897   fi
24898 
24899 
24900   if test "x$path" != "x$new_path"; then
24901     BOOT_JDK="$new_path"
24902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904   fi
24905 
24906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24907 
24908   path="$BOOT_JDK"
24909   has_colon=`$ECHO $path | $GREP ^.:`
24910   new_path="$path"
24911   if test "x$has_colon" = x; then
24912     # Not in mixed or Windows style, start by that.
24913     new_path=`cmd //c echo $path`
24914   fi
24915 
24916 
24917   input_path="$new_path"
24918   # Check if we need to convert this using DOS-style short mode. If the path
24919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24920   # take no chances and rewrite it.
24921   # Note: m4 eats our [], so we need to use [ and ] instead.
24922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24923   if test "x$has_forbidden_chars" != x; then
24924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926   fi
24927 
24928 
24929   windows_path="$new_path"
24930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24931     unix_path=`$CYGPATH -u "$windows_path"`
24932     new_path="$unix_path"
24933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24935     new_path="$unix_path"
24936   fi
24937 
24938   if test "x$path" != "x$new_path"; then
24939     BOOT_JDK="$new_path"
24940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24941 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24942   fi
24943 
24944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24946 
24947   else
24948     # We're on a unix platform. Hooray! :)
24949     path="$BOOT_JDK"
24950     has_space=`$ECHO "$path" | $GREP " "`
24951     if test "x$has_space" != x; then
24952       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24953 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24954       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24955     fi
24956 
24957     # Use eval to expand a potential ~
24958     eval path="$path"
24959     if test ! -f "$path" && test ! -d "$path"; then
24960       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24961     fi
24962 
24963     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24964   fi
24965 
24966             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24967 $as_echo_n "checking for Boot JDK... " >&6; }
24968             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24969 $as_echo "$BOOT_JDK" >&6; }
24970             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24971 $as_echo_n "checking Boot JDK version... " >&6; }
24972             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24973             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24974 $as_echo "$BOOT_JDK_VERSION" >&6; }
24975           fi # end check jdk version
24976         fi # end check javac
24977       fi # end check java
24978     fi # end check boot jdk found
24979   fi
24980 
24981     done
24982   fi
24983 
24984 
24985     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24986     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24987       # Do we have a bin/java?
24988       if test ! -x "$BOOT_JDK/bin/java"; then
24989         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24990 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24991         BOOT_JDK_FOUND=no
24992       else
24993         # Do we have a bin/javac?
24994         if test ! -x "$BOOT_JDK/bin/javac"; then
24995           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24997           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24998 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24999           BOOT_JDK_FOUND=no
25000         else
25001           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25002           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25003 
25004           # Extra M4 quote needed to protect [] in grep expression.
25005           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25006           if test "x$FOUND_CORRECT_VERSION" = x; then
25007             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25009             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25010 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25011             BOOT_JDK_FOUND=no
25012           else
25013             # We're done! :-)
25014             BOOT_JDK_FOUND=yes
25015 
25016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25017 
25018   # Input might be given as Windows format, start by converting to
25019   # unix format.
25020   path="$BOOT_JDK"
25021   new_path=`$CYGPATH -u "$path"`
25022 
25023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25026   # "foo.exe" is OK but "foo" is an error.
25027   #
25028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25029   # It is also a way to make sure we got the proper file name for the real test later on.
25030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25031   if test "x$test_shortpath" = x; then
25032     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25033 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25034     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25035   fi
25036 
25037   # Call helper function which possibly converts this using DOS-style short mode.
25038   # If so, the updated path is stored in $new_path.
25039 
25040   input_path="$new_path"
25041   # Check if we need to convert this using DOS-style short mode. If the path
25042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25043   # take no chances and rewrite it.
25044   # Note: m4 eats our [], so we need to use [ and ] instead.
25045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25046   if test "x$has_forbidden_chars" != x; then
25047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25051       # Going to short mode and back again did indeed matter. Since short mode is
25052       # case insensitive, let's make it lowercase to improve readability.
25053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25054       # Now convert it back to Unix-stile (cygpath)
25055       input_path=`$CYGPATH -u "$shortmode_path"`
25056       new_path="$input_path"
25057     fi
25058   fi
25059 
25060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25061   if test "x$test_cygdrive_prefix" = x; then
25062     # As a simple fix, exclude /usr/bin since it's not a real path.
25063     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25065       # a path prefixed by /cygdrive for fixpath to work.
25066       new_path="$CYGWIN_ROOT_PATH$input_path"
25067     fi
25068   fi
25069 
25070 
25071   if test "x$path" != "x$new_path"; then
25072     BOOT_JDK="$new_path"
25073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25074 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25075   fi
25076 
25077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25078 
25079   path="$BOOT_JDK"
25080   has_colon=`$ECHO $path | $GREP ^.:`
25081   new_path="$path"
25082   if test "x$has_colon" = x; then
25083     # Not in mixed or Windows style, start by that.
25084     new_path=`cmd //c echo $path`
25085   fi
25086 
25087 
25088   input_path="$new_path"
25089   # Check if we need to convert this using DOS-style short mode. If the path
25090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25091   # take no chances and rewrite it.
25092   # Note: m4 eats our [], so we need to use [ and ] instead.
25093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25094   if test "x$has_forbidden_chars" != x; then
25095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25097   fi
25098 
25099 
25100   windows_path="$new_path"
25101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25102     unix_path=`$CYGPATH -u "$windows_path"`
25103     new_path="$unix_path"
25104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25106     new_path="$unix_path"
25107   fi
25108 
25109   if test "x$path" != "x$new_path"; then
25110     BOOT_JDK="$new_path"
25111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25112 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25113   fi
25114 
25115   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25116   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25117 
25118   else
25119     # We're on a unix platform. Hooray! :)
25120     path="$BOOT_JDK"
25121     has_space=`$ECHO "$path" | $GREP " "`
25122     if test "x$has_space" != x; then
25123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25124 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25125       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25126     fi
25127 
25128     # Use eval to expand a potential ~
25129     eval path="$path"
25130     if test ! -f "$path" && test ! -d "$path"; then
25131       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25132     fi
25133 
25134     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25135   fi
25136 
25137             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25138 $as_echo_n "checking for Boot JDK... " >&6; }
25139             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25140 $as_echo "$BOOT_JDK" >&6; }
25141             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25142 $as_echo_n "checking Boot JDK version... " >&6; }
25143             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25144             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25145 $as_echo "$BOOT_JDK_VERSION" >&6; }
25146           fi # end check jdk version
25147         fi # end check javac
25148       fi # end check java
25149     fi # end check boot jdk found
25150   fi
25151 
25152   fi
25153 
25154 
25155     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25156     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25157       # Do we have a bin/java?
25158       if test ! -x "$BOOT_JDK/bin/java"; then
25159         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25161         BOOT_JDK_FOUND=no
25162       else
25163         # Do we have a bin/javac?
25164         if test ! -x "$BOOT_JDK/bin/javac"; then
25165           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25167           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25168 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25169           BOOT_JDK_FOUND=no
25170         else
25171           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25172           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25173 
25174           # Extra M4 quote needed to protect [] in grep expression.
25175           FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25176           if test "x$FOUND_CORRECT_VERSION" = x; then
25177             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25179             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25180 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25181             BOOT_JDK_FOUND=no
25182           else
25183             # We're done! :-)
25184             BOOT_JDK_FOUND=yes
25185 
25186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25187 
25188   # Input might be given as Windows format, start by converting to
25189   # unix format.
25190   path="$BOOT_JDK"
25191   new_path=`$CYGPATH -u "$path"`
25192 
25193   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25194   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25195   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25196   # "foo.exe" is OK but "foo" is an error.
25197   #
25198   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25199   # It is also a way to make sure we got the proper file name for the real test later on.
25200   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25201   if test "x$test_shortpath" = x; then
25202     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25203 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25204     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25205   fi
25206 
25207   # Call helper function which possibly converts this using DOS-style short mode.
25208   # If so, the updated path is stored in $new_path.
25209 
25210   input_path="$new_path"
25211   # Check if we need to convert this using DOS-style short mode. If the path
25212   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25213   # take no chances and rewrite it.
25214   # Note: m4 eats our [], so we need to use [ and ] instead.
25215   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25216   if test "x$has_forbidden_chars" != x; then
25217     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25218     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25219     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25220     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25221       # Going to short mode and back again did indeed matter. Since short mode is
25222       # case insensitive, let's make it lowercase to improve readability.
25223       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25224       # Now convert it back to Unix-stile (cygpath)
25225       input_path=`$CYGPATH -u "$shortmode_path"`
25226       new_path="$input_path"
25227     fi
25228   fi
25229 
25230   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25231   if test "x$test_cygdrive_prefix" = x; then
25232     # As a simple fix, exclude /usr/bin since it's not a real path.
25233     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25234       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25235       # a path prefixed by /cygdrive for fixpath to work.
25236       new_path="$CYGWIN_ROOT_PATH$input_path"
25237     fi
25238   fi
25239 
25240 
25241   if test "x$path" != "x$new_path"; then
25242     BOOT_JDK="$new_path"
25243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25244 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25245   fi
25246 
25247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25248 
25249   path="$BOOT_JDK"
25250   has_colon=`$ECHO $path | $GREP ^.:`
25251   new_path="$path"
25252   if test "x$has_colon" = x; then
25253     # Not in mixed or Windows style, start by that.
25254     new_path=`cmd //c echo $path`
25255   fi
25256 
25257 
25258   input_path="$new_path"
25259   # Check if we need to convert this using DOS-style short mode. If the path
25260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25261   # take no chances and rewrite it.
25262   # Note: m4 eats our [], so we need to use [ and ] instead.
25263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25264   if test "x$has_forbidden_chars" != x; then
25265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25267   fi
25268 
25269 
25270   windows_path="$new_path"
25271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25272     unix_path=`$CYGPATH -u "$windows_path"`
25273     new_path="$unix_path"
25274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25276     new_path="$unix_path"
25277   fi
25278 
25279   if test "x$path" != "x$new_path"; then
25280     BOOT_JDK="$new_path"
25281     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25282 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25283   fi
25284 
25285   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25286   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25287 
25288   else
25289     # We're on a unix platform. Hooray! :)
25290     path="$BOOT_JDK"
25291     has_space=`$ECHO "$path" | $GREP " "`
25292     if test "x$has_space" != x; then
25293       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25294 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25295       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25296     fi
25297 
25298     # Use eval to expand a potential ~
25299     eval path="$path"
25300     if test ! -f "$path" && test ! -d "$path"; then
25301       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25302     fi
25303 
25304     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25305   fi
25306 
25307             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25308 $as_echo_n "checking for Boot JDK... " >&6; }
25309             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25310 $as_echo "$BOOT_JDK" >&6; }
25311             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25312 $as_echo_n "checking Boot JDK version... " >&6; }
25313             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25314             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25315 $as_echo "$BOOT_JDK_VERSION" >&6; }
25316           fi # end check jdk version
25317         fi # end check javac
25318       fi # end check java
25319     fi # end check boot jdk found
25320   fi
25321 
25322 
25323   # If we haven't found anything yet, we've truly lost. Give up.
25324   if test "x$BOOT_JDK_FOUND" = xno; then
25325 
25326   # Print a helpful message on how to acquire the necessary build dependency.
25327   # openjdk is the help tag: freetype, cups, pulse, alsa etc
25328   MISSING_DEPENDENCY=openjdk
25329 
25330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25331     cygwin_help $MISSING_DEPENDENCY
25332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25333     msys_help $MISSING_DEPENDENCY
25334   else
25335     PKGHANDLER_COMMAND=
25336 
25337     case $PKGHANDLER in
25338       apt-get)
25339         apt_help     $MISSING_DEPENDENCY ;;
25340       yum)
25341         yum_help     $MISSING_DEPENDENCY ;;
25342       port)
25343         port_help    $MISSING_DEPENDENCY ;;
25344       pkgutil)
25345         pkgutil_help $MISSING_DEPENDENCY ;;
25346       pkgadd)
25347         pkgadd_help  $MISSING_DEPENDENCY ;;
25348     esac
25349 
25350     if test "x$PKGHANDLER_COMMAND" != x; then
25351       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25352     fi
25353   fi
25354 
25355     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25356 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25357     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25358 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25359     as_fn_error $? "Cannot continue" "$LINENO" 5
25360   fi
25361 
25362 
25363 
25364   # Setup tools from the Boot JDK.
25365 
25366   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25367 
25368   # Publish this variable in the help.
25369 
25370 
25371   if test "x$JAVA" = x; then
25372     # The variable is not set by user, try to locate tool using the code snippet
25373 
25374       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25375 $as_echo_n "checking for java in Boot JDK... " >&6; }
25376       JAVA=$BOOT_JDK/bin/java
25377       if test ! -x $JAVA; then
25378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25379 $as_echo "not found" >&6; }
25380         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25381 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25382         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25383       fi
25384       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25385 $as_echo "ok" >&6; }
25386 
25387 
25388   else
25389     # The variable is set, but is it from the command line or the environment?
25390 
25391     # Try to remove the string !JAVA! from our list.
25392     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25393     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25394       # If it failed, the variable was not from the command line. Ignore it,
25395       # but warn the user (except for BASH, which is always set by the calling BASH).
25396       if test "xJAVA" != xBASH; then
25397         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25398 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25399       fi
25400       # Try to locate tool using the code snippet
25401 
25402       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25403 $as_echo_n "checking for java in Boot JDK... " >&6; }
25404       JAVA=$BOOT_JDK/bin/java
25405       if test ! -x $JAVA; then
25406         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25407 $as_echo "not found" >&6; }
25408         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25409 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25410         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25411       fi
25412       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25413 $as_echo "ok" >&6; }
25414 
25415 
25416     else
25417       # If it succeeded, then it was overridden by the user. We will use it
25418       # for the tool.
25419 
25420       # First remove it from the list of overridden variables, so we can test
25421       # for unknown variables in the end.
25422       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25423 
25424       # Check if the provided tool contains a complete path.
25425       tool_specified="$JAVA"
25426       tool_basename="${tool_specified##*/}"
25427       if test "x$tool_basename" = "x$tool_specified"; then
25428         # A command without a complete path is provided, search $PATH.
25429         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25430 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25431         # Extract the first word of "$tool_basename", so it can be a program name with args.
25432 set dummy $tool_basename; ac_word=$2
25433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25434 $as_echo_n "checking for $ac_word... " >&6; }
25435 if ${ac_cv_path_JAVA+:} false; then :
25436   $as_echo_n "(cached) " >&6
25437 else
25438   case $JAVA in
25439   [\\/]* | ?:[\\/]*)
25440   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25441   ;;
25442   *)
25443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25444 for as_dir in $PATH
25445 do
25446   IFS=$as_save_IFS
25447   test -z "$as_dir" && as_dir=.
25448     for ac_exec_ext in '' $ac_executable_extensions; do
25449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25450     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25452     break 2
25453   fi
25454 done
25455   done
25456 IFS=$as_save_IFS
25457 
25458   ;;
25459 esac
25460 fi
25461 JAVA=$ac_cv_path_JAVA
25462 if test -n "$JAVA"; then
25463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25464 $as_echo "$JAVA" >&6; }
25465 else
25466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25467 $as_echo "no" >&6; }
25468 fi
25469 
25470 
25471         if test "x$JAVA" = x; then
25472           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25473         fi
25474       else
25475         # Otherwise we believe it is a complete path. Use it as it is.
25476         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25477 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25478         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25479 $as_echo_n "checking for JAVA... " >&6; }
25480         if test ! -x "$tool_specified"; then
25481           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25482 $as_echo "not found" >&6; }
25483           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25484         fi
25485         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25486 $as_echo "$tool_specified" >&6; }
25487       fi
25488     fi
25489   fi
25490 
25491 
25492 
25493   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25494 
25495   # Publish this variable in the help.
25496 
25497 
25498   if test "x$JAVAC" = x; then
25499     # The variable is not set by user, try to locate tool using the code snippet
25500 
25501       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25502 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25503       JAVAC=$BOOT_JDK/bin/javac
25504       if test ! -x $JAVAC; then
25505         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25506 $as_echo "not found" >&6; }
25507         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25508 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25509         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25510       fi
25511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25512 $as_echo "ok" >&6; }
25513 
25514 
25515   else
25516     # The variable is set, but is it from the command line or the environment?
25517 
25518     # Try to remove the string !JAVAC! from our list.
25519     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25520     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25521       # If it failed, the variable was not from the command line. Ignore it,
25522       # but warn the user (except for BASH, which is always set by the calling BASH).
25523       if test "xJAVAC" != xBASH; then
25524         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25525 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25526       fi
25527       # Try to locate tool using the code snippet
25528 
25529       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25530 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25531       JAVAC=$BOOT_JDK/bin/javac
25532       if test ! -x $JAVAC; then
25533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25534 $as_echo "not found" >&6; }
25535         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25536 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25537         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25538       fi
25539       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25540 $as_echo "ok" >&6; }
25541 
25542 
25543     else
25544       # If it succeeded, then it was overridden by the user. We will use it
25545       # for the tool.
25546 
25547       # First remove it from the list of overridden variables, so we can test
25548       # for unknown variables in the end.
25549       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25550 
25551       # Check if the provided tool contains a complete path.
25552       tool_specified="$JAVAC"
25553       tool_basename="${tool_specified##*/}"
25554       if test "x$tool_basename" = "x$tool_specified"; then
25555         # A command without a complete path is provided, search $PATH.
25556         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25557 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25558         # Extract the first word of "$tool_basename", so it can be a program name with args.
25559 set dummy $tool_basename; ac_word=$2
25560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25561 $as_echo_n "checking for $ac_word... " >&6; }
25562 if ${ac_cv_path_JAVAC+:} false; then :
25563   $as_echo_n "(cached) " >&6
25564 else
25565   case $JAVAC in
25566   [\\/]* | ?:[\\/]*)
25567   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25568   ;;
25569   *)
25570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25571 for as_dir in $PATH
25572 do
25573   IFS=$as_save_IFS
25574   test -z "$as_dir" && as_dir=.
25575     for ac_exec_ext in '' $ac_executable_extensions; do
25576   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25577     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25579     break 2
25580   fi
25581 done
25582   done
25583 IFS=$as_save_IFS
25584 
25585   ;;
25586 esac
25587 fi
25588 JAVAC=$ac_cv_path_JAVAC
25589 if test -n "$JAVAC"; then
25590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25591 $as_echo "$JAVAC" >&6; }
25592 else
25593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25594 $as_echo "no" >&6; }
25595 fi
25596 
25597 
25598         if test "x$JAVAC" = x; then
25599           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25600         fi
25601       else
25602         # Otherwise we believe it is a complete path. Use it as it is.
25603         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25604 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25606 $as_echo_n "checking for JAVAC... " >&6; }
25607         if test ! -x "$tool_specified"; then
25608           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25609 $as_echo "not found" >&6; }
25610           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25611         fi
25612         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25613 $as_echo "$tool_specified" >&6; }
25614       fi
25615     fi
25616   fi
25617 
25618 
25619 
25620   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25621 
25622   # Publish this variable in the help.
25623 
25624 
25625   if test "x$JAVAH" = x; then
25626     # The variable is not set by user, try to locate tool using the code snippet
25627 
25628       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25629 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25630       JAVAH=$BOOT_JDK/bin/javah
25631       if test ! -x $JAVAH; then
25632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25633 $as_echo "not found" >&6; }
25634         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25635 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25636         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25637       fi
25638       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25639 $as_echo "ok" >&6; }
25640 
25641 
25642   else
25643     # The variable is set, but is it from the command line or the environment?
25644 
25645     # Try to remove the string !JAVAH! from our list.
25646     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25647     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25648       # If it failed, the variable was not from the command line. Ignore it,
25649       # but warn the user (except for BASH, which is always set by the calling BASH).
25650       if test "xJAVAH" != xBASH; then
25651         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25652 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25653       fi
25654       # Try to locate tool using the code snippet
25655 
25656       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25657 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25658       JAVAH=$BOOT_JDK/bin/javah
25659       if test ! -x $JAVAH; then
25660         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25661 $as_echo "not found" >&6; }
25662         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25663 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25664         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25665       fi
25666       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25667 $as_echo "ok" >&6; }
25668 
25669 
25670     else
25671       # If it succeeded, then it was overridden by the user. We will use it
25672       # for the tool.
25673 
25674       # First remove it from the list of overridden variables, so we can test
25675       # for unknown variables in the end.
25676       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25677 
25678       # Check if the provided tool contains a complete path.
25679       tool_specified="$JAVAH"
25680       tool_basename="${tool_specified##*/}"
25681       if test "x$tool_basename" = "x$tool_specified"; then
25682         # A command without a complete path is provided, search $PATH.
25683         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25684 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25685         # Extract the first word of "$tool_basename", so it can be a program name with args.
25686 set dummy $tool_basename; ac_word=$2
25687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25688 $as_echo_n "checking for $ac_word... " >&6; }
25689 if ${ac_cv_path_JAVAH+:} false; then :
25690   $as_echo_n "(cached) " >&6
25691 else
25692   case $JAVAH in
25693   [\\/]* | ?:[\\/]*)
25694   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25695   ;;
25696   *)
25697   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25698 for as_dir in $PATH
25699 do
25700   IFS=$as_save_IFS
25701   test -z "$as_dir" && as_dir=.
25702     for ac_exec_ext in '' $ac_executable_extensions; do
25703   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25704     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25705     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25706     break 2
25707   fi
25708 done
25709   done
25710 IFS=$as_save_IFS
25711 
25712   ;;
25713 esac
25714 fi
25715 JAVAH=$ac_cv_path_JAVAH
25716 if test -n "$JAVAH"; then
25717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25718 $as_echo "$JAVAH" >&6; }
25719 else
25720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25721 $as_echo "no" >&6; }
25722 fi
25723 
25724 
25725         if test "x$JAVAH" = x; then
25726           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25727         fi
25728       else
25729         # Otherwise we believe it is a complete path. Use it as it is.
25730         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25731 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25732         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25733 $as_echo_n "checking for JAVAH... " >&6; }
25734         if test ! -x "$tool_specified"; then
25735           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25736 $as_echo "not found" >&6; }
25737           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25738         fi
25739         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25740 $as_echo "$tool_specified" >&6; }
25741       fi
25742     fi
25743   fi
25744 
25745 
25746 
25747   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25748 
25749   # Publish this variable in the help.
25750 
25751 
25752   if test "x$JAR" = x; then
25753     # The variable is not set by user, try to locate tool using the code snippet
25754 
25755       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25756 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25757       JAR=$BOOT_JDK/bin/jar
25758       if test ! -x $JAR; then
25759         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25760 $as_echo "not found" >&6; }
25761         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25762 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25763         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25764       fi
25765       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25766 $as_echo "ok" >&6; }
25767 
25768 
25769   else
25770     # The variable is set, but is it from the command line or the environment?
25771 
25772     # Try to remove the string !JAR! from our list.
25773     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25774     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25775       # If it failed, the variable was not from the command line. Ignore it,
25776       # but warn the user (except for BASH, which is always set by the calling BASH).
25777       if test "xJAR" != xBASH; then
25778         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25779 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25780       fi
25781       # Try to locate tool using the code snippet
25782 
25783       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25784 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25785       JAR=$BOOT_JDK/bin/jar
25786       if test ! -x $JAR; then
25787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25788 $as_echo "not found" >&6; }
25789         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25790 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25791         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25792       fi
25793       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25794 $as_echo "ok" >&6; }
25795 
25796 
25797     else
25798       # If it succeeded, then it was overridden by the user. We will use it
25799       # for the tool.
25800 
25801       # First remove it from the list of overridden variables, so we can test
25802       # for unknown variables in the end.
25803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25804 
25805       # Check if the provided tool contains a complete path.
25806       tool_specified="$JAR"
25807       tool_basename="${tool_specified##*/}"
25808       if test "x$tool_basename" = "x$tool_specified"; then
25809         # A command without a complete path is provided, search $PATH.
25810         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25811 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25812         # Extract the first word of "$tool_basename", so it can be a program name with args.
25813 set dummy $tool_basename; ac_word=$2
25814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25815 $as_echo_n "checking for $ac_word... " >&6; }
25816 if ${ac_cv_path_JAR+:} false; then :
25817   $as_echo_n "(cached) " >&6
25818 else
25819   case $JAR in
25820   [\\/]* | ?:[\\/]*)
25821   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25822   ;;
25823   *)
25824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25825 for as_dir in $PATH
25826 do
25827   IFS=$as_save_IFS
25828   test -z "$as_dir" && as_dir=.
25829     for ac_exec_ext in '' $ac_executable_extensions; do
25830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25831     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25833     break 2
25834   fi
25835 done
25836   done
25837 IFS=$as_save_IFS
25838 
25839   ;;
25840 esac
25841 fi
25842 JAR=$ac_cv_path_JAR
25843 if test -n "$JAR"; then
25844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25845 $as_echo "$JAR" >&6; }
25846 else
25847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25848 $as_echo "no" >&6; }
25849 fi
25850 
25851 
25852         if test "x$JAR" = x; then
25853           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25854         fi
25855       else
25856         # Otherwise we believe it is a complete path. Use it as it is.
25857         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25858 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25859         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25860 $as_echo_n "checking for JAR... " >&6; }
25861         if test ! -x "$tool_specified"; then
25862           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25863 $as_echo "not found" >&6; }
25864           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25865         fi
25866         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25867 $as_echo "$tool_specified" >&6; }
25868       fi
25869     fi
25870   fi
25871 
25872 
25873 
25874   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25875 
25876   # Publish this variable in the help.
25877 
25878 
25879   if test "x$NATIVE2ASCII" = x; then
25880     # The variable is not set by user, try to locate tool using the code snippet
25881 
25882       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25883 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25884       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25885       if test ! -x $NATIVE2ASCII; then
25886         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25887 $as_echo "not found" >&6; }
25888         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25889 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25890         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25891       fi
25892       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25893 $as_echo "ok" >&6; }
25894 
25895 
25896   else
25897     # The variable is set, but is it from the command line or the environment?
25898 
25899     # Try to remove the string !NATIVE2ASCII! from our list.
25900     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25901     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25902       # If it failed, the variable was not from the command line. Ignore it,
25903       # but warn the user (except for BASH, which is always set by the calling BASH).
25904       if test "xNATIVE2ASCII" != xBASH; then
25905         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25906 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25907       fi
25908       # Try to locate tool using the code snippet
25909 
25910       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25911 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25912       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25913       if test ! -x $NATIVE2ASCII; then
25914         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25915 $as_echo "not found" >&6; }
25916         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25917 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25918         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25919       fi
25920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25921 $as_echo "ok" >&6; }
25922 
25923 
25924     else
25925       # If it succeeded, then it was overridden by the user. We will use it
25926       # for the tool.
25927 
25928       # First remove it from the list of overridden variables, so we can test
25929       # for unknown variables in the end.
25930       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25931 
25932       # Check if the provided tool contains a complete path.
25933       tool_specified="$NATIVE2ASCII"
25934       tool_basename="${tool_specified##*/}"
25935       if test "x$tool_basename" = "x$tool_specified"; then
25936         # A command without a complete path is provided, search $PATH.
25937         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25938 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25939         # Extract the first word of "$tool_basename", so it can be a program name with args.
25940 set dummy $tool_basename; ac_word=$2
25941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25942 $as_echo_n "checking for $ac_word... " >&6; }
25943 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25944   $as_echo_n "(cached) " >&6
25945 else
25946   case $NATIVE2ASCII in
25947   [\\/]* | ?:[\\/]*)
25948   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25949   ;;
25950   *)
25951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25952 for as_dir in $PATH
25953 do
25954   IFS=$as_save_IFS
25955   test -z "$as_dir" && as_dir=.
25956     for ac_exec_ext in '' $ac_executable_extensions; do
25957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25958     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25960     break 2
25961   fi
25962 done
25963   done
25964 IFS=$as_save_IFS
25965 
25966   ;;
25967 esac
25968 fi
25969 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25970 if test -n "$NATIVE2ASCII"; then
25971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25972 $as_echo "$NATIVE2ASCII" >&6; }
25973 else
25974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25975 $as_echo "no" >&6; }
25976 fi
25977 
25978 
25979         if test "x$NATIVE2ASCII" = x; then
25980           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25981         fi
25982       else
25983         # Otherwise we believe it is a complete path. Use it as it is.
25984         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25985 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25987 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
25988         if test ! -x "$tool_specified"; then
25989           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25990 $as_echo "not found" >&6; }
25991           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25992         fi
25993         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25994 $as_echo "$tool_specified" >&6; }
25995       fi
25996     fi
25997   fi
25998 
25999 
26000 
26001   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26002 
26003   # Publish this variable in the help.
26004 
26005 
26006   if test "x$JARSIGNER" = x; then
26007     # The variable is not set by user, try to locate tool using the code snippet
26008 
26009       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26010 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26011       JARSIGNER=$BOOT_JDK/bin/jarsigner
26012       if test ! -x $JARSIGNER; then
26013         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26014 $as_echo "not found" >&6; }
26015         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26016 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26017         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26018       fi
26019       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26020 $as_echo "ok" >&6; }
26021 
26022 
26023   else
26024     # The variable is set, but is it from the command line or the environment?
26025 
26026     # Try to remove the string !JARSIGNER! from our list.
26027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26029       # If it failed, the variable was not from the command line. Ignore it,
26030       # but warn the user (except for BASH, which is always set by the calling BASH).
26031       if test "xJARSIGNER" != xBASH; then
26032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26033 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26034       fi
26035       # Try to locate tool using the code snippet
26036 
26037       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26038 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26039       JARSIGNER=$BOOT_JDK/bin/jarsigner
26040       if test ! -x $JARSIGNER; then
26041         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26042 $as_echo "not found" >&6; }
26043         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26044 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26045         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26046       fi
26047       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26048 $as_echo "ok" >&6; }
26049 
26050 
26051     else
26052       # If it succeeded, then it was overridden by the user. We will use it
26053       # for the tool.
26054 
26055       # First remove it from the list of overridden variables, so we can test
26056       # for unknown variables in the end.
26057       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26058 
26059       # Check if the provided tool contains a complete path.
26060       tool_specified="$JARSIGNER"
26061       tool_basename="${tool_specified##*/}"
26062       if test "x$tool_basename" = "x$tool_specified"; then
26063         # A command without a complete path is provided, search $PATH.
26064         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26065 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26066         # Extract the first word of "$tool_basename", so it can be a program name with args.
26067 set dummy $tool_basename; ac_word=$2
26068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26069 $as_echo_n "checking for $ac_word... " >&6; }
26070 if ${ac_cv_path_JARSIGNER+:} false; then :
26071   $as_echo_n "(cached) " >&6
26072 else
26073   case $JARSIGNER in
26074   [\\/]* | ?:[\\/]*)
26075   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26076   ;;
26077   *)
26078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26079 for as_dir in $PATH
26080 do
26081   IFS=$as_save_IFS
26082   test -z "$as_dir" && as_dir=.
26083     for ac_exec_ext in '' $ac_executable_extensions; do
26084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26085     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26087     break 2
26088   fi
26089 done
26090   done
26091 IFS=$as_save_IFS
26092 
26093   ;;
26094 esac
26095 fi
26096 JARSIGNER=$ac_cv_path_JARSIGNER
26097 if test -n "$JARSIGNER"; then
26098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26099 $as_echo "$JARSIGNER" >&6; }
26100 else
26101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26102 $as_echo "no" >&6; }
26103 fi
26104 
26105 
26106         if test "x$JARSIGNER" = x; then
26107           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26108         fi
26109       else
26110         # Otherwise we believe it is a complete path. Use it as it is.
26111         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26112 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26113         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26114 $as_echo_n "checking for JARSIGNER... " >&6; }
26115         if test ! -x "$tool_specified"; then
26116           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26117 $as_echo "not found" >&6; }
26118           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26119         fi
26120         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26121 $as_echo "$tool_specified" >&6; }
26122       fi
26123     fi
26124   fi
26125 
26126 
26127 
26128   # Finally, set some other options...
26129 
26130   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26131   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26132 
26133 
26134 
26135 
26136 ###############################################################################
26137 #
26138 # Configure the sources to use. We can add or override individual directories.
26139 #
26140 ###############################################################################
26141 
26142 
26143   # Where are the sources. Any of these can be overridden
26144   # using --with-override-corba and the likes.
26145   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26146   CORBA_TOPDIR="$SRC_ROOT/corba"
26147   JAXP_TOPDIR="$SRC_ROOT/jaxp"
26148   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26149   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26150   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26151   JDK_TOPDIR="$SRC_ROOT/jdk"
26152 
26153 
26154 
26155 
26156 
26157 
26158 
26159 
26160 
26161 
26162   ###############################################################################
26163   #
26164   # Pickup additional source for a component from outside of the source root
26165   # or override source for a component.
26166   #
26167 
26168 # Check whether --with-add-source-root was given.
26169 if test "${with_add_source_root+set}" = set; then :
26170   withval=$with_add_source_root;
26171 fi
26172 
26173 
26174 
26175 # Check whether --with-override-source-root was given.
26176 if test "${with_override_source_root+set}" = set; then :
26177   withval=$with_override_source_root;
26178 fi
26179 
26180 
26181 
26182 # Check whether --with-adds-and-overrides was given.
26183 if test "${with_adds_and_overrides+set}" = set; then :
26184   withval=$with_adds_and_overrides;
26185 fi
26186 
26187 
26188   if test "x$with_adds_and_overrides" != x; then
26189     with_add_source_root="$with_adds_and_overrides/adds"
26190     with_override_source_root="$with_adds_and_overrides/overrides"
26191   fi
26192 
26193   if test "x$with_add_source_root" != x; then
26194     if ! test -d $with_add_source_root; then
26195       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26196     fi
26197     CURDIR="$PWD"
26198     cd "$with_add_source_root"
26199     ADD_SRC_ROOT="`pwd`"
26200     cd "$CURDIR"
26201     # Verify that the addon source root does not have any root makefiles.
26202     # If it does, then it is usually an error, prevent this.
26203     if test -f $with_add_source_root/langtools/make/Makefile; then
26204       as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26205     fi
26206     if test -f $with_add_source_root/corba/make/Makefile; then
26207       as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26208     fi
26209     if test -f $with_add_source_root/jaxp/make/Makefile; then
26210       as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26211     fi
26212     if test -f $with_add_source_root/jaxws/make/Makefile; then
26213       as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26214     fi
26215     if test -f $with_add_source_root/hotspot/make/Makefile; then
26216       as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26217     fi
26218     if test -f $with_add_source_root/nashorn/make/Makefile; then
26219       as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26220     fi
26221     if test -f $with_add_source_root/jdk/make/Makefile; then
26222       as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26223     fi
26224   fi
26225 
26226 
26227   if test "x$with_override_source_root" != x; then
26228     if ! test -d $with_override_source_root; then
26229       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26230     fi
26231     CURDIR="$PWD"
26232     cd "$with_override_source_root"
26233     OVERRIDE_SRC_ROOT="`pwd`"
26234     cd "$CURDIR"
26235     if test -f $with_override_source_root/langtools/make/Makefile; then
26236       as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26237     fi
26238     if test -f $with_override_source_root/corba/make/Makefile; then
26239       as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26240     fi
26241     if test -f $with_override_source_root/jaxp/make/Makefile; then
26242       as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26243     fi
26244     if test -f $with_override_source_root/jaxws/make/Makefile; then
26245       as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26246     fi
26247     if test -f $with_override_source_root/hotspot/make/Makefile; then
26248       as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26249     fi
26250     if test -f $with_override_source_root/nashorn/make/Makefile; then
26251       as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26252     fi
26253     if test -f $with_override_source_root/jdk/make/Makefile; then
26254       as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26255     fi
26256   fi
26257 
26258 
26259   ###############################################################################
26260   #
26261   # Override a repo completely, this is used for example when you have 3 small
26262   # development sandboxes of the langtools sources and want to avoid having 3 full
26263   # OpenJDK sources checked out on disk.
26264   #
26265   # Assuming that the 3 langtools sandboxes are located here:
26266   # /home/fredrik/sandbox1/langtools
26267   # /home/fredrik/sandbox2/langtools
26268   # /home/fredrik/sandbox3/langtools
26269   #
26270   # From the source root you create build subdirs manually:
26271   #     mkdir -p build1 build2 build3
26272   # in each build directory run:
26273   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26274   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26275   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26276   #
26277 
26278 
26279 # Check whether --with-override-langtools was given.
26280 if test "${with_override_langtools+set}" = set; then :
26281   withval=$with_override_langtools;
26282 fi
26283 
26284 
26285 
26286 # Check whether --with-override-corba was given.
26287 if test "${with_override_corba+set}" = set; then :
26288   withval=$with_override_corba;
26289 fi
26290 
26291 
26292 
26293 # Check whether --with-override-jaxp was given.
26294 if test "${with_override_jaxp+set}" = set; then :
26295   withval=$with_override_jaxp;
26296 fi
26297 
26298 
26299 
26300 # Check whether --with-override-jaxws was given.
26301 if test "${with_override_jaxws+set}" = set; then :
26302   withval=$with_override_jaxws;
26303 fi
26304 
26305 
26306 
26307 # Check whether --with-override-hotspot was given.
26308 if test "${with_override_hotspot+set}" = set; then :
26309   withval=$with_override_hotspot;
26310 fi
26311 
26312 
26313 
26314 # Check whether --with-override-nashorn was given.
26315 if test "${with_override_nashorn+set}" = set; then :
26316   withval=$with_override_nashorn;
26317 fi
26318 
26319 
26320 
26321 # Check whether --with-override-jdk was given.
26322 if test "${with_override_jdk+set}" = set; then :
26323   withval=$with_override_jdk;
26324 fi
26325 
26326 
26327   if test "x$with_override_langtools" != x; then
26328     CURDIR="$PWD"
26329     cd "$with_override_langtools"
26330     LANGTOOLS_TOPDIR="`pwd`"
26331     cd "$CURDIR"
26332     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26333       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26334     fi
26335     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26336 $as_echo_n "checking if langtools should be overridden... " >&6; }
26337     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26338 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26339   fi
26340   if test "x$with_override_corba" != x; then
26341     CURDIR="$PWD"
26342     cd "$with_override_corba"
26343     CORBA_TOPDIR="`pwd`"
26344     cd "$CURDIR"
26345     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26346       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26347     fi
26348     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26349 $as_echo_n "checking if corba should be overridden... " >&6; }
26350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26351 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26352   fi
26353   if test "x$with_override_jaxp" != x; then
26354     CURDIR="$PWD"
26355     cd "$with_override_jaxp"
26356     JAXP_TOPDIR="`pwd`"
26357     cd "$CURDIR"
26358     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26359       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26360     fi
26361     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26362 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26363     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26364 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26365   fi
26366   if test "x$with_override_jaxws" != x; then
26367     CURDIR="$PWD"
26368     cd "$with_override_jaxws"
26369     JAXWS_TOPDIR="`pwd`"
26370     cd "$CURDIR"
26371     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26372       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26373     fi
26374     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26375 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26376     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26377 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26378   fi
26379   if test "x$with_override_hotspot" != x; then
26380     CURDIR="$PWD"
26381     cd "$with_override_hotspot"
26382     HOTSPOT_TOPDIR="`pwd`"
26383     cd "$CURDIR"
26384     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26385       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26386     fi
26387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26388 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26389     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26390 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26391   fi
26392   if test "x$with_override_nashorn" != x; then
26393     CURDIR="$PWD"
26394     cd "$with_override_nashorn"
26395     NASHORN_TOPDIR="`pwd`"
26396     cd "$CURDIR"
26397     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26398       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26399     fi
26400     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26401 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26402     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26403 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26404   fi
26405   if test "x$with_override_jdk" != x; then
26406     CURDIR="$PWD"
26407     cd "$with_override_jdk"
26408     JDK_TOPDIR="`pwd`"
26409     cd "$CURDIR"
26410     if ! test -f $JDK_TOPDIR/make/Makefile; then
26411       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26412     fi
26413     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26414 $as_echo_n "checking if JDK should be overridden... " >&6; }
26415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26416 $as_echo "yes with $JDK_TOPDIR" >&6; }
26417   fi
26418 
26419 
26420   BUILD_OUTPUT="$OUTPUT_ROOT"
26421 
26422 
26423   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26424   BUILD_HOTSPOT=true
26425 
26426 
26427 
26428 # Check whether --with-import-hotspot was given.
26429 if test "${with_import_hotspot+set}" = set; then :
26430   withval=$with_import_hotspot;
26431 fi
26432 
26433   if test "x$with_import_hotspot" != x; then
26434     CURDIR="$PWD"
26435     cd "$with_import_hotspot"
26436     HOTSPOT_DIST="`pwd`"
26437     cd "$CURDIR"
26438     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26439       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26440     fi
26441     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26442 $as_echo_n "checking if hotspot should be imported... " >&6; }
26443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26444 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26445     BUILD_HOTSPOT=false
26446   fi
26447 
26448   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26449 
26450 
26451 ###############################################################################
26452 #
26453 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
26454 # native code.
26455 #
26456 ###############################################################################
26457 
26458 # First determine the toolchain type (compiler family)
26459 
26460 
26461 # Check whether --with-toolchain-type was given.
26462 if test "${with_toolchain_type+set}" = set; then :
26463   withval=$with_toolchain_type;
26464 fi
26465 
26466 
26467   # Use indirect variable referencing
26468   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26469   VALID_TOOLCHAINS=${!toolchain_var_name}
26470 
26471   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26472     if test -n "$XCODEBUILD"; then
26473       # On Mac OS X, default toolchain to clang after Xcode 5
26474       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26475       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26476       if test $? -ne 0; then
26477         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26478       fi
26479       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26480           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26481           $CUT -f 1 -d .`
26482       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26483 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26484       if test $XCODE_MAJOR_VERSION -ge 5; then
26485           DEFAULT_TOOLCHAIN="clang"
26486       else
26487           DEFAULT_TOOLCHAIN="gcc"
26488       fi
26489     else
26490       # If Xcode is not installed, but the command line tools are
26491       # then we can't run xcodebuild. On these systems we should
26492       # default to clang
26493       DEFAULT_TOOLCHAIN="clang"
26494     fi
26495   else
26496     # First toolchain type in the list is the default
26497     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26498   fi
26499 
26500   if test "x$with_toolchain_type" = xlist; then
26501     # List all toolchains
26502     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26503 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26504     for toolchain in $VALID_TOOLCHAINS; do
26505       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26506       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26507       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26508     done
26509 
26510     exit 0
26511   elif test "x$with_toolchain_type" != x; then
26512     # User override; check that it is valid
26513     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26514       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26515 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26516       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26517 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26518       as_fn_error $? "Cannot continue." "$LINENO" 5
26519     fi
26520     TOOLCHAIN_TYPE=$with_toolchain_type
26521   else
26522     # No flag given, use default
26523     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26524   fi
26525 
26526 
26527   TOOLCHAIN_CC_BINARY_clang="clang"
26528   TOOLCHAIN_CC_BINARY_gcc="gcc"
26529   TOOLCHAIN_CC_BINARY_microsoft="cl"
26530   TOOLCHAIN_CC_BINARY_solstudio="cc"
26531   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26532 
26533   TOOLCHAIN_CXX_BINARY_clang="clang++"
26534   TOOLCHAIN_CXX_BINARY_gcc="g++"
26535   TOOLCHAIN_CXX_BINARY_microsoft="cl"
26536   TOOLCHAIN_CXX_BINARY_solstudio="CC"
26537   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26538 
26539   # Use indirect variable referencing
26540   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26541   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26542   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26543   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26544   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26545   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26546 
26547 
26548   # Define filename patterns
26549   if test "x$OPENJDK_TARGET_OS" = xwindows; then
26550     LIBRARY_PREFIX=
26551     SHARED_LIBRARY_SUFFIX='.dll'
26552     STATIC_LIBRARY_SUFFIX='.lib'
26553     SHARED_LIBRARY='$1.dll'
26554     STATIC_LIBRARY='$1.lib'
26555     OBJ_SUFFIX='.obj'
26556     EXE_SUFFIX='.exe'
26557   else
26558     LIBRARY_PREFIX=lib
26559     SHARED_LIBRARY_SUFFIX='.so'
26560     STATIC_LIBRARY_SUFFIX='.a'
26561     SHARED_LIBRARY='lib$1.so'
26562     STATIC_LIBRARY='lib$1.a'
26563     OBJ_SUFFIX='.o'
26564     EXE_SUFFIX=''
26565     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26566       SHARED_LIBRARY='lib$1.dylib'
26567       SHARED_LIBRARY_SUFFIX='.dylib'
26568     fi
26569   fi
26570 
26571 
26572 
26573 
26574 
26575 
26576 
26577 
26578 
26579 
26580   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26581     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26582 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26583   else
26584     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26585 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26586   fi
26587 
26588 
26589 # Then detect the actual binaries needed
26590 
26591   # FIXME: Is this needed?
26592   ac_ext=cpp
26593 ac_cpp='$CXXCPP $CPPFLAGS'
26594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26595 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26597 
26598 
26599   # Store the CFLAGS etc passed to the configure script.
26600   ORG_CFLAGS="$CFLAGS"
26601   ORG_CXXFLAGS="$CXXFLAGS"
26602   ORG_OBJCFLAGS="$OBJCFLAGS"
26603 
26604   # On Windows, we need to detect the visual studio installation first.
26605   # This will change the PATH, but we need to keep that new PATH even
26606   # after toolchain detection is done, since the compiler (on x86) uses
26607   # it for DLL resolution in runtime.
26608   if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26609 
26610   # Store path to cygwin link.exe to help excluding it when searching for
26611   # VS linker. This must be done before changing the PATH when looking for VS.
26612   # Extract the first word of "link", so it can be a program name with args.
26613 set dummy link; ac_word=$2
26614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26615 $as_echo_n "checking for $ac_word... " >&6; }
26616 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26617   $as_echo_n "(cached) " >&6
26618 else
26619   case $CYGWIN_LINK in
26620   [\\/]* | ?:[\\/]*)
26621   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26622   ;;
26623   *)
26624   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26625 for as_dir in $PATH
26626 do
26627   IFS=$as_save_IFS
26628   test -z "$as_dir" && as_dir=.
26629     for ac_exec_ext in '' $ac_executable_extensions; do
26630   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26631     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26632     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26633     break 2
26634   fi
26635 done
26636   done
26637 IFS=$as_save_IFS
26638 
26639   ;;
26640 esac
26641 fi
26642 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26643 if test -n "$CYGWIN_LINK"; then
26644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26645 $as_echo "$CYGWIN_LINK" >&6; }
26646 else
26647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26648 $as_echo "no" >&6; }
26649 fi
26650 
26651 
26652   if test "x$CYGWIN_LINK" != x; then
26653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26654 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26655     "$CYGWIN_LINK" --version > /dev/null
26656     if test $? -eq 0 ; then
26657       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26658 $as_echo "yes" >&6; }
26659     else
26660       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26661 $as_echo "no" >&6; }
26662       # This might be the VS linker. Don't exclude it later on.
26663       CYGWIN_LINK=""
26664     fi
26665   fi
26666 
26667   # First-hand choice is to locate and run the vsvars bat file.
26668 
26669   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26670     VCVARSFILE="vc/bin/vcvars32.bat"
26671   else
26672     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26673   fi
26674 
26675   VS_ENV_CMD=""
26676   VS_ENV_ARGS=""
26677   if test "x$with_toolsdir" != x; then
26678 
26679   if test "x$VS_ENV_CMD" = x; then
26680     VS100BASE="$with_toolsdir/../.."
26681     METHOD="--with-tools-dir"
26682 
26683   windows_path="$VS100BASE"
26684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26685     unix_path=`$CYGPATH -u "$windows_path"`
26686     VS100BASE="$unix_path"
26687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26689     VS100BASE="$unix_path"
26690   fi
26691 
26692     if test -d "$VS100BASE"; then
26693       if test -f "$VS100BASE/$VCVARSFILE"; then
26694         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26695 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26696         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26697         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26698         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26699         # TODO: improve detection for other versions of VS
26700         PLATFORM_TOOLSET="v100"
26701       else
26702         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26703 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26704         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26705 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26706       fi
26707     fi
26708   fi
26709 
26710   fi
26711 
26712   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26713     # Having specified an argument which is incorrect will produce an instant failure;
26714     # we should not go on looking
26715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26716 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26717     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26718 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26719     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26720   fi
26721 
26722   if test "x$VS100COMNTOOLS" != x; then
26723 
26724   if test "x$VS_ENV_CMD" = x; then
26725     VS100BASE="$VS100COMNTOOLS/../.."
26726     METHOD="VS100COMNTOOLS variable"
26727 
26728   windows_path="$VS100BASE"
26729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26730     unix_path=`$CYGPATH -u "$windows_path"`
26731     VS100BASE="$unix_path"
26732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26734     VS100BASE="$unix_path"
26735   fi
26736 
26737     if test -d "$VS100BASE"; then
26738       if test -f "$VS100BASE/$VCVARSFILE"; then
26739         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26740 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26741         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26742         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26743         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26744         # TODO: improve detection for other versions of VS
26745         PLATFORM_TOOLSET="v100"
26746       else
26747         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26748 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26749         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26750 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26751       fi
26752     fi
26753   fi
26754 
26755   fi
26756   if test "x$PROGRAMFILES" != x; then
26757 
26758   if test "x$VS_ENV_CMD" = x; then
26759     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26760     METHOD="well-known name"
26761 
26762   windows_path="$VS100BASE"
26763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26764     unix_path=`$CYGPATH -u "$windows_path"`
26765     VS100BASE="$unix_path"
26766   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26767     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26768     VS100BASE="$unix_path"
26769   fi
26770 
26771     if test -d "$VS100BASE"; then
26772       if test -f "$VS100BASE/$VCVARSFILE"; then
26773         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26774 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26775         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26776         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26777         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26778         # TODO: improve detection for other versions of VS
26779         PLATFORM_TOOLSET="v100"
26780       else
26781         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26782 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26783         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26784 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26785       fi
26786     fi
26787   fi
26788 
26789   fi
26790 
26791   if test "x$VS_ENV_CMD" = x; then
26792     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26793     METHOD="well-known name"
26794 
26795   windows_path="$VS100BASE"
26796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26797     unix_path=`$CYGPATH -u "$windows_path"`
26798     VS100BASE="$unix_path"
26799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26801     VS100BASE="$unix_path"
26802   fi
26803 
26804     if test -d "$VS100BASE"; then
26805       if test -f "$VS100BASE/$VCVARSFILE"; then
26806         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26807 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26808         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26809         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26810         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26811         # TODO: improve detection for other versions of VS
26812         PLATFORM_TOOLSET="v100"
26813       else
26814         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26815 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26816         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26817 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26818       fi
26819     fi
26820   fi
26821 
26822 
26823   if test "x$VS_ENV_CMD" = x; then
26824     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26825     METHOD="well-known name"
26826 
26827   windows_path="$VS100BASE"
26828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26829     unix_path=`$CYGPATH -u "$windows_path"`
26830     VS100BASE="$unix_path"
26831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26833     VS100BASE="$unix_path"
26834   fi
26835 
26836     if test -d "$VS100BASE"; then
26837       if test -f "$VS100BASE/$VCVARSFILE"; then
26838         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26839 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26840         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26841         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26842         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26843         # TODO: improve detection for other versions of VS
26844         PLATFORM_TOOLSET="v100"
26845       else
26846         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26847 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26848         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26849 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26850       fi
26851     fi
26852   fi
26853 
26854 
26855   if test "x$ProgramW6432" != x; then
26856 
26857   if test "x$VS_ENV_CMD" = x; then
26858     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26859     METHOD="well-known name"
26860 
26861   windows_path="$WIN_SDK_BASE"
26862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26863     unix_path=`$CYGPATH -u "$windows_path"`
26864     WIN_SDK_BASE="$unix_path"
26865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26867     WIN_SDK_BASE="$unix_path"
26868   fi
26869 
26870     if test -d "$WIN_SDK_BASE"; then
26871       # There have been cases of partial or broken SDK installations. A missing
26872       # lib dir is not going to work.
26873       if test ! -d "$WIN_SDK_BASE/../lib"; then
26874         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26875 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26876         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26877 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26878       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26879         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26880 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26881         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26882         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26883           VS_ENV_ARGS="/x86"
26884         else
26885           VS_ENV_ARGS="/x64"
26886         fi
26887         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26888         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26889         # TODO: improve detection for other versions of SDK
26890         PLATFORM_TOOLSET="Windows7.1SDK"
26891       else
26892         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26893 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26894         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26895 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26896       fi
26897     fi
26898   fi
26899 
26900   fi
26901   if test "x$PROGRAMW6432" != x; then
26902 
26903   if test "x$VS_ENV_CMD" = x; then
26904     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26905     METHOD="well-known name"
26906 
26907   windows_path="$WIN_SDK_BASE"
26908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26909     unix_path=`$CYGPATH -u "$windows_path"`
26910     WIN_SDK_BASE="$unix_path"
26911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26913     WIN_SDK_BASE="$unix_path"
26914   fi
26915 
26916     if test -d "$WIN_SDK_BASE"; then
26917       # There have been cases of partial or broken SDK installations. A missing
26918       # lib dir is not going to work.
26919       if test ! -d "$WIN_SDK_BASE/../lib"; then
26920         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26921 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26922         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26923 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26924       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26925         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26926 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26927         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26928         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26929           VS_ENV_ARGS="/x86"
26930         else
26931           VS_ENV_ARGS="/x64"
26932         fi
26933         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26934         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26935         # TODO: improve detection for other versions of SDK
26936         PLATFORM_TOOLSET="Windows7.1SDK"
26937       else
26938         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26939 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26940         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26941 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26942       fi
26943     fi
26944   fi
26945 
26946   fi
26947   if test "x$PROGRAMFILES" != x; then
26948 
26949   if test "x$VS_ENV_CMD" = x; then
26950     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26951     METHOD="well-known name"
26952 
26953   windows_path="$WIN_SDK_BASE"
26954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26955     unix_path=`$CYGPATH -u "$windows_path"`
26956     WIN_SDK_BASE="$unix_path"
26957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26959     WIN_SDK_BASE="$unix_path"
26960   fi
26961 
26962     if test -d "$WIN_SDK_BASE"; then
26963       # There have been cases of partial or broken SDK installations. A missing
26964       # lib dir is not going to work.
26965       if test ! -d "$WIN_SDK_BASE/../lib"; then
26966         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26967 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26968         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26969 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26970       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26971         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26972 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26973         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26974         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26975           VS_ENV_ARGS="/x86"
26976         else
26977           VS_ENV_ARGS="/x64"
26978         fi
26979         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26980         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26981         # TODO: improve detection for other versions of SDK
26982         PLATFORM_TOOLSET="Windows7.1SDK"
26983       else
26984         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26985 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26986         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26987 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26988       fi
26989     fi
26990   fi
26991 
26992   fi
26993 
26994   if test "x$VS_ENV_CMD" = x; then
26995     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26996     METHOD="well-known name"
26997 
26998   windows_path="$WIN_SDK_BASE"
26999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27000     unix_path=`$CYGPATH -u "$windows_path"`
27001     WIN_SDK_BASE="$unix_path"
27002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27004     WIN_SDK_BASE="$unix_path"
27005   fi
27006 
27007     if test -d "$WIN_SDK_BASE"; then
27008       # There have been cases of partial or broken SDK installations. A missing
27009       # lib dir is not going to work.
27010       if test ! -d "$WIN_SDK_BASE/../lib"; then
27011         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27012 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27013         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27014 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27015       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27016         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27017 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27018         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27019         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27020           VS_ENV_ARGS="/x86"
27021         else
27022           VS_ENV_ARGS="/x64"
27023         fi
27024         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27025         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27026         # TODO: improve detection for other versions of SDK
27027         PLATFORM_TOOLSET="Windows7.1SDK"
27028       else
27029         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27030 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27031         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27032 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27033       fi
27034     fi
27035   fi
27036 
27037 
27038   if test "x$VS_ENV_CMD" = x; then
27039     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27040     METHOD="well-known name"
27041 
27042   windows_path="$WIN_SDK_BASE"
27043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27044     unix_path=`$CYGPATH -u "$windows_path"`
27045     WIN_SDK_BASE="$unix_path"
27046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27048     WIN_SDK_BASE="$unix_path"
27049   fi
27050 
27051     if test -d "$WIN_SDK_BASE"; then
27052       # There have been cases of partial or broken SDK installations. A missing
27053       # lib dir is not going to work.
27054       if test ! -d "$WIN_SDK_BASE/../lib"; then
27055         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27056 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27057         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27058 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27059       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27060         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27061 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27062         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27063         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27064           VS_ENV_ARGS="/x86"
27065         else
27066           VS_ENV_ARGS="/x64"
27067         fi
27068         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27069         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27070         # TODO: improve detection for other versions of SDK
27071         PLATFORM_TOOLSET="Windows7.1SDK"
27072       else
27073         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27074 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27075         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27076 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27077       fi
27078     fi
27079   fi
27080 
27081 
27082   if test "x$VS_ENV_CMD" != x; then
27083     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27084 
27085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27086 
27087   # First separate the path from the arguments. This will split at the first
27088   # space.
27089   complete="$VS_ENV_CMD"
27090   path="${complete%% *}"
27091   tmp="$complete EOL"
27092   arguments="${tmp#* }"
27093 
27094   # Input might be given as Windows format, start by converting to
27095   # unix format.
27096   new_path=`$CYGPATH -u "$path"`
27097 
27098   # Now try to locate executable using which
27099   new_path=`$WHICH "$new_path" 2> /dev/null`
27100   # bat and cmd files are not always considered executable in cygwin causing which
27101   # to not find them
27102   if test "x$new_path" = x \
27103       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27104       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27105     new_path=`$CYGPATH -u "$path"`
27106   fi
27107   if test "x$new_path" = x; then
27108     # Oops. Which didn't find the executable.
27109     # The splitting of arguments from the executable at a space might have been incorrect,
27110     # since paths with space are more likely in Windows. Give it another try with the whole
27111     # argument.
27112     path="$complete"
27113     arguments="EOL"
27114     new_path=`$CYGPATH -u "$path"`
27115     new_path=`$WHICH "$new_path" 2> /dev/null`
27116     # bat and cmd files are not always considered executable in cygwin causing which
27117     # to not find them
27118     if test "x$new_path" = x \
27119         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27120         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27121       new_path=`$CYGPATH -u "$path"`
27122     fi
27123     if test "x$new_path" = x; then
27124       # It's still not found. Now this is an unrecoverable error.
27125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27126 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27127       has_space=`$ECHO "$complete" | $GREP " "`
27128       if test "x$has_space" != x; then
27129         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27130 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27131       fi
27132       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27133     fi
27134   fi
27135 
27136   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27137   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27138   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27139   # "foo.exe" is OK but "foo" is an error.
27140   #
27141   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27142   # It is also a way to make sure we got the proper file name for the real test later on.
27143   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27144   if test "x$test_shortpath" = x; then
27145     # Short path failed, file does not exist as specified.
27146     # Try adding .exe or .cmd
27147     if test -f "${new_path}.exe"; then
27148       input_to_shortpath="${new_path}.exe"
27149     elif test -f "${new_path}.cmd"; then
27150       input_to_shortpath="${new_path}.cmd"
27151     else
27152       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27153 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27154       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27155 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27156       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27157     fi
27158   else
27159     input_to_shortpath="$new_path"
27160   fi
27161 
27162   # Call helper function which possibly converts this using DOS-style short mode.
27163   # If so, the updated path is stored in $new_path.
27164   new_path="$input_to_shortpath"
27165 
27166   input_path="$input_to_shortpath"
27167   # Check if we need to convert this using DOS-style short mode. If the path
27168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27169   # take no chances and rewrite it.
27170   # Note: m4 eats our [], so we need to use [ and ] instead.
27171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27172   if test "x$has_forbidden_chars" != x; then
27173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27174     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27175     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27176     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27177       # Going to short mode and back again did indeed matter. Since short mode is
27178       # case insensitive, let's make it lowercase to improve readability.
27179       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27180       # Now convert it back to Unix-stile (cygpath)
27181       input_path=`$CYGPATH -u "$shortmode_path"`
27182       new_path="$input_path"
27183     fi
27184   fi
27185 
27186   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27187   if test "x$test_cygdrive_prefix" = x; then
27188     # As a simple fix, exclude /usr/bin since it's not a real path.
27189     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27190       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27191       # a path prefixed by /cygdrive for fixpath to work.
27192       new_path="$CYGWIN_ROOT_PATH$input_path"
27193     fi
27194   fi
27195 
27196   # remove trailing .exe if any
27197   new_path="${new_path/%.exe/}"
27198 
27199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27200 
27201   # First separate the path from the arguments. This will split at the first
27202   # space.
27203   complete="$VS_ENV_CMD"
27204   path="${complete%% *}"
27205   tmp="$complete EOL"
27206   arguments="${tmp#* }"
27207 
27208   # Input might be given as Windows format, start by converting to
27209   # unix format.
27210   new_path="$path"
27211 
27212   windows_path="$new_path"
27213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27214     unix_path=`$CYGPATH -u "$windows_path"`
27215     new_path="$unix_path"
27216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27218     new_path="$unix_path"
27219   fi
27220 
27221 
27222   # Now try to locate executable using which
27223   new_path=`$WHICH "$new_path" 2> /dev/null`
27224 
27225   if test "x$new_path" = x; then
27226     # Oops. Which didn't find the executable.
27227     # The splitting of arguments from the executable at a space might have been incorrect,
27228     # since paths with space are more likely in Windows. Give it another try with the whole
27229     # argument.
27230     path="$complete"
27231     arguments="EOL"
27232     new_path="$path"
27233 
27234   windows_path="$new_path"
27235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27236     unix_path=`$CYGPATH -u "$windows_path"`
27237     new_path="$unix_path"
27238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27240     new_path="$unix_path"
27241   fi
27242 
27243 
27244     new_path=`$WHICH "$new_path" 2> /dev/null`
27245     # bat and cmd files are not always considered executable in MSYS causing which
27246     # to not find them
27247     if test "x$new_path" = x \
27248         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27249         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27250       new_path="$path"
27251 
27252   windows_path="$new_path"
27253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27254     unix_path=`$CYGPATH -u "$windows_path"`
27255     new_path="$unix_path"
27256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27258     new_path="$unix_path"
27259   fi
27260 
27261     fi
27262 
27263     if test "x$new_path" = x; then
27264       # It's still not found. Now this is an unrecoverable error.
27265       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27266 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27267       has_space=`$ECHO "$complete" | $GREP " "`
27268       if test "x$has_space" != x; then
27269         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27270 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27271       fi
27272       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27273     fi
27274   fi
27275 
27276   # Now new_path has a complete unix path to the binary
27277   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27278     # Keep paths in /bin as-is, but remove trailing .exe if any
27279     new_path="${new_path/%.exe/}"
27280     # Do not save /bin paths to all_fixpath_prefixes!
27281   else
27282     # Not in mixed or Windows style, start by that.
27283     new_path=`cmd //c echo $new_path`
27284 
27285   input_path="$new_path"
27286   # Check if we need to convert this using DOS-style short mode. If the path
27287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27288   # take no chances and rewrite it.
27289   # Note: m4 eats our [], so we need to use [ and ] instead.
27290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27291   if test "x$has_forbidden_chars" != x; then
27292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27294   fi
27295 
27296     # Output is in $new_path
27297 
27298   windows_path="$new_path"
27299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27300     unix_path=`$CYGPATH -u "$windows_path"`
27301     new_path="$unix_path"
27302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27304     new_path="$unix_path"
27305   fi
27306 
27307     # remove trailing .exe if any
27308     new_path="${new_path/%.exe/}"
27309 
27310     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27311     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27312   fi
27313 
27314   else
27315     # We're on a unix platform. Hooray! :)
27316     # First separate the path from the arguments. This will split at the first
27317     # space.
27318     complete="$VS_ENV_CMD"
27319     path="${complete%% *}"
27320     tmp="$complete EOL"
27321     arguments="${tmp#* }"
27322 
27323     # Cannot rely on the command "which" here since it doesn't always work.
27324     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27325     if test -z "$is_absolute_path"; then
27326       # Path to executable is not absolute. Find it.
27327       IFS_save="$IFS"
27328       IFS=:
27329       for p in $PATH; do
27330         if test -f "$p/$path" && test -x "$p/$path"; then
27331           new_path="$p/$path"
27332           break
27333         fi
27334       done
27335       IFS="$IFS_save"
27336     else
27337       # This is an absolute path, we can use it without further modifications.
27338       new_path="$path"
27339     fi
27340 
27341     if test "x$new_path" = x; then
27342       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27343 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27344       has_space=`$ECHO "$complete" | $GREP " "`
27345       if test "x$has_space" != x; then
27346         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27347 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27348       fi
27349       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27350     fi
27351   fi
27352 
27353   # Now join together the path and the arguments once again
27354   if test "x$arguments" != xEOL; then
27355     new_complete="$new_path ${arguments% *}"
27356   else
27357     new_complete="$new_path"
27358   fi
27359 
27360   if test "x$complete" != "x$new_complete"; then
27361     VS_ENV_CMD="$new_complete"
27362     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27363 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27364   fi
27365 
27366 
27367     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27368     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27369 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27370 
27371     # We need to create a couple of temporary files.
27372     VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27373     $MKDIR -p $VS_ENV_TMP_DIR
27374 
27375     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27376     # Instead create a shell script which will set the relevant variables when run.
27377     WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27378 
27379   unix_path="$WINPATH_VS_ENV_CMD"
27380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27381     windows_path=`$CYGPATH -m "$unix_path"`
27382     WINPATH_VS_ENV_CMD="$windows_path"
27383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27384     windows_path=`cmd //c echo $unix_path`
27385     WINPATH_VS_ENV_CMD="$windows_path"
27386   fi
27387 
27388     WINPATH_BASH="$BASH"
27389 
27390   unix_path="$WINPATH_BASH"
27391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27392     windows_path=`$CYGPATH -m "$unix_path"`
27393     WINPATH_BASH="$windows_path"
27394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27395     windows_path=`cmd //c echo $unix_path`
27396     WINPATH_BASH="$windows_path"
27397   fi
27398 
27399 
27400     # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27401     # script (executable by bash) that will setup the important variables.
27402     EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27403     $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27404     # This will end up something like:
27405     # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27406     $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27407     # These will end up something like:
27408     # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27409     # The trailing space for everyone except PATH is no typo, but is needed due
27410     # to trailing \ in the Windows paths. These will be stripped later.
27411     $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27412     $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27413     $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27414     $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27415     $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27416     $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27417 
27418     # Now execute the newly created bat file.
27419     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27420     # Change directory so we don't need to mess with Windows paths in redirects.
27421     cd $VS_ENV_TMP_DIR
27422     cmd /c extract-vs-env.bat | $CAT
27423     cd $CURDIR
27424 
27425     if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27426       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27427 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27428       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27429 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27430       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27431 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27432       as_fn_error $? "Cannot continue" "$LINENO" 5
27433     fi
27434 
27435     # Now set all paths and other env variables. This will allow the rest of
27436     # the configure script to find and run the compiler in the proper way.
27437     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27438 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27439     . $VS_ENV_TMP_DIR/set-vs-env.sh
27440     # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27441     # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27442   else
27443     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27444     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27445 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27446   fi
27447 
27448   # At this point, we should have correct variables in the environment, or we can't continue.
27449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27450 $as_echo_n "checking for Visual Studio variables... " >&6; }
27451 
27452   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27453     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27454       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27455 $as_echo "present but broken" >&6; }
27456       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27457     else
27458       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27459 $as_echo "ok" >&6; }
27460       # Remove any trailing "\" and " " from the variables.
27461       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27462       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27463       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27464       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27465       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27466       # Remove any paths containing # (typically F#) as that messes up make. This
27467       # is needed if visual studio was installed with F# support.
27468       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27469 
27470 
27471 
27472 
27473     fi
27474   else
27475     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27476 $as_echo "not found" >&6; }
27477 
27478     if test "x$VS_ENV_CMD" = x; then
27479       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27480 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27481       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27482 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27483     else
27484       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27485 $as_echo "$as_me: Running the extraction script failed." >&6;}
27486     fi
27487     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27488 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27489     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27490 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27491     as_fn_error $? "Cannot continue" "$LINENO" 5
27492   fi
27493 
27494     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27495     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27496     PATH="$VS_PATH"
27497     # The microsoft toolchain also requires INCLUDE and LIB to be set.
27498     export INCLUDE="$VS_INCLUDE"
27499     export LIB="$VS_LIB"
27500   fi
27501 
27502   # autoconf magic only relies on PATH, so update it if tools dir is specified
27503   OLD_PATH="$PATH"
27504 
27505   # For solaris we really need solaris tools, and not the GNU equivalent.
27506   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27507   # so add that to path before starting to probe.
27508   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27509   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27510     PATH="/usr/ccs/bin:$PATH"
27511   fi
27512 
27513   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27514   # override all other locations.
27515   if test "x$TOOLCHAIN_PATH" != x; then
27516     PATH=$TOOLCHAIN_PATH:$PATH
27517   fi
27518 
27519 
27520   #
27521   # Setup the compilers (CC and CXX)
27522   #
27523 
27524   COMPILER_NAME=C
27525   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27526 
27527   if test "x$CC" != x; then
27528     # User has supplied compiler name already, always let that override.
27529     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27530 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27531     if test "x`basename $CC`" = "x$CC"; then
27532       # A command without a complete path is provided, search $PATH.
27533 
27534       for ac_prog in $CC
27535 do
27536   # Extract the first word of "$ac_prog", so it can be a program name with args.
27537 set dummy $ac_prog; ac_word=$2
27538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27539 $as_echo_n "checking for $ac_word... " >&6; }
27540 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27541   $as_echo_n "(cached) " >&6
27542 else
27543   case $POTENTIAL_CC in
27544   [\\/]* | ?:[\\/]*)
27545   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27546   ;;
27547   *)
27548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27549 for as_dir in $PATH
27550 do
27551   IFS=$as_save_IFS
27552   test -z "$as_dir" && as_dir=.
27553     for ac_exec_ext in '' $ac_executable_extensions; do
27554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27555     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27557     break 2
27558   fi
27559 done
27560   done
27561 IFS=$as_save_IFS
27562 
27563   ;;
27564 esac
27565 fi
27566 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27567 if test -n "$POTENTIAL_CC"; then
27568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27569 $as_echo "$POTENTIAL_CC" >&6; }
27570 else
27571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27572 $as_echo "no" >&6; }
27573 fi
27574 
27575 
27576   test -n "$POTENTIAL_CC" && break
27577 done
27578 
27579       if test "x$POTENTIAL_CC" != x; then
27580         CC=$POTENTIAL_CC
27581       else
27582         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27583       fi
27584     else
27585       # Otherwise it might already be a complete path
27586       if test ! -x "$CC"; then
27587         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27588       fi
27589     fi
27590   else
27591     # No user supplied value. Locate compiler ourselves.
27592 
27593     # If we are cross compiling, assume cross compilation tools follows the
27594     # cross compilation standard where they are prefixed with the autoconf
27595     # standard name for the target. For example the binary
27596     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27597     # If we are not cross compiling, then the default compiler name will be
27598     # used.
27599 
27600     CC=
27601     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27602     # before checking the rest of the PATH.
27603     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27604     # step, this should not be necessary.
27605     if test -n "$TOOLCHAIN_PATH"; then
27606       PATH_save="$PATH"
27607       PATH="$TOOLCHAIN_PATH"
27608       for ac_prog in $SEARCH_LIST
27609 do
27610   # Extract the first word of "$ac_prog", so it can be a program name with args.
27611 set dummy $ac_prog; ac_word=$2
27612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27613 $as_echo_n "checking for $ac_word... " >&6; }
27614 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27615   $as_echo_n "(cached) " >&6
27616 else
27617   case $TOOLCHAIN_PATH_CC in
27618   [\\/]* | ?:[\\/]*)
27619   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27620   ;;
27621   *)
27622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27623 for as_dir in $PATH
27624 do
27625   IFS=$as_save_IFS
27626   test -z "$as_dir" && as_dir=.
27627     for ac_exec_ext in '' $ac_executable_extensions; do
27628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27629     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27631     break 2
27632   fi
27633 done
27634   done
27635 IFS=$as_save_IFS
27636 
27637   ;;
27638 esac
27639 fi
27640 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27641 if test -n "$TOOLCHAIN_PATH_CC"; then
27642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27643 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27644 else
27645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27646 $as_echo "no" >&6; }
27647 fi
27648 
27649 
27650   test -n "$TOOLCHAIN_PATH_CC" && break
27651 done
27652 
27653       CC=$TOOLCHAIN_PATH_CC
27654       PATH="$PATH_save"
27655     fi
27656 
27657     # AC_PATH_PROGS can't be run multiple times with the same variable,
27658     # so create a new name for this run.
27659     if test "x$CC" = x; then
27660       for ac_prog in $SEARCH_LIST
27661 do
27662   # Extract the first word of "$ac_prog", so it can be a program name with args.
27663 set dummy $ac_prog; ac_word=$2
27664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27665 $as_echo_n "checking for $ac_word... " >&6; }
27666 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27667   $as_echo_n "(cached) " >&6
27668 else
27669   case $POTENTIAL_CC in
27670   [\\/]* | ?:[\\/]*)
27671   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27672   ;;
27673   *)
27674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27675 for as_dir in $PATH
27676 do
27677   IFS=$as_save_IFS
27678   test -z "$as_dir" && as_dir=.
27679     for ac_exec_ext in '' $ac_executable_extensions; do
27680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27681     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27683     break 2
27684   fi
27685 done
27686   done
27687 IFS=$as_save_IFS
27688 
27689   ;;
27690 esac
27691 fi
27692 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27693 if test -n "$POTENTIAL_CC"; then
27694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27695 $as_echo "$POTENTIAL_CC" >&6; }
27696 else
27697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27698 $as_echo "no" >&6; }
27699 fi
27700 
27701 
27702   test -n "$POTENTIAL_CC" && break
27703 done
27704 
27705       CC=$POTENTIAL_CC
27706     fi
27707 
27708     if test "x$CC" = x; then
27709 
27710   # Print a helpful message on how to acquire the necessary build dependency.
27711   # devkit is the help tag: freetype, cups, pulse, alsa etc
27712   MISSING_DEPENDENCY=devkit
27713 
27714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27715     cygwin_help $MISSING_DEPENDENCY
27716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27717     msys_help $MISSING_DEPENDENCY
27718   else
27719     PKGHANDLER_COMMAND=
27720 
27721     case $PKGHANDLER in
27722       apt-get)
27723         apt_help     $MISSING_DEPENDENCY ;;
27724       yum)
27725         yum_help     $MISSING_DEPENDENCY ;;
27726       port)
27727         port_help    $MISSING_DEPENDENCY ;;
27728       pkgutil)
27729         pkgutil_help $MISSING_DEPENDENCY ;;
27730       pkgadd)
27731         pkgadd_help  $MISSING_DEPENDENCY ;;
27732     esac
27733 
27734     if test "x$PKGHANDLER_COMMAND" != x; then
27735       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27736     fi
27737   fi
27738 
27739       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27740     fi
27741   fi
27742 
27743   # Now we have a compiler binary in CC. Make sure it's okay.
27744 
27745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27746 
27747   # First separate the path from the arguments. This will split at the first
27748   # space.
27749   complete="$CC"
27750   path="${complete%% *}"
27751   tmp="$complete EOL"
27752   arguments="${tmp#* }"
27753 
27754   # Input might be given as Windows format, start by converting to
27755   # unix format.
27756   new_path=`$CYGPATH -u "$path"`
27757 
27758   # Now try to locate executable using which
27759   new_path=`$WHICH "$new_path" 2> /dev/null`
27760   # bat and cmd files are not always considered executable in cygwin causing which
27761   # to not find them
27762   if test "x$new_path" = x \
27763       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27764       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27765     new_path=`$CYGPATH -u "$path"`
27766   fi
27767   if test "x$new_path" = x; then
27768     # Oops. Which didn't find the executable.
27769     # The splitting of arguments from the executable at a space might have been incorrect,
27770     # since paths with space are more likely in Windows. Give it another try with the whole
27771     # argument.
27772     path="$complete"
27773     arguments="EOL"
27774     new_path=`$CYGPATH -u "$path"`
27775     new_path=`$WHICH "$new_path" 2> /dev/null`
27776     # bat and cmd files are not always considered executable in cygwin causing which
27777     # to not find them
27778     if test "x$new_path" = x \
27779         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27780         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27781       new_path=`$CYGPATH -u "$path"`
27782     fi
27783     if test "x$new_path" = x; then
27784       # It's still not found. Now this is an unrecoverable error.
27785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27786 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27787       has_space=`$ECHO "$complete" | $GREP " "`
27788       if test "x$has_space" != x; then
27789         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27791       fi
27792       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27793     fi
27794   fi
27795 
27796   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27797   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27798   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27799   # "foo.exe" is OK but "foo" is an error.
27800   #
27801   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27802   # It is also a way to make sure we got the proper file name for the real test later on.
27803   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27804   if test "x$test_shortpath" = x; then
27805     # Short path failed, file does not exist as specified.
27806     # Try adding .exe or .cmd
27807     if test -f "${new_path}.exe"; then
27808       input_to_shortpath="${new_path}.exe"
27809     elif test -f "${new_path}.cmd"; then
27810       input_to_shortpath="${new_path}.cmd"
27811     else
27812       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27813 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27814       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27815 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27816       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27817     fi
27818   else
27819     input_to_shortpath="$new_path"
27820   fi
27821 
27822   # Call helper function which possibly converts this using DOS-style short mode.
27823   # If so, the updated path is stored in $new_path.
27824   new_path="$input_to_shortpath"
27825 
27826   input_path="$input_to_shortpath"
27827   # Check if we need to convert this using DOS-style short mode. If the path
27828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27829   # take no chances and rewrite it.
27830   # Note: m4 eats our [], so we need to use [ and ] instead.
27831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27832   if test "x$has_forbidden_chars" != x; then
27833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27834     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27835     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27836     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27837       # Going to short mode and back again did indeed matter. Since short mode is
27838       # case insensitive, let's make it lowercase to improve readability.
27839       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27840       # Now convert it back to Unix-stile (cygpath)
27841       input_path=`$CYGPATH -u "$shortmode_path"`
27842       new_path="$input_path"
27843     fi
27844   fi
27845 
27846   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27847   if test "x$test_cygdrive_prefix" = x; then
27848     # As a simple fix, exclude /usr/bin since it's not a real path.
27849     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27850       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27851       # a path prefixed by /cygdrive for fixpath to work.
27852       new_path="$CYGWIN_ROOT_PATH$input_path"
27853     fi
27854   fi
27855 
27856   # remove trailing .exe if any
27857   new_path="${new_path/%.exe/}"
27858 
27859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27860 
27861   # First separate the path from the arguments. This will split at the first
27862   # space.
27863   complete="$CC"
27864   path="${complete%% *}"
27865   tmp="$complete EOL"
27866   arguments="${tmp#* }"
27867 
27868   # Input might be given as Windows format, start by converting to
27869   # unix format.
27870   new_path="$path"
27871 
27872   windows_path="$new_path"
27873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27874     unix_path=`$CYGPATH -u "$windows_path"`
27875     new_path="$unix_path"
27876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27878     new_path="$unix_path"
27879   fi
27880 
27881 
27882   # Now try to locate executable using which
27883   new_path=`$WHICH "$new_path" 2> /dev/null`
27884 
27885   if test "x$new_path" = x; then
27886     # Oops. Which didn't find the executable.
27887     # The splitting of arguments from the executable at a space might have been incorrect,
27888     # since paths with space are more likely in Windows. Give it another try with the whole
27889     # argument.
27890     path="$complete"
27891     arguments="EOL"
27892     new_path="$path"
27893 
27894   windows_path="$new_path"
27895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27896     unix_path=`$CYGPATH -u "$windows_path"`
27897     new_path="$unix_path"
27898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27900     new_path="$unix_path"
27901   fi
27902 
27903 
27904     new_path=`$WHICH "$new_path" 2> /dev/null`
27905     # bat and cmd files are not always considered executable in MSYS causing which
27906     # to not find them
27907     if test "x$new_path" = x \
27908         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27909         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27910       new_path="$path"
27911 
27912   windows_path="$new_path"
27913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27914     unix_path=`$CYGPATH -u "$windows_path"`
27915     new_path="$unix_path"
27916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27918     new_path="$unix_path"
27919   fi
27920 
27921     fi
27922 
27923     if test "x$new_path" = x; then
27924       # It's still not found. Now this is an unrecoverable error.
27925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27926 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27927       has_space=`$ECHO "$complete" | $GREP " "`
27928       if test "x$has_space" != x; then
27929         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27930 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27931       fi
27932       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27933     fi
27934   fi
27935 
27936   # Now new_path has a complete unix path to the binary
27937   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27938     # Keep paths in /bin as-is, but remove trailing .exe if any
27939     new_path="${new_path/%.exe/}"
27940     # Do not save /bin paths to all_fixpath_prefixes!
27941   else
27942     # Not in mixed or Windows style, start by that.
27943     new_path=`cmd //c echo $new_path`
27944 
27945   input_path="$new_path"
27946   # Check if we need to convert this using DOS-style short mode. If the path
27947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27948   # take no chances and rewrite it.
27949   # Note: m4 eats our [], so we need to use [ and ] instead.
27950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27951   if test "x$has_forbidden_chars" != x; then
27952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27954   fi
27955 
27956     # Output is in $new_path
27957 
27958   windows_path="$new_path"
27959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27960     unix_path=`$CYGPATH -u "$windows_path"`
27961     new_path="$unix_path"
27962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27964     new_path="$unix_path"
27965   fi
27966 
27967     # remove trailing .exe if any
27968     new_path="${new_path/%.exe/}"
27969 
27970     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27971     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27972   fi
27973 
27974   else
27975     # We're on a unix platform. Hooray! :)
27976     # First separate the path from the arguments. This will split at the first
27977     # space.
27978     complete="$CC"
27979     path="${complete%% *}"
27980     tmp="$complete EOL"
27981     arguments="${tmp#* }"
27982 
27983     # Cannot rely on the command "which" here since it doesn't always work.
27984     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27985     if test -z "$is_absolute_path"; then
27986       # Path to executable is not absolute. Find it.
27987       IFS_save="$IFS"
27988       IFS=:
27989       for p in $PATH; do
27990         if test -f "$p/$path" && test -x "$p/$path"; then
27991           new_path="$p/$path"
27992           break
27993         fi
27994       done
27995       IFS="$IFS_save"
27996     else
27997       # This is an absolute path, we can use it without further modifications.
27998       new_path="$path"
27999     fi
28000 
28001     if test "x$new_path" = x; then
28002       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28003 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28004       has_space=`$ECHO "$complete" | $GREP " "`
28005       if test "x$has_space" != x; then
28006         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28007 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28008       fi
28009       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28010     fi
28011   fi
28012 
28013   # Now join together the path and the arguments once again
28014   if test "x$arguments" != xEOL; then
28015     new_complete="$new_path ${arguments% *}"
28016   else
28017     new_complete="$new_path"
28018   fi
28019 
28020   if test "x$complete" != "x$new_complete"; then
28021     CC="$new_complete"
28022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28023 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28024   fi
28025 
28026   TEST_COMPILER="$CC"
28027   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28028   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28029   if test "x$OPENJDK_BUILD_OS" != xaix; then
28030     # FIXME: This test should not be needed anymore; we don't do that for any platform.
28031     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28032 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
28033 
28034   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28035     # Follow a chain of symbolic links. Use readlink
28036     # where it exists, else fall back to horribly
28037     # complicated shell code.
28038     if test "x$READLINK_TESTED" != yes; then
28039       # On MacOSX there is a readlink tool with a different
28040       # purpose than the GNU readlink tool. Check the found readlink.
28041       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28042       if test "x$ISGNU" = x; then
28043         # A readlink that we do not know how to use.
28044         # Are there other non-GNU readlinks out there?
28045         READLINK_TESTED=yes
28046         READLINK=
28047       fi
28048     fi
28049 
28050     if test "x$READLINK" != x; then
28051       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28052     else
28053       # Save the current directory for restoring afterwards
28054       STARTDIR=$PWD
28055       COUNTER=0
28056       sym_link_dir=`$DIRNAME $TEST_COMPILER`
28057       sym_link_file=`$BASENAME $TEST_COMPILER`
28058       cd $sym_link_dir
28059       # Use -P flag to resolve symlinks in directories.
28060       cd `$THEPWDCMD -P`
28061       sym_link_dir=`$THEPWDCMD -P`
28062       # Resolve file symlinks
28063       while test $COUNTER -lt 20; do
28064         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28065         if test "x$ISLINK" == x; then
28066           # This is not a symbolic link! We are done!
28067           break
28068         fi
28069         # Again resolve directory symlinks since the target of the just found
28070         # link could be in a different directory
28071         cd `$DIRNAME $ISLINK`
28072         sym_link_dir=`$THEPWDCMD -P`
28073         sym_link_file=`$BASENAME $ISLINK`
28074         let COUNTER=COUNTER+1
28075       done
28076       cd $STARTDIR
28077       TEST_COMPILER=$sym_link_dir/$sym_link_file
28078     fi
28079   fi
28080 
28081     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28082 $as_echo "$TEST_COMPILER" >&6; }
28083   fi
28084   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28085 $as_echo_n "checking if CC is disguised ccache... " >&6; }
28086 
28087   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28088   if test "x$COMPILER_BASENAME" = "xccache"; then
28089     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28090 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28091     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28092     # We want to control ccache invocation ourselves, so ignore this cc and try
28093     # searching again.
28094 
28095     # Remove the path to the fake ccache cc from the PATH
28096     RETRY_COMPILER_SAVED_PATH="$PATH"
28097     COMPILER_DIRNAME=`$DIRNAME $CC`
28098     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28099 
28100     # Try again looking for our compiler
28101     if test -n "$ac_tool_prefix"; then
28102   for ac_prog in $TOOLCHAIN_CC_BINARY
28103   do
28104     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28105 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28107 $as_echo_n "checking for $ac_word... " >&6; }
28108 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28109   $as_echo_n "(cached) " >&6
28110 else
28111   if test -n "$PROPER_COMPILER_CC"; then
28112   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28113 else
28114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28115 for as_dir in $PATH
28116 do
28117   IFS=$as_save_IFS
28118   test -z "$as_dir" && as_dir=.
28119     for ac_exec_ext in '' $ac_executable_extensions; do
28120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28121     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28123     break 2
28124   fi
28125 done
28126   done
28127 IFS=$as_save_IFS
28128 
28129 fi
28130 fi
28131 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28132 if test -n "$PROPER_COMPILER_CC"; then
28133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28134 $as_echo "$PROPER_COMPILER_CC" >&6; }
28135 else
28136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28137 $as_echo "no" >&6; }
28138 fi
28139 
28140 
28141     test -n "$PROPER_COMPILER_CC" && break
28142   done
28143 fi
28144 if test -z "$PROPER_COMPILER_CC"; then
28145   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28146   for ac_prog in $TOOLCHAIN_CC_BINARY
28147 do
28148   # Extract the first word of "$ac_prog", so it can be a program name with args.
28149 set dummy $ac_prog; ac_word=$2
28150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28151 $as_echo_n "checking for $ac_word... " >&6; }
28152 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28153   $as_echo_n "(cached) " >&6
28154 else
28155   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28156   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28157 else
28158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28159 for as_dir in $PATH
28160 do
28161   IFS=$as_save_IFS
28162   test -z "$as_dir" && as_dir=.
28163     for ac_exec_ext in '' $ac_executable_extensions; do
28164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28165     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28167     break 2
28168   fi
28169 done
28170   done
28171 IFS=$as_save_IFS
28172 
28173 fi
28174 fi
28175 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28176 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28178 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28179 else
28180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28181 $as_echo "no" >&6; }
28182 fi
28183 
28184 
28185   test -n "$ac_ct_PROPER_COMPILER_CC" && break
28186 done
28187 
28188   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28189     PROPER_COMPILER_CC=""
28190   else
28191     case $cross_compiling:$ac_tool_warned in
28192 yes:)
28193 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28194 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28195 ac_tool_warned=yes ;;
28196 esac
28197     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28198   fi
28199 fi
28200 
28201 
28202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28203 
28204   # First separate the path from the arguments. This will split at the first
28205   # space.
28206   complete="$PROPER_COMPILER_CC"
28207   path="${complete%% *}"
28208   tmp="$complete EOL"
28209   arguments="${tmp#* }"
28210 
28211   # Input might be given as Windows format, start by converting to
28212   # unix format.
28213   new_path=`$CYGPATH -u "$path"`
28214 
28215   # Now try to locate executable using which
28216   new_path=`$WHICH "$new_path" 2> /dev/null`
28217   # bat and cmd files are not always considered executable in cygwin causing which
28218   # to not find them
28219   if test "x$new_path" = x \
28220       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28221       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28222     new_path=`$CYGPATH -u "$path"`
28223   fi
28224   if test "x$new_path" = x; then
28225     # Oops. Which didn't find the executable.
28226     # The splitting of arguments from the executable at a space might have been incorrect,
28227     # since paths with space are more likely in Windows. Give it another try with the whole
28228     # argument.
28229     path="$complete"
28230     arguments="EOL"
28231     new_path=`$CYGPATH -u "$path"`
28232     new_path=`$WHICH "$new_path" 2> /dev/null`
28233     # bat and cmd files are not always considered executable in cygwin causing which
28234     # to not find them
28235     if test "x$new_path" = x \
28236         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28237         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28238       new_path=`$CYGPATH -u "$path"`
28239     fi
28240     if test "x$new_path" = x; then
28241       # It's still not found. Now this is an unrecoverable error.
28242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28243 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28244       has_space=`$ECHO "$complete" | $GREP " "`
28245       if test "x$has_space" != x; then
28246         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28247 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28248       fi
28249       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28250     fi
28251   fi
28252 
28253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28256   # "foo.exe" is OK but "foo" is an error.
28257   #
28258   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28259   # It is also a way to make sure we got the proper file name for the real test later on.
28260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28261   if test "x$test_shortpath" = x; then
28262     # Short path failed, file does not exist as specified.
28263     # Try adding .exe or .cmd
28264     if test -f "${new_path}.exe"; then
28265       input_to_shortpath="${new_path}.exe"
28266     elif test -f "${new_path}.cmd"; then
28267       input_to_shortpath="${new_path}.cmd"
28268     else
28269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28270 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28271       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28272 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28273       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28274     fi
28275   else
28276     input_to_shortpath="$new_path"
28277   fi
28278 
28279   # Call helper function which possibly converts this using DOS-style short mode.
28280   # If so, the updated path is stored in $new_path.
28281   new_path="$input_to_shortpath"
28282 
28283   input_path="$input_to_shortpath"
28284   # Check if we need to convert this using DOS-style short mode. If the path
28285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28286   # take no chances and rewrite it.
28287   # Note: m4 eats our [], so we need to use [ and ] instead.
28288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28289   if test "x$has_forbidden_chars" != x; then
28290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28294       # Going to short mode and back again did indeed matter. Since short mode is
28295       # case insensitive, let's make it lowercase to improve readability.
28296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28297       # Now convert it back to Unix-stile (cygpath)
28298       input_path=`$CYGPATH -u "$shortmode_path"`
28299       new_path="$input_path"
28300     fi
28301   fi
28302 
28303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28304   if test "x$test_cygdrive_prefix" = x; then
28305     # As a simple fix, exclude /usr/bin since it's not a real path.
28306     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28308       # a path prefixed by /cygdrive for fixpath to work.
28309       new_path="$CYGWIN_ROOT_PATH$input_path"
28310     fi
28311   fi
28312 
28313   # remove trailing .exe if any
28314   new_path="${new_path/%.exe/}"
28315 
28316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28317 
28318   # First separate the path from the arguments. This will split at the first
28319   # space.
28320   complete="$PROPER_COMPILER_CC"
28321   path="${complete%% *}"
28322   tmp="$complete EOL"
28323   arguments="${tmp#* }"
28324 
28325   # Input might be given as Windows format, start by converting to
28326   # unix format.
28327   new_path="$path"
28328 
28329   windows_path="$new_path"
28330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28331     unix_path=`$CYGPATH -u "$windows_path"`
28332     new_path="$unix_path"
28333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28335     new_path="$unix_path"
28336   fi
28337 
28338 
28339   # Now try to locate executable using which
28340   new_path=`$WHICH "$new_path" 2> /dev/null`
28341 
28342   if test "x$new_path" = x; then
28343     # Oops. Which didn't find the executable.
28344     # The splitting of arguments from the executable at a space might have been incorrect,
28345     # since paths with space are more likely in Windows. Give it another try with the whole
28346     # argument.
28347     path="$complete"
28348     arguments="EOL"
28349     new_path="$path"
28350 
28351   windows_path="$new_path"
28352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28353     unix_path=`$CYGPATH -u "$windows_path"`
28354     new_path="$unix_path"
28355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28357     new_path="$unix_path"
28358   fi
28359 
28360 
28361     new_path=`$WHICH "$new_path" 2> /dev/null`
28362     # bat and cmd files are not always considered executable in MSYS causing which
28363     # to not find them
28364     if test "x$new_path" = x \
28365         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28366         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28367       new_path="$path"
28368 
28369   windows_path="$new_path"
28370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28371     unix_path=`$CYGPATH -u "$windows_path"`
28372     new_path="$unix_path"
28373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28375     new_path="$unix_path"
28376   fi
28377 
28378     fi
28379 
28380     if test "x$new_path" = x; then
28381       # It's still not found. Now this is an unrecoverable error.
28382       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28383 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28384       has_space=`$ECHO "$complete" | $GREP " "`
28385       if test "x$has_space" != x; then
28386         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28387 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28388       fi
28389       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28390     fi
28391   fi
28392 
28393   # Now new_path has a complete unix path to the binary
28394   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28395     # Keep paths in /bin as-is, but remove trailing .exe if any
28396     new_path="${new_path/%.exe/}"
28397     # Do not save /bin paths to all_fixpath_prefixes!
28398   else
28399     # Not in mixed or Windows style, start by that.
28400     new_path=`cmd //c echo $new_path`
28401 
28402   input_path="$new_path"
28403   # Check if we need to convert this using DOS-style short mode. If the path
28404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28405   # take no chances and rewrite it.
28406   # Note: m4 eats our [], so we need to use [ and ] instead.
28407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28408   if test "x$has_forbidden_chars" != x; then
28409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28410     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28411   fi
28412 
28413     # Output is in $new_path
28414 
28415   windows_path="$new_path"
28416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28417     unix_path=`$CYGPATH -u "$windows_path"`
28418     new_path="$unix_path"
28419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28421     new_path="$unix_path"
28422   fi
28423 
28424     # remove trailing .exe if any
28425     new_path="${new_path/%.exe/}"
28426 
28427     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28428     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28429   fi
28430 
28431   else
28432     # We're on a unix platform. Hooray! :)
28433     # First separate the path from the arguments. This will split at the first
28434     # space.
28435     complete="$PROPER_COMPILER_CC"
28436     path="${complete%% *}"
28437     tmp="$complete EOL"
28438     arguments="${tmp#* }"
28439 
28440     # Cannot rely on the command "which" here since it doesn't always work.
28441     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28442     if test -z "$is_absolute_path"; then
28443       # Path to executable is not absolute. Find it.
28444       IFS_save="$IFS"
28445       IFS=:
28446       for p in $PATH; do
28447         if test -f "$p/$path" && test -x "$p/$path"; then
28448           new_path="$p/$path"
28449           break
28450         fi
28451       done
28452       IFS="$IFS_save"
28453     else
28454       # This is an absolute path, we can use it without further modifications.
28455       new_path="$path"
28456     fi
28457 
28458     if test "x$new_path" = x; then
28459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28460 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28461       has_space=`$ECHO "$complete" | $GREP " "`
28462       if test "x$has_space" != x; then
28463         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28464 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28465       fi
28466       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28467     fi
28468   fi
28469 
28470   # Now join together the path and the arguments once again
28471   if test "x$arguments" != xEOL; then
28472     new_complete="$new_path ${arguments% *}"
28473   else
28474     new_complete="$new_path"
28475   fi
28476 
28477   if test "x$complete" != "x$new_complete"; then
28478     PROPER_COMPILER_CC="$new_complete"
28479     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28480 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28481   fi
28482 
28483     PATH="$RETRY_COMPILER_SAVED_PATH"
28484 
28485     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28486 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28487 
28488   if test "x$OPENJDK_BUILD_OS" != xwindows; then
28489     # Follow a chain of symbolic links. Use readlink
28490     # where it exists, else fall back to horribly
28491     # complicated shell code.
28492     if test "x$READLINK_TESTED" != yes; then
28493       # On MacOSX there is a readlink tool with a different
28494       # purpose than the GNU readlink tool. Check the found readlink.
28495       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28496       if test "x$ISGNU" = x; then
28497         # A readlink that we do not know how to use.
28498         # Are there other non-GNU readlinks out there?
28499         READLINK_TESTED=yes
28500         READLINK=
28501       fi
28502     fi
28503 
28504     if test "x$READLINK" != x; then
28505       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28506     else
28507       # Save the current directory for restoring afterwards
28508       STARTDIR=$PWD
28509       COUNTER=0
28510       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28511       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28512       cd $sym_link_dir
28513       # Use -P flag to resolve symlinks in directories.
28514       cd `$THEPWDCMD -P`
28515       sym_link_dir=`$THEPWDCMD -P`
28516       # Resolve file symlinks
28517       while test $COUNTER -lt 20; do
28518         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28519         if test "x$ISLINK" == x; then
28520           # This is not a symbolic link! We are done!
28521           break
28522         fi
28523         # Again resolve directory symlinks since the target of the just found
28524         # link could be in a different directory
28525         cd `$DIRNAME $ISLINK`
28526         sym_link_dir=`$THEPWDCMD -P`
28527         sym_link_file=`$BASENAME $ISLINK`
28528         let COUNTER=COUNTER+1
28529       done
28530       cd $STARTDIR
28531       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28532     fi
28533   fi
28534 
28535     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28536 $as_echo "$PROPER_COMPILER_CC" >&6; }
28537     CC="$PROPER_COMPILER_CC"
28538   else
28539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28540 $as_echo "no, keeping CC" >&6; }
28541   fi
28542 
28543 
28544   COMPILER=$CC
28545   COMPILER_NAME=$COMPILER_NAME
28546 
28547   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28548     # cc -V output typically looks like
28549     #     cc: Sun C 5.12 Linux_i386 2011/11/16
28550     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28551     # Check that this is likely to be the Solaris Studio cc.
28552     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28553     if test $? -ne 0; then
28554       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28555       { $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
28556 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28557       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28558 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28559       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28560 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28561       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28562     fi
28563     # Remove usage instructions (if present), and
28564     # collapse compiler output into a single line
28565     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28566         $SED -e 's/ *[Uu]sage:.*//'`
28567     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28568         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28569   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28570     # xlc -qversion output typically looks like
28571     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28572     #     Version: 11.01.0000.0015
28573     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28574     # Check that this is likely to be the IBM XL C compiler.
28575     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28576     if test $? -ne 0; then
28577       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28578       { $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
28579 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28580       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28581 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28582       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28583 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28584       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28585     fi
28586     # Collapse compiler output into a single line
28587     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28588     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28589         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28590   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28591     # There is no specific version flag, but all output starts with a version string.
28592     # First line typically looks something like:
28593     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28594     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28595     # Check that this is likely to be Microsoft CL.EXE.
28596     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28597     if test $? -ne 0; then
28598       { $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
28599 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28600       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28601 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28602       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28603     fi
28604     # Collapse compiler output into a single line
28605     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28606     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28607         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28608   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28609     # gcc --version output typically looks like
28610     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28611     #     Copyright (C) 2013 Free Software Foundation, Inc.
28612     #     This is free software; see the source for copying conditions.  There is NO
28613     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28614     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28615     # Check that this is likely to be GCC.
28616     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28617     if test $? -ne 0; then
28618       { $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
28619 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28620       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28621 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28622       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28623     fi
28624     # Remove Copyright and legalese from version string, and
28625     # collapse into a single line
28626     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28627         $SED -e 's/ *Copyright .*//'`
28628     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28629         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28630   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28631     # clang --version output typically looks like
28632     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28633     #    clang version 3.3 (tags/RELEASE_33/final)
28634     # or
28635     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28636     #    Target: x86_64-pc-linux-gnu
28637     #    Thread model: posix
28638     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28639     # Check that this is likely to be clang
28640     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28641     if test $? -ne 0; then
28642       { $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
28643 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28644       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28645 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28646       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28647     fi
28648     # Collapse compiler output into a single line
28649     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28650     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28651         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28652   else
28653       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28654   fi
28655   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28656   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28657   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28658   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28659 
28660   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28661 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28662 
28663 
28664   # Now that we have resolved CC ourself, let autoconf have its go at it
28665   ac_ext=c
28666 ac_cpp='$CPP $CPPFLAGS'
28667 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28668 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28669 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28670 if test -n "$ac_tool_prefix"; then
28671   for ac_prog in $CC
28672   do
28673     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28674 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28676 $as_echo_n "checking for $ac_word... " >&6; }
28677 if ${ac_cv_prog_CC+:} false; then :
28678   $as_echo_n "(cached) " >&6
28679 else
28680   if test -n "$CC"; then
28681   ac_cv_prog_CC="$CC" # Let the user override the test.
28682 else
28683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28684 for as_dir in $PATH
28685 do
28686   IFS=$as_save_IFS
28687   test -z "$as_dir" && as_dir=.
28688     for ac_exec_ext in '' $ac_executable_extensions; do
28689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28690     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28692     break 2
28693   fi
28694 done
28695   done
28696 IFS=$as_save_IFS
28697 
28698 fi
28699 fi
28700 CC=$ac_cv_prog_CC
28701 if test -n "$CC"; then
28702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28703 $as_echo "$CC" >&6; }
28704 else
28705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28706 $as_echo "no" >&6; }
28707 fi
28708 
28709 
28710     test -n "$CC" && break
28711   done
28712 fi
28713 if test -z "$CC"; then
28714   ac_ct_CC=$CC
28715   for ac_prog in $CC
28716 do
28717   # Extract the first word of "$ac_prog", so it can be a program name with args.
28718 set dummy $ac_prog; ac_word=$2
28719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28720 $as_echo_n "checking for $ac_word... " >&6; }
28721 if ${ac_cv_prog_ac_ct_CC+:} false; then :
28722   $as_echo_n "(cached) " >&6
28723 else
28724   if test -n "$ac_ct_CC"; then
28725   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28726 else
28727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28728 for as_dir in $PATH
28729 do
28730   IFS=$as_save_IFS
28731   test -z "$as_dir" && as_dir=.
28732     for ac_exec_ext in '' $ac_executable_extensions; do
28733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28734     ac_cv_prog_ac_ct_CC="$ac_prog"
28735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28736     break 2
28737   fi
28738 done
28739   done
28740 IFS=$as_save_IFS
28741 
28742 fi
28743 fi
28744 ac_ct_CC=$ac_cv_prog_ac_ct_CC
28745 if test -n "$ac_ct_CC"; then
28746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28747 $as_echo "$ac_ct_CC" >&6; }
28748 else
28749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28750 $as_echo "no" >&6; }
28751 fi
28752 
28753 
28754   test -n "$ac_ct_CC" && break
28755 done
28756 
28757   if test "x$ac_ct_CC" = x; then
28758     CC=""
28759   else
28760     case $cross_compiling:$ac_tool_warned in
28761 yes:)
28762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28763 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28764 ac_tool_warned=yes ;;
28765 esac
28766     CC=$ac_ct_CC
28767   fi
28768 fi
28769 
28770 
28771 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28772 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28773 as_fn_error $? "no acceptable C compiler found in \$PATH
28774 See \`config.log' for more details" "$LINENO" 5; }
28775 
28776 # Provide some information about the compiler.
28777 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28778 set X $ac_compile
28779 ac_compiler=$2
28780 for ac_option in --version -v -V -qversion; do
28781   { { ac_try="$ac_compiler $ac_option >&5"
28782 case "(($ac_try" in
28783   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28784   *) ac_try_echo=$ac_try;;
28785 esac
28786 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28787 $as_echo "$ac_try_echo"; } >&5
28788   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28789   ac_status=$?
28790   if test -s conftest.err; then
28791     sed '10a\
28792 ... rest of stderr output deleted ...
28793          10q' conftest.err >conftest.er1
28794     cat conftest.er1 >&5
28795   fi
28796   rm -f conftest.er1 conftest.err
28797   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28798   test $ac_status = 0; }
28799 done
28800 
28801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28802 /* end confdefs.h.  */
28803 
28804 int
28805 main ()
28806 {
28807 
28808   ;
28809   return 0;
28810 }
28811 _ACEOF
28812 ac_clean_files_save=$ac_clean_files
28813 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28814 # Try to create an executable without -o first, disregard a.out.
28815 # It will help us diagnose broken compilers, and finding out an intuition
28816 # of exeext.
28817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28818 $as_echo_n "checking whether the C compiler works... " >&6; }
28819 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28820 
28821 # The possible output files:
28822 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28823 
28824 ac_rmfiles=
28825 for ac_file in $ac_files
28826 do
28827   case $ac_file in
28828     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28829     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28830   esac
28831 done
28832 rm -f $ac_rmfiles
28833 
28834 if { { ac_try="$ac_link_default"
28835 case "(($ac_try" in
28836   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28837   *) ac_try_echo=$ac_try;;
28838 esac
28839 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28840 $as_echo "$ac_try_echo"; } >&5
28841   (eval "$ac_link_default") 2>&5
28842   ac_status=$?
28843   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28844   test $ac_status = 0; }; then :
28845   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28846 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28847 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
28848 # so that the user can short-circuit this test for compilers unknown to
28849 # Autoconf.
28850 for ac_file in $ac_files ''
28851 do
28852   test -f "$ac_file" || continue
28853   case $ac_file in
28854     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28855         ;;
28856     [ab].out )
28857         # We found the default executable, but exeext='' is most
28858         # certainly right.
28859         break;;
28860     *.* )
28861         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28862         then :; else
28863            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28864         fi
28865         # We set ac_cv_exeext here because the later test for it is not
28866         # safe: cross compilers may not add the suffix if given an `-o'
28867         # argument, so we may need to know it at that point already.
28868         # Even if this section looks crufty: it has the advantage of
28869         # actually working.
28870         break;;
28871     * )
28872         break;;
28873   esac
28874 done
28875 test "$ac_cv_exeext" = no && ac_cv_exeext=
28876 
28877 else
28878   ac_file=''
28879 fi
28880 if test -z "$ac_file"; then :
28881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28882 $as_echo "no" >&6; }
28883 $as_echo "$as_me: failed program was:" >&5
28884 sed 's/^/| /' conftest.$ac_ext >&5
28885 
28886 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28887 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28888 as_fn_error 77 "C compiler cannot create executables
28889 See \`config.log' for more details" "$LINENO" 5; }
28890 else
28891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28892 $as_echo "yes" >&6; }
28893 fi
28894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28895 $as_echo_n "checking for C compiler default output file name... " >&6; }
28896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28897 $as_echo "$ac_file" >&6; }
28898 ac_exeext=$ac_cv_exeext
28899 
28900 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28901 ac_clean_files=$ac_clean_files_save
28902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28903 $as_echo_n "checking for suffix of executables... " >&6; }
28904 if { { ac_try="$ac_link"
28905 case "(($ac_try" in
28906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28907   *) ac_try_echo=$ac_try;;
28908 esac
28909 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28910 $as_echo "$ac_try_echo"; } >&5
28911   (eval "$ac_link") 2>&5
28912   ac_status=$?
28913   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28914   test $ac_status = 0; }; then :
28915   # If both `conftest.exe' and `conftest' are `present' (well, observable)
28916 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28917 # work properly (i.e., refer to `conftest.exe'), while it won't with
28918 # `rm'.
28919 for ac_file in conftest.exe conftest conftest.*; do
28920   test -f "$ac_file" || continue
28921   case $ac_file in
28922     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28923     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28924           break;;
28925     * ) break;;
28926   esac
28927 done
28928 else
28929   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28930 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28931 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28932 See \`config.log' for more details" "$LINENO" 5; }
28933 fi
28934 rm -f conftest conftest$ac_cv_exeext
28935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28936 $as_echo "$ac_cv_exeext" >&6; }
28937 
28938 rm -f conftest.$ac_ext
28939 EXEEXT=$ac_cv_exeext
28940 ac_exeext=$EXEEXT
28941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28942 /* end confdefs.h.  */
28943 #include <stdio.h>
28944 int
28945 main ()
28946 {
28947 FILE *f = fopen ("conftest.out", "w");
28948  return ferror (f) || fclose (f) != 0;
28949 
28950   ;
28951   return 0;
28952 }
28953 _ACEOF
28954 ac_clean_files="$ac_clean_files conftest.out"
28955 # Check that the compiler produces executables we can run.  If not, either
28956 # the compiler is broken, or we cross compile.
28957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28958 $as_echo_n "checking whether we are cross compiling... " >&6; }
28959 if test "$cross_compiling" != yes; then
28960   { { ac_try="$ac_link"
28961 case "(($ac_try" in
28962   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28963   *) ac_try_echo=$ac_try;;
28964 esac
28965 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28966 $as_echo "$ac_try_echo"; } >&5
28967   (eval "$ac_link") 2>&5
28968   ac_status=$?
28969   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28970   test $ac_status = 0; }
28971   if { ac_try='./conftest$ac_cv_exeext'
28972   { { case "(($ac_try" in
28973   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28974   *) ac_try_echo=$ac_try;;
28975 esac
28976 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28977 $as_echo "$ac_try_echo"; } >&5
28978   (eval "$ac_try") 2>&5
28979   ac_status=$?
28980   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28981   test $ac_status = 0; }; }; then
28982     cross_compiling=no
28983   else
28984     if test "$cross_compiling" = maybe; then
28985         cross_compiling=yes
28986     else
28987         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28988 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28989 as_fn_error $? "cannot run C compiled programs.
28990 If you meant to cross compile, use \`--host'.
28991 See \`config.log' for more details" "$LINENO" 5; }
28992     fi
28993   fi
28994 fi
28995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28996 $as_echo "$cross_compiling" >&6; }
28997 
28998 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28999 ac_clean_files=$ac_clean_files_save
29000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29001 $as_echo_n "checking for suffix of object files... " >&6; }
29002 if ${ac_cv_objext+:} false; then :
29003   $as_echo_n "(cached) " >&6
29004 else
29005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29006 /* end confdefs.h.  */
29007 
29008 int
29009 main ()
29010 {
29011 
29012   ;
29013   return 0;
29014 }
29015 _ACEOF
29016 rm -f conftest.o conftest.obj
29017 if { { ac_try="$ac_compile"
29018 case "(($ac_try" in
29019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29020   *) ac_try_echo=$ac_try;;
29021 esac
29022 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29023 $as_echo "$ac_try_echo"; } >&5
29024   (eval "$ac_compile") 2>&5
29025   ac_status=$?
29026   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29027   test $ac_status = 0; }; then :
29028   for ac_file in conftest.o conftest.obj conftest.*; do
29029   test -f "$ac_file" || continue;
29030   case $ac_file in
29031     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29032     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29033        break;;
29034   esac
29035 done
29036 else
29037   $as_echo "$as_me: failed program was:" >&5
29038 sed 's/^/| /' conftest.$ac_ext >&5
29039 
29040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29041 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29042 as_fn_error $? "cannot compute suffix of object files: cannot compile
29043 See \`config.log' for more details" "$LINENO" 5; }
29044 fi
29045 rm -f conftest.$ac_cv_objext conftest.$ac_ext
29046 fi
29047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29048 $as_echo "$ac_cv_objext" >&6; }
29049 OBJEXT=$ac_cv_objext
29050 ac_objext=$OBJEXT
29051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29052 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29053 if ${ac_cv_c_compiler_gnu+:} false; then :
29054   $as_echo_n "(cached) " >&6
29055 else
29056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29057 /* end confdefs.h.  */
29058 
29059 int
29060 main ()
29061 {
29062 #ifndef __GNUC__
29063        choke me
29064 #endif
29065 
29066   ;
29067   return 0;
29068 }
29069 _ACEOF
29070 if ac_fn_c_try_compile "$LINENO"; then :
29071   ac_compiler_gnu=yes
29072 else
29073   ac_compiler_gnu=no
29074 fi
29075 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29076 ac_cv_c_compiler_gnu=$ac_compiler_gnu
29077 
29078 fi
29079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29080 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
29081 if test $ac_compiler_gnu = yes; then
29082   GCC=yes
29083 else
29084   GCC=
29085 fi
29086 ac_test_CFLAGS=${CFLAGS+set}
29087 ac_save_CFLAGS=$CFLAGS
29088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29089 $as_echo_n "checking whether $CC accepts -g... " >&6; }
29090 if ${ac_cv_prog_cc_g+:} false; then :
29091   $as_echo_n "(cached) " >&6
29092 else
29093   ac_save_c_werror_flag=$ac_c_werror_flag
29094    ac_c_werror_flag=yes
29095    ac_cv_prog_cc_g=no
29096    CFLAGS="-g"
29097    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29098 /* end confdefs.h.  */
29099 
29100 int
29101 main ()
29102 {
29103 
29104   ;
29105   return 0;
29106 }
29107 _ACEOF
29108 if ac_fn_c_try_compile "$LINENO"; then :
29109   ac_cv_prog_cc_g=yes
29110 else
29111   CFLAGS=""
29112       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29113 /* end confdefs.h.  */
29114 
29115 int
29116 main ()
29117 {
29118 
29119   ;
29120   return 0;
29121 }
29122 _ACEOF
29123 if ac_fn_c_try_compile "$LINENO"; then :
29124 
29125 else
29126   ac_c_werror_flag=$ac_save_c_werror_flag
29127          CFLAGS="-g"
29128          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29129 /* end confdefs.h.  */
29130 
29131 int
29132 main ()
29133 {
29134 
29135   ;
29136   return 0;
29137 }
29138 _ACEOF
29139 if ac_fn_c_try_compile "$LINENO"; then :
29140   ac_cv_prog_cc_g=yes
29141 fi
29142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29143 fi
29144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29145 fi
29146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29147    ac_c_werror_flag=$ac_save_c_werror_flag
29148 fi
29149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29150 $as_echo "$ac_cv_prog_cc_g" >&6; }
29151 if test "$ac_test_CFLAGS" = set; then
29152   CFLAGS=$ac_save_CFLAGS
29153 elif test $ac_cv_prog_cc_g = yes; then
29154   if test "$GCC" = yes; then
29155     CFLAGS="-g -O2"
29156   else
29157     CFLAGS="-g"
29158   fi
29159 else
29160   if test "$GCC" = yes; then
29161     CFLAGS="-O2"
29162   else
29163     CFLAGS=
29164   fi
29165 fi
29166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29167 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29168 if ${ac_cv_prog_cc_c89+:} false; then :
29169   $as_echo_n "(cached) " >&6
29170 else
29171   ac_cv_prog_cc_c89=no
29172 ac_save_CC=$CC
29173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29174 /* end confdefs.h.  */
29175 #include <stdarg.h>
29176 #include <stdio.h>
29177 struct stat;
29178 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29179 struct buf { int x; };
29180 FILE * (*rcsopen) (struct buf *, struct stat *, int);
29181 static char *e (p, i)
29182      char **p;
29183      int i;
29184 {
29185   return p[i];
29186 }
29187 static char *f (char * (*g) (char **, int), char **p, ...)
29188 {
29189   char *s;
29190   va_list v;
29191   va_start (v,p);
29192   s = g (p, va_arg (v,int));
29193   va_end (v);
29194   return s;
29195 }
29196 
29197 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29198    function prototypes and stuff, but not '\xHH' hex character constants.
29199    These don't provoke an error unfortunately, instead are silently treated
29200    as 'x'.  The following induces an error, until -std is added to get
29201    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29202    array size at least.  It's necessary to write '\x00'==0 to get something
29203    that's true only with -std.  */
29204 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29205 
29206 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29207    inside strings and character constants.  */
29208 #define FOO(x) 'x'
29209 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29210 
29211 int test (int i, double x);
29212 struct s1 {int (*f) (int a);};
29213 struct s2 {int (*f) (double a);};
29214 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29215 int argc;
29216 char **argv;
29217 int
29218 main ()
29219 {
29220 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29221   ;
29222   return 0;
29223 }
29224 _ACEOF
29225 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29226         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29227 do
29228   CC="$ac_save_CC $ac_arg"
29229   if ac_fn_c_try_compile "$LINENO"; then :
29230   ac_cv_prog_cc_c89=$ac_arg
29231 fi
29232 rm -f core conftest.err conftest.$ac_objext
29233   test "x$ac_cv_prog_cc_c89" != "xno" && break
29234 done
29235 rm -f conftest.$ac_ext
29236 CC=$ac_save_CC
29237 
29238 fi
29239 # AC_CACHE_VAL
29240 case "x$ac_cv_prog_cc_c89" in
29241   x)
29242     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29243 $as_echo "none needed" >&6; } ;;
29244   xno)
29245     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29246 $as_echo "unsupported" >&6; } ;;
29247   *)
29248     CC="$CC $ac_cv_prog_cc_c89"
29249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29250 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29251 esac
29252 if test "x$ac_cv_prog_cc_c89" != xno; then :
29253 
29254 fi
29255 
29256 ac_ext=cpp
29257 ac_cpp='$CXXCPP $CPPFLAGS'
29258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29261 
29262 
29263 
29264   COMPILER_NAME=C++
29265   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29266 
29267   if test "x$CXX" != x; then
29268     # User has supplied compiler name already, always let that override.
29269     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29270 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29271     if test "x`basename $CXX`" = "x$CXX"; then
29272       # A command without a complete path is provided, search $PATH.
29273 
29274       for ac_prog in $CXX
29275 do
29276   # Extract the first word of "$ac_prog", so it can be a program name with args.
29277 set dummy $ac_prog; ac_word=$2
29278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29279 $as_echo_n "checking for $ac_word... " >&6; }
29280 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29281   $as_echo_n "(cached) " >&6
29282 else
29283   case $POTENTIAL_CXX in
29284   [\\/]* | ?:[\\/]*)
29285   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29286   ;;
29287   *)
29288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29289 for as_dir in $PATH
29290 do
29291   IFS=$as_save_IFS
29292   test -z "$as_dir" && as_dir=.
29293     for ac_exec_ext in '' $ac_executable_extensions; do
29294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29295     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29297     break 2
29298   fi
29299 done
29300   done
29301 IFS=$as_save_IFS
29302 
29303   ;;
29304 esac
29305 fi
29306 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29307 if test -n "$POTENTIAL_CXX"; then
29308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29309 $as_echo "$POTENTIAL_CXX" >&6; }
29310 else
29311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29312 $as_echo "no" >&6; }
29313 fi
29314 
29315 
29316   test -n "$POTENTIAL_CXX" && break
29317 done
29318 
29319       if test "x$POTENTIAL_CXX" != x; then
29320         CXX=$POTENTIAL_CXX
29321       else
29322         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29323       fi
29324     else
29325       # Otherwise it might already be a complete path
29326       if test ! -x "$CXX"; then
29327         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29328       fi
29329     fi
29330   else
29331     # No user supplied value. Locate compiler ourselves.
29332 
29333     # If we are cross compiling, assume cross compilation tools follows the
29334     # cross compilation standard where they are prefixed with the autoconf
29335     # standard name for the target. For example the binary
29336     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29337     # If we are not cross compiling, then the default compiler name will be
29338     # used.
29339 
29340     CXX=
29341     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29342     # before checking the rest of the PATH.
29343     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29344     # step, this should not be necessary.
29345     if test -n "$TOOLCHAIN_PATH"; then
29346       PATH_save="$PATH"
29347       PATH="$TOOLCHAIN_PATH"
29348       for ac_prog in $SEARCH_LIST
29349 do
29350   # Extract the first word of "$ac_prog", so it can be a program name with args.
29351 set dummy $ac_prog; ac_word=$2
29352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29353 $as_echo_n "checking for $ac_word... " >&6; }
29354 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29355   $as_echo_n "(cached) " >&6
29356 else
29357   case $TOOLCHAIN_PATH_CXX in
29358   [\\/]* | ?:[\\/]*)
29359   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29360   ;;
29361   *)
29362   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29363 for as_dir in $PATH
29364 do
29365   IFS=$as_save_IFS
29366   test -z "$as_dir" && as_dir=.
29367     for ac_exec_ext in '' $ac_executable_extensions; do
29368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29369     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29371     break 2
29372   fi
29373 done
29374   done
29375 IFS=$as_save_IFS
29376 
29377   ;;
29378 esac
29379 fi
29380 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29381 if test -n "$TOOLCHAIN_PATH_CXX"; then
29382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29383 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29384 else
29385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29386 $as_echo "no" >&6; }
29387 fi
29388 
29389 
29390   test -n "$TOOLCHAIN_PATH_CXX" && break
29391 done
29392 
29393       CXX=$TOOLCHAIN_PATH_CXX
29394       PATH="$PATH_save"
29395     fi
29396 
29397     # AC_PATH_PROGS can't be run multiple times with the same variable,
29398     # so create a new name for this run.
29399     if test "x$CXX" = x; then
29400       for ac_prog in $SEARCH_LIST
29401 do
29402   # Extract the first word of "$ac_prog", so it can be a program name with args.
29403 set dummy $ac_prog; ac_word=$2
29404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29405 $as_echo_n "checking for $ac_word... " >&6; }
29406 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29407   $as_echo_n "(cached) " >&6
29408 else
29409   case $POTENTIAL_CXX in
29410   [\\/]* | ?:[\\/]*)
29411   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29412   ;;
29413   *)
29414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29415 for as_dir in $PATH
29416 do
29417   IFS=$as_save_IFS
29418   test -z "$as_dir" && as_dir=.
29419     for ac_exec_ext in '' $ac_executable_extensions; do
29420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29421     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29423     break 2
29424   fi
29425 done
29426   done
29427 IFS=$as_save_IFS
29428 
29429   ;;
29430 esac
29431 fi
29432 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29433 if test -n "$POTENTIAL_CXX"; then
29434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29435 $as_echo "$POTENTIAL_CXX" >&6; }
29436 else
29437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29438 $as_echo "no" >&6; }
29439 fi
29440 
29441 
29442   test -n "$POTENTIAL_CXX" && break
29443 done
29444 
29445       CXX=$POTENTIAL_CXX
29446     fi
29447 
29448     if test "x$CXX" = x; then
29449 
29450   # Print a helpful message on how to acquire the necessary build dependency.
29451   # devkit is the help tag: freetype, cups, pulse, alsa etc
29452   MISSING_DEPENDENCY=devkit
29453 
29454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29455     cygwin_help $MISSING_DEPENDENCY
29456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29457     msys_help $MISSING_DEPENDENCY
29458   else
29459     PKGHANDLER_COMMAND=
29460 
29461     case $PKGHANDLER in
29462       apt-get)
29463         apt_help     $MISSING_DEPENDENCY ;;
29464       yum)
29465         yum_help     $MISSING_DEPENDENCY ;;
29466       port)
29467         port_help    $MISSING_DEPENDENCY ;;
29468       pkgutil)
29469         pkgutil_help $MISSING_DEPENDENCY ;;
29470       pkgadd)
29471         pkgadd_help  $MISSING_DEPENDENCY ;;
29472     esac
29473 
29474     if test "x$PKGHANDLER_COMMAND" != x; then
29475       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29476     fi
29477   fi
29478 
29479       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29480     fi
29481   fi
29482 
29483   # Now we have a compiler binary in CXX. Make sure it's okay.
29484 
29485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29486 
29487   # First separate the path from the arguments. This will split at the first
29488   # space.
29489   complete="$CXX"
29490   path="${complete%% *}"
29491   tmp="$complete EOL"
29492   arguments="${tmp#* }"
29493 
29494   # Input might be given as Windows format, start by converting to
29495   # unix format.
29496   new_path=`$CYGPATH -u "$path"`
29497 
29498   # Now try to locate executable using which
29499   new_path=`$WHICH "$new_path" 2> /dev/null`
29500   # bat and cmd files are not always considered executable in cygwin causing which
29501   # to not find them
29502   if test "x$new_path" = x \
29503       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29504       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29505     new_path=`$CYGPATH -u "$path"`
29506   fi
29507   if test "x$new_path" = x; then
29508     # Oops. Which didn't find the executable.
29509     # The splitting of arguments from the executable at a space might have been incorrect,
29510     # since paths with space are more likely in Windows. Give it another try with the whole
29511     # argument.
29512     path="$complete"
29513     arguments="EOL"
29514     new_path=`$CYGPATH -u "$path"`
29515     new_path=`$WHICH "$new_path" 2> /dev/null`
29516     # bat and cmd files are not always considered executable in cygwin causing which
29517     # to not find them
29518     if test "x$new_path" = x \
29519         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29520         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29521       new_path=`$CYGPATH -u "$path"`
29522     fi
29523     if test "x$new_path" = x; then
29524       # It's still not found. Now this is an unrecoverable error.
29525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29526 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29527       has_space=`$ECHO "$complete" | $GREP " "`
29528       if test "x$has_space" != x; then
29529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29531       fi
29532       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29533     fi
29534   fi
29535 
29536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29539   # "foo.exe" is OK but "foo" is an error.
29540   #
29541   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29542   # It is also a way to make sure we got the proper file name for the real test later on.
29543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29544   if test "x$test_shortpath" = x; then
29545     # Short path failed, file does not exist as specified.
29546     # Try adding .exe or .cmd
29547     if test -f "${new_path}.exe"; then
29548       input_to_shortpath="${new_path}.exe"
29549     elif test -f "${new_path}.cmd"; then
29550       input_to_shortpath="${new_path}.cmd"
29551     else
29552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29553 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29554       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29555 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29556       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29557     fi
29558   else
29559     input_to_shortpath="$new_path"
29560   fi
29561 
29562   # Call helper function which possibly converts this using DOS-style short mode.
29563   # If so, the updated path is stored in $new_path.
29564   new_path="$input_to_shortpath"
29565 
29566   input_path="$input_to_shortpath"
29567   # Check if we need to convert this using DOS-style short mode. If the path
29568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29569   # take no chances and rewrite it.
29570   # Note: m4 eats our [], so we need to use [ and ] instead.
29571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29572   if test "x$has_forbidden_chars" != x; then
29573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29577       # Going to short mode and back again did indeed matter. Since short mode is
29578       # case insensitive, let's make it lowercase to improve readability.
29579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29580       # Now convert it back to Unix-stile (cygpath)
29581       input_path=`$CYGPATH -u "$shortmode_path"`
29582       new_path="$input_path"
29583     fi
29584   fi
29585 
29586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29587   if test "x$test_cygdrive_prefix" = x; then
29588     # As a simple fix, exclude /usr/bin since it's not a real path.
29589     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29591       # a path prefixed by /cygdrive for fixpath to work.
29592       new_path="$CYGWIN_ROOT_PATH$input_path"
29593     fi
29594   fi
29595 
29596   # remove trailing .exe if any
29597   new_path="${new_path/%.exe/}"
29598 
29599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29600 
29601   # First separate the path from the arguments. This will split at the first
29602   # space.
29603   complete="$CXX"
29604   path="${complete%% *}"
29605   tmp="$complete EOL"
29606   arguments="${tmp#* }"
29607 
29608   # Input might be given as Windows format, start by converting to
29609   # unix format.
29610   new_path="$path"
29611 
29612   windows_path="$new_path"
29613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29614     unix_path=`$CYGPATH -u "$windows_path"`
29615     new_path="$unix_path"
29616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29618     new_path="$unix_path"
29619   fi
29620 
29621 
29622   # Now try to locate executable using which
29623   new_path=`$WHICH "$new_path" 2> /dev/null`
29624 
29625   if test "x$new_path" = x; then
29626     # Oops. Which didn't find the executable.
29627     # The splitting of arguments from the executable at a space might have been incorrect,
29628     # since paths with space are more likely in Windows. Give it another try with the whole
29629     # argument.
29630     path="$complete"
29631     arguments="EOL"
29632     new_path="$path"
29633 
29634   windows_path="$new_path"
29635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29636     unix_path=`$CYGPATH -u "$windows_path"`
29637     new_path="$unix_path"
29638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29640     new_path="$unix_path"
29641   fi
29642 
29643 
29644     new_path=`$WHICH "$new_path" 2> /dev/null`
29645     # bat and cmd files are not always considered executable in MSYS causing which
29646     # to not find them
29647     if test "x$new_path" = x \
29648         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29649         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29650       new_path="$path"
29651 
29652   windows_path="$new_path"
29653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29654     unix_path=`$CYGPATH -u "$windows_path"`
29655     new_path="$unix_path"
29656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29658     new_path="$unix_path"
29659   fi
29660 
29661     fi
29662 
29663     if test "x$new_path" = x; then
29664       # It's still not found. Now this is an unrecoverable error.
29665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29666 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29667       has_space=`$ECHO "$complete" | $GREP " "`
29668       if test "x$has_space" != x; then
29669         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29670 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29671       fi
29672       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29673     fi
29674   fi
29675 
29676   # Now new_path has a complete unix path to the binary
29677   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29678     # Keep paths in /bin as-is, but remove trailing .exe if any
29679     new_path="${new_path/%.exe/}"
29680     # Do not save /bin paths to all_fixpath_prefixes!
29681   else
29682     # Not in mixed or Windows style, start by that.
29683     new_path=`cmd //c echo $new_path`
29684 
29685   input_path="$new_path"
29686   # Check if we need to convert this using DOS-style short mode. If the path
29687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29688   # take no chances and rewrite it.
29689   # Note: m4 eats our [], so we need to use [ and ] instead.
29690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29691   if test "x$has_forbidden_chars" != x; then
29692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29694   fi
29695 
29696     # Output is in $new_path
29697 
29698   windows_path="$new_path"
29699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29700     unix_path=`$CYGPATH -u "$windows_path"`
29701     new_path="$unix_path"
29702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29704     new_path="$unix_path"
29705   fi
29706 
29707     # remove trailing .exe if any
29708     new_path="${new_path/%.exe/}"
29709 
29710     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29711     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29712   fi
29713 
29714   else
29715     # We're on a unix platform. Hooray! :)
29716     # First separate the path from the arguments. This will split at the first
29717     # space.
29718     complete="$CXX"
29719     path="${complete%% *}"
29720     tmp="$complete EOL"
29721     arguments="${tmp#* }"
29722 
29723     # Cannot rely on the command "which" here since it doesn't always work.
29724     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29725     if test -z "$is_absolute_path"; then
29726       # Path to executable is not absolute. Find it.
29727       IFS_save="$IFS"
29728       IFS=:
29729       for p in $PATH; do
29730         if test -f "$p/$path" && test -x "$p/$path"; then
29731           new_path="$p/$path"
29732           break
29733         fi
29734       done
29735       IFS="$IFS_save"
29736     else
29737       # This is an absolute path, we can use it without further modifications.
29738       new_path="$path"
29739     fi
29740 
29741     if test "x$new_path" = x; then
29742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29743 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29744       has_space=`$ECHO "$complete" | $GREP " "`
29745       if test "x$has_space" != x; then
29746         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29747 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29748       fi
29749       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29750     fi
29751   fi
29752 
29753   # Now join together the path and the arguments once again
29754   if test "x$arguments" != xEOL; then
29755     new_complete="$new_path ${arguments% *}"
29756   else
29757     new_complete="$new_path"
29758   fi
29759 
29760   if test "x$complete" != "x$new_complete"; then
29761     CXX="$new_complete"
29762     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29763 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29764   fi
29765 
29766   TEST_COMPILER="$CXX"
29767   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29768   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29769   if test "x$OPENJDK_BUILD_OS" != xaix; then
29770     # FIXME: This test should not be needed anymore; we don't do that for any platform.
29771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29772 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29773 
29774   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29775     # Follow a chain of symbolic links. Use readlink
29776     # where it exists, else fall back to horribly
29777     # complicated shell code.
29778     if test "x$READLINK_TESTED" != yes; then
29779       # On MacOSX there is a readlink tool with a different
29780       # purpose than the GNU readlink tool. Check the found readlink.
29781       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29782       if test "x$ISGNU" = x; then
29783         # A readlink that we do not know how to use.
29784         # Are there other non-GNU readlinks out there?
29785         READLINK_TESTED=yes
29786         READLINK=
29787       fi
29788     fi
29789 
29790     if test "x$READLINK" != x; then
29791       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29792     else
29793       # Save the current directory for restoring afterwards
29794       STARTDIR=$PWD
29795       COUNTER=0
29796       sym_link_dir=`$DIRNAME $TEST_COMPILER`
29797       sym_link_file=`$BASENAME $TEST_COMPILER`
29798       cd $sym_link_dir
29799       # Use -P flag to resolve symlinks in directories.
29800       cd `$THEPWDCMD -P`
29801       sym_link_dir=`$THEPWDCMD -P`
29802       # Resolve file symlinks
29803       while test $COUNTER -lt 20; do
29804         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29805         if test "x$ISLINK" == x; then
29806           # This is not a symbolic link! We are done!
29807           break
29808         fi
29809         # Again resolve directory symlinks since the target of the just found
29810         # link could be in a different directory
29811         cd `$DIRNAME $ISLINK`
29812         sym_link_dir=`$THEPWDCMD -P`
29813         sym_link_file=`$BASENAME $ISLINK`
29814         let COUNTER=COUNTER+1
29815       done
29816       cd $STARTDIR
29817       TEST_COMPILER=$sym_link_dir/$sym_link_file
29818     fi
29819   fi
29820 
29821     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29822 $as_echo "$TEST_COMPILER" >&6; }
29823   fi
29824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29825 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
29826 
29827   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29828   if test "x$COMPILER_BASENAME" = "xccache"; then
29829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29830 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29831     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29832     # We want to control ccache invocation ourselves, so ignore this cc and try
29833     # searching again.
29834 
29835     # Remove the path to the fake ccache cc from the PATH
29836     RETRY_COMPILER_SAVED_PATH="$PATH"
29837     COMPILER_DIRNAME=`$DIRNAME $CXX`
29838     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29839 
29840     # Try again looking for our compiler
29841     if test -n "$ac_tool_prefix"; then
29842   for ac_prog in $TOOLCHAIN_CXX_BINARY
29843   do
29844     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29845 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29847 $as_echo_n "checking for $ac_word... " >&6; }
29848 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29849   $as_echo_n "(cached) " >&6
29850 else
29851   if test -n "$PROPER_COMPILER_CXX"; then
29852   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29853 else
29854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29855 for as_dir in $PATH
29856 do
29857   IFS=$as_save_IFS
29858   test -z "$as_dir" && as_dir=.
29859     for ac_exec_ext in '' $ac_executable_extensions; do
29860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29861     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29863     break 2
29864   fi
29865 done
29866   done
29867 IFS=$as_save_IFS
29868 
29869 fi
29870 fi
29871 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29872 if test -n "$PROPER_COMPILER_CXX"; then
29873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29874 $as_echo "$PROPER_COMPILER_CXX" >&6; }
29875 else
29876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29877 $as_echo "no" >&6; }
29878 fi
29879 
29880 
29881     test -n "$PROPER_COMPILER_CXX" && break
29882   done
29883 fi
29884 if test -z "$PROPER_COMPILER_CXX"; then
29885   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29886   for ac_prog in $TOOLCHAIN_CXX_BINARY
29887 do
29888   # Extract the first word of "$ac_prog", so it can be a program name with args.
29889 set dummy $ac_prog; ac_word=$2
29890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29891 $as_echo_n "checking for $ac_word... " >&6; }
29892 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29893   $as_echo_n "(cached) " >&6
29894 else
29895   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29896   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29897 else
29898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29899 for as_dir in $PATH
29900 do
29901   IFS=$as_save_IFS
29902   test -z "$as_dir" && as_dir=.
29903     for ac_exec_ext in '' $ac_executable_extensions; do
29904   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29905     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29906     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29907     break 2
29908   fi
29909 done
29910   done
29911 IFS=$as_save_IFS
29912 
29913 fi
29914 fi
29915 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29916 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29918 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29919 else
29920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29921 $as_echo "no" >&6; }
29922 fi
29923 
29924 
29925   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29926 done
29927 
29928   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29929     PROPER_COMPILER_CXX=""
29930   else
29931     case $cross_compiling:$ac_tool_warned in
29932 yes:)
29933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29934 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29935 ac_tool_warned=yes ;;
29936 esac
29937     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29938   fi
29939 fi
29940 
29941 
29942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29943 
29944   # First separate the path from the arguments. This will split at the first
29945   # space.
29946   complete="$PROPER_COMPILER_CXX"
29947   path="${complete%% *}"
29948   tmp="$complete EOL"
29949   arguments="${tmp#* }"
29950 
29951   # Input might be given as Windows format, start by converting to
29952   # unix format.
29953   new_path=`$CYGPATH -u "$path"`
29954 
29955   # Now try to locate executable using which
29956   new_path=`$WHICH "$new_path" 2> /dev/null`
29957   # bat and cmd files are not always considered executable in cygwin causing which
29958   # to not find them
29959   if test "x$new_path" = x \
29960       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29961       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29962     new_path=`$CYGPATH -u "$path"`
29963   fi
29964   if test "x$new_path" = x; then
29965     # Oops. Which didn't find the executable.
29966     # The splitting of arguments from the executable at a space might have been incorrect,
29967     # since paths with space are more likely in Windows. Give it another try with the whole
29968     # argument.
29969     path="$complete"
29970     arguments="EOL"
29971     new_path=`$CYGPATH -u "$path"`
29972     new_path=`$WHICH "$new_path" 2> /dev/null`
29973     # bat and cmd files are not always considered executable in cygwin causing which
29974     # to not find them
29975     if test "x$new_path" = x \
29976         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29977         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29978       new_path=`$CYGPATH -u "$path"`
29979     fi
29980     if test "x$new_path" = x; then
29981       # It's still not found. Now this is an unrecoverable error.
29982       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29983 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29984       has_space=`$ECHO "$complete" | $GREP " "`
29985       if test "x$has_space" != x; then
29986         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29987 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29988       fi
29989       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29990     fi
29991   fi
29992 
29993   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29994   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29995   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29996   # "foo.exe" is OK but "foo" is an error.
29997   #
29998   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29999   # It is also a way to make sure we got the proper file name for the real test later on.
30000   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30001   if test "x$test_shortpath" = x; then
30002     # Short path failed, file does not exist as specified.
30003     # Try adding .exe or .cmd
30004     if test -f "${new_path}.exe"; then
30005       input_to_shortpath="${new_path}.exe"
30006     elif test -f "${new_path}.cmd"; then
30007       input_to_shortpath="${new_path}.cmd"
30008     else
30009       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30010 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30011       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30012 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30013       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30014     fi
30015   else
30016     input_to_shortpath="$new_path"
30017   fi
30018 
30019   # Call helper function which possibly converts this using DOS-style short mode.
30020   # If so, the updated path is stored in $new_path.
30021   new_path="$input_to_shortpath"
30022 
30023   input_path="$input_to_shortpath"
30024   # Check if we need to convert this using DOS-style short mode. If the path
30025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30026   # take no chances and rewrite it.
30027   # Note: m4 eats our [], so we need to use [ and ] instead.
30028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30029   if test "x$has_forbidden_chars" != x; then
30030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30031     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30032     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30033     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30034       # Going to short mode and back again did indeed matter. Since short mode is
30035       # case insensitive, let's make it lowercase to improve readability.
30036       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30037       # Now convert it back to Unix-stile (cygpath)
30038       input_path=`$CYGPATH -u "$shortmode_path"`
30039       new_path="$input_path"
30040     fi
30041   fi
30042 
30043   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30044   if test "x$test_cygdrive_prefix" = x; then
30045     # As a simple fix, exclude /usr/bin since it's not a real path.
30046     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30047       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30048       # a path prefixed by /cygdrive for fixpath to work.
30049       new_path="$CYGWIN_ROOT_PATH$input_path"
30050     fi
30051   fi
30052 
30053   # remove trailing .exe if any
30054   new_path="${new_path/%.exe/}"
30055 
30056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30057 
30058   # First separate the path from the arguments. This will split at the first
30059   # space.
30060   complete="$PROPER_COMPILER_CXX"
30061   path="${complete%% *}"
30062   tmp="$complete EOL"
30063   arguments="${tmp#* }"
30064 
30065   # Input might be given as Windows format, start by converting to
30066   # unix format.
30067   new_path="$path"
30068 
30069   windows_path="$new_path"
30070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30071     unix_path=`$CYGPATH -u "$windows_path"`
30072     new_path="$unix_path"
30073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30074     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30075     new_path="$unix_path"
30076   fi
30077 
30078 
30079   # Now try to locate executable using which
30080   new_path=`$WHICH "$new_path" 2> /dev/null`
30081 
30082   if test "x$new_path" = x; then
30083     # Oops. Which didn't find the executable.
30084     # The splitting of arguments from the executable at a space might have been incorrect,
30085     # since paths with space are more likely in Windows. Give it another try with the whole
30086     # argument.
30087     path="$complete"
30088     arguments="EOL"
30089     new_path="$path"
30090 
30091   windows_path="$new_path"
30092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30093     unix_path=`$CYGPATH -u "$windows_path"`
30094     new_path="$unix_path"
30095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30097     new_path="$unix_path"
30098   fi
30099 
30100 
30101     new_path=`$WHICH "$new_path" 2> /dev/null`
30102     # bat and cmd files are not always considered executable in MSYS causing which
30103     # to not find them
30104     if test "x$new_path" = x \
30105         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30106         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30107       new_path="$path"
30108 
30109   windows_path="$new_path"
30110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30111     unix_path=`$CYGPATH -u "$windows_path"`
30112     new_path="$unix_path"
30113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30115     new_path="$unix_path"
30116   fi
30117 
30118     fi
30119 
30120     if test "x$new_path" = x; then
30121       # It's still not found. Now this is an unrecoverable error.
30122       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30123 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30124       has_space=`$ECHO "$complete" | $GREP " "`
30125       if test "x$has_space" != x; then
30126         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30127 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30128       fi
30129       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30130     fi
30131   fi
30132 
30133   # Now new_path has a complete unix path to the binary
30134   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30135     # Keep paths in /bin as-is, but remove trailing .exe if any
30136     new_path="${new_path/%.exe/}"
30137     # Do not save /bin paths to all_fixpath_prefixes!
30138   else
30139     # Not in mixed or Windows style, start by that.
30140     new_path=`cmd //c echo $new_path`
30141 
30142   input_path="$new_path"
30143   # Check if we need to convert this using DOS-style short mode. If the path
30144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30145   # take no chances and rewrite it.
30146   # Note: m4 eats our [], so we need to use [ and ] instead.
30147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30148   if test "x$has_forbidden_chars" != x; then
30149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30150     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30151   fi
30152 
30153     # Output is in $new_path
30154 
30155   windows_path="$new_path"
30156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30157     unix_path=`$CYGPATH -u "$windows_path"`
30158     new_path="$unix_path"
30159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30161     new_path="$unix_path"
30162   fi
30163 
30164     # remove trailing .exe if any
30165     new_path="${new_path/%.exe/}"
30166 
30167     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30168     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30169   fi
30170 
30171   else
30172     # We're on a unix platform. Hooray! :)
30173     # First separate the path from the arguments. This will split at the first
30174     # space.
30175     complete="$PROPER_COMPILER_CXX"
30176     path="${complete%% *}"
30177     tmp="$complete EOL"
30178     arguments="${tmp#* }"
30179 
30180     # Cannot rely on the command "which" here since it doesn't always work.
30181     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30182     if test -z "$is_absolute_path"; then
30183       # Path to executable is not absolute. Find it.
30184       IFS_save="$IFS"
30185       IFS=:
30186       for p in $PATH; do
30187         if test -f "$p/$path" && test -x "$p/$path"; then
30188           new_path="$p/$path"
30189           break
30190         fi
30191       done
30192       IFS="$IFS_save"
30193     else
30194       # This is an absolute path, we can use it without further modifications.
30195       new_path="$path"
30196     fi
30197 
30198     if test "x$new_path" = x; then
30199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30200 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30201       has_space=`$ECHO "$complete" | $GREP " "`
30202       if test "x$has_space" != x; then
30203         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30204 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30205       fi
30206       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30207     fi
30208   fi
30209 
30210   # Now join together the path and the arguments once again
30211   if test "x$arguments" != xEOL; then
30212     new_complete="$new_path ${arguments% *}"
30213   else
30214     new_complete="$new_path"
30215   fi
30216 
30217   if test "x$complete" != "x$new_complete"; then
30218     PROPER_COMPILER_CXX="$new_complete"
30219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30220 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30221   fi
30222 
30223     PATH="$RETRY_COMPILER_SAVED_PATH"
30224 
30225     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30226 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30227 
30228   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30229     # Follow a chain of symbolic links. Use readlink
30230     # where it exists, else fall back to horribly
30231     # complicated shell code.
30232     if test "x$READLINK_TESTED" != yes; then
30233       # On MacOSX there is a readlink tool with a different
30234       # purpose than the GNU readlink tool. Check the found readlink.
30235       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30236       if test "x$ISGNU" = x; then
30237         # A readlink that we do not know how to use.
30238         # Are there other non-GNU readlinks out there?
30239         READLINK_TESTED=yes
30240         READLINK=
30241       fi
30242     fi
30243 
30244     if test "x$READLINK" != x; then
30245       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30246     else
30247       # Save the current directory for restoring afterwards
30248       STARTDIR=$PWD
30249       COUNTER=0
30250       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30251       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30252       cd $sym_link_dir
30253       # Use -P flag to resolve symlinks in directories.
30254       cd `$THEPWDCMD -P`
30255       sym_link_dir=`$THEPWDCMD -P`
30256       # Resolve file symlinks
30257       while test $COUNTER -lt 20; do
30258         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30259         if test "x$ISLINK" == x; then
30260           # This is not a symbolic link! We are done!
30261           break
30262         fi
30263         # Again resolve directory symlinks since the target of the just found
30264         # link could be in a different directory
30265         cd `$DIRNAME $ISLINK`
30266         sym_link_dir=`$THEPWDCMD -P`
30267         sym_link_file=`$BASENAME $ISLINK`
30268         let COUNTER=COUNTER+1
30269       done
30270       cd $STARTDIR
30271       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30272     fi
30273   fi
30274 
30275     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30276 $as_echo "$PROPER_COMPILER_CXX" >&6; }
30277     CXX="$PROPER_COMPILER_CXX"
30278   else
30279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30280 $as_echo "no, keeping CXX" >&6; }
30281   fi
30282 
30283 
30284   COMPILER=$CXX
30285   COMPILER_NAME=$COMPILER_NAME
30286 
30287   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30288     # cc -V output typically looks like
30289     #     cc: Sun C 5.12 Linux_i386 2011/11/16
30290     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30291     # Check that this is likely to be the Solaris Studio cc.
30292     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30293     if test $? -ne 0; then
30294       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30295       { $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
30296 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30297       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30298 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30299       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30300 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30301       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30302     fi
30303     # Remove usage instructions (if present), and
30304     # collapse compiler output into a single line
30305     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30306         $SED -e 's/ *[Uu]sage:.*//'`
30307     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30308         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30309   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30310     # xlc -qversion output typically looks like
30311     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30312     #     Version: 11.01.0000.0015
30313     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30314     # Check that this is likely to be the IBM XL C compiler.
30315     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30316     if test $? -ne 0; then
30317       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30318       { $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
30319 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30320       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30321 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30322       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30323 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30324       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30325     fi
30326     # Collapse compiler output into a single line
30327     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30328     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30329         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30330   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30331     # There is no specific version flag, but all output starts with a version string.
30332     # First line typically looks something like:
30333     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30334     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30335     # Check that this is likely to be Microsoft CL.EXE.
30336     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30337     if test $? -ne 0; then
30338       { $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
30339 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30340       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30341 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30342       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30343     fi
30344     # Collapse compiler output into a single line
30345     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30346     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30347         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30348   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30349     # gcc --version output typically looks like
30350     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30351     #     Copyright (C) 2013 Free Software Foundation, Inc.
30352     #     This is free software; see the source for copying conditions.  There is NO
30353     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30354     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30355     # Check that this is likely to be GCC.
30356     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30357     if test $? -ne 0; then
30358       { $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
30359 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30360       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30361 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30362       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30363     fi
30364     # Remove Copyright and legalese from version string, and
30365     # collapse into a single line
30366     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30367         $SED -e 's/ *Copyright .*//'`
30368     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30369         $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30370   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30371     # clang --version output typically looks like
30372     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30373     #    clang version 3.3 (tags/RELEASE_33/final)
30374     # or
30375     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30376     #    Target: x86_64-pc-linux-gnu
30377     #    Thread model: posix
30378     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30379     # Check that this is likely to be clang
30380     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30381     if test $? -ne 0; then
30382       { $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
30383 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30384       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30385 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30386       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30387     fi
30388     # Collapse compiler output into a single line
30389     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30390     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30391         $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30392   else
30393       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30394   fi
30395   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30396   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30397   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30398   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30399 
30400   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30401 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30402 
30403 
30404   # Now that we have resolved CXX ourself, let autoconf have its go at it
30405   ac_ext=cpp
30406 ac_cpp='$CXXCPP $CPPFLAGS'
30407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30410 if test -z "$CXX"; then
30411   if test -n "$CCC"; then
30412     CXX=$CCC
30413   else
30414     if test -n "$ac_tool_prefix"; then
30415   for ac_prog in $CXX
30416   do
30417     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30418 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30420 $as_echo_n "checking for $ac_word... " >&6; }
30421 if ${ac_cv_prog_CXX+:} false; then :
30422   $as_echo_n "(cached) " >&6
30423 else
30424   if test -n "$CXX"; then
30425   ac_cv_prog_CXX="$CXX" # Let the user override the test.
30426 else
30427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30428 for as_dir in $PATH
30429 do
30430   IFS=$as_save_IFS
30431   test -z "$as_dir" && as_dir=.
30432     for ac_exec_ext in '' $ac_executable_extensions; do
30433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30434     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30436     break 2
30437   fi
30438 done
30439   done
30440 IFS=$as_save_IFS
30441 
30442 fi
30443 fi
30444 CXX=$ac_cv_prog_CXX
30445 if test -n "$CXX"; then
30446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30447 $as_echo "$CXX" >&6; }
30448 else
30449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30450 $as_echo "no" >&6; }
30451 fi
30452 
30453 
30454     test -n "$CXX" && break
30455   done
30456 fi
30457 if test -z "$CXX"; then
30458   ac_ct_CXX=$CXX
30459   for ac_prog in $CXX
30460 do
30461   # Extract the first word of "$ac_prog", so it can be a program name with args.
30462 set dummy $ac_prog; ac_word=$2
30463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30464 $as_echo_n "checking for $ac_word... " >&6; }
30465 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30466   $as_echo_n "(cached) " >&6
30467 else
30468   if test -n "$ac_ct_CXX"; then
30469   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30470 else
30471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30472 for as_dir in $PATH
30473 do
30474   IFS=$as_save_IFS
30475   test -z "$as_dir" && as_dir=.
30476     for ac_exec_ext in '' $ac_executable_extensions; do
30477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30478     ac_cv_prog_ac_ct_CXX="$ac_prog"
30479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30480     break 2
30481   fi
30482 done
30483   done
30484 IFS=$as_save_IFS
30485 
30486 fi
30487 fi
30488 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30489 if test -n "$ac_ct_CXX"; then
30490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30491 $as_echo "$ac_ct_CXX" >&6; }
30492 else
30493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30494 $as_echo "no" >&6; }
30495 fi
30496 
30497 
30498   test -n "$ac_ct_CXX" && break
30499 done
30500 
30501   if test "x$ac_ct_CXX" = x; then
30502     CXX="g++"
30503   else
30504     case $cross_compiling:$ac_tool_warned in
30505 yes:)
30506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30507 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30508 ac_tool_warned=yes ;;
30509 esac
30510     CXX=$ac_ct_CXX
30511   fi
30512 fi
30513 
30514   fi
30515 fi
30516 # Provide some information about the compiler.
30517 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30518 set X $ac_compile
30519 ac_compiler=$2
30520 for ac_option in --version -v -V -qversion; do
30521   { { ac_try="$ac_compiler $ac_option >&5"
30522 case "(($ac_try" in
30523   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30524   *) ac_try_echo=$ac_try;;
30525 esac
30526 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30527 $as_echo "$ac_try_echo"; } >&5
30528   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30529   ac_status=$?
30530   if test -s conftest.err; then
30531     sed '10a\
30532 ... rest of stderr output deleted ...
30533          10q' conftest.err >conftest.er1
30534     cat conftest.er1 >&5
30535   fi
30536   rm -f conftest.er1 conftest.err
30537   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30538   test $ac_status = 0; }
30539 done
30540 
30541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30542 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30543 if ${ac_cv_cxx_compiler_gnu+:} false; then :
30544   $as_echo_n "(cached) " >&6
30545 else
30546   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30547 /* end confdefs.h.  */
30548 
30549 int
30550 main ()
30551 {
30552 #ifndef __GNUC__
30553        choke me
30554 #endif
30555 
30556   ;
30557   return 0;
30558 }
30559 _ACEOF
30560 if ac_fn_cxx_try_compile "$LINENO"; then :
30561   ac_compiler_gnu=yes
30562 else
30563   ac_compiler_gnu=no
30564 fi
30565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30566 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30567 
30568 fi
30569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30570 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30571 if test $ac_compiler_gnu = yes; then
30572   GXX=yes
30573 else
30574   GXX=
30575 fi
30576 ac_test_CXXFLAGS=${CXXFLAGS+set}
30577 ac_save_CXXFLAGS=$CXXFLAGS
30578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30579 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
30580 if ${ac_cv_prog_cxx_g+:} false; then :
30581   $as_echo_n "(cached) " >&6
30582 else
30583   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30584    ac_cxx_werror_flag=yes
30585    ac_cv_prog_cxx_g=no
30586    CXXFLAGS="-g"
30587    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30588 /* end confdefs.h.  */
30589 
30590 int
30591 main ()
30592 {
30593 
30594   ;
30595   return 0;
30596 }
30597 _ACEOF
30598 if ac_fn_cxx_try_compile "$LINENO"; then :
30599   ac_cv_prog_cxx_g=yes
30600 else
30601   CXXFLAGS=""
30602       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30603 /* end confdefs.h.  */
30604 
30605 int
30606 main ()
30607 {
30608 
30609   ;
30610   return 0;
30611 }
30612 _ACEOF
30613 if ac_fn_cxx_try_compile "$LINENO"; then :
30614 
30615 else
30616   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30617          CXXFLAGS="-g"
30618          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30619 /* end confdefs.h.  */
30620 
30621 int
30622 main ()
30623 {
30624 
30625   ;
30626   return 0;
30627 }
30628 _ACEOF
30629 if ac_fn_cxx_try_compile "$LINENO"; then :
30630   ac_cv_prog_cxx_g=yes
30631 fi
30632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30633 fi
30634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30635 fi
30636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30637    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30638 fi
30639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30640 $as_echo "$ac_cv_prog_cxx_g" >&6; }
30641 if test "$ac_test_CXXFLAGS" = set; then
30642   CXXFLAGS=$ac_save_CXXFLAGS
30643 elif test $ac_cv_prog_cxx_g = yes; then
30644   if test "$GXX" = yes; then
30645     CXXFLAGS="-g -O2"
30646   else
30647     CXXFLAGS="-g"
30648   fi
30649 else
30650   if test "$GXX" = yes; then
30651     CXXFLAGS="-O2"
30652   else
30653     CXXFLAGS=
30654   fi
30655 fi
30656 ac_ext=cpp
30657 ac_cpp='$CXXCPP $CPPFLAGS'
30658 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30659 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30660 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30661 
30662 
30663   #
30664   # Setup the preprocessor (CPP and CXXCPP)
30665   #
30666   ac_ext=c
30667 ac_cpp='$CPP $CPPFLAGS'
30668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30672 $as_echo_n "checking how to run the C preprocessor... " >&6; }
30673 # On Suns, sometimes $CPP names a directory.
30674 if test -n "$CPP" && test -d "$CPP"; then
30675   CPP=
30676 fi
30677 if test -z "$CPP"; then
30678   if ${ac_cv_prog_CPP+:} false; then :
30679   $as_echo_n "(cached) " >&6
30680 else
30681       # Double quotes because CPP needs to be expanded
30682     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30683     do
30684       ac_preproc_ok=false
30685 for ac_c_preproc_warn_flag in '' yes
30686 do
30687   # Use a header file that comes with gcc, so configuring glibc
30688   # with a fresh cross-compiler works.
30689   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30690   # <limits.h> exists even on freestanding compilers.
30691   # On the NeXT, cc -E runs the code through the compiler's parser,
30692   # not just through cpp. "Syntax error" is here to catch this case.
30693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30694 /* end confdefs.h.  */
30695 #ifdef __STDC__
30696 # include <limits.h>
30697 #else
30698 # include <assert.h>
30699 #endif
30700                      Syntax error
30701 _ACEOF
30702 if ac_fn_c_try_cpp "$LINENO"; then :
30703 
30704 else
30705   # Broken: fails on valid input.
30706 continue
30707 fi
30708 rm -f conftest.err conftest.i conftest.$ac_ext
30709 
30710   # OK, works on sane cases.  Now check whether nonexistent headers
30711   # can be detected and how.
30712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30713 /* end confdefs.h.  */
30714 #include <ac_nonexistent.h>
30715 _ACEOF
30716 if ac_fn_c_try_cpp "$LINENO"; then :
30717   # Broken: success on invalid input.
30718 continue
30719 else
30720   # Passes both tests.
30721 ac_preproc_ok=:
30722 break
30723 fi
30724 rm -f conftest.err conftest.i conftest.$ac_ext
30725 
30726 done
30727 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30728 rm -f conftest.i conftest.err conftest.$ac_ext
30729 if $ac_preproc_ok; then :
30730   break
30731 fi
30732 
30733     done
30734     ac_cv_prog_CPP=$CPP
30735 
30736 fi
30737   CPP=$ac_cv_prog_CPP
30738 else
30739   ac_cv_prog_CPP=$CPP
30740 fi
30741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30742 $as_echo "$CPP" >&6; }
30743 ac_preproc_ok=false
30744 for ac_c_preproc_warn_flag in '' yes
30745 do
30746   # Use a header file that comes with gcc, so configuring glibc
30747   # with a fresh cross-compiler works.
30748   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30749   # <limits.h> exists even on freestanding compilers.
30750   # On the NeXT, cc -E runs the code through the compiler's parser,
30751   # not just through cpp. "Syntax error" is here to catch this case.
30752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30753 /* end confdefs.h.  */
30754 #ifdef __STDC__
30755 # include <limits.h>
30756 #else
30757 # include <assert.h>
30758 #endif
30759                      Syntax error
30760 _ACEOF
30761 if ac_fn_c_try_cpp "$LINENO"; then :
30762 
30763 else
30764   # Broken: fails on valid input.
30765 continue
30766 fi
30767 rm -f conftest.err conftest.i conftest.$ac_ext
30768 
30769   # OK, works on sane cases.  Now check whether nonexistent headers
30770   # can be detected and how.
30771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30772 /* end confdefs.h.  */
30773 #include <ac_nonexistent.h>
30774 _ACEOF
30775 if ac_fn_c_try_cpp "$LINENO"; then :
30776   # Broken: success on invalid input.
30777 continue
30778 else
30779   # Passes both tests.
30780 ac_preproc_ok=:
30781 break
30782 fi
30783 rm -f conftest.err conftest.i conftest.$ac_ext
30784 
30785 done
30786 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30787 rm -f conftest.i conftest.err conftest.$ac_ext
30788 if $ac_preproc_ok; then :
30789 
30790 else
30791   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30792 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30793 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30794 See \`config.log' for more details" "$LINENO" 5; }
30795 fi
30796 
30797 ac_ext=cpp
30798 ac_cpp='$CXXCPP $CPPFLAGS'
30799 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30800 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30801 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30802 
30803 
30804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30805 
30806   # First separate the path from the arguments. This will split at the first
30807   # space.
30808   complete="$CPP"
30809   path="${complete%% *}"
30810   tmp="$complete EOL"
30811   arguments="${tmp#* }"
30812 
30813   # Input might be given as Windows format, start by converting to
30814   # unix format.
30815   new_path=`$CYGPATH -u "$path"`
30816 
30817   # Now try to locate executable using which
30818   new_path=`$WHICH "$new_path" 2> /dev/null`
30819   # bat and cmd files are not always considered executable in cygwin causing which
30820   # to not find them
30821   if test "x$new_path" = x \
30822       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30823       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30824     new_path=`$CYGPATH -u "$path"`
30825   fi
30826   if test "x$new_path" = x; then
30827     # Oops. Which didn't find the executable.
30828     # The splitting of arguments from the executable at a space might have been incorrect,
30829     # since paths with space are more likely in Windows. Give it another try with the whole
30830     # argument.
30831     path="$complete"
30832     arguments="EOL"
30833     new_path=`$CYGPATH -u "$path"`
30834     new_path=`$WHICH "$new_path" 2> /dev/null`
30835     # bat and cmd files are not always considered executable in cygwin causing which
30836     # to not find them
30837     if test "x$new_path" = x \
30838         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30839         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30840       new_path=`$CYGPATH -u "$path"`
30841     fi
30842     if test "x$new_path" = x; then
30843       # It's still not found. Now this is an unrecoverable error.
30844       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30845 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30846       has_space=`$ECHO "$complete" | $GREP " "`
30847       if test "x$has_space" != x; then
30848         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30849 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30850       fi
30851       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30852     fi
30853   fi
30854 
30855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30858   # "foo.exe" is OK but "foo" is an error.
30859   #
30860   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30861   # It is also a way to make sure we got the proper file name for the real test later on.
30862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30863   if test "x$test_shortpath" = x; then
30864     # Short path failed, file does not exist as specified.
30865     # Try adding .exe or .cmd
30866     if test -f "${new_path}.exe"; then
30867       input_to_shortpath="${new_path}.exe"
30868     elif test -f "${new_path}.cmd"; then
30869       input_to_shortpath="${new_path}.cmd"
30870     else
30871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30872 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30873       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30874 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30875       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30876     fi
30877   else
30878     input_to_shortpath="$new_path"
30879   fi
30880 
30881   # Call helper function which possibly converts this using DOS-style short mode.
30882   # If so, the updated path is stored in $new_path.
30883   new_path="$input_to_shortpath"
30884 
30885   input_path="$input_to_shortpath"
30886   # Check if we need to convert this using DOS-style short mode. If the path
30887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30888   # take no chances and rewrite it.
30889   # Note: m4 eats our [], so we need to use [ and ] instead.
30890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30891   if test "x$has_forbidden_chars" != x; then
30892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30896       # Going to short mode and back again did indeed matter. Since short mode is
30897       # case insensitive, let's make it lowercase to improve readability.
30898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30899       # Now convert it back to Unix-stile (cygpath)
30900       input_path=`$CYGPATH -u "$shortmode_path"`
30901       new_path="$input_path"
30902     fi
30903   fi
30904 
30905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30906   if test "x$test_cygdrive_prefix" = x; then
30907     # As a simple fix, exclude /usr/bin since it's not a real path.
30908     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30910       # a path prefixed by /cygdrive for fixpath to work.
30911       new_path="$CYGWIN_ROOT_PATH$input_path"
30912     fi
30913   fi
30914 
30915   # remove trailing .exe if any
30916   new_path="${new_path/%.exe/}"
30917 
30918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30919 
30920   # First separate the path from the arguments. This will split at the first
30921   # space.
30922   complete="$CPP"
30923   path="${complete%% *}"
30924   tmp="$complete EOL"
30925   arguments="${tmp#* }"
30926 
30927   # Input might be given as Windows format, start by converting to
30928   # unix format.
30929   new_path="$path"
30930 
30931   windows_path="$new_path"
30932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30933     unix_path=`$CYGPATH -u "$windows_path"`
30934     new_path="$unix_path"
30935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30937     new_path="$unix_path"
30938   fi
30939 
30940 
30941   # Now try to locate executable using which
30942   new_path=`$WHICH "$new_path" 2> /dev/null`
30943 
30944   if test "x$new_path" = x; then
30945     # Oops. Which didn't find the executable.
30946     # The splitting of arguments from the executable at a space might have been incorrect,
30947     # since paths with space are more likely in Windows. Give it another try with the whole
30948     # argument.
30949     path="$complete"
30950     arguments="EOL"
30951     new_path="$path"
30952 
30953   windows_path="$new_path"
30954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30955     unix_path=`$CYGPATH -u "$windows_path"`
30956     new_path="$unix_path"
30957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30959     new_path="$unix_path"
30960   fi
30961 
30962 
30963     new_path=`$WHICH "$new_path" 2> /dev/null`
30964     # bat and cmd files are not always considered executable in MSYS causing which
30965     # to not find them
30966     if test "x$new_path" = x \
30967         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30968         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30969       new_path="$path"
30970 
30971   windows_path="$new_path"
30972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30973     unix_path=`$CYGPATH -u "$windows_path"`
30974     new_path="$unix_path"
30975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30977     new_path="$unix_path"
30978   fi
30979 
30980     fi
30981 
30982     if test "x$new_path" = x; then
30983       # It's still not found. Now this is an unrecoverable error.
30984       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30985 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30986       has_space=`$ECHO "$complete" | $GREP " "`
30987       if test "x$has_space" != x; then
30988         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30989 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30990       fi
30991       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30992     fi
30993   fi
30994 
30995   # Now new_path has a complete unix path to the binary
30996   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30997     # Keep paths in /bin as-is, but remove trailing .exe if any
30998     new_path="${new_path/%.exe/}"
30999     # Do not save /bin paths to all_fixpath_prefixes!
31000   else
31001     # Not in mixed or Windows style, start by that.
31002     new_path=`cmd //c echo $new_path`
31003 
31004   input_path="$new_path"
31005   # Check if we need to convert this using DOS-style short mode. If the path
31006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31007   # take no chances and rewrite it.
31008   # Note: m4 eats our [], so we need to use [ and ] instead.
31009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31010   if test "x$has_forbidden_chars" != x; then
31011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31013   fi
31014 
31015     # Output is in $new_path
31016 
31017   windows_path="$new_path"
31018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31019     unix_path=`$CYGPATH -u "$windows_path"`
31020     new_path="$unix_path"
31021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31023     new_path="$unix_path"
31024   fi
31025 
31026     # remove trailing .exe if any
31027     new_path="${new_path/%.exe/}"
31028 
31029     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31030     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31031   fi
31032 
31033   else
31034     # We're on a unix platform. Hooray! :)
31035     # First separate the path from the arguments. This will split at the first
31036     # space.
31037     complete="$CPP"
31038     path="${complete%% *}"
31039     tmp="$complete EOL"
31040     arguments="${tmp#* }"
31041 
31042     # Cannot rely on the command "which" here since it doesn't always work.
31043     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31044     if test -z "$is_absolute_path"; then
31045       # Path to executable is not absolute. Find it.
31046       IFS_save="$IFS"
31047       IFS=:
31048       for p in $PATH; do
31049         if test -f "$p/$path" && test -x "$p/$path"; then
31050           new_path="$p/$path"
31051           break
31052         fi
31053       done
31054       IFS="$IFS_save"
31055     else
31056       # This is an absolute path, we can use it without further modifications.
31057       new_path="$path"
31058     fi
31059 
31060     if test "x$new_path" = x; then
31061       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31062 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31063       has_space=`$ECHO "$complete" | $GREP " "`
31064       if test "x$has_space" != x; then
31065         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31066 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31067       fi
31068       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31069     fi
31070   fi
31071 
31072   # Now join together the path and the arguments once again
31073   if test "x$arguments" != xEOL; then
31074     new_complete="$new_path ${arguments% *}"
31075   else
31076     new_complete="$new_path"
31077   fi
31078 
31079   if test "x$complete" != "x$new_complete"; then
31080     CPP="$new_complete"
31081     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31082 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31083   fi
31084 
31085   ac_ext=cpp
31086 ac_cpp='$CXXCPP $CPPFLAGS'
31087 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31088 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31089 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31091 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31092 if test -z "$CXXCPP"; then
31093   if ${ac_cv_prog_CXXCPP+:} false; then :
31094   $as_echo_n "(cached) " >&6
31095 else
31096       # Double quotes because CXXCPP needs to be expanded
31097     for CXXCPP in "$CXX -E" "/lib/cpp"
31098     do
31099       ac_preproc_ok=false
31100 for ac_cxx_preproc_warn_flag in '' yes
31101 do
31102   # Use a header file that comes with gcc, so configuring glibc
31103   # with a fresh cross-compiler works.
31104   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31105   # <limits.h> exists even on freestanding compilers.
31106   # On the NeXT, cc -E runs the code through the compiler's parser,
31107   # not just through cpp. "Syntax error" is here to catch this case.
31108   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31109 /* end confdefs.h.  */
31110 #ifdef __STDC__
31111 # include <limits.h>
31112 #else
31113 # include <assert.h>
31114 #endif
31115                      Syntax error
31116 _ACEOF
31117 if ac_fn_cxx_try_cpp "$LINENO"; then :
31118 
31119 else
31120   # Broken: fails on valid input.
31121 continue
31122 fi
31123 rm -f conftest.err conftest.i conftest.$ac_ext
31124 
31125   # OK, works on sane cases.  Now check whether nonexistent headers
31126   # can be detected and how.
31127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31128 /* end confdefs.h.  */
31129 #include <ac_nonexistent.h>
31130 _ACEOF
31131 if ac_fn_cxx_try_cpp "$LINENO"; then :
31132   # Broken: success on invalid input.
31133 continue
31134 else
31135   # Passes both tests.
31136 ac_preproc_ok=:
31137 break
31138 fi
31139 rm -f conftest.err conftest.i conftest.$ac_ext
31140 
31141 done
31142 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31143 rm -f conftest.i conftest.err conftest.$ac_ext
31144 if $ac_preproc_ok; then :
31145   break
31146 fi
31147 
31148     done
31149     ac_cv_prog_CXXCPP=$CXXCPP
31150 
31151 fi
31152   CXXCPP=$ac_cv_prog_CXXCPP
31153 else
31154   ac_cv_prog_CXXCPP=$CXXCPP
31155 fi
31156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31157 $as_echo "$CXXCPP" >&6; }
31158 ac_preproc_ok=false
31159 for ac_cxx_preproc_warn_flag in '' yes
31160 do
31161   # Use a header file that comes with gcc, so configuring glibc
31162   # with a fresh cross-compiler works.
31163   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31164   # <limits.h> exists even on freestanding compilers.
31165   # On the NeXT, cc -E runs the code through the compiler's parser,
31166   # not just through cpp. "Syntax error" is here to catch this case.
31167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31168 /* end confdefs.h.  */
31169 #ifdef __STDC__
31170 # include <limits.h>
31171 #else
31172 # include <assert.h>
31173 #endif
31174                      Syntax error
31175 _ACEOF
31176 if ac_fn_cxx_try_cpp "$LINENO"; then :
31177 
31178 else
31179   # Broken: fails on valid input.
31180 continue
31181 fi
31182 rm -f conftest.err conftest.i conftest.$ac_ext
31183 
31184   # OK, works on sane cases.  Now check whether nonexistent headers
31185   # can be detected and how.
31186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31187 /* end confdefs.h.  */
31188 #include <ac_nonexistent.h>
31189 _ACEOF
31190 if ac_fn_cxx_try_cpp "$LINENO"; then :
31191   # Broken: success on invalid input.
31192 continue
31193 else
31194   # Passes both tests.
31195 ac_preproc_ok=:
31196 break
31197 fi
31198 rm -f conftest.err conftest.i conftest.$ac_ext
31199 
31200 done
31201 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31202 rm -f conftest.i conftest.err conftest.$ac_ext
31203 if $ac_preproc_ok; then :
31204 
31205 else
31206   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31208 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31209 See \`config.log' for more details" "$LINENO" 5; }
31210 fi
31211 
31212 ac_ext=cpp
31213 ac_cpp='$CXXCPP $CPPFLAGS'
31214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31215 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31217 
31218 
31219   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31220 
31221   # First separate the path from the arguments. This will split at the first
31222   # space.
31223   complete="$CXXCPP"
31224   path="${complete%% *}"
31225   tmp="$complete EOL"
31226   arguments="${tmp#* }"
31227 
31228   # Input might be given as Windows format, start by converting to
31229   # unix format.
31230   new_path=`$CYGPATH -u "$path"`
31231 
31232   # Now try to locate executable using which
31233   new_path=`$WHICH "$new_path" 2> /dev/null`
31234   # bat and cmd files are not always considered executable in cygwin causing which
31235   # to not find them
31236   if test "x$new_path" = x \
31237       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31238       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31239     new_path=`$CYGPATH -u "$path"`
31240   fi
31241   if test "x$new_path" = x; then
31242     # Oops. Which didn't find the executable.
31243     # The splitting of arguments from the executable at a space might have been incorrect,
31244     # since paths with space are more likely in Windows. Give it another try with the whole
31245     # argument.
31246     path="$complete"
31247     arguments="EOL"
31248     new_path=`$CYGPATH -u "$path"`
31249     new_path=`$WHICH "$new_path" 2> /dev/null`
31250     # bat and cmd files are not always considered executable in cygwin causing which
31251     # to not find them
31252     if test "x$new_path" = x \
31253         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31254         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31255       new_path=`$CYGPATH -u "$path"`
31256     fi
31257     if test "x$new_path" = x; then
31258       # It's still not found. Now this is an unrecoverable error.
31259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31260 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31261       has_space=`$ECHO "$complete" | $GREP " "`
31262       if test "x$has_space" != x; then
31263         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31264 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31265       fi
31266       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31267     fi
31268   fi
31269 
31270   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31271   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31272   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31273   # "foo.exe" is OK but "foo" is an error.
31274   #
31275   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31276   # It is also a way to make sure we got the proper file name for the real test later on.
31277   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31278   if test "x$test_shortpath" = x; then
31279     # Short path failed, file does not exist as specified.
31280     # Try adding .exe or .cmd
31281     if test -f "${new_path}.exe"; then
31282       input_to_shortpath="${new_path}.exe"
31283     elif test -f "${new_path}.cmd"; then
31284       input_to_shortpath="${new_path}.cmd"
31285     else
31286       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31287 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31288       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31289 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31290       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31291     fi
31292   else
31293     input_to_shortpath="$new_path"
31294   fi
31295 
31296   # Call helper function which possibly converts this using DOS-style short mode.
31297   # If so, the updated path is stored in $new_path.
31298   new_path="$input_to_shortpath"
31299 
31300   input_path="$input_to_shortpath"
31301   # Check if we need to convert this using DOS-style short mode. If the path
31302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31303   # take no chances and rewrite it.
31304   # Note: m4 eats our [], so we need to use [ and ] instead.
31305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31306   if test "x$has_forbidden_chars" != x; then
31307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31308     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31309     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31310     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31311       # Going to short mode and back again did indeed matter. Since short mode is
31312       # case insensitive, let's make it lowercase to improve readability.
31313       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31314       # Now convert it back to Unix-stile (cygpath)
31315       input_path=`$CYGPATH -u "$shortmode_path"`
31316       new_path="$input_path"
31317     fi
31318   fi
31319 
31320   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31321   if test "x$test_cygdrive_prefix" = x; then
31322     # As a simple fix, exclude /usr/bin since it's not a real path.
31323     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31324       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31325       # a path prefixed by /cygdrive for fixpath to work.
31326       new_path="$CYGWIN_ROOT_PATH$input_path"
31327     fi
31328   fi
31329 
31330   # remove trailing .exe if any
31331   new_path="${new_path/%.exe/}"
31332 
31333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31334 
31335   # First separate the path from the arguments. This will split at the first
31336   # space.
31337   complete="$CXXCPP"
31338   path="${complete%% *}"
31339   tmp="$complete EOL"
31340   arguments="${tmp#* }"
31341 
31342   # Input might be given as Windows format, start by converting to
31343   # unix format.
31344   new_path="$path"
31345 
31346   windows_path="$new_path"
31347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31348     unix_path=`$CYGPATH -u "$windows_path"`
31349     new_path="$unix_path"
31350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31352     new_path="$unix_path"
31353   fi
31354 
31355 
31356   # Now try to locate executable using which
31357   new_path=`$WHICH "$new_path" 2> /dev/null`
31358 
31359   if test "x$new_path" = x; then
31360     # Oops. Which didn't find the executable.
31361     # The splitting of arguments from the executable at a space might have been incorrect,
31362     # since paths with space are more likely in Windows. Give it another try with the whole
31363     # argument.
31364     path="$complete"
31365     arguments="EOL"
31366     new_path="$path"
31367 
31368   windows_path="$new_path"
31369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31370     unix_path=`$CYGPATH -u "$windows_path"`
31371     new_path="$unix_path"
31372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31374     new_path="$unix_path"
31375   fi
31376 
31377 
31378     new_path=`$WHICH "$new_path" 2> /dev/null`
31379     # bat and cmd files are not always considered executable in MSYS causing which
31380     # to not find them
31381     if test "x$new_path" = x \
31382         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31383         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31384       new_path="$path"
31385 
31386   windows_path="$new_path"
31387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31388     unix_path=`$CYGPATH -u "$windows_path"`
31389     new_path="$unix_path"
31390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31391     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31392     new_path="$unix_path"
31393   fi
31394 
31395     fi
31396 
31397     if test "x$new_path" = x; then
31398       # It's still not found. Now this is an unrecoverable error.
31399       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31400 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31401       has_space=`$ECHO "$complete" | $GREP " "`
31402       if test "x$has_space" != x; then
31403         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31404 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31405       fi
31406       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31407     fi
31408   fi
31409 
31410   # Now new_path has a complete unix path to the binary
31411   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31412     # Keep paths in /bin as-is, but remove trailing .exe if any
31413     new_path="${new_path/%.exe/}"
31414     # Do not save /bin paths to all_fixpath_prefixes!
31415   else
31416     # Not in mixed or Windows style, start by that.
31417     new_path=`cmd //c echo $new_path`
31418 
31419   input_path="$new_path"
31420   # Check if we need to convert this using DOS-style short mode. If the path
31421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31422   # take no chances and rewrite it.
31423   # Note: m4 eats our [], so we need to use [ and ] instead.
31424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31425   if test "x$has_forbidden_chars" != x; then
31426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31427     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31428   fi
31429 
31430     # Output is in $new_path
31431 
31432   windows_path="$new_path"
31433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31434     unix_path=`$CYGPATH -u "$windows_path"`
31435     new_path="$unix_path"
31436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31438     new_path="$unix_path"
31439   fi
31440 
31441     # remove trailing .exe if any
31442     new_path="${new_path/%.exe/}"
31443 
31444     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31445     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31446   fi
31447 
31448   else
31449     # We're on a unix platform. Hooray! :)
31450     # First separate the path from the arguments. This will split at the first
31451     # space.
31452     complete="$CXXCPP"
31453     path="${complete%% *}"
31454     tmp="$complete EOL"
31455     arguments="${tmp#* }"
31456 
31457     # Cannot rely on the command "which" here since it doesn't always work.
31458     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31459     if test -z "$is_absolute_path"; then
31460       # Path to executable is not absolute. Find it.
31461       IFS_save="$IFS"
31462       IFS=:
31463       for p in $PATH; do
31464         if test -f "$p/$path" && test -x "$p/$path"; then
31465           new_path="$p/$path"
31466           break
31467         fi
31468       done
31469       IFS="$IFS_save"
31470     else
31471       # This is an absolute path, we can use it without further modifications.
31472       new_path="$path"
31473     fi
31474 
31475     if test "x$new_path" = x; then
31476       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31477 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31478       has_space=`$ECHO "$complete" | $GREP " "`
31479       if test "x$has_space" != x; then
31480         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31481 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31482       fi
31483       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31484     fi
31485   fi
31486 
31487   # Now join together the path and the arguments once again
31488   if test "x$arguments" != xEOL; then
31489     new_complete="$new_path ${arguments% *}"
31490   else
31491     new_complete="$new_path"
31492   fi
31493 
31494   if test "x$complete" != "x$new_complete"; then
31495     CXXCPP="$new_complete"
31496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31497 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31498   fi
31499 
31500 
31501   #
31502   # Setup the linker (LD)
31503   #
31504   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31505     # In the Microsoft toolchain we have a separate LD command "link".
31506     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31507     # a cygwin program for something completely different.
31508     # Extract the first word of "link", so it can be a program name with args.
31509 set dummy link; ac_word=$2
31510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31511 $as_echo_n "checking for $ac_word... " >&6; }
31512 if ${ac_cv_prog_LD+:} false; then :
31513   $as_echo_n "(cached) " >&6
31514 else
31515   if test -n "$LD"; then
31516   ac_cv_prog_LD="$LD" # Let the user override the test.
31517 else
31518   ac_prog_rejected=no
31519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31520 for as_dir in $PATH
31521 do
31522   IFS=$as_save_IFS
31523   test -z "$as_dir" && as_dir=.
31524     for ac_exec_ext in '' $ac_executable_extensions; do
31525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31526     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31527        ac_prog_rejected=yes
31528        continue
31529      fi
31530     ac_cv_prog_LD="link"
31531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31532     break 2
31533   fi
31534 done
31535   done
31536 IFS=$as_save_IFS
31537 
31538 if test $ac_prog_rejected = yes; then
31539   # We found a bogon in the path, so make sure we never use it.
31540   set dummy $ac_cv_prog_LD
31541   shift
31542   if test $# != 0; then
31543     # We chose a different compiler from the bogus one.
31544     # However, it has the same basename, so the bogon will be chosen
31545     # first if we set LD to just the basename; use the full file name.
31546     shift
31547     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31548   fi
31549 fi
31550 fi
31551 fi
31552 LD=$ac_cv_prog_LD
31553 if test -n "$LD"; then
31554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31555 $as_echo "$LD" >&6; }
31556 else
31557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31558 $as_echo "no" >&6; }
31559 fi
31560 
31561 
31562 
31563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31564 
31565   # First separate the path from the arguments. This will split at the first
31566   # space.
31567   complete="$LD"
31568   path="${complete%% *}"
31569   tmp="$complete EOL"
31570   arguments="${tmp#* }"
31571 
31572   # Input might be given as Windows format, start by converting to
31573   # unix format.
31574   new_path=`$CYGPATH -u "$path"`
31575 
31576   # Now try to locate executable using which
31577   new_path=`$WHICH "$new_path" 2> /dev/null`
31578   # bat and cmd files are not always considered executable in cygwin causing which
31579   # to not find them
31580   if test "x$new_path" = x \
31581       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31582       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31583     new_path=`$CYGPATH -u "$path"`
31584   fi
31585   if test "x$new_path" = x; then
31586     # Oops. Which didn't find the executable.
31587     # The splitting of arguments from the executable at a space might have been incorrect,
31588     # since paths with space are more likely in Windows. Give it another try with the whole
31589     # argument.
31590     path="$complete"
31591     arguments="EOL"
31592     new_path=`$CYGPATH -u "$path"`
31593     new_path=`$WHICH "$new_path" 2> /dev/null`
31594     # bat and cmd files are not always considered executable in cygwin causing which
31595     # to not find them
31596     if test "x$new_path" = x \
31597         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31598         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31599       new_path=`$CYGPATH -u "$path"`
31600     fi
31601     if test "x$new_path" = x; then
31602       # It's still not found. Now this is an unrecoverable error.
31603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31604 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31605       has_space=`$ECHO "$complete" | $GREP " "`
31606       if test "x$has_space" != x; then
31607         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31608 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31609       fi
31610       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31611     fi
31612   fi
31613 
31614   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31615   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31616   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31617   # "foo.exe" is OK but "foo" is an error.
31618   #
31619   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31620   # It is also a way to make sure we got the proper file name for the real test later on.
31621   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31622   if test "x$test_shortpath" = x; then
31623     # Short path failed, file does not exist as specified.
31624     # Try adding .exe or .cmd
31625     if test -f "${new_path}.exe"; then
31626       input_to_shortpath="${new_path}.exe"
31627     elif test -f "${new_path}.cmd"; then
31628       input_to_shortpath="${new_path}.cmd"
31629     else
31630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31631 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31632       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31633 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31634       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31635     fi
31636   else
31637     input_to_shortpath="$new_path"
31638   fi
31639 
31640   # Call helper function which possibly converts this using DOS-style short mode.
31641   # If so, the updated path is stored in $new_path.
31642   new_path="$input_to_shortpath"
31643 
31644   input_path="$input_to_shortpath"
31645   # Check if we need to convert this using DOS-style short mode. If the path
31646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31647   # take no chances and rewrite it.
31648   # Note: m4 eats our [], so we need to use [ and ] instead.
31649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31650   if test "x$has_forbidden_chars" != x; then
31651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31652     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31653     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31654     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31655       # Going to short mode and back again did indeed matter. Since short mode is
31656       # case insensitive, let's make it lowercase to improve readability.
31657       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31658       # Now convert it back to Unix-stile (cygpath)
31659       input_path=`$CYGPATH -u "$shortmode_path"`
31660       new_path="$input_path"
31661     fi
31662   fi
31663 
31664   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31665   if test "x$test_cygdrive_prefix" = x; then
31666     # As a simple fix, exclude /usr/bin since it's not a real path.
31667     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31668       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31669       # a path prefixed by /cygdrive for fixpath to work.
31670       new_path="$CYGWIN_ROOT_PATH$input_path"
31671     fi
31672   fi
31673 
31674   # remove trailing .exe if any
31675   new_path="${new_path/%.exe/}"
31676 
31677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31678 
31679   # First separate the path from the arguments. This will split at the first
31680   # space.
31681   complete="$LD"
31682   path="${complete%% *}"
31683   tmp="$complete EOL"
31684   arguments="${tmp#* }"
31685 
31686   # Input might be given as Windows format, start by converting to
31687   # unix format.
31688   new_path="$path"
31689 
31690   windows_path="$new_path"
31691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31692     unix_path=`$CYGPATH -u "$windows_path"`
31693     new_path="$unix_path"
31694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31695     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31696     new_path="$unix_path"
31697   fi
31698 
31699 
31700   # Now try to locate executable using which
31701   new_path=`$WHICH "$new_path" 2> /dev/null`
31702 
31703   if test "x$new_path" = x; then
31704     # Oops. Which didn't find the executable.
31705     # The splitting of arguments from the executable at a space might have been incorrect,
31706     # since paths with space are more likely in Windows. Give it another try with the whole
31707     # argument.
31708     path="$complete"
31709     arguments="EOL"
31710     new_path="$path"
31711 
31712   windows_path="$new_path"
31713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31714     unix_path=`$CYGPATH -u "$windows_path"`
31715     new_path="$unix_path"
31716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31718     new_path="$unix_path"
31719   fi
31720 
31721 
31722     new_path=`$WHICH "$new_path" 2> /dev/null`
31723     # bat and cmd files are not always considered executable in MSYS causing which
31724     # to not find them
31725     if test "x$new_path" = x \
31726         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31727         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31728       new_path="$path"
31729 
31730   windows_path="$new_path"
31731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31732     unix_path=`$CYGPATH -u "$windows_path"`
31733     new_path="$unix_path"
31734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31736     new_path="$unix_path"
31737   fi
31738 
31739     fi
31740 
31741     if test "x$new_path" = x; then
31742       # It's still not found. Now this is an unrecoverable error.
31743       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31744 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31745       has_space=`$ECHO "$complete" | $GREP " "`
31746       if test "x$has_space" != x; then
31747         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31748 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31749       fi
31750       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31751     fi
31752   fi
31753 
31754   # Now new_path has a complete unix path to the binary
31755   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31756     # Keep paths in /bin as-is, but remove trailing .exe if any
31757     new_path="${new_path/%.exe/}"
31758     # Do not save /bin paths to all_fixpath_prefixes!
31759   else
31760     # Not in mixed or Windows style, start by that.
31761     new_path=`cmd //c echo $new_path`
31762 
31763   input_path="$new_path"
31764   # Check if we need to convert this using DOS-style short mode. If the path
31765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31766   # take no chances and rewrite it.
31767   # Note: m4 eats our [], so we need to use [ and ] instead.
31768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31769   if test "x$has_forbidden_chars" != x; then
31770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31772   fi
31773 
31774     # Output is in $new_path
31775 
31776   windows_path="$new_path"
31777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31778     unix_path=`$CYGPATH -u "$windows_path"`
31779     new_path="$unix_path"
31780   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31781     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31782     new_path="$unix_path"
31783   fi
31784 
31785     # remove trailing .exe if any
31786     new_path="${new_path/%.exe/}"
31787 
31788     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31789     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31790   fi
31791 
31792   else
31793     # We're on a unix platform. Hooray! :)
31794     # First separate the path from the arguments. This will split at the first
31795     # space.
31796     complete="$LD"
31797     path="${complete%% *}"
31798     tmp="$complete EOL"
31799     arguments="${tmp#* }"
31800 
31801     # Cannot rely on the command "which" here since it doesn't always work.
31802     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31803     if test -z "$is_absolute_path"; then
31804       # Path to executable is not absolute. Find it.
31805       IFS_save="$IFS"
31806       IFS=:
31807       for p in $PATH; do
31808         if test -f "$p/$path" && test -x "$p/$path"; then
31809           new_path="$p/$path"
31810           break
31811         fi
31812       done
31813       IFS="$IFS_save"
31814     else
31815       # This is an absolute path, we can use it without further modifications.
31816       new_path="$path"
31817     fi
31818 
31819     if test "x$new_path" = x; then
31820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31821 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31822       has_space=`$ECHO "$complete" | $GREP " "`
31823       if test "x$has_space" != x; then
31824         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31825 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31826       fi
31827       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31828     fi
31829   fi
31830 
31831   # Now join together the path and the arguments once again
31832   if test "x$arguments" != xEOL; then
31833     new_complete="$new_path ${arguments% *}"
31834   else
31835     new_complete="$new_path"
31836   fi
31837 
31838   if test "x$complete" != "x$new_complete"; then
31839     LD="$new_complete"
31840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31841 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31842   fi
31843 
31844     # Verify that we indeed succeeded with this trick.
31845     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31846 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31847     "$LD" --version > /dev/null
31848     if test $? -eq 0 ; then
31849       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31850 $as_echo "no" >&6; }
31851       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31852     else
31853       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31854 $as_echo "yes" >&6; }
31855     fi
31856     LDCXX="$LD"
31857   else
31858     # All other toolchains use the compiler to link.
31859     LD="$CC"
31860     LDCXX="$CXX"
31861   fi
31862 
31863   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31864 
31865 
31866   #
31867   # Setup the assembler (AS)
31868   #
31869   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31870     # FIXME: should this really be solaris, or solstudio?
31871 
31872 
31873   # Publish this variable in the help.
31874 
31875 
31876   if test "x$AS" = x; then
31877     # The variable is not set by user, try to locate tool using the code snippet
31878     for ac_prog in as
31879 do
31880   # Extract the first word of "$ac_prog", so it can be a program name with args.
31881 set dummy $ac_prog; ac_word=$2
31882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31883 $as_echo_n "checking for $ac_word... " >&6; }
31884 if ${ac_cv_path_AS+:} false; then :
31885   $as_echo_n "(cached) " >&6
31886 else
31887   case $AS in
31888   [\\/]* | ?:[\\/]*)
31889   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31890   ;;
31891   *)
31892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31893 for as_dir in $PATH
31894 do
31895   IFS=$as_save_IFS
31896   test -z "$as_dir" && as_dir=.
31897     for ac_exec_ext in '' $ac_executable_extensions; do
31898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31899     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31901     break 2
31902   fi
31903 done
31904   done
31905 IFS=$as_save_IFS
31906 
31907   ;;
31908 esac
31909 fi
31910 AS=$ac_cv_path_AS
31911 if test -n "$AS"; then
31912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31913 $as_echo "$AS" >&6; }
31914 else
31915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31916 $as_echo "no" >&6; }
31917 fi
31918 
31919 
31920   test -n "$AS" && break
31921 done
31922 
31923   else
31924     # The variable is set, but is it from the command line or the environment?
31925 
31926     # Try to remove the string !AS! from our list.
31927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31929       # If it failed, the variable was not from the command line. Ignore it,
31930       # but warn the user (except for BASH, which is always set by the calling BASH).
31931       if test "xAS" != xBASH; then
31932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31933 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31934       fi
31935       # Try to locate tool using the code snippet
31936       for ac_prog in as
31937 do
31938   # Extract the first word of "$ac_prog", so it can be a program name with args.
31939 set dummy $ac_prog; ac_word=$2
31940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31941 $as_echo_n "checking for $ac_word... " >&6; }
31942 if ${ac_cv_path_AS+:} false; then :
31943   $as_echo_n "(cached) " >&6
31944 else
31945   case $AS in
31946   [\\/]* | ?:[\\/]*)
31947   ac_cv_path_AS="$AS" # Let the user override the test with a path.
31948   ;;
31949   *)
31950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31951 for as_dir in $PATH
31952 do
31953   IFS=$as_save_IFS
31954   test -z "$as_dir" && as_dir=.
31955     for ac_exec_ext in '' $ac_executable_extensions; do
31956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31957     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31959     break 2
31960   fi
31961 done
31962   done
31963 IFS=$as_save_IFS
31964 
31965   ;;
31966 esac
31967 fi
31968 AS=$ac_cv_path_AS
31969 if test -n "$AS"; then
31970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31971 $as_echo "$AS" >&6; }
31972 else
31973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31974 $as_echo "no" >&6; }
31975 fi
31976 
31977 
31978   test -n "$AS" && break
31979 done
31980 
31981     else
31982       # If it succeeded, then it was overridden by the user. We will use it
31983       # for the tool.
31984 
31985       # First remove it from the list of overridden variables, so we can test
31986       # for unknown variables in the end.
31987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31988 
31989       # Check if the provided tool contains a complete path.
31990       tool_specified="$AS"
31991       tool_basename="${tool_specified##*/}"
31992       if test "x$tool_basename" = "x$tool_specified"; then
31993         # A command without a complete path is provided, search $PATH.
31994         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31995 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31996         # Extract the first word of "$tool_basename", so it can be a program name with args.
31997 set dummy $tool_basename; ac_word=$2
31998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31999 $as_echo_n "checking for $ac_word... " >&6; }
32000 if ${ac_cv_path_AS+:} false; then :
32001   $as_echo_n "(cached) " >&6
32002 else
32003   case $AS in
32004   [\\/]* | ?:[\\/]*)
32005   ac_cv_path_AS="$AS" # Let the user override the test with a path.
32006   ;;
32007   *)
32008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32009 for as_dir in $PATH
32010 do
32011   IFS=$as_save_IFS
32012   test -z "$as_dir" && as_dir=.
32013     for ac_exec_ext in '' $ac_executable_extensions; do
32014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32015     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32017     break 2
32018   fi
32019 done
32020   done
32021 IFS=$as_save_IFS
32022 
32023   ;;
32024 esac
32025 fi
32026 AS=$ac_cv_path_AS
32027 if test -n "$AS"; then
32028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32029 $as_echo "$AS" >&6; }
32030 else
32031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32032 $as_echo "no" >&6; }
32033 fi
32034 
32035 
32036         if test "x$AS" = x; then
32037           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32038         fi
32039       else
32040         # Otherwise we believe it is a complete path. Use it as it is.
32041         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32042 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32044 $as_echo_n "checking for AS... " >&6; }
32045         if test ! -x "$tool_specified"; then
32046           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32047 $as_echo "not found" >&6; }
32048           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32049         fi
32050         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32051 $as_echo "$tool_specified" >&6; }
32052       fi
32053     fi
32054   fi
32055 
32056 
32057 
32058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32059 
32060   # First separate the path from the arguments. This will split at the first
32061   # space.
32062   complete="$AS"
32063   path="${complete%% *}"
32064   tmp="$complete EOL"
32065   arguments="${tmp#* }"
32066 
32067   # Input might be given as Windows format, start by converting to
32068   # unix format.
32069   new_path=`$CYGPATH -u "$path"`
32070 
32071   # Now try to locate executable using which
32072   new_path=`$WHICH "$new_path" 2> /dev/null`
32073   # bat and cmd files are not always considered executable in cygwin causing which
32074   # to not find them
32075   if test "x$new_path" = x \
32076       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32077       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32078     new_path=`$CYGPATH -u "$path"`
32079   fi
32080   if test "x$new_path" = x; then
32081     # Oops. Which didn't find the executable.
32082     # The splitting of arguments from the executable at a space might have been incorrect,
32083     # since paths with space are more likely in Windows. Give it another try with the whole
32084     # argument.
32085     path="$complete"
32086     arguments="EOL"
32087     new_path=`$CYGPATH -u "$path"`
32088     new_path=`$WHICH "$new_path" 2> /dev/null`
32089     # bat and cmd files are not always considered executable in cygwin causing which
32090     # to not find them
32091     if test "x$new_path" = x \
32092         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32093         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32094       new_path=`$CYGPATH -u "$path"`
32095     fi
32096     if test "x$new_path" = x; then
32097       # It's still not found. Now this is an unrecoverable error.
32098       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32099 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32100       has_space=`$ECHO "$complete" | $GREP " "`
32101       if test "x$has_space" != x; then
32102         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32103 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32104       fi
32105       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32106     fi
32107   fi
32108 
32109   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32110   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32111   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32112   # "foo.exe" is OK but "foo" is an error.
32113   #
32114   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32115   # It is also a way to make sure we got the proper file name for the real test later on.
32116   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32117   if test "x$test_shortpath" = x; then
32118     # Short path failed, file does not exist as specified.
32119     # Try adding .exe or .cmd
32120     if test -f "${new_path}.exe"; then
32121       input_to_shortpath="${new_path}.exe"
32122     elif test -f "${new_path}.cmd"; then
32123       input_to_shortpath="${new_path}.cmd"
32124     else
32125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32126 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32127       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32128 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32129       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32130     fi
32131   else
32132     input_to_shortpath="$new_path"
32133   fi
32134 
32135   # Call helper function which possibly converts this using DOS-style short mode.
32136   # If so, the updated path is stored in $new_path.
32137   new_path="$input_to_shortpath"
32138 
32139   input_path="$input_to_shortpath"
32140   # Check if we need to convert this using DOS-style short mode. If the path
32141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32142   # take no chances and rewrite it.
32143   # Note: m4 eats our [], so we need to use [ and ] instead.
32144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32145   if test "x$has_forbidden_chars" != x; then
32146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32150       # Going to short mode and back again did indeed matter. Since short mode is
32151       # case insensitive, let's make it lowercase to improve readability.
32152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32153       # Now convert it back to Unix-stile (cygpath)
32154       input_path=`$CYGPATH -u "$shortmode_path"`
32155       new_path="$input_path"
32156     fi
32157   fi
32158 
32159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32160   if test "x$test_cygdrive_prefix" = x; then
32161     # As a simple fix, exclude /usr/bin since it's not a real path.
32162     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32164       # a path prefixed by /cygdrive for fixpath to work.
32165       new_path="$CYGWIN_ROOT_PATH$input_path"
32166     fi
32167   fi
32168 
32169   # remove trailing .exe if any
32170   new_path="${new_path/%.exe/}"
32171 
32172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32173 
32174   # First separate the path from the arguments. This will split at the first
32175   # space.
32176   complete="$AS"
32177   path="${complete%% *}"
32178   tmp="$complete EOL"
32179   arguments="${tmp#* }"
32180 
32181   # Input might be given as Windows format, start by converting to
32182   # unix format.
32183   new_path="$path"
32184 
32185   windows_path="$new_path"
32186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32187     unix_path=`$CYGPATH -u "$windows_path"`
32188     new_path="$unix_path"
32189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32191     new_path="$unix_path"
32192   fi
32193 
32194 
32195   # Now try to locate executable using which
32196   new_path=`$WHICH "$new_path" 2> /dev/null`
32197 
32198   if test "x$new_path" = x; then
32199     # Oops. Which didn't find the executable.
32200     # The splitting of arguments from the executable at a space might have been incorrect,
32201     # since paths with space are more likely in Windows. Give it another try with the whole
32202     # argument.
32203     path="$complete"
32204     arguments="EOL"
32205     new_path="$path"
32206 
32207   windows_path="$new_path"
32208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32209     unix_path=`$CYGPATH -u "$windows_path"`
32210     new_path="$unix_path"
32211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32213     new_path="$unix_path"
32214   fi
32215 
32216 
32217     new_path=`$WHICH "$new_path" 2> /dev/null`
32218     # bat and cmd files are not always considered executable in MSYS causing which
32219     # to not find them
32220     if test "x$new_path" = x \
32221         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32222         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32223       new_path="$path"
32224 
32225   windows_path="$new_path"
32226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32227     unix_path=`$CYGPATH -u "$windows_path"`
32228     new_path="$unix_path"
32229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32230     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32231     new_path="$unix_path"
32232   fi
32233 
32234     fi
32235 
32236     if test "x$new_path" = x; then
32237       # It's still not found. Now this is an unrecoverable error.
32238       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32239 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32240       has_space=`$ECHO "$complete" | $GREP " "`
32241       if test "x$has_space" != x; then
32242         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32243 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32244       fi
32245       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32246     fi
32247   fi
32248 
32249   # Now new_path has a complete unix path to the binary
32250   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32251     # Keep paths in /bin as-is, but remove trailing .exe if any
32252     new_path="${new_path/%.exe/}"
32253     # Do not save /bin paths to all_fixpath_prefixes!
32254   else
32255     # Not in mixed or Windows style, start by that.
32256     new_path=`cmd //c echo $new_path`
32257 
32258   input_path="$new_path"
32259   # Check if we need to convert this using DOS-style short mode. If the path
32260   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32261   # take no chances and rewrite it.
32262   # Note: m4 eats our [], so we need to use [ and ] instead.
32263   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32264   if test "x$has_forbidden_chars" != x; then
32265     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32266     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32267   fi
32268 
32269     # Output is in $new_path
32270 
32271   windows_path="$new_path"
32272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32273     unix_path=`$CYGPATH -u "$windows_path"`
32274     new_path="$unix_path"
32275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32277     new_path="$unix_path"
32278   fi
32279 
32280     # remove trailing .exe if any
32281     new_path="${new_path/%.exe/}"
32282 
32283     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32284     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32285   fi
32286 
32287   else
32288     # We're on a unix platform. Hooray! :)
32289     # First separate the path from the arguments. This will split at the first
32290     # space.
32291     complete="$AS"
32292     path="${complete%% *}"
32293     tmp="$complete EOL"
32294     arguments="${tmp#* }"
32295 
32296     # Cannot rely on the command "which" here since it doesn't always work.
32297     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32298     if test -z "$is_absolute_path"; then
32299       # Path to executable is not absolute. Find it.
32300       IFS_save="$IFS"
32301       IFS=:
32302       for p in $PATH; do
32303         if test -f "$p/$path" && test -x "$p/$path"; then
32304           new_path="$p/$path"
32305           break
32306         fi
32307       done
32308       IFS="$IFS_save"
32309     else
32310       # This is an absolute path, we can use it without further modifications.
32311       new_path="$path"
32312     fi
32313 
32314     if test "x$new_path" = x; then
32315       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32316 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32317       has_space=`$ECHO "$complete" | $GREP " "`
32318       if test "x$has_space" != x; then
32319         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32320 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32321       fi
32322       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32323     fi
32324   fi
32325 
32326   # Now join together the path and the arguments once again
32327   if test "x$arguments" != xEOL; then
32328     new_complete="$new_path ${arguments% *}"
32329   else
32330     new_complete="$new_path"
32331   fi
32332 
32333   if test "x$complete" != "x$new_complete"; then
32334     AS="$new_complete"
32335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32336 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32337   fi
32338 
32339   else
32340     # FIXME: is this correct for microsoft?
32341     AS="$CC -c"
32342   fi
32343 
32344 
32345   #
32346   # Setup the archiver (AR)
32347   #
32348   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32349     # The corresponding ar tool is lib.exe (used to create static libraries)
32350     # Extract the first word of "lib", so it can be a program name with args.
32351 set dummy lib; ac_word=$2
32352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32353 $as_echo_n "checking for $ac_word... " >&6; }
32354 if ${ac_cv_prog_AR+:} false; then :
32355   $as_echo_n "(cached) " >&6
32356 else
32357   if test -n "$AR"; then
32358   ac_cv_prog_AR="$AR" # Let the user override the test.
32359 else
32360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32361 for as_dir in $PATH
32362 do
32363   IFS=$as_save_IFS
32364   test -z "$as_dir" && as_dir=.
32365     for ac_exec_ext in '' $ac_executable_extensions; do
32366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32367     ac_cv_prog_AR="lib"
32368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32369     break 2
32370   fi
32371 done
32372   done
32373 IFS=$as_save_IFS
32374 
32375 fi
32376 fi
32377 AR=$ac_cv_prog_AR
32378 if test -n "$AR"; then
32379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32380 $as_echo "$AR" >&6; }
32381 else
32382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32383 $as_echo "no" >&6; }
32384 fi
32385 
32386 
32387   else
32388 
32389 
32390   # Publish this variable in the help.
32391 
32392 
32393   if test "x$AR" = x; then
32394     # The variable is not set by user, try to locate tool using the code snippet
32395     if test -n "$ac_tool_prefix"; then
32396   for ac_prog in ar
32397   do
32398     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32399 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32401 $as_echo_n "checking for $ac_word... " >&6; }
32402 if ${ac_cv_prog_AR+:} false; then :
32403   $as_echo_n "(cached) " >&6
32404 else
32405   if test -n "$AR"; then
32406   ac_cv_prog_AR="$AR" # Let the user override the test.
32407 else
32408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32409 for as_dir in $PATH
32410 do
32411   IFS=$as_save_IFS
32412   test -z "$as_dir" && as_dir=.
32413     for ac_exec_ext in '' $ac_executable_extensions; do
32414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32415     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32417     break 2
32418   fi
32419 done
32420   done
32421 IFS=$as_save_IFS
32422 
32423 fi
32424 fi
32425 AR=$ac_cv_prog_AR
32426 if test -n "$AR"; then
32427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32428 $as_echo "$AR" >&6; }
32429 else
32430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32431 $as_echo "no" >&6; }
32432 fi
32433 
32434 
32435     test -n "$AR" && break
32436   done
32437 fi
32438 if test -z "$AR"; then
32439   ac_ct_AR=$AR
32440   for ac_prog in ar
32441 do
32442   # Extract the first word of "$ac_prog", so it can be a program name with args.
32443 set dummy $ac_prog; ac_word=$2
32444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32445 $as_echo_n "checking for $ac_word... " >&6; }
32446 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32447   $as_echo_n "(cached) " >&6
32448 else
32449   if test -n "$ac_ct_AR"; then
32450   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32451 else
32452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32453 for as_dir in $PATH
32454 do
32455   IFS=$as_save_IFS
32456   test -z "$as_dir" && as_dir=.
32457     for ac_exec_ext in '' $ac_executable_extensions; do
32458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32459     ac_cv_prog_ac_ct_AR="$ac_prog"
32460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32461     break 2
32462   fi
32463 done
32464   done
32465 IFS=$as_save_IFS
32466 
32467 fi
32468 fi
32469 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32470 if test -n "$ac_ct_AR"; then
32471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32472 $as_echo "$ac_ct_AR" >&6; }
32473 else
32474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32475 $as_echo "no" >&6; }
32476 fi
32477 
32478 
32479   test -n "$ac_ct_AR" && break
32480 done
32481 
32482   if test "x$ac_ct_AR" = x; then
32483     AR=""
32484   else
32485     case $cross_compiling:$ac_tool_warned in
32486 yes:)
32487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32488 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32489 ac_tool_warned=yes ;;
32490 esac
32491     AR=$ac_ct_AR
32492   fi
32493 fi
32494 
32495   else
32496     # The variable is set, but is it from the command line or the environment?
32497 
32498     # Try to remove the string !AR! from our list.
32499     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32500     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32501       # If it failed, the variable was not from the command line. Ignore it,
32502       # but warn the user (except for BASH, which is always set by the calling BASH).
32503       if test "xAR" != xBASH; then
32504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32505 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32506       fi
32507       # Try to locate tool using the code snippet
32508       if test -n "$ac_tool_prefix"; then
32509   for ac_prog in ar
32510   do
32511     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32512 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32514 $as_echo_n "checking for $ac_word... " >&6; }
32515 if ${ac_cv_prog_AR+:} false; then :
32516   $as_echo_n "(cached) " >&6
32517 else
32518   if test -n "$AR"; then
32519   ac_cv_prog_AR="$AR" # Let the user override the test.
32520 else
32521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32522 for as_dir in $PATH
32523 do
32524   IFS=$as_save_IFS
32525   test -z "$as_dir" && as_dir=.
32526     for ac_exec_ext in '' $ac_executable_extensions; do
32527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32528     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32530     break 2
32531   fi
32532 done
32533   done
32534 IFS=$as_save_IFS
32535 
32536 fi
32537 fi
32538 AR=$ac_cv_prog_AR
32539 if test -n "$AR"; then
32540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32541 $as_echo "$AR" >&6; }
32542 else
32543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32544 $as_echo "no" >&6; }
32545 fi
32546 
32547 
32548     test -n "$AR" && break
32549   done
32550 fi
32551 if test -z "$AR"; then
32552   ac_ct_AR=$AR
32553   for ac_prog in ar
32554 do
32555   # Extract the first word of "$ac_prog", so it can be a program name with args.
32556 set dummy $ac_prog; ac_word=$2
32557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32558 $as_echo_n "checking for $ac_word... " >&6; }
32559 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32560   $as_echo_n "(cached) " >&6
32561 else
32562   if test -n "$ac_ct_AR"; then
32563   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32564 else
32565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32566 for as_dir in $PATH
32567 do
32568   IFS=$as_save_IFS
32569   test -z "$as_dir" && as_dir=.
32570     for ac_exec_ext in '' $ac_executable_extensions; do
32571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32572     ac_cv_prog_ac_ct_AR="$ac_prog"
32573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32574     break 2
32575   fi
32576 done
32577   done
32578 IFS=$as_save_IFS
32579 
32580 fi
32581 fi
32582 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32583 if test -n "$ac_ct_AR"; then
32584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32585 $as_echo "$ac_ct_AR" >&6; }
32586 else
32587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32588 $as_echo "no" >&6; }
32589 fi
32590 
32591 
32592   test -n "$ac_ct_AR" && break
32593 done
32594 
32595   if test "x$ac_ct_AR" = x; then
32596     AR=""
32597   else
32598     case $cross_compiling:$ac_tool_warned in
32599 yes:)
32600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32601 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32602 ac_tool_warned=yes ;;
32603 esac
32604     AR=$ac_ct_AR
32605   fi
32606 fi
32607 
32608     else
32609       # If it succeeded, then it was overridden by the user. We will use it
32610       # for the tool.
32611 
32612       # First remove it from the list of overridden variables, so we can test
32613       # for unknown variables in the end.
32614       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32615 
32616       # Check if the provided tool contains a complete path.
32617       tool_specified="$AR"
32618       tool_basename="${tool_specified##*/}"
32619       if test "x$tool_basename" = "x$tool_specified"; then
32620         # A command without a complete path is provided, search $PATH.
32621         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32622 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32623         # Extract the first word of "$tool_basename", so it can be a program name with args.
32624 set dummy $tool_basename; ac_word=$2
32625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32626 $as_echo_n "checking for $ac_word... " >&6; }
32627 if ${ac_cv_path_AR+:} false; then :
32628   $as_echo_n "(cached) " >&6
32629 else
32630   case $AR in
32631   [\\/]* | ?:[\\/]*)
32632   ac_cv_path_AR="$AR" # Let the user override the test with a path.
32633   ;;
32634   *)
32635   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32636 for as_dir in $PATH
32637 do
32638   IFS=$as_save_IFS
32639   test -z "$as_dir" && as_dir=.
32640     for ac_exec_ext in '' $ac_executable_extensions; do
32641   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32642     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32644     break 2
32645   fi
32646 done
32647   done
32648 IFS=$as_save_IFS
32649 
32650   ;;
32651 esac
32652 fi
32653 AR=$ac_cv_path_AR
32654 if test -n "$AR"; then
32655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32656 $as_echo "$AR" >&6; }
32657 else
32658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32659 $as_echo "no" >&6; }
32660 fi
32661 
32662 
32663         if test "x$AR" = x; then
32664           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32665         fi
32666       else
32667         # Otherwise we believe it is a complete path. Use it as it is.
32668         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32669 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32670         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32671 $as_echo_n "checking for AR... " >&6; }
32672         if test ! -x "$tool_specified"; then
32673           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32674 $as_echo "not found" >&6; }
32675           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32676         fi
32677         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32678 $as_echo "$tool_specified" >&6; }
32679       fi
32680     fi
32681   fi
32682 
32683 
32684   fi
32685 
32686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32687 
32688   # First separate the path from the arguments. This will split at the first
32689   # space.
32690   complete="$AR"
32691   path="${complete%% *}"
32692   tmp="$complete EOL"
32693   arguments="${tmp#* }"
32694 
32695   # Input might be given as Windows format, start by converting to
32696   # unix format.
32697   new_path=`$CYGPATH -u "$path"`
32698 
32699   # Now try to locate executable using which
32700   new_path=`$WHICH "$new_path" 2> /dev/null`
32701   # bat and cmd files are not always considered executable in cygwin causing which
32702   # to not find them
32703   if test "x$new_path" = x \
32704       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32705       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32706     new_path=`$CYGPATH -u "$path"`
32707   fi
32708   if test "x$new_path" = x; then
32709     # Oops. Which didn't find the executable.
32710     # The splitting of arguments from the executable at a space might have been incorrect,
32711     # since paths with space are more likely in Windows. Give it another try with the whole
32712     # argument.
32713     path="$complete"
32714     arguments="EOL"
32715     new_path=`$CYGPATH -u "$path"`
32716     new_path=`$WHICH "$new_path" 2> /dev/null`
32717     # bat and cmd files are not always considered executable in cygwin causing which
32718     # to not find them
32719     if test "x$new_path" = x \
32720         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32721         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32722       new_path=`$CYGPATH -u "$path"`
32723     fi
32724     if test "x$new_path" = x; then
32725       # It's still not found. Now this is an unrecoverable error.
32726       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32727 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32728       has_space=`$ECHO "$complete" | $GREP " "`
32729       if test "x$has_space" != x; then
32730         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32731 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32732       fi
32733       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32734     fi
32735   fi
32736 
32737   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32738   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32739   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32740   # "foo.exe" is OK but "foo" is an error.
32741   #
32742   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32743   # It is also a way to make sure we got the proper file name for the real test later on.
32744   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32745   if test "x$test_shortpath" = x; then
32746     # Short path failed, file does not exist as specified.
32747     # Try adding .exe or .cmd
32748     if test -f "${new_path}.exe"; then
32749       input_to_shortpath="${new_path}.exe"
32750     elif test -f "${new_path}.cmd"; then
32751       input_to_shortpath="${new_path}.cmd"
32752     else
32753       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32754 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32755       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32756 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32757       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32758     fi
32759   else
32760     input_to_shortpath="$new_path"
32761   fi
32762 
32763   # Call helper function which possibly converts this using DOS-style short mode.
32764   # If so, the updated path is stored in $new_path.
32765   new_path="$input_to_shortpath"
32766 
32767   input_path="$input_to_shortpath"
32768   # Check if we need to convert this using DOS-style short mode. If the path
32769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32770   # take no chances and rewrite it.
32771   # Note: m4 eats our [], so we need to use [ and ] instead.
32772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32773   if test "x$has_forbidden_chars" != x; then
32774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32775     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32776     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32777     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32778       # Going to short mode and back again did indeed matter. Since short mode is
32779       # case insensitive, let's make it lowercase to improve readability.
32780       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32781       # Now convert it back to Unix-stile (cygpath)
32782       input_path=`$CYGPATH -u "$shortmode_path"`
32783       new_path="$input_path"
32784     fi
32785   fi
32786 
32787   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32788   if test "x$test_cygdrive_prefix" = x; then
32789     # As a simple fix, exclude /usr/bin since it's not a real path.
32790     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32791       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32792       # a path prefixed by /cygdrive for fixpath to work.
32793       new_path="$CYGWIN_ROOT_PATH$input_path"
32794     fi
32795   fi
32796 
32797   # remove trailing .exe if any
32798   new_path="${new_path/%.exe/}"
32799 
32800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32801 
32802   # First separate the path from the arguments. This will split at the first
32803   # space.
32804   complete="$AR"
32805   path="${complete%% *}"
32806   tmp="$complete EOL"
32807   arguments="${tmp#* }"
32808 
32809   # Input might be given as Windows format, start by converting to
32810   # unix format.
32811   new_path="$path"
32812 
32813   windows_path="$new_path"
32814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32815     unix_path=`$CYGPATH -u "$windows_path"`
32816     new_path="$unix_path"
32817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32819     new_path="$unix_path"
32820   fi
32821 
32822 
32823   # Now try to locate executable using which
32824   new_path=`$WHICH "$new_path" 2> /dev/null`
32825 
32826   if test "x$new_path" = x; then
32827     # Oops. Which didn't find the executable.
32828     # The splitting of arguments from the executable at a space might have been incorrect,
32829     # since paths with space are more likely in Windows. Give it another try with the whole
32830     # argument.
32831     path="$complete"
32832     arguments="EOL"
32833     new_path="$path"
32834 
32835   windows_path="$new_path"
32836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32837     unix_path=`$CYGPATH -u "$windows_path"`
32838     new_path="$unix_path"
32839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32841     new_path="$unix_path"
32842   fi
32843 
32844 
32845     new_path=`$WHICH "$new_path" 2> /dev/null`
32846     # bat and cmd files are not always considered executable in MSYS causing which
32847     # to not find them
32848     if test "x$new_path" = x \
32849         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32850         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32851       new_path="$path"
32852 
32853   windows_path="$new_path"
32854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32855     unix_path=`$CYGPATH -u "$windows_path"`
32856     new_path="$unix_path"
32857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32859     new_path="$unix_path"
32860   fi
32861 
32862     fi
32863 
32864     if test "x$new_path" = x; then
32865       # It's still not found. Now this is an unrecoverable error.
32866       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32867 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32868       has_space=`$ECHO "$complete" | $GREP " "`
32869       if test "x$has_space" != x; then
32870         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32871 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32872       fi
32873       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32874     fi
32875   fi
32876 
32877   # Now new_path has a complete unix path to the binary
32878   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32879     # Keep paths in /bin as-is, but remove trailing .exe if any
32880     new_path="${new_path/%.exe/}"
32881     # Do not save /bin paths to all_fixpath_prefixes!
32882   else
32883     # Not in mixed or Windows style, start by that.
32884     new_path=`cmd //c echo $new_path`
32885 
32886   input_path="$new_path"
32887   # Check if we need to convert this using DOS-style short mode. If the path
32888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32889   # take no chances and rewrite it.
32890   # Note: m4 eats our [], so we need to use [ and ] instead.
32891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32892   if test "x$has_forbidden_chars" != x; then
32893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32894     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32895   fi
32896 
32897     # Output is in $new_path
32898 
32899   windows_path="$new_path"
32900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32901     unix_path=`$CYGPATH -u "$windows_path"`
32902     new_path="$unix_path"
32903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32905     new_path="$unix_path"
32906   fi
32907 
32908     # remove trailing .exe if any
32909     new_path="${new_path/%.exe/}"
32910 
32911     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32912     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32913   fi
32914 
32915   else
32916     # We're on a unix platform. Hooray! :)
32917     # First separate the path from the arguments. This will split at the first
32918     # space.
32919     complete="$AR"
32920     path="${complete%% *}"
32921     tmp="$complete EOL"
32922     arguments="${tmp#* }"
32923 
32924     # Cannot rely on the command "which" here since it doesn't always work.
32925     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32926     if test -z "$is_absolute_path"; then
32927       # Path to executable is not absolute. Find it.
32928       IFS_save="$IFS"
32929       IFS=:
32930       for p in $PATH; do
32931         if test -f "$p/$path" && test -x "$p/$path"; then
32932           new_path="$p/$path"
32933           break
32934         fi
32935       done
32936       IFS="$IFS_save"
32937     else
32938       # This is an absolute path, we can use it without further modifications.
32939       new_path="$path"
32940     fi
32941 
32942     if test "x$new_path" = x; then
32943       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32944 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32945       has_space=`$ECHO "$complete" | $GREP " "`
32946       if test "x$has_space" != x; then
32947         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32948 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32949       fi
32950       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32951     fi
32952   fi
32953 
32954   # Now join together the path and the arguments once again
32955   if test "x$arguments" != xEOL; then
32956     new_complete="$new_path ${arguments% *}"
32957   else
32958     new_complete="$new_path"
32959   fi
32960 
32961   if test "x$complete" != "x$new_complete"; then
32962     AR="$new_complete"
32963     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32964 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32965   fi
32966 
32967 
32968 
32969   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32970     ac_ext=m
32971 ac_cpp='$OBJCPP $CPPFLAGS'
32972 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32973 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32974 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32975 if test -n "$ac_tool_prefix"; then
32976   for ac_prog in gcc objcc objc cc CC
32977   do
32978     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32979 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32981 $as_echo_n "checking for $ac_word... " >&6; }
32982 if ${ac_cv_prog_OBJC+:} false; then :
32983   $as_echo_n "(cached) " >&6
32984 else
32985   if test -n "$OBJC"; then
32986   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32987 else
32988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32989 for as_dir in $PATH
32990 do
32991   IFS=$as_save_IFS
32992   test -z "$as_dir" && as_dir=.
32993     for ac_exec_ext in '' $ac_executable_extensions; do
32994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32995     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32997     break 2
32998   fi
32999 done
33000   done
33001 IFS=$as_save_IFS
33002 
33003 fi
33004 fi
33005 OBJC=$ac_cv_prog_OBJC
33006 if test -n "$OBJC"; then
33007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33008 $as_echo "$OBJC" >&6; }
33009 else
33010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33011 $as_echo "no" >&6; }
33012 fi
33013 
33014 
33015     test -n "$OBJC" && break
33016   done
33017 fi
33018 if test -z "$OBJC"; then
33019   ac_ct_OBJC=$OBJC
33020   for ac_prog in gcc objcc objc cc CC
33021 do
33022   # Extract the first word of "$ac_prog", so it can be a program name with args.
33023 set dummy $ac_prog; ac_word=$2
33024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33025 $as_echo_n "checking for $ac_word... " >&6; }
33026 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33027   $as_echo_n "(cached) " >&6
33028 else
33029   if test -n "$ac_ct_OBJC"; then
33030   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33031 else
33032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33033 for as_dir in $PATH
33034 do
33035   IFS=$as_save_IFS
33036   test -z "$as_dir" && as_dir=.
33037     for ac_exec_ext in '' $ac_executable_extensions; do
33038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33039     ac_cv_prog_ac_ct_OBJC="$ac_prog"
33040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33041     break 2
33042   fi
33043 done
33044   done
33045 IFS=$as_save_IFS
33046 
33047 fi
33048 fi
33049 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33050 if test -n "$ac_ct_OBJC"; then
33051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33052 $as_echo "$ac_ct_OBJC" >&6; }
33053 else
33054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33055 $as_echo "no" >&6; }
33056 fi
33057 
33058 
33059   test -n "$ac_ct_OBJC" && break
33060 done
33061 
33062   if test "x$ac_ct_OBJC" = x; then
33063     OBJC="gcc"
33064   else
33065     case $cross_compiling:$ac_tool_warned in
33066 yes:)
33067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33068 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33069 ac_tool_warned=yes ;;
33070 esac
33071     OBJC=$ac_ct_OBJC
33072   fi
33073 fi
33074 
33075 # Provide some information about the compiler.
33076 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33077 set X $ac_compile
33078 ac_compiler=$2
33079 for ac_option in --version -v -V -qversion; do
33080   { { ac_try="$ac_compiler $ac_option >&5"
33081 case "(($ac_try" in
33082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33083   *) ac_try_echo=$ac_try;;
33084 esac
33085 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33086 $as_echo "$ac_try_echo"; } >&5
33087   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33088   ac_status=$?
33089   if test -s conftest.err; then
33090     sed '10a\
33091 ... rest of stderr output deleted ...
33092          10q' conftest.err >conftest.er1
33093     cat conftest.er1 >&5
33094   fi
33095   rm -f conftest.er1 conftest.err
33096   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33097   test $ac_status = 0; }
33098 done
33099 
33100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33101 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33102 if ${ac_cv_objc_compiler_gnu+:} false; then :
33103   $as_echo_n "(cached) " >&6
33104 else
33105   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33106 /* end confdefs.h.  */
33107 
33108 int
33109 main ()
33110 {
33111 #ifndef __GNUC__
33112        choke me
33113 #endif
33114 
33115   ;
33116   return 0;
33117 }
33118 _ACEOF
33119 if ac_fn_objc_try_compile "$LINENO"; then :
33120   ac_compiler_gnu=yes
33121 else
33122   ac_compiler_gnu=no
33123 fi
33124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33125 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33126 
33127 fi
33128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33129 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33130 if test $ac_compiler_gnu = yes; then
33131   GOBJC=yes
33132 else
33133   GOBJC=
33134 fi
33135 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33136 ac_save_OBJCFLAGS=$OBJCFLAGS
33137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33138 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33139 if ${ac_cv_prog_objc_g+:} false; then :
33140   $as_echo_n "(cached) " >&6
33141 else
33142   ac_save_objc_werror_flag=$ac_objc_werror_flag
33143    ac_objc_werror_flag=yes
33144    ac_cv_prog_objc_g=no
33145    OBJCFLAGS="-g"
33146    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33147 /* end confdefs.h.  */
33148 
33149 int
33150 main ()
33151 {
33152 
33153   ;
33154   return 0;
33155 }
33156 _ACEOF
33157 if ac_fn_objc_try_compile "$LINENO"; then :
33158   ac_cv_prog_objc_g=yes
33159 else
33160   OBJCFLAGS=""
33161       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33162 /* end confdefs.h.  */
33163 
33164 int
33165 main ()
33166 {
33167 
33168   ;
33169   return 0;
33170 }
33171 _ACEOF
33172 if ac_fn_objc_try_compile "$LINENO"; then :
33173 
33174 else
33175   ac_objc_werror_flag=$ac_save_objc_werror_flag
33176          OBJCFLAGS="-g"
33177          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33178 /* end confdefs.h.  */
33179 
33180 int
33181 main ()
33182 {
33183 
33184   ;
33185   return 0;
33186 }
33187 _ACEOF
33188 if ac_fn_objc_try_compile "$LINENO"; then :
33189   ac_cv_prog_objc_g=yes
33190 fi
33191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33192 fi
33193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33194 fi
33195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33196    ac_objc_werror_flag=$ac_save_objc_werror_flag
33197 fi
33198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33199 $as_echo "$ac_cv_prog_objc_g" >&6; }
33200 if test "$ac_test_OBJCFLAGS" = set; then
33201   OBJCFLAGS=$ac_save_OBJCFLAGS
33202 elif test $ac_cv_prog_objc_g = yes; then
33203   if test "$GOBJC" = yes; then
33204     OBJCFLAGS="-g -O2"
33205   else
33206     OBJCFLAGS="-g"
33207   fi
33208 else
33209   if test "$GOBJC" = yes; then
33210     OBJCFLAGS="-O2"
33211   else
33212     OBJCFLAGS=
33213   fi
33214 fi
33215 ac_ext=cpp
33216 ac_cpp='$CXXCPP $CPPFLAGS'
33217 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33218 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33219 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33220 
33221 
33222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33223 
33224   # First separate the path from the arguments. This will split at the first
33225   # space.
33226   complete="$OBJC"
33227   path="${complete%% *}"
33228   tmp="$complete EOL"
33229   arguments="${tmp#* }"
33230 
33231   # Input might be given as Windows format, start by converting to
33232   # unix format.
33233   new_path=`$CYGPATH -u "$path"`
33234 
33235   # Now try to locate executable using which
33236   new_path=`$WHICH "$new_path" 2> /dev/null`
33237   # bat and cmd files are not always considered executable in cygwin causing which
33238   # to not find them
33239   if test "x$new_path" = x \
33240       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33241       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33242     new_path=`$CYGPATH -u "$path"`
33243   fi
33244   if test "x$new_path" = x; then
33245     # Oops. Which didn't find the executable.
33246     # The splitting of arguments from the executable at a space might have been incorrect,
33247     # since paths with space are more likely in Windows. Give it another try with the whole
33248     # argument.
33249     path="$complete"
33250     arguments="EOL"
33251     new_path=`$CYGPATH -u "$path"`
33252     new_path=`$WHICH "$new_path" 2> /dev/null`
33253     # bat and cmd files are not always considered executable in cygwin causing which
33254     # to not find them
33255     if test "x$new_path" = x \
33256         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33257         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33258       new_path=`$CYGPATH -u "$path"`
33259     fi
33260     if test "x$new_path" = x; then
33261       # It's still not found. Now this is an unrecoverable error.
33262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33263 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33264       has_space=`$ECHO "$complete" | $GREP " "`
33265       if test "x$has_space" != x; then
33266         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33267 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33268       fi
33269       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33270     fi
33271   fi
33272 
33273   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33274   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33275   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33276   # "foo.exe" is OK but "foo" is an error.
33277   #
33278   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33279   # It is also a way to make sure we got the proper file name for the real test later on.
33280   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33281   if test "x$test_shortpath" = x; then
33282     # Short path failed, file does not exist as specified.
33283     # Try adding .exe or .cmd
33284     if test -f "${new_path}.exe"; then
33285       input_to_shortpath="${new_path}.exe"
33286     elif test -f "${new_path}.cmd"; then
33287       input_to_shortpath="${new_path}.cmd"
33288     else
33289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33290 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33291       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33292 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33293       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33294     fi
33295   else
33296     input_to_shortpath="$new_path"
33297   fi
33298 
33299   # Call helper function which possibly converts this using DOS-style short mode.
33300   # If so, the updated path is stored in $new_path.
33301   new_path="$input_to_shortpath"
33302 
33303   input_path="$input_to_shortpath"
33304   # Check if we need to convert this using DOS-style short mode. If the path
33305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33306   # take no chances and rewrite it.
33307   # Note: m4 eats our [], so we need to use [ and ] instead.
33308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33309   if test "x$has_forbidden_chars" != x; then
33310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33311     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33312     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33313     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33314       # Going to short mode and back again did indeed matter. Since short mode is
33315       # case insensitive, let's make it lowercase to improve readability.
33316       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33317       # Now convert it back to Unix-stile (cygpath)
33318       input_path=`$CYGPATH -u "$shortmode_path"`
33319       new_path="$input_path"
33320     fi
33321   fi
33322 
33323   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33324   if test "x$test_cygdrive_prefix" = x; then
33325     # As a simple fix, exclude /usr/bin since it's not a real path.
33326     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33327       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33328       # a path prefixed by /cygdrive for fixpath to work.
33329       new_path="$CYGWIN_ROOT_PATH$input_path"
33330     fi
33331   fi
33332 
33333   # remove trailing .exe if any
33334   new_path="${new_path/%.exe/}"
33335 
33336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33337 
33338   # First separate the path from the arguments. This will split at the first
33339   # space.
33340   complete="$OBJC"
33341   path="${complete%% *}"
33342   tmp="$complete EOL"
33343   arguments="${tmp#* }"
33344 
33345   # Input might be given as Windows format, start by converting to
33346   # unix format.
33347   new_path="$path"
33348 
33349   windows_path="$new_path"
33350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33351     unix_path=`$CYGPATH -u "$windows_path"`
33352     new_path="$unix_path"
33353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33355     new_path="$unix_path"
33356   fi
33357 
33358 
33359   # Now try to locate executable using which
33360   new_path=`$WHICH "$new_path" 2> /dev/null`
33361 
33362   if test "x$new_path" = x; then
33363     # Oops. Which didn't find the executable.
33364     # The splitting of arguments from the executable at a space might have been incorrect,
33365     # since paths with space are more likely in Windows. Give it another try with the whole
33366     # argument.
33367     path="$complete"
33368     arguments="EOL"
33369     new_path="$path"
33370 
33371   windows_path="$new_path"
33372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33373     unix_path=`$CYGPATH -u "$windows_path"`
33374     new_path="$unix_path"
33375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33377     new_path="$unix_path"
33378   fi
33379 
33380 
33381     new_path=`$WHICH "$new_path" 2> /dev/null`
33382     # bat and cmd files are not always considered executable in MSYS causing which
33383     # to not find them
33384     if test "x$new_path" = x \
33385         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33386         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33387       new_path="$path"
33388 
33389   windows_path="$new_path"
33390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33391     unix_path=`$CYGPATH -u "$windows_path"`
33392     new_path="$unix_path"
33393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33395     new_path="$unix_path"
33396   fi
33397 
33398     fi
33399 
33400     if test "x$new_path" = x; then
33401       # It's still not found. Now this is an unrecoverable error.
33402       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33403 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33404       has_space=`$ECHO "$complete" | $GREP " "`
33405       if test "x$has_space" != x; then
33406         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33407 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33408       fi
33409       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33410     fi
33411   fi
33412 
33413   # Now new_path has a complete unix path to the binary
33414   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33415     # Keep paths in /bin as-is, but remove trailing .exe if any
33416     new_path="${new_path/%.exe/}"
33417     # Do not save /bin paths to all_fixpath_prefixes!
33418   else
33419     # Not in mixed or Windows style, start by that.
33420     new_path=`cmd //c echo $new_path`
33421 
33422   input_path="$new_path"
33423   # Check if we need to convert this using DOS-style short mode. If the path
33424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33425   # take no chances and rewrite it.
33426   # Note: m4 eats our [], so we need to use [ and ] instead.
33427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33428   if test "x$has_forbidden_chars" != x; then
33429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33431   fi
33432 
33433     # Output is in $new_path
33434 
33435   windows_path="$new_path"
33436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33437     unix_path=`$CYGPATH -u "$windows_path"`
33438     new_path="$unix_path"
33439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33441     new_path="$unix_path"
33442   fi
33443 
33444     # remove trailing .exe if any
33445     new_path="${new_path/%.exe/}"
33446 
33447     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33448     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33449   fi
33450 
33451   else
33452     # We're on a unix platform. Hooray! :)
33453     # First separate the path from the arguments. This will split at the first
33454     # space.
33455     complete="$OBJC"
33456     path="${complete%% *}"
33457     tmp="$complete EOL"
33458     arguments="${tmp#* }"
33459 
33460     # Cannot rely on the command "which" here since it doesn't always work.
33461     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33462     if test -z "$is_absolute_path"; then
33463       # Path to executable is not absolute. Find it.
33464       IFS_save="$IFS"
33465       IFS=:
33466       for p in $PATH; do
33467         if test -f "$p/$path" && test -x "$p/$path"; then
33468           new_path="$p/$path"
33469           break
33470         fi
33471       done
33472       IFS="$IFS_save"
33473     else
33474       # This is an absolute path, we can use it without further modifications.
33475       new_path="$path"
33476     fi
33477 
33478     if test "x$new_path" = x; then
33479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33480 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33481       has_space=`$ECHO "$complete" | $GREP " "`
33482       if test "x$has_space" != x; then
33483         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33484 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33485       fi
33486       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33487     fi
33488   fi
33489 
33490   # Now join together the path and the arguments once again
33491   if test "x$arguments" != xEOL; then
33492     new_complete="$new_path ${arguments% *}"
33493   else
33494     new_complete="$new_path"
33495   fi
33496 
33497   if test "x$complete" != "x$new_complete"; then
33498     OBJC="$new_complete"
33499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33500 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33501   fi
33502 
33503 
33504 
33505   # Publish this variable in the help.
33506 
33507 
33508   if test "x$LIPO" = x; then
33509     # The variable is not set by user, try to locate tool using the code snippet
33510     for ac_prog in lipo
33511 do
33512   # Extract the first word of "$ac_prog", so it can be a program name with args.
33513 set dummy $ac_prog; ac_word=$2
33514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33515 $as_echo_n "checking for $ac_word... " >&6; }
33516 if ${ac_cv_path_LIPO+:} false; then :
33517   $as_echo_n "(cached) " >&6
33518 else
33519   case $LIPO in
33520   [\\/]* | ?:[\\/]*)
33521   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33522   ;;
33523   *)
33524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33525 for as_dir in $PATH
33526 do
33527   IFS=$as_save_IFS
33528   test -z "$as_dir" && as_dir=.
33529     for ac_exec_ext in '' $ac_executable_extensions; do
33530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33531     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33533     break 2
33534   fi
33535 done
33536   done
33537 IFS=$as_save_IFS
33538 
33539   ;;
33540 esac
33541 fi
33542 LIPO=$ac_cv_path_LIPO
33543 if test -n "$LIPO"; then
33544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33545 $as_echo "$LIPO" >&6; }
33546 else
33547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33548 $as_echo "no" >&6; }
33549 fi
33550 
33551 
33552   test -n "$LIPO" && break
33553 done
33554 
33555   else
33556     # The variable is set, but is it from the command line or the environment?
33557 
33558     # Try to remove the string !LIPO! from our list.
33559     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33560     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33561       # If it failed, the variable was not from the command line. Ignore it,
33562       # but warn the user (except for BASH, which is always set by the calling BASH).
33563       if test "xLIPO" != xBASH; then
33564         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33565 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33566       fi
33567       # Try to locate tool using the code snippet
33568       for ac_prog in lipo
33569 do
33570   # Extract the first word of "$ac_prog", so it can be a program name with args.
33571 set dummy $ac_prog; ac_word=$2
33572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33573 $as_echo_n "checking for $ac_word... " >&6; }
33574 if ${ac_cv_path_LIPO+:} false; then :
33575   $as_echo_n "(cached) " >&6
33576 else
33577   case $LIPO in
33578   [\\/]* | ?:[\\/]*)
33579   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33580   ;;
33581   *)
33582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33583 for as_dir in $PATH
33584 do
33585   IFS=$as_save_IFS
33586   test -z "$as_dir" && as_dir=.
33587     for ac_exec_ext in '' $ac_executable_extensions; do
33588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33589     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33591     break 2
33592   fi
33593 done
33594   done
33595 IFS=$as_save_IFS
33596 
33597   ;;
33598 esac
33599 fi
33600 LIPO=$ac_cv_path_LIPO
33601 if test -n "$LIPO"; then
33602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33603 $as_echo "$LIPO" >&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 "$LIPO" && break
33611 done
33612 
33613     else
33614       # If it succeeded, then it was overridden by the user. We will use it
33615       # for the tool.
33616 
33617       # First remove it from the list of overridden variables, so we can test
33618       # for unknown variables in the end.
33619       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33620 
33621       # Check if the provided tool contains a complete path.
33622       tool_specified="$LIPO"
33623       tool_basename="${tool_specified##*/}"
33624       if test "x$tool_basename" = "x$tool_specified"; then
33625         # A command without a complete path is provided, search $PATH.
33626         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33627 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33628         # Extract the first word of "$tool_basename", so it can be a program name with args.
33629 set dummy $tool_basename; ac_word=$2
33630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33631 $as_echo_n "checking for $ac_word... " >&6; }
33632 if ${ac_cv_path_LIPO+:} false; then :
33633   $as_echo_n "(cached) " >&6
33634 else
33635   case $LIPO in
33636   [\\/]* | ?:[\\/]*)
33637   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33638   ;;
33639   *)
33640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33641 for as_dir in $PATH
33642 do
33643   IFS=$as_save_IFS
33644   test -z "$as_dir" && as_dir=.
33645     for ac_exec_ext in '' $ac_executable_extensions; do
33646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33647     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33649     break 2
33650   fi
33651 done
33652   done
33653 IFS=$as_save_IFS
33654 
33655   ;;
33656 esac
33657 fi
33658 LIPO=$ac_cv_path_LIPO
33659 if test -n "$LIPO"; then
33660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33661 $as_echo "$LIPO" >&6; }
33662 else
33663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33664 $as_echo "no" >&6; }
33665 fi
33666 
33667 
33668         if test "x$LIPO" = x; then
33669           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33670         fi
33671       else
33672         # Otherwise we believe it is a complete path. Use it as it is.
33673         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33674 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33675         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33676 $as_echo_n "checking for LIPO... " >&6; }
33677         if test ! -x "$tool_specified"; then
33678           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33679 $as_echo "not found" >&6; }
33680           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33681         fi
33682         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33683 $as_echo "$tool_specified" >&6; }
33684       fi
33685     fi
33686   fi
33687 
33688 
33689 
33690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33691 
33692   # First separate the path from the arguments. This will split at the first
33693   # space.
33694   complete="$LIPO"
33695   path="${complete%% *}"
33696   tmp="$complete EOL"
33697   arguments="${tmp#* }"
33698 
33699   # Input might be given as Windows format, start by converting to
33700   # unix format.
33701   new_path=`$CYGPATH -u "$path"`
33702 
33703   # Now try to locate executable using which
33704   new_path=`$WHICH "$new_path" 2> /dev/null`
33705   # bat and cmd files are not always considered executable in cygwin causing which
33706   # to not find them
33707   if test "x$new_path" = x \
33708       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33709       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33710     new_path=`$CYGPATH -u "$path"`
33711   fi
33712   if test "x$new_path" = x; then
33713     # Oops. Which didn't find the executable.
33714     # The splitting of arguments from the executable at a space might have been incorrect,
33715     # since paths with space are more likely in Windows. Give it another try with the whole
33716     # argument.
33717     path="$complete"
33718     arguments="EOL"
33719     new_path=`$CYGPATH -u "$path"`
33720     new_path=`$WHICH "$new_path" 2> /dev/null`
33721     # bat and cmd files are not always considered executable in cygwin causing which
33722     # to not find them
33723     if test "x$new_path" = x \
33724         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33725         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33726       new_path=`$CYGPATH -u "$path"`
33727     fi
33728     if test "x$new_path" = x; then
33729       # It's still not found. Now this is an unrecoverable error.
33730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33731 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33732       has_space=`$ECHO "$complete" | $GREP " "`
33733       if test "x$has_space" != x; then
33734         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33735 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33736       fi
33737       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33738     fi
33739   fi
33740 
33741   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33742   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33743   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33744   # "foo.exe" is OK but "foo" is an error.
33745   #
33746   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33747   # It is also a way to make sure we got the proper file name for the real test later on.
33748   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33749   if test "x$test_shortpath" = x; then
33750     # Short path failed, file does not exist as specified.
33751     # Try adding .exe or .cmd
33752     if test -f "${new_path}.exe"; then
33753       input_to_shortpath="${new_path}.exe"
33754     elif test -f "${new_path}.cmd"; then
33755       input_to_shortpath="${new_path}.cmd"
33756     else
33757       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33758 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33759       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33760 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33761       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33762     fi
33763   else
33764     input_to_shortpath="$new_path"
33765   fi
33766 
33767   # Call helper function which possibly converts this using DOS-style short mode.
33768   # If so, the updated path is stored in $new_path.
33769   new_path="$input_to_shortpath"
33770 
33771   input_path="$input_to_shortpath"
33772   # Check if we need to convert this using DOS-style short mode. If the path
33773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33774   # take no chances and rewrite it.
33775   # Note: m4 eats our [], so we need to use [ and ] instead.
33776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33777   if test "x$has_forbidden_chars" != x; then
33778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33779     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33780     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33781     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33782       # Going to short mode and back again did indeed matter. Since short mode is
33783       # case insensitive, let's make it lowercase to improve readability.
33784       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33785       # Now convert it back to Unix-stile (cygpath)
33786       input_path=`$CYGPATH -u "$shortmode_path"`
33787       new_path="$input_path"
33788     fi
33789   fi
33790 
33791   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33792   if test "x$test_cygdrive_prefix" = x; then
33793     # As a simple fix, exclude /usr/bin since it's not a real path.
33794     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33795       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33796       # a path prefixed by /cygdrive for fixpath to work.
33797       new_path="$CYGWIN_ROOT_PATH$input_path"
33798     fi
33799   fi
33800 
33801   # remove trailing .exe if any
33802   new_path="${new_path/%.exe/}"
33803 
33804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33805 
33806   # First separate the path from the arguments. This will split at the first
33807   # space.
33808   complete="$LIPO"
33809   path="${complete%% *}"
33810   tmp="$complete EOL"
33811   arguments="${tmp#* }"
33812 
33813   # Input might be given as Windows format, start by converting to
33814   # unix format.
33815   new_path="$path"
33816 
33817   windows_path="$new_path"
33818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33819     unix_path=`$CYGPATH -u "$windows_path"`
33820     new_path="$unix_path"
33821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33823     new_path="$unix_path"
33824   fi
33825 
33826 
33827   # Now try to locate executable using which
33828   new_path=`$WHICH "$new_path" 2> /dev/null`
33829 
33830   if test "x$new_path" = x; then
33831     # Oops. Which didn't find the executable.
33832     # The splitting of arguments from the executable at a space might have been incorrect,
33833     # since paths with space are more likely in Windows. Give it another try with the whole
33834     # argument.
33835     path="$complete"
33836     arguments="EOL"
33837     new_path="$path"
33838 
33839   windows_path="$new_path"
33840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33841     unix_path=`$CYGPATH -u "$windows_path"`
33842     new_path="$unix_path"
33843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33845     new_path="$unix_path"
33846   fi
33847 
33848 
33849     new_path=`$WHICH "$new_path" 2> /dev/null`
33850     # bat and cmd files are not always considered executable in MSYS causing which
33851     # to not find them
33852     if test "x$new_path" = x \
33853         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33854         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33855       new_path="$path"
33856 
33857   windows_path="$new_path"
33858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33859     unix_path=`$CYGPATH -u "$windows_path"`
33860     new_path="$unix_path"
33861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33862     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33863     new_path="$unix_path"
33864   fi
33865 
33866     fi
33867 
33868     if test "x$new_path" = x; then
33869       # It's still not found. Now this is an unrecoverable error.
33870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33871 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33872       has_space=`$ECHO "$complete" | $GREP " "`
33873       if test "x$has_space" != x; then
33874         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33875 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33876       fi
33877       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33878     fi
33879   fi
33880 
33881   # Now new_path has a complete unix path to the binary
33882   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33883     # Keep paths in /bin as-is, but remove trailing .exe if any
33884     new_path="${new_path/%.exe/}"
33885     # Do not save /bin paths to all_fixpath_prefixes!
33886   else
33887     # Not in mixed or Windows style, start by that.
33888     new_path=`cmd //c echo $new_path`
33889 
33890   input_path="$new_path"
33891   # Check if we need to convert this using DOS-style short mode. If the path
33892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33893   # take no chances and rewrite it.
33894   # Note: m4 eats our [], so we need to use [ and ] instead.
33895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33896   if test "x$has_forbidden_chars" != x; then
33897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33898     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33899   fi
33900 
33901     # Output is in $new_path
33902 
33903   windows_path="$new_path"
33904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33905     unix_path=`$CYGPATH -u "$windows_path"`
33906     new_path="$unix_path"
33907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33909     new_path="$unix_path"
33910   fi
33911 
33912     # remove trailing .exe if any
33913     new_path="${new_path/%.exe/}"
33914 
33915     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33916     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33917   fi
33918 
33919   else
33920     # We're on a unix platform. Hooray! :)
33921     # First separate the path from the arguments. This will split at the first
33922     # space.
33923     complete="$LIPO"
33924     path="${complete%% *}"
33925     tmp="$complete EOL"
33926     arguments="${tmp#* }"
33927 
33928     # Cannot rely on the command "which" here since it doesn't always work.
33929     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33930     if test -z "$is_absolute_path"; then
33931       # Path to executable is not absolute. Find it.
33932       IFS_save="$IFS"
33933       IFS=:
33934       for p in $PATH; do
33935         if test -f "$p/$path" && test -x "$p/$path"; then
33936           new_path="$p/$path"
33937           break
33938         fi
33939       done
33940       IFS="$IFS_save"
33941     else
33942       # This is an absolute path, we can use it without further modifications.
33943       new_path="$path"
33944     fi
33945 
33946     if test "x$new_path" = x; then
33947       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33948 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33949       has_space=`$ECHO "$complete" | $GREP " "`
33950       if test "x$has_space" != x; then
33951         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33952 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33953       fi
33954       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33955     fi
33956   fi
33957 
33958   # Now join together the path and the arguments once again
33959   if test "x$arguments" != xEOL; then
33960     new_complete="$new_path ${arguments% *}"
33961   else
33962     new_complete="$new_path"
33963   fi
33964 
33965   if test "x$complete" != "x$new_complete"; then
33966     LIPO="$new_complete"
33967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33968 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33969   fi
33970 
33971   else
33972     OBJC=
33973   fi
33974 
33975   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33976     # Extract the first word of "mt", so it can be a program name with args.
33977 set dummy mt; ac_word=$2
33978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33979 $as_echo_n "checking for $ac_word... " >&6; }
33980 if ${ac_cv_prog_MT+:} false; then :
33981   $as_echo_n "(cached) " >&6
33982 else
33983   if test -n "$MT"; then
33984   ac_cv_prog_MT="$MT" # Let the user override the test.
33985 else
33986   ac_prog_rejected=no
33987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33988 for as_dir in $PATH
33989 do
33990   IFS=$as_save_IFS
33991   test -z "$as_dir" && as_dir=.
33992     for ac_exec_ext in '' $ac_executable_extensions; do
33993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33994     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33995        ac_prog_rejected=yes
33996        continue
33997      fi
33998     ac_cv_prog_MT="mt"
33999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34000     break 2
34001   fi
34002 done
34003   done
34004 IFS=$as_save_IFS
34005 
34006 if test $ac_prog_rejected = yes; then
34007   # We found a bogon in the path, so make sure we never use it.
34008   set dummy $ac_cv_prog_MT
34009   shift
34010   if test $# != 0; then
34011     # We chose a different compiler from the bogus one.
34012     # However, it has the same basename, so the bogon will be chosen
34013     # first if we set MT to just the basename; use the full file name.
34014     shift
34015     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34016   fi
34017 fi
34018 fi
34019 fi
34020 MT=$ac_cv_prog_MT
34021 if test -n "$MT"; then
34022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34023 $as_echo "$MT" >&6; }
34024 else
34025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34026 $as_echo "no" >&6; }
34027 fi
34028 
34029 
34030 
34031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34032 
34033   # First separate the path from the arguments. This will split at the first
34034   # space.
34035   complete="$MT"
34036   path="${complete%% *}"
34037   tmp="$complete EOL"
34038   arguments="${tmp#* }"
34039 
34040   # Input might be given as Windows format, start by converting to
34041   # unix format.
34042   new_path=`$CYGPATH -u "$path"`
34043 
34044   # Now try to locate executable using which
34045   new_path=`$WHICH "$new_path" 2> /dev/null`
34046   # bat and cmd files are not always considered executable in cygwin causing which
34047   # to not find them
34048   if test "x$new_path" = x \
34049       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34050       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34051     new_path=`$CYGPATH -u "$path"`
34052   fi
34053   if test "x$new_path" = x; then
34054     # Oops. Which didn't find the executable.
34055     # The splitting of arguments from the executable at a space might have been incorrect,
34056     # since paths with space are more likely in Windows. Give it another try with the whole
34057     # argument.
34058     path="$complete"
34059     arguments="EOL"
34060     new_path=`$CYGPATH -u "$path"`
34061     new_path=`$WHICH "$new_path" 2> /dev/null`
34062     # bat and cmd files are not always considered executable in cygwin causing which
34063     # to not find them
34064     if test "x$new_path" = x \
34065         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34066         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34067       new_path=`$CYGPATH -u "$path"`
34068     fi
34069     if test "x$new_path" = x; then
34070       # It's still not found. Now this is an unrecoverable error.
34071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34072 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34073       has_space=`$ECHO "$complete" | $GREP " "`
34074       if test "x$has_space" != x; then
34075         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34076 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34077       fi
34078       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34079     fi
34080   fi
34081 
34082   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34083   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34084   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34085   # "foo.exe" is OK but "foo" is an error.
34086   #
34087   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34088   # It is also a way to make sure we got the proper file name for the real test later on.
34089   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34090   if test "x$test_shortpath" = x; then
34091     # Short path failed, file does not exist as specified.
34092     # Try adding .exe or .cmd
34093     if test -f "${new_path}.exe"; then
34094       input_to_shortpath="${new_path}.exe"
34095     elif test -f "${new_path}.cmd"; then
34096       input_to_shortpath="${new_path}.cmd"
34097     else
34098       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34099 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34100       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34101 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34102       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34103     fi
34104   else
34105     input_to_shortpath="$new_path"
34106   fi
34107 
34108   # Call helper function which possibly converts this using DOS-style short mode.
34109   # If so, the updated path is stored in $new_path.
34110   new_path="$input_to_shortpath"
34111 
34112   input_path="$input_to_shortpath"
34113   # Check if we need to convert this using DOS-style short mode. If the path
34114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34115   # take no chances and rewrite it.
34116   # Note: m4 eats our [], so we need to use [ and ] instead.
34117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34118   if test "x$has_forbidden_chars" != x; then
34119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34123       # Going to short mode and back again did indeed matter. Since short mode is
34124       # case insensitive, let's make it lowercase to improve readability.
34125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34126       # Now convert it back to Unix-stile (cygpath)
34127       input_path=`$CYGPATH -u "$shortmode_path"`
34128       new_path="$input_path"
34129     fi
34130   fi
34131 
34132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34133   if test "x$test_cygdrive_prefix" = x; then
34134     # As a simple fix, exclude /usr/bin since it's not a real path.
34135     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34137       # a path prefixed by /cygdrive for fixpath to work.
34138       new_path="$CYGWIN_ROOT_PATH$input_path"
34139     fi
34140   fi
34141 
34142   # remove trailing .exe if any
34143   new_path="${new_path/%.exe/}"
34144 
34145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34146 
34147   # First separate the path from the arguments. This will split at the first
34148   # space.
34149   complete="$MT"
34150   path="${complete%% *}"
34151   tmp="$complete EOL"
34152   arguments="${tmp#* }"
34153 
34154   # Input might be given as Windows format, start by converting to
34155   # unix format.
34156   new_path="$path"
34157 
34158   windows_path="$new_path"
34159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34160     unix_path=`$CYGPATH -u "$windows_path"`
34161     new_path="$unix_path"
34162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34164     new_path="$unix_path"
34165   fi
34166 
34167 
34168   # Now try to locate executable using which
34169   new_path=`$WHICH "$new_path" 2> /dev/null`
34170 
34171   if test "x$new_path" = x; then
34172     # Oops. Which didn't find the executable.
34173     # The splitting of arguments from the executable at a space might have been incorrect,
34174     # since paths with space are more likely in Windows. Give it another try with the whole
34175     # argument.
34176     path="$complete"
34177     arguments="EOL"
34178     new_path="$path"
34179 
34180   windows_path="$new_path"
34181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34182     unix_path=`$CYGPATH -u "$windows_path"`
34183     new_path="$unix_path"
34184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34186     new_path="$unix_path"
34187   fi
34188 
34189 
34190     new_path=`$WHICH "$new_path" 2> /dev/null`
34191     # bat and cmd files are not always considered executable in MSYS causing which
34192     # to not find them
34193     if test "x$new_path" = x \
34194         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34195         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34196       new_path="$path"
34197 
34198   windows_path="$new_path"
34199   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34200     unix_path=`$CYGPATH -u "$windows_path"`
34201     new_path="$unix_path"
34202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34203     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34204     new_path="$unix_path"
34205   fi
34206 
34207     fi
34208 
34209     if test "x$new_path" = x; then
34210       # It's still not found. Now this is an unrecoverable error.
34211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34212 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34213       has_space=`$ECHO "$complete" | $GREP " "`
34214       if test "x$has_space" != x; then
34215         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34216 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34217       fi
34218       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34219     fi
34220   fi
34221 
34222   # Now new_path has a complete unix path to the binary
34223   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34224     # Keep paths in /bin as-is, but remove trailing .exe if any
34225     new_path="${new_path/%.exe/}"
34226     # Do not save /bin paths to all_fixpath_prefixes!
34227   else
34228     # Not in mixed or Windows style, start by that.
34229     new_path=`cmd //c echo $new_path`
34230 
34231   input_path="$new_path"
34232   # Check if we need to convert this using DOS-style short mode. If the path
34233   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34234   # take no chances and rewrite it.
34235   # Note: m4 eats our [], so we need to use [ and ] instead.
34236   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34237   if test "x$has_forbidden_chars" != x; then
34238     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34239     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34240   fi
34241 
34242     # Output is in $new_path
34243 
34244   windows_path="$new_path"
34245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34246     unix_path=`$CYGPATH -u "$windows_path"`
34247     new_path="$unix_path"
34248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34249     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34250     new_path="$unix_path"
34251   fi
34252 
34253     # remove trailing .exe if any
34254     new_path="${new_path/%.exe/}"
34255 
34256     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34257     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34258   fi
34259 
34260   else
34261     # We're on a unix platform. Hooray! :)
34262     # First separate the path from the arguments. This will split at the first
34263     # space.
34264     complete="$MT"
34265     path="${complete%% *}"
34266     tmp="$complete EOL"
34267     arguments="${tmp#* }"
34268 
34269     # Cannot rely on the command "which" here since it doesn't always work.
34270     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34271     if test -z "$is_absolute_path"; then
34272       # Path to executable is not absolute. Find it.
34273       IFS_save="$IFS"
34274       IFS=:
34275       for p in $PATH; do
34276         if test -f "$p/$path" && test -x "$p/$path"; then
34277           new_path="$p/$path"
34278           break
34279         fi
34280       done
34281       IFS="$IFS_save"
34282     else
34283       # This is an absolute path, we can use it without further modifications.
34284       new_path="$path"
34285     fi
34286 
34287     if test "x$new_path" = x; then
34288       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34289 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34290       has_space=`$ECHO "$complete" | $GREP " "`
34291       if test "x$has_space" != x; then
34292         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34293 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34294       fi
34295       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34296     fi
34297   fi
34298 
34299   # Now join together the path and the arguments once again
34300   if test "x$arguments" != xEOL; then
34301     new_complete="$new_path ${arguments% *}"
34302   else
34303     new_complete="$new_path"
34304   fi
34305 
34306   if test "x$complete" != "x$new_complete"; then
34307     MT="$new_complete"
34308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34309 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34310   fi
34311 
34312     # Setup the resource compiler (RC)
34313     # Extract the first word of "rc", so it can be a program name with args.
34314 set dummy rc; ac_word=$2
34315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34316 $as_echo_n "checking for $ac_word... " >&6; }
34317 if ${ac_cv_prog_RC+:} false; then :
34318   $as_echo_n "(cached) " >&6
34319 else
34320   if test -n "$RC"; then
34321   ac_cv_prog_RC="$RC" # Let the user override the test.
34322 else
34323   ac_prog_rejected=no
34324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34325 for as_dir in $PATH
34326 do
34327   IFS=$as_save_IFS
34328   test -z "$as_dir" && as_dir=.
34329     for ac_exec_ext in '' $ac_executable_extensions; do
34330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34331     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34332        ac_prog_rejected=yes
34333        continue
34334      fi
34335     ac_cv_prog_RC="rc"
34336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34337     break 2
34338   fi
34339 done
34340   done
34341 IFS=$as_save_IFS
34342 
34343 if test $ac_prog_rejected = yes; then
34344   # We found a bogon in the path, so make sure we never use it.
34345   set dummy $ac_cv_prog_RC
34346   shift
34347   if test $# != 0; then
34348     # We chose a different compiler from the bogus one.
34349     # However, it has the same basename, so the bogon will be chosen
34350     # first if we set RC to just the basename; use the full file name.
34351     shift
34352     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34353   fi
34354 fi
34355 fi
34356 fi
34357 RC=$ac_cv_prog_RC
34358 if test -n "$RC"; then
34359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34360 $as_echo "$RC" >&6; }
34361 else
34362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34363 $as_echo "no" >&6; }
34364 fi
34365 
34366 
34367 
34368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34369 
34370   # First separate the path from the arguments. This will split at the first
34371   # space.
34372   complete="$RC"
34373   path="${complete%% *}"
34374   tmp="$complete EOL"
34375   arguments="${tmp#* }"
34376 
34377   # Input might be given as Windows format, start by converting to
34378   # unix format.
34379   new_path=`$CYGPATH -u "$path"`
34380 
34381   # Now try to locate executable using which
34382   new_path=`$WHICH "$new_path" 2> /dev/null`
34383   # bat and cmd files are not always considered executable in cygwin causing which
34384   # to not find them
34385   if test "x$new_path" = x \
34386       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34387       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34388     new_path=`$CYGPATH -u "$path"`
34389   fi
34390   if test "x$new_path" = x; then
34391     # Oops. Which didn't find the executable.
34392     # The splitting of arguments from the executable at a space might have been incorrect,
34393     # since paths with space are more likely in Windows. Give it another try with the whole
34394     # argument.
34395     path="$complete"
34396     arguments="EOL"
34397     new_path=`$CYGPATH -u "$path"`
34398     new_path=`$WHICH "$new_path" 2> /dev/null`
34399     # bat and cmd files are not always considered executable in cygwin causing which
34400     # to not find them
34401     if test "x$new_path" = x \
34402         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34403         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34404       new_path=`$CYGPATH -u "$path"`
34405     fi
34406     if test "x$new_path" = x; then
34407       # It's still not found. Now this is an unrecoverable error.
34408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34409 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34410       has_space=`$ECHO "$complete" | $GREP " "`
34411       if test "x$has_space" != x; then
34412         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34414       fi
34415       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34416     fi
34417   fi
34418 
34419   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34420   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34421   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34422   # "foo.exe" is OK but "foo" is an error.
34423   #
34424   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34425   # It is also a way to make sure we got the proper file name for the real test later on.
34426   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34427   if test "x$test_shortpath" = x; then
34428     # Short path failed, file does not exist as specified.
34429     # Try adding .exe or .cmd
34430     if test -f "${new_path}.exe"; then
34431       input_to_shortpath="${new_path}.exe"
34432     elif test -f "${new_path}.cmd"; then
34433       input_to_shortpath="${new_path}.cmd"
34434     else
34435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34436 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34437       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34438 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34439       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34440     fi
34441   else
34442     input_to_shortpath="$new_path"
34443   fi
34444 
34445   # Call helper function which possibly converts this using DOS-style short mode.
34446   # If so, the updated path is stored in $new_path.
34447   new_path="$input_to_shortpath"
34448 
34449   input_path="$input_to_shortpath"
34450   # Check if we need to convert this using DOS-style short mode. If the path
34451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34452   # take no chances and rewrite it.
34453   # Note: m4 eats our [], so we need to use [ and ] instead.
34454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34455   if test "x$has_forbidden_chars" != x; then
34456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34457     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34458     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34459     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34460       # Going to short mode and back again did indeed matter. Since short mode is
34461       # case insensitive, let's make it lowercase to improve readability.
34462       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34463       # Now convert it back to Unix-stile (cygpath)
34464       input_path=`$CYGPATH -u "$shortmode_path"`
34465       new_path="$input_path"
34466     fi
34467   fi
34468 
34469   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34470   if test "x$test_cygdrive_prefix" = x; then
34471     # As a simple fix, exclude /usr/bin since it's not a real path.
34472     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34473       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34474       # a path prefixed by /cygdrive for fixpath to work.
34475       new_path="$CYGWIN_ROOT_PATH$input_path"
34476     fi
34477   fi
34478 
34479   # remove trailing .exe if any
34480   new_path="${new_path/%.exe/}"
34481 
34482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34483 
34484   # First separate the path from the arguments. This will split at the first
34485   # space.
34486   complete="$RC"
34487   path="${complete%% *}"
34488   tmp="$complete EOL"
34489   arguments="${tmp#* }"
34490 
34491   # Input might be given as Windows format, start by converting to
34492   # unix format.
34493   new_path="$path"
34494 
34495   windows_path="$new_path"
34496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34497     unix_path=`$CYGPATH -u "$windows_path"`
34498     new_path="$unix_path"
34499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34500     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34501     new_path="$unix_path"
34502   fi
34503 
34504 
34505   # Now try to locate executable using which
34506   new_path=`$WHICH "$new_path" 2> /dev/null`
34507 
34508   if test "x$new_path" = x; then
34509     # Oops. Which didn't find the executable.
34510     # The splitting of arguments from the executable at a space might have been incorrect,
34511     # since paths with space are more likely in Windows. Give it another try with the whole
34512     # argument.
34513     path="$complete"
34514     arguments="EOL"
34515     new_path="$path"
34516 
34517   windows_path="$new_path"
34518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34519     unix_path=`$CYGPATH -u "$windows_path"`
34520     new_path="$unix_path"
34521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34522     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34523     new_path="$unix_path"
34524   fi
34525 
34526 
34527     new_path=`$WHICH "$new_path" 2> /dev/null`
34528     # bat and cmd files are not always considered executable in MSYS causing which
34529     # to not find them
34530     if test "x$new_path" = x \
34531         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34532         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34533       new_path="$path"
34534 
34535   windows_path="$new_path"
34536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34537     unix_path=`$CYGPATH -u "$windows_path"`
34538     new_path="$unix_path"
34539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34541     new_path="$unix_path"
34542   fi
34543 
34544     fi
34545 
34546     if test "x$new_path" = x; then
34547       # It's still not found. Now this is an unrecoverable error.
34548       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34549 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34550       has_space=`$ECHO "$complete" | $GREP " "`
34551       if test "x$has_space" != x; then
34552         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34553 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34554       fi
34555       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34556     fi
34557   fi
34558 
34559   # Now new_path has a complete unix path to the binary
34560   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34561     # Keep paths in /bin as-is, but remove trailing .exe if any
34562     new_path="${new_path/%.exe/}"
34563     # Do not save /bin paths to all_fixpath_prefixes!
34564   else
34565     # Not in mixed or Windows style, start by that.
34566     new_path=`cmd //c echo $new_path`
34567 
34568   input_path="$new_path"
34569   # Check if we need to convert this using DOS-style short mode. If the path
34570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34571   # take no chances and rewrite it.
34572   # Note: m4 eats our [], so we need to use [ and ] instead.
34573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34574   if test "x$has_forbidden_chars" != x; then
34575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34577   fi
34578 
34579     # Output is in $new_path
34580 
34581   windows_path="$new_path"
34582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34583     unix_path=`$CYGPATH -u "$windows_path"`
34584     new_path="$unix_path"
34585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34587     new_path="$unix_path"
34588   fi
34589 
34590     # remove trailing .exe if any
34591     new_path="${new_path/%.exe/}"
34592 
34593     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34594     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34595   fi
34596 
34597   else
34598     # We're on a unix platform. Hooray! :)
34599     # First separate the path from the arguments. This will split at the first
34600     # space.
34601     complete="$RC"
34602     path="${complete%% *}"
34603     tmp="$complete EOL"
34604     arguments="${tmp#* }"
34605 
34606     # Cannot rely on the command "which" here since it doesn't always work.
34607     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34608     if test -z "$is_absolute_path"; then
34609       # Path to executable is not absolute. Find it.
34610       IFS_save="$IFS"
34611       IFS=:
34612       for p in $PATH; do
34613         if test -f "$p/$path" && test -x "$p/$path"; then
34614           new_path="$p/$path"
34615           break
34616         fi
34617       done
34618       IFS="$IFS_save"
34619     else
34620       # This is an absolute path, we can use it without further modifications.
34621       new_path="$path"
34622     fi
34623 
34624     if test "x$new_path" = x; then
34625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34626 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34627       has_space=`$ECHO "$complete" | $GREP " "`
34628       if test "x$has_space" != x; then
34629         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34630 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34631       fi
34632       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34633     fi
34634   fi
34635 
34636   # Now join together the path and the arguments once again
34637   if test "x$arguments" != xEOL; then
34638     new_complete="$new_path ${arguments% *}"
34639   else
34640     new_complete="$new_path"
34641   fi
34642 
34643   if test "x$complete" != "x$new_complete"; then
34644     RC="$new_complete"
34645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34646 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34647   fi
34648 
34649     # Extract the first word of "dumpbin", so it can be a program name with args.
34650 set dummy dumpbin; ac_word=$2
34651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34652 $as_echo_n "checking for $ac_word... " >&6; }
34653 if ${ac_cv_prog_DUMPBIN+:} false; then :
34654   $as_echo_n "(cached) " >&6
34655 else
34656   if test -n "$DUMPBIN"; then
34657   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34658 else
34659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34660 for as_dir in $PATH
34661 do
34662   IFS=$as_save_IFS
34663   test -z "$as_dir" && as_dir=.
34664     for ac_exec_ext in '' $ac_executable_extensions; do
34665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34666     ac_cv_prog_DUMPBIN="dumpbin"
34667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34668     break 2
34669   fi
34670 done
34671   done
34672 IFS=$as_save_IFS
34673 
34674 fi
34675 fi
34676 DUMPBIN=$ac_cv_prog_DUMPBIN
34677 if test -n "$DUMPBIN"; then
34678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34679 $as_echo "$DUMPBIN" >&6; }
34680 else
34681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34682 $as_echo "no" >&6; }
34683 fi
34684 
34685 
34686 
34687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34688 
34689   # First separate the path from the arguments. This will split at the first
34690   # space.
34691   complete="$DUMPBIN"
34692   path="${complete%% *}"
34693   tmp="$complete EOL"
34694   arguments="${tmp#* }"
34695 
34696   # Input might be given as Windows format, start by converting to
34697   # unix format.
34698   new_path=`$CYGPATH -u "$path"`
34699 
34700   # Now try to locate executable using which
34701   new_path=`$WHICH "$new_path" 2> /dev/null`
34702   # bat and cmd files are not always considered executable in cygwin causing which
34703   # to not find them
34704   if test "x$new_path" = x \
34705       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34706       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34707     new_path=`$CYGPATH -u "$path"`
34708   fi
34709   if test "x$new_path" = x; then
34710     # Oops. Which didn't find the executable.
34711     # The splitting of arguments from the executable at a space might have been incorrect,
34712     # since paths with space are more likely in Windows. Give it another try with the whole
34713     # argument.
34714     path="$complete"
34715     arguments="EOL"
34716     new_path=`$CYGPATH -u "$path"`
34717     new_path=`$WHICH "$new_path" 2> /dev/null`
34718     # bat and cmd files are not always considered executable in cygwin causing which
34719     # to not find them
34720     if test "x$new_path" = x \
34721         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34722         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34723       new_path=`$CYGPATH -u "$path"`
34724     fi
34725     if test "x$new_path" = x; then
34726       # It's still not found. Now this is an unrecoverable error.
34727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34728 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34729       has_space=`$ECHO "$complete" | $GREP " "`
34730       if test "x$has_space" != x; then
34731         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34732 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34733       fi
34734       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34735     fi
34736   fi
34737 
34738   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34739   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34740   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34741   # "foo.exe" is OK but "foo" is an error.
34742   #
34743   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34744   # It is also a way to make sure we got the proper file name for the real test later on.
34745   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34746   if test "x$test_shortpath" = x; then
34747     # Short path failed, file does not exist as specified.
34748     # Try adding .exe or .cmd
34749     if test -f "${new_path}.exe"; then
34750       input_to_shortpath="${new_path}.exe"
34751     elif test -f "${new_path}.cmd"; then
34752       input_to_shortpath="${new_path}.cmd"
34753     else
34754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34755 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34756       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34757 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34758       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34759     fi
34760   else
34761     input_to_shortpath="$new_path"
34762   fi
34763 
34764   # Call helper function which possibly converts this using DOS-style short mode.
34765   # If so, the updated path is stored in $new_path.
34766   new_path="$input_to_shortpath"
34767 
34768   input_path="$input_to_shortpath"
34769   # Check if we need to convert this using DOS-style short mode. If the path
34770   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34771   # take no chances and rewrite it.
34772   # Note: m4 eats our [], so we need to use [ and ] instead.
34773   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34774   if test "x$has_forbidden_chars" != x; then
34775     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34776     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34777     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34778     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34779       # Going to short mode and back again did indeed matter. Since short mode is
34780       # case insensitive, let's make it lowercase to improve readability.
34781       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34782       # Now convert it back to Unix-stile (cygpath)
34783       input_path=`$CYGPATH -u "$shortmode_path"`
34784       new_path="$input_path"
34785     fi
34786   fi
34787 
34788   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34789   if test "x$test_cygdrive_prefix" = x; then
34790     # As a simple fix, exclude /usr/bin since it's not a real path.
34791     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34792       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34793       # a path prefixed by /cygdrive for fixpath to work.
34794       new_path="$CYGWIN_ROOT_PATH$input_path"
34795     fi
34796   fi
34797 
34798   # remove trailing .exe if any
34799   new_path="${new_path/%.exe/}"
34800 
34801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34802 
34803   # First separate the path from the arguments. This will split at the first
34804   # space.
34805   complete="$DUMPBIN"
34806   path="${complete%% *}"
34807   tmp="$complete EOL"
34808   arguments="${tmp#* }"
34809 
34810   # Input might be given as Windows format, start by converting to
34811   # unix format.
34812   new_path="$path"
34813 
34814   windows_path="$new_path"
34815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34816     unix_path=`$CYGPATH -u "$windows_path"`
34817     new_path="$unix_path"
34818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34820     new_path="$unix_path"
34821   fi
34822 
34823 
34824   # Now try to locate executable using which
34825   new_path=`$WHICH "$new_path" 2> /dev/null`
34826 
34827   if test "x$new_path" = x; then
34828     # Oops. Which didn't find the executable.
34829     # The splitting of arguments from the executable at a space might have been incorrect,
34830     # since paths with space are more likely in Windows. Give it another try with the whole
34831     # argument.
34832     path="$complete"
34833     arguments="EOL"
34834     new_path="$path"
34835 
34836   windows_path="$new_path"
34837   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34838     unix_path=`$CYGPATH -u "$windows_path"`
34839     new_path="$unix_path"
34840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34841     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34842     new_path="$unix_path"
34843   fi
34844 
34845 
34846     new_path=`$WHICH "$new_path" 2> /dev/null`
34847     # bat and cmd files are not always considered executable in MSYS causing which
34848     # to not find them
34849     if test "x$new_path" = x \
34850         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34851         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34852       new_path="$path"
34853 
34854   windows_path="$new_path"
34855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34856     unix_path=`$CYGPATH -u "$windows_path"`
34857     new_path="$unix_path"
34858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34860     new_path="$unix_path"
34861   fi
34862 
34863     fi
34864 
34865     if test "x$new_path" = x; then
34866       # It's still not found. Now this is an unrecoverable error.
34867       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34868 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34869       has_space=`$ECHO "$complete" | $GREP " "`
34870       if test "x$has_space" != x; then
34871         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34872 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34873       fi
34874       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34875     fi
34876   fi
34877 
34878   # Now new_path has a complete unix path to the binary
34879   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34880     # Keep paths in /bin as-is, but remove trailing .exe if any
34881     new_path="${new_path/%.exe/}"
34882     # Do not save /bin paths to all_fixpath_prefixes!
34883   else
34884     # Not in mixed or Windows style, start by that.
34885     new_path=`cmd //c echo $new_path`
34886 
34887   input_path="$new_path"
34888   # Check if we need to convert this using DOS-style short mode. If the path
34889   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34890   # take no chances and rewrite it.
34891   # Note: m4 eats our [], so we need to use [ and ] instead.
34892   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34893   if test "x$has_forbidden_chars" != x; then
34894     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34895     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34896   fi
34897 
34898     # Output is in $new_path
34899 
34900   windows_path="$new_path"
34901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34902     unix_path=`$CYGPATH -u "$windows_path"`
34903     new_path="$unix_path"
34904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34906     new_path="$unix_path"
34907   fi
34908 
34909     # remove trailing .exe if any
34910     new_path="${new_path/%.exe/}"
34911 
34912     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34913     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34914   fi
34915 
34916   else
34917     # We're on a unix platform. Hooray! :)
34918     # First separate the path from the arguments. This will split at the first
34919     # space.
34920     complete="$DUMPBIN"
34921     path="${complete%% *}"
34922     tmp="$complete EOL"
34923     arguments="${tmp#* }"
34924 
34925     # Cannot rely on the command "which" here since it doesn't always work.
34926     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34927     if test -z "$is_absolute_path"; then
34928       # Path to executable is not absolute. Find it.
34929       IFS_save="$IFS"
34930       IFS=:
34931       for p in $PATH; do
34932         if test -f "$p/$path" && test -x "$p/$path"; then
34933           new_path="$p/$path"
34934           break
34935         fi
34936       done
34937       IFS="$IFS_save"
34938     else
34939       # This is an absolute path, we can use it without further modifications.
34940       new_path="$path"
34941     fi
34942 
34943     if test "x$new_path" = x; then
34944       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34945 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34946       has_space=`$ECHO "$complete" | $GREP " "`
34947       if test "x$has_space" != x; then
34948         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34949 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34950       fi
34951       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34952     fi
34953   fi
34954 
34955   # Now join together the path and the arguments once again
34956   if test "x$arguments" != xEOL; then
34957     new_complete="$new_path ${arguments% *}"
34958   else
34959     new_complete="$new_path"
34960   fi
34961 
34962   if test "x$complete" != "x$new_complete"; then
34963     DUMPBIN="$new_complete"
34964     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34965 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34966   fi
34967 
34968     # We need to check for 'msbuild.exe' because at the place where we expect to
34969     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
34970     # won't find the 'msbuild.exe' executable in that case (and the
34971     # 'ac_executable_extensions' is unusable due to performance reasons).
34972     # Notice that we intentionally don't fix up the path to MSBUILD because we
34973     # will call it in a DOS shell during freetype detection on Windows (see
34974     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
34975     # Extract the first word of "msbuild.exe", so it can be a program name with args.
34976 set dummy msbuild.exe; ac_word=$2
34977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34978 $as_echo_n "checking for $ac_word... " >&6; }
34979 if ${ac_cv_prog_MSBUILD+:} false; then :
34980   $as_echo_n "(cached) " >&6
34981 else
34982   if test -n "$MSBUILD"; then
34983   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
34984 else
34985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34986 for as_dir in $PATH
34987 do
34988   IFS=$as_save_IFS
34989   test -z "$as_dir" && as_dir=.
34990     for ac_exec_ext in '' $ac_executable_extensions; do
34991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34992     ac_cv_prog_MSBUILD="msbuild.exe"
34993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34994     break 2
34995   fi
34996 done
34997   done
34998 IFS=$as_save_IFS
34999 
35000 fi
35001 fi
35002 MSBUILD=$ac_cv_prog_MSBUILD
35003 if test -n "$MSBUILD"; then
35004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35005 $as_echo "$MSBUILD" >&6; }
35006 else
35007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35008 $as_echo "no" >&6; }
35009 fi
35010 
35011 
35012   fi
35013 
35014   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35015 
35016 
35017   # Publish this variable in the help.
35018 
35019 
35020   if test "x$STRIP" = x; then
35021     # The variable is not set by user, try to locate tool using the code snippet
35022     for ac_prog in strip
35023 do
35024   # Extract the first word of "$ac_prog", so it can be a program name with args.
35025 set dummy $ac_prog; ac_word=$2
35026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35027 $as_echo_n "checking for $ac_word... " >&6; }
35028 if ${ac_cv_path_STRIP+:} false; then :
35029   $as_echo_n "(cached) " >&6
35030 else
35031   case $STRIP in
35032   [\\/]* | ?:[\\/]*)
35033   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35034   ;;
35035   *)
35036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35037 for as_dir in $PATH
35038 do
35039   IFS=$as_save_IFS
35040   test -z "$as_dir" && as_dir=.
35041     for ac_exec_ext in '' $ac_executable_extensions; do
35042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35043     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35045     break 2
35046   fi
35047 done
35048   done
35049 IFS=$as_save_IFS
35050 
35051   ;;
35052 esac
35053 fi
35054 STRIP=$ac_cv_path_STRIP
35055 if test -n "$STRIP"; then
35056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35057 $as_echo "$STRIP" >&6; }
35058 else
35059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35060 $as_echo "no" >&6; }
35061 fi
35062 
35063 
35064   test -n "$STRIP" && break
35065 done
35066 
35067   else
35068     # The variable is set, but is it from the command line or the environment?
35069 
35070     # Try to remove the string !STRIP! from our list.
35071     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35072     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35073       # If it failed, the variable was not from the command line. Ignore it,
35074       # but warn the user (except for BASH, which is always set by the calling BASH).
35075       if test "xSTRIP" != xBASH; then
35076         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35077 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35078       fi
35079       # Try to locate tool using the code snippet
35080       for ac_prog in strip
35081 do
35082   # Extract the first word of "$ac_prog", so it can be a program name with args.
35083 set dummy $ac_prog; ac_word=$2
35084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35085 $as_echo_n "checking for $ac_word... " >&6; }
35086 if ${ac_cv_path_STRIP+:} false; then :
35087   $as_echo_n "(cached) " >&6
35088 else
35089   case $STRIP in
35090   [\\/]* | ?:[\\/]*)
35091   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35092   ;;
35093   *)
35094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35095 for as_dir in $PATH
35096 do
35097   IFS=$as_save_IFS
35098   test -z "$as_dir" && as_dir=.
35099     for ac_exec_ext in '' $ac_executable_extensions; do
35100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35101     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35103     break 2
35104   fi
35105 done
35106   done
35107 IFS=$as_save_IFS
35108 
35109   ;;
35110 esac
35111 fi
35112 STRIP=$ac_cv_path_STRIP
35113 if test -n "$STRIP"; then
35114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35115 $as_echo "$STRIP" >&6; }
35116 else
35117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35118 $as_echo "no" >&6; }
35119 fi
35120 
35121 
35122   test -n "$STRIP" && break
35123 done
35124 
35125     else
35126       # If it succeeded, then it was overridden by the user. We will use it
35127       # for the tool.
35128 
35129       # First remove it from the list of overridden variables, so we can test
35130       # for unknown variables in the end.
35131       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35132 
35133       # Check if the provided tool contains a complete path.
35134       tool_specified="$STRIP"
35135       tool_basename="${tool_specified##*/}"
35136       if test "x$tool_basename" = "x$tool_specified"; then
35137         # A command without a complete path is provided, search $PATH.
35138         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35139 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35140         # Extract the first word of "$tool_basename", so it can be a program name with args.
35141 set dummy $tool_basename; ac_word=$2
35142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35143 $as_echo_n "checking for $ac_word... " >&6; }
35144 if ${ac_cv_path_STRIP+:} false; then :
35145   $as_echo_n "(cached) " >&6
35146 else
35147   case $STRIP in
35148   [\\/]* | ?:[\\/]*)
35149   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35150   ;;
35151   *)
35152   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35153 for as_dir in $PATH
35154 do
35155   IFS=$as_save_IFS
35156   test -z "$as_dir" && as_dir=.
35157     for ac_exec_ext in '' $ac_executable_extensions; do
35158   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35159     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35160     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35161     break 2
35162   fi
35163 done
35164   done
35165 IFS=$as_save_IFS
35166 
35167   ;;
35168 esac
35169 fi
35170 STRIP=$ac_cv_path_STRIP
35171 if test -n "$STRIP"; then
35172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35173 $as_echo "$STRIP" >&6; }
35174 else
35175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35176 $as_echo "no" >&6; }
35177 fi
35178 
35179 
35180         if test "x$STRIP" = x; then
35181           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35182         fi
35183       else
35184         # Otherwise we believe it is a complete path. Use it as it is.
35185         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35186 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35187         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35188 $as_echo_n "checking for STRIP... " >&6; }
35189         if test ! -x "$tool_specified"; then
35190           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35191 $as_echo "not found" >&6; }
35192           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35193         fi
35194         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35195 $as_echo "$tool_specified" >&6; }
35196       fi
35197     fi
35198   fi
35199 
35200 
35201 
35202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35203 
35204   # First separate the path from the arguments. This will split at the first
35205   # space.
35206   complete="$STRIP"
35207   path="${complete%% *}"
35208   tmp="$complete EOL"
35209   arguments="${tmp#* }"
35210 
35211   # Input might be given as Windows format, start by converting to
35212   # unix format.
35213   new_path=`$CYGPATH -u "$path"`
35214 
35215   # Now try to locate executable using which
35216   new_path=`$WHICH "$new_path" 2> /dev/null`
35217   # bat and cmd files are not always considered executable in cygwin causing which
35218   # to not find them
35219   if test "x$new_path" = x \
35220       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35221       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35222     new_path=`$CYGPATH -u "$path"`
35223   fi
35224   if test "x$new_path" = x; then
35225     # Oops. Which didn't find the executable.
35226     # The splitting of arguments from the executable at a space might have been incorrect,
35227     # since paths with space are more likely in Windows. Give it another try with the whole
35228     # argument.
35229     path="$complete"
35230     arguments="EOL"
35231     new_path=`$CYGPATH -u "$path"`
35232     new_path=`$WHICH "$new_path" 2> /dev/null`
35233     # bat and cmd files are not always considered executable in cygwin causing which
35234     # to not find them
35235     if test "x$new_path" = x \
35236         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35237         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35238       new_path=`$CYGPATH -u "$path"`
35239     fi
35240     if test "x$new_path" = x; then
35241       # It's still not found. Now this is an unrecoverable error.
35242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35243 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35244       has_space=`$ECHO "$complete" | $GREP " "`
35245       if test "x$has_space" != x; then
35246         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35247 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35248       fi
35249       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35250     fi
35251   fi
35252 
35253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35256   # "foo.exe" is OK but "foo" is an error.
35257   #
35258   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35259   # It is also a way to make sure we got the proper file name for the real test later on.
35260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35261   if test "x$test_shortpath" = x; then
35262     # Short path failed, file does not exist as specified.
35263     # Try adding .exe or .cmd
35264     if test -f "${new_path}.exe"; then
35265       input_to_shortpath="${new_path}.exe"
35266     elif test -f "${new_path}.cmd"; then
35267       input_to_shortpath="${new_path}.cmd"
35268     else
35269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35270 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35271       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35272 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35273       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35274     fi
35275   else
35276     input_to_shortpath="$new_path"
35277   fi
35278 
35279   # Call helper function which possibly converts this using DOS-style short mode.
35280   # If so, the updated path is stored in $new_path.
35281   new_path="$input_to_shortpath"
35282 
35283   input_path="$input_to_shortpath"
35284   # Check if we need to convert this using DOS-style short mode. If the path
35285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35286   # take no chances and rewrite it.
35287   # Note: m4 eats our [], so we need to use [ and ] instead.
35288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35289   if test "x$has_forbidden_chars" != x; then
35290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35294       # Going to short mode and back again did indeed matter. Since short mode is
35295       # case insensitive, let's make it lowercase to improve readability.
35296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35297       # Now convert it back to Unix-stile (cygpath)
35298       input_path=`$CYGPATH -u "$shortmode_path"`
35299       new_path="$input_path"
35300     fi
35301   fi
35302 
35303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35304   if test "x$test_cygdrive_prefix" = x; then
35305     # As a simple fix, exclude /usr/bin since it's not a real path.
35306     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35308       # a path prefixed by /cygdrive for fixpath to work.
35309       new_path="$CYGWIN_ROOT_PATH$input_path"
35310     fi
35311   fi
35312 
35313   # remove trailing .exe if any
35314   new_path="${new_path/%.exe/}"
35315 
35316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35317 
35318   # First separate the path from the arguments. This will split at the first
35319   # space.
35320   complete="$STRIP"
35321   path="${complete%% *}"
35322   tmp="$complete EOL"
35323   arguments="${tmp#* }"
35324 
35325   # Input might be given as Windows format, start by converting to
35326   # unix format.
35327   new_path="$path"
35328 
35329   windows_path="$new_path"
35330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35331     unix_path=`$CYGPATH -u "$windows_path"`
35332     new_path="$unix_path"
35333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35335     new_path="$unix_path"
35336   fi
35337 
35338 
35339   # Now try to locate executable using which
35340   new_path=`$WHICH "$new_path" 2> /dev/null`
35341 
35342   if test "x$new_path" = x; then
35343     # Oops. Which didn't find the executable.
35344     # The splitting of arguments from the executable at a space might have been incorrect,
35345     # since paths with space are more likely in Windows. Give it another try with the whole
35346     # argument.
35347     path="$complete"
35348     arguments="EOL"
35349     new_path="$path"
35350 
35351   windows_path="$new_path"
35352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35353     unix_path=`$CYGPATH -u "$windows_path"`
35354     new_path="$unix_path"
35355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35357     new_path="$unix_path"
35358   fi
35359 
35360 
35361     new_path=`$WHICH "$new_path" 2> /dev/null`
35362     # bat and cmd files are not always considered executable in MSYS causing which
35363     # to not find them
35364     if test "x$new_path" = x \
35365         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35366         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35367       new_path="$path"
35368 
35369   windows_path="$new_path"
35370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35371     unix_path=`$CYGPATH -u "$windows_path"`
35372     new_path="$unix_path"
35373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35375     new_path="$unix_path"
35376   fi
35377 
35378     fi
35379 
35380     if test "x$new_path" = x; then
35381       # It's still not found. Now this is an unrecoverable error.
35382       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35383 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35384       has_space=`$ECHO "$complete" | $GREP " "`
35385       if test "x$has_space" != x; then
35386         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35387 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35388       fi
35389       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35390     fi
35391   fi
35392 
35393   # Now new_path has a complete unix path to the binary
35394   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35395     # Keep paths in /bin as-is, but remove trailing .exe if any
35396     new_path="${new_path/%.exe/}"
35397     # Do not save /bin paths to all_fixpath_prefixes!
35398   else
35399     # Not in mixed or Windows style, start by that.
35400     new_path=`cmd //c echo $new_path`
35401 
35402   input_path="$new_path"
35403   # Check if we need to convert this using DOS-style short mode. If the path
35404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35405   # take no chances and rewrite it.
35406   # Note: m4 eats our [], so we need to use [ and ] instead.
35407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35408   if test "x$has_forbidden_chars" != x; then
35409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35410     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35411   fi
35412 
35413     # Output is in $new_path
35414 
35415   windows_path="$new_path"
35416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35417     unix_path=`$CYGPATH -u "$windows_path"`
35418     new_path="$unix_path"
35419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35421     new_path="$unix_path"
35422   fi
35423 
35424     # remove trailing .exe if any
35425     new_path="${new_path/%.exe/}"
35426 
35427     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35428     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35429   fi
35430 
35431   else
35432     # We're on a unix platform. Hooray! :)
35433     # First separate the path from the arguments. This will split at the first
35434     # space.
35435     complete="$STRIP"
35436     path="${complete%% *}"
35437     tmp="$complete EOL"
35438     arguments="${tmp#* }"
35439 
35440     # Cannot rely on the command "which" here since it doesn't always work.
35441     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35442     if test -z "$is_absolute_path"; then
35443       # Path to executable is not absolute. Find it.
35444       IFS_save="$IFS"
35445       IFS=:
35446       for p in $PATH; do
35447         if test -f "$p/$path" && test -x "$p/$path"; then
35448           new_path="$p/$path"
35449           break
35450         fi
35451       done
35452       IFS="$IFS_save"
35453     else
35454       # This is an absolute path, we can use it without further modifications.
35455       new_path="$path"
35456     fi
35457 
35458     if test "x$new_path" = x; then
35459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35460 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35461       has_space=`$ECHO "$complete" | $GREP " "`
35462       if test "x$has_space" != x; then
35463         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35464 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35465       fi
35466       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35467     fi
35468   fi
35469 
35470   # Now join together the path and the arguments once again
35471   if test "x$arguments" != xEOL; then
35472     new_complete="$new_path ${arguments% *}"
35473   else
35474     new_complete="$new_path"
35475   fi
35476 
35477   if test "x$complete" != "x$new_complete"; then
35478     STRIP="$new_complete"
35479     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35480 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35481   fi
35482 
35483 
35484 
35485   # Publish this variable in the help.
35486 
35487 
35488   if test "x$NM" = x; then
35489     # The variable is not set by user, try to locate tool using the code snippet
35490     for ac_prog in nm
35491 do
35492   # Extract the first word of "$ac_prog", so it can be a program name with args.
35493 set dummy $ac_prog; ac_word=$2
35494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35495 $as_echo_n "checking for $ac_word... " >&6; }
35496 if ${ac_cv_path_NM+:} false; then :
35497   $as_echo_n "(cached) " >&6
35498 else
35499   case $NM in
35500   [\\/]* | ?:[\\/]*)
35501   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35502   ;;
35503   *)
35504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35505 for as_dir in $PATH
35506 do
35507   IFS=$as_save_IFS
35508   test -z "$as_dir" && as_dir=.
35509     for ac_exec_ext in '' $ac_executable_extensions; do
35510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35511     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35513     break 2
35514   fi
35515 done
35516   done
35517 IFS=$as_save_IFS
35518 
35519   ;;
35520 esac
35521 fi
35522 NM=$ac_cv_path_NM
35523 if test -n "$NM"; then
35524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35525 $as_echo "$NM" >&6; }
35526 else
35527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35528 $as_echo "no" >&6; }
35529 fi
35530 
35531 
35532   test -n "$NM" && break
35533 done
35534 
35535   else
35536     # The variable is set, but is it from the command line or the environment?
35537 
35538     # Try to remove the string !NM! from our list.
35539     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35540     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35541       # If it failed, the variable was not from the command line. Ignore it,
35542       # but warn the user (except for BASH, which is always set by the calling BASH).
35543       if test "xNM" != xBASH; then
35544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35545 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35546       fi
35547       # Try to locate tool using the code snippet
35548       for ac_prog in nm
35549 do
35550   # Extract the first word of "$ac_prog", so it can be a program name with args.
35551 set dummy $ac_prog; ac_word=$2
35552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35553 $as_echo_n "checking for $ac_word... " >&6; }
35554 if ${ac_cv_path_NM+:} false; then :
35555   $as_echo_n "(cached) " >&6
35556 else
35557   case $NM in
35558   [\\/]* | ?:[\\/]*)
35559   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35560   ;;
35561   *)
35562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35563 for as_dir in $PATH
35564 do
35565   IFS=$as_save_IFS
35566   test -z "$as_dir" && as_dir=.
35567     for ac_exec_ext in '' $ac_executable_extensions; do
35568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35569     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35571     break 2
35572   fi
35573 done
35574   done
35575 IFS=$as_save_IFS
35576 
35577   ;;
35578 esac
35579 fi
35580 NM=$ac_cv_path_NM
35581 if test -n "$NM"; then
35582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35583 $as_echo "$NM" >&6; }
35584 else
35585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35586 $as_echo "no" >&6; }
35587 fi
35588 
35589 
35590   test -n "$NM" && break
35591 done
35592 
35593     else
35594       # If it succeeded, then it was overridden by the user. We will use it
35595       # for the tool.
35596 
35597       # First remove it from the list of overridden variables, so we can test
35598       # for unknown variables in the end.
35599       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35600 
35601       # Check if the provided tool contains a complete path.
35602       tool_specified="$NM"
35603       tool_basename="${tool_specified##*/}"
35604       if test "x$tool_basename" = "x$tool_specified"; then
35605         # A command without a complete path is provided, search $PATH.
35606         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35607 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35608         # Extract the first word of "$tool_basename", so it can be a program name with args.
35609 set dummy $tool_basename; ac_word=$2
35610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35611 $as_echo_n "checking for $ac_word... " >&6; }
35612 if ${ac_cv_path_NM+:} false; then :
35613   $as_echo_n "(cached) " >&6
35614 else
35615   case $NM in
35616   [\\/]* | ?:[\\/]*)
35617   ac_cv_path_NM="$NM" # Let the user override the test with a path.
35618   ;;
35619   *)
35620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35621 for as_dir in $PATH
35622 do
35623   IFS=$as_save_IFS
35624   test -z "$as_dir" && as_dir=.
35625     for ac_exec_ext in '' $ac_executable_extensions; do
35626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35627     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35629     break 2
35630   fi
35631 done
35632   done
35633 IFS=$as_save_IFS
35634 
35635   ;;
35636 esac
35637 fi
35638 NM=$ac_cv_path_NM
35639 if test -n "$NM"; then
35640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35641 $as_echo "$NM" >&6; }
35642 else
35643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35644 $as_echo "no" >&6; }
35645 fi
35646 
35647 
35648         if test "x$NM" = x; then
35649           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35650         fi
35651       else
35652         # Otherwise we believe it is a complete path. Use it as it is.
35653         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35654 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35655         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35656 $as_echo_n "checking for NM... " >&6; }
35657         if test ! -x "$tool_specified"; then
35658           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35659 $as_echo "not found" >&6; }
35660           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35661         fi
35662         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35663 $as_echo "$tool_specified" >&6; }
35664       fi
35665     fi
35666   fi
35667 
35668 
35669 
35670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35671 
35672   # First separate the path from the arguments. This will split at the first
35673   # space.
35674   complete="$NM"
35675   path="${complete%% *}"
35676   tmp="$complete EOL"
35677   arguments="${tmp#* }"
35678 
35679   # Input might be given as Windows format, start by converting to
35680   # unix format.
35681   new_path=`$CYGPATH -u "$path"`
35682 
35683   # Now try to locate executable using which
35684   new_path=`$WHICH "$new_path" 2> /dev/null`
35685   # bat and cmd files are not always considered executable in cygwin causing which
35686   # to not find them
35687   if test "x$new_path" = x \
35688       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35689       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35690     new_path=`$CYGPATH -u "$path"`
35691   fi
35692   if test "x$new_path" = x; then
35693     # Oops. Which didn't find the executable.
35694     # The splitting of arguments from the executable at a space might have been incorrect,
35695     # since paths with space are more likely in Windows. Give it another try with the whole
35696     # argument.
35697     path="$complete"
35698     arguments="EOL"
35699     new_path=`$CYGPATH -u "$path"`
35700     new_path=`$WHICH "$new_path" 2> /dev/null`
35701     # bat and cmd files are not always considered executable in cygwin causing which
35702     # to not find them
35703     if test "x$new_path" = x \
35704         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35705         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35706       new_path=`$CYGPATH -u "$path"`
35707     fi
35708     if test "x$new_path" = x; then
35709       # It's still not found. Now this is an unrecoverable error.
35710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35711 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35712       has_space=`$ECHO "$complete" | $GREP " "`
35713       if test "x$has_space" != x; then
35714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35716       fi
35717       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35718     fi
35719   fi
35720 
35721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35724   # "foo.exe" is OK but "foo" is an error.
35725   #
35726   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35727   # It is also a way to make sure we got the proper file name for the real test later on.
35728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35729   if test "x$test_shortpath" = x; then
35730     # Short path failed, file does not exist as specified.
35731     # Try adding .exe or .cmd
35732     if test -f "${new_path}.exe"; then
35733       input_to_shortpath="${new_path}.exe"
35734     elif test -f "${new_path}.cmd"; then
35735       input_to_shortpath="${new_path}.cmd"
35736     else
35737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35738 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35739       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35740 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35741       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35742     fi
35743   else
35744     input_to_shortpath="$new_path"
35745   fi
35746 
35747   # Call helper function which possibly converts this using DOS-style short mode.
35748   # If so, the updated path is stored in $new_path.
35749   new_path="$input_to_shortpath"
35750 
35751   input_path="$input_to_shortpath"
35752   # Check if we need to convert this using DOS-style short mode. If the path
35753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35754   # take no chances and rewrite it.
35755   # Note: m4 eats our [], so we need to use [ and ] instead.
35756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35757   if test "x$has_forbidden_chars" != x; then
35758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35762       # Going to short mode and back again did indeed matter. Since short mode is
35763       # case insensitive, let's make it lowercase to improve readability.
35764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35765       # Now convert it back to Unix-stile (cygpath)
35766       input_path=`$CYGPATH -u "$shortmode_path"`
35767       new_path="$input_path"
35768     fi
35769   fi
35770 
35771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35772   if test "x$test_cygdrive_prefix" = x; then
35773     # As a simple fix, exclude /usr/bin since it's not a real path.
35774     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35776       # a path prefixed by /cygdrive for fixpath to work.
35777       new_path="$CYGWIN_ROOT_PATH$input_path"
35778     fi
35779   fi
35780 
35781   # remove trailing .exe if any
35782   new_path="${new_path/%.exe/}"
35783 
35784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35785 
35786   # First separate the path from the arguments. This will split at the first
35787   # space.
35788   complete="$NM"
35789   path="${complete%% *}"
35790   tmp="$complete EOL"
35791   arguments="${tmp#* }"
35792 
35793   # Input might be given as Windows format, start by converting to
35794   # unix format.
35795   new_path="$path"
35796 
35797   windows_path="$new_path"
35798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35799     unix_path=`$CYGPATH -u "$windows_path"`
35800     new_path="$unix_path"
35801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35803     new_path="$unix_path"
35804   fi
35805 
35806 
35807   # Now try to locate executable using which
35808   new_path=`$WHICH "$new_path" 2> /dev/null`
35809 
35810   if test "x$new_path" = x; then
35811     # Oops. Which didn't find the executable.
35812     # The splitting of arguments from the executable at a space might have been incorrect,
35813     # since paths with space are more likely in Windows. Give it another try with the whole
35814     # argument.
35815     path="$complete"
35816     arguments="EOL"
35817     new_path="$path"
35818 
35819   windows_path="$new_path"
35820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35821     unix_path=`$CYGPATH -u "$windows_path"`
35822     new_path="$unix_path"
35823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35825     new_path="$unix_path"
35826   fi
35827 
35828 
35829     new_path=`$WHICH "$new_path" 2> /dev/null`
35830     # bat and cmd files are not always considered executable in MSYS causing which
35831     # to not find them
35832     if test "x$new_path" = x \
35833         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35834         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35835       new_path="$path"
35836 
35837   windows_path="$new_path"
35838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35839     unix_path=`$CYGPATH -u "$windows_path"`
35840     new_path="$unix_path"
35841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35842     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35843     new_path="$unix_path"
35844   fi
35845 
35846     fi
35847 
35848     if test "x$new_path" = x; then
35849       # It's still not found. Now this is an unrecoverable error.
35850       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35851 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35852       has_space=`$ECHO "$complete" | $GREP " "`
35853       if test "x$has_space" != x; then
35854         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35855 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35856       fi
35857       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35858     fi
35859   fi
35860 
35861   # Now new_path has a complete unix path to the binary
35862   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35863     # Keep paths in /bin as-is, but remove trailing .exe if any
35864     new_path="${new_path/%.exe/}"
35865     # Do not save /bin paths to all_fixpath_prefixes!
35866   else
35867     # Not in mixed or Windows style, start by that.
35868     new_path=`cmd //c echo $new_path`
35869 
35870   input_path="$new_path"
35871   # Check if we need to convert this using DOS-style short mode. If the path
35872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35873   # take no chances and rewrite it.
35874   # Note: m4 eats our [], so we need to use [ and ] instead.
35875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35876   if test "x$has_forbidden_chars" != x; then
35877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35878     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35879   fi
35880 
35881     # Output is in $new_path
35882 
35883   windows_path="$new_path"
35884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35885     unix_path=`$CYGPATH -u "$windows_path"`
35886     new_path="$unix_path"
35887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35889     new_path="$unix_path"
35890   fi
35891 
35892     # remove trailing .exe if any
35893     new_path="${new_path/%.exe/}"
35894 
35895     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35896     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35897   fi
35898 
35899   else
35900     # We're on a unix platform. Hooray! :)
35901     # First separate the path from the arguments. This will split at the first
35902     # space.
35903     complete="$NM"
35904     path="${complete%% *}"
35905     tmp="$complete EOL"
35906     arguments="${tmp#* }"
35907 
35908     # Cannot rely on the command "which" here since it doesn't always work.
35909     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35910     if test -z "$is_absolute_path"; then
35911       # Path to executable is not absolute. Find it.
35912       IFS_save="$IFS"
35913       IFS=:
35914       for p in $PATH; do
35915         if test -f "$p/$path" && test -x "$p/$path"; then
35916           new_path="$p/$path"
35917           break
35918         fi
35919       done
35920       IFS="$IFS_save"
35921     else
35922       # This is an absolute path, we can use it without further modifications.
35923       new_path="$path"
35924     fi
35925 
35926     if test "x$new_path" = x; then
35927       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35928 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35929       has_space=`$ECHO "$complete" | $GREP " "`
35930       if test "x$has_space" != x; then
35931         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35932 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35933       fi
35934       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35935     fi
35936   fi
35937 
35938   # Now join together the path and the arguments once again
35939   if test "x$arguments" != xEOL; then
35940     new_complete="$new_path ${arguments% *}"
35941   else
35942     new_complete="$new_path"
35943   fi
35944 
35945   if test "x$complete" != "x$new_complete"; then
35946     NM="$new_complete"
35947     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35948 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35949   fi
35950 
35951 
35952 
35953   # Publish this variable in the help.
35954 
35955 
35956   if test "x$GNM" = x; then
35957     # The variable is not set by user, try to locate tool using the code snippet
35958     for ac_prog in gnm
35959 do
35960   # Extract the first word of "$ac_prog", so it can be a program name with args.
35961 set dummy $ac_prog; ac_word=$2
35962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35963 $as_echo_n "checking for $ac_word... " >&6; }
35964 if ${ac_cv_path_GNM+:} false; then :
35965   $as_echo_n "(cached) " >&6
35966 else
35967   case $GNM in
35968   [\\/]* | ?:[\\/]*)
35969   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35970   ;;
35971   *)
35972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35973 for as_dir in $PATH
35974 do
35975   IFS=$as_save_IFS
35976   test -z "$as_dir" && as_dir=.
35977     for ac_exec_ext in '' $ac_executable_extensions; do
35978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35979     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35981     break 2
35982   fi
35983 done
35984   done
35985 IFS=$as_save_IFS
35986 
35987   ;;
35988 esac
35989 fi
35990 GNM=$ac_cv_path_GNM
35991 if test -n "$GNM"; then
35992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35993 $as_echo "$GNM" >&6; }
35994 else
35995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35996 $as_echo "no" >&6; }
35997 fi
35998 
35999 
36000   test -n "$GNM" && break
36001 done
36002 
36003   else
36004     # The variable is set, but is it from the command line or the environment?
36005 
36006     # Try to remove the string !GNM! from our list.
36007     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36008     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36009       # If it failed, the variable was not from the command line. Ignore it,
36010       # but warn the user (except for BASH, which is always set by the calling BASH).
36011       if test "xGNM" != xBASH; then
36012         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36013 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36014       fi
36015       # Try to locate tool using the code snippet
36016       for ac_prog in gnm
36017 do
36018   # Extract the first word of "$ac_prog", so it can be a program name with args.
36019 set dummy $ac_prog; ac_word=$2
36020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36021 $as_echo_n "checking for $ac_word... " >&6; }
36022 if ${ac_cv_path_GNM+:} false; then :
36023   $as_echo_n "(cached) " >&6
36024 else
36025   case $GNM in
36026   [\\/]* | ?:[\\/]*)
36027   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36028   ;;
36029   *)
36030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36031 for as_dir in $PATH
36032 do
36033   IFS=$as_save_IFS
36034   test -z "$as_dir" && as_dir=.
36035     for ac_exec_ext in '' $ac_executable_extensions; do
36036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36037     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36039     break 2
36040   fi
36041 done
36042   done
36043 IFS=$as_save_IFS
36044 
36045   ;;
36046 esac
36047 fi
36048 GNM=$ac_cv_path_GNM
36049 if test -n "$GNM"; then
36050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36051 $as_echo "$GNM" >&6; }
36052 else
36053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36054 $as_echo "no" >&6; }
36055 fi
36056 
36057 
36058   test -n "$GNM" && break
36059 done
36060 
36061     else
36062       # If it succeeded, then it was overridden by the user. We will use it
36063       # for the tool.
36064 
36065       # First remove it from the list of overridden variables, so we can test
36066       # for unknown variables in the end.
36067       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36068 
36069       # Check if the provided tool contains a complete path.
36070       tool_specified="$GNM"
36071       tool_basename="${tool_specified##*/}"
36072       if test "x$tool_basename" = "x$tool_specified"; then
36073         # A command without a complete path is provided, search $PATH.
36074         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36075 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36076         # Extract the first word of "$tool_basename", so it can be a program name with args.
36077 set dummy $tool_basename; ac_word=$2
36078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36079 $as_echo_n "checking for $ac_word... " >&6; }
36080 if ${ac_cv_path_GNM+:} false; then :
36081   $as_echo_n "(cached) " >&6
36082 else
36083   case $GNM in
36084   [\\/]* | ?:[\\/]*)
36085   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36086   ;;
36087   *)
36088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36089 for as_dir in $PATH
36090 do
36091   IFS=$as_save_IFS
36092   test -z "$as_dir" && as_dir=.
36093     for ac_exec_ext in '' $ac_executable_extensions; do
36094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36095     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36097     break 2
36098   fi
36099 done
36100   done
36101 IFS=$as_save_IFS
36102 
36103   ;;
36104 esac
36105 fi
36106 GNM=$ac_cv_path_GNM
36107 if test -n "$GNM"; then
36108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36109 $as_echo "$GNM" >&6; }
36110 else
36111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36112 $as_echo "no" >&6; }
36113 fi
36114 
36115 
36116         if test "x$GNM" = x; then
36117           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36118         fi
36119       else
36120         # Otherwise we believe it is a complete path. Use it as it is.
36121         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36122 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36123         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36124 $as_echo_n "checking for GNM... " >&6; }
36125         if test ! -x "$tool_specified"; then
36126           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36127 $as_echo "not found" >&6; }
36128           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36129         fi
36130         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36131 $as_echo "$tool_specified" >&6; }
36132       fi
36133     fi
36134   fi
36135 
36136 
36137 
36138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36139 
36140   # First separate the path from the arguments. This will split at the first
36141   # space.
36142   complete="$GNM"
36143   path="${complete%% *}"
36144   tmp="$complete EOL"
36145   arguments="${tmp#* }"
36146 
36147   # Input might be given as Windows format, start by converting to
36148   # unix format.
36149   new_path=`$CYGPATH -u "$path"`
36150 
36151   # Now try to locate executable using which
36152   new_path=`$WHICH "$new_path" 2> /dev/null`
36153   # bat and cmd files are not always considered executable in cygwin causing which
36154   # to not find them
36155   if test "x$new_path" = x \
36156       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36157       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36158     new_path=`$CYGPATH -u "$path"`
36159   fi
36160   if test "x$new_path" = x; then
36161     # Oops. Which didn't find the executable.
36162     # The splitting of arguments from the executable at a space might have been incorrect,
36163     # since paths with space are more likely in Windows. Give it another try with the whole
36164     # argument.
36165     path="$complete"
36166     arguments="EOL"
36167     new_path=`$CYGPATH -u "$path"`
36168     new_path=`$WHICH "$new_path" 2> /dev/null`
36169     # bat and cmd files are not always considered executable in cygwin causing which
36170     # to not find them
36171     if test "x$new_path" = x \
36172         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36173         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36174       new_path=`$CYGPATH -u "$path"`
36175     fi
36176     if test "x$new_path" = x; then
36177       # It's still not found. Now this is an unrecoverable error.
36178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36179 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36180       has_space=`$ECHO "$complete" | $GREP " "`
36181       if test "x$has_space" != x; then
36182         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36183 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36184       fi
36185       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36186     fi
36187   fi
36188 
36189   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36190   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36191   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36192   # "foo.exe" is OK but "foo" is an error.
36193   #
36194   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36195   # It is also a way to make sure we got the proper file name for the real test later on.
36196   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36197   if test "x$test_shortpath" = x; then
36198     # Short path failed, file does not exist as specified.
36199     # Try adding .exe or .cmd
36200     if test -f "${new_path}.exe"; then
36201       input_to_shortpath="${new_path}.exe"
36202     elif test -f "${new_path}.cmd"; then
36203       input_to_shortpath="${new_path}.cmd"
36204     else
36205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36206 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36207       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36208 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36209       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36210     fi
36211   else
36212     input_to_shortpath="$new_path"
36213   fi
36214 
36215   # Call helper function which possibly converts this using DOS-style short mode.
36216   # If so, the updated path is stored in $new_path.
36217   new_path="$input_to_shortpath"
36218 
36219   input_path="$input_to_shortpath"
36220   # Check if we need to convert this using DOS-style short mode. If the path
36221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36222   # take no chances and rewrite it.
36223   # Note: m4 eats our [], so we need to use [ and ] instead.
36224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36225   if test "x$has_forbidden_chars" != x; then
36226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36227     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36228     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36229     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36230       # Going to short mode and back again did indeed matter. Since short mode is
36231       # case insensitive, let's make it lowercase to improve readability.
36232       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36233       # Now convert it back to Unix-stile (cygpath)
36234       input_path=`$CYGPATH -u "$shortmode_path"`
36235       new_path="$input_path"
36236     fi
36237   fi
36238 
36239   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36240   if test "x$test_cygdrive_prefix" = x; then
36241     # As a simple fix, exclude /usr/bin since it's not a real path.
36242     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36243       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36244       # a path prefixed by /cygdrive for fixpath to work.
36245       new_path="$CYGWIN_ROOT_PATH$input_path"
36246     fi
36247   fi
36248 
36249   # remove trailing .exe if any
36250   new_path="${new_path/%.exe/}"
36251 
36252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36253 
36254   # First separate the path from the arguments. This will split at the first
36255   # space.
36256   complete="$GNM"
36257   path="${complete%% *}"
36258   tmp="$complete EOL"
36259   arguments="${tmp#* }"
36260 
36261   # Input might be given as Windows format, start by converting to
36262   # unix format.
36263   new_path="$path"
36264 
36265   windows_path="$new_path"
36266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36267     unix_path=`$CYGPATH -u "$windows_path"`
36268     new_path="$unix_path"
36269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36271     new_path="$unix_path"
36272   fi
36273 
36274 
36275   # Now try to locate executable using which
36276   new_path=`$WHICH "$new_path" 2> /dev/null`
36277 
36278   if test "x$new_path" = x; then
36279     # Oops. Which didn't find the executable.
36280     # The splitting of arguments from the executable at a space might have been incorrect,
36281     # since paths with space are more likely in Windows. Give it another try with the whole
36282     # argument.
36283     path="$complete"
36284     arguments="EOL"
36285     new_path="$path"
36286 
36287   windows_path="$new_path"
36288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36289     unix_path=`$CYGPATH -u "$windows_path"`
36290     new_path="$unix_path"
36291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36293     new_path="$unix_path"
36294   fi
36295 
36296 
36297     new_path=`$WHICH "$new_path" 2> /dev/null`
36298     # bat and cmd files are not always considered executable in MSYS causing which
36299     # to not find them
36300     if test "x$new_path" = x \
36301         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36302         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36303       new_path="$path"
36304 
36305   windows_path="$new_path"
36306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36307     unix_path=`$CYGPATH -u "$windows_path"`
36308     new_path="$unix_path"
36309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36310     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36311     new_path="$unix_path"
36312   fi
36313 
36314     fi
36315 
36316     if test "x$new_path" = x; then
36317       # It's still not found. Now this is an unrecoverable error.
36318       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36319 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36320       has_space=`$ECHO "$complete" | $GREP " "`
36321       if test "x$has_space" != x; then
36322         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36323 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36324       fi
36325       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36326     fi
36327   fi
36328 
36329   # Now new_path has a complete unix path to the binary
36330   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36331     # Keep paths in /bin as-is, but remove trailing .exe if any
36332     new_path="${new_path/%.exe/}"
36333     # Do not save /bin paths to all_fixpath_prefixes!
36334   else
36335     # Not in mixed or Windows style, start by that.
36336     new_path=`cmd //c echo $new_path`
36337 
36338   input_path="$new_path"
36339   # Check if we need to convert this using DOS-style short mode. If the path
36340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36341   # take no chances and rewrite it.
36342   # Note: m4 eats our [], so we need to use [ and ] instead.
36343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36344   if test "x$has_forbidden_chars" != x; then
36345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36346     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36347   fi
36348 
36349     # Output is in $new_path
36350 
36351   windows_path="$new_path"
36352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36353     unix_path=`$CYGPATH -u "$windows_path"`
36354     new_path="$unix_path"
36355   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36356     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36357     new_path="$unix_path"
36358   fi
36359 
36360     # remove trailing .exe if any
36361     new_path="${new_path/%.exe/}"
36362 
36363     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36364     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36365   fi
36366 
36367   else
36368     # We're on a unix platform. Hooray! :)
36369     # First separate the path from the arguments. This will split at the first
36370     # space.
36371     complete="$GNM"
36372     path="${complete%% *}"
36373     tmp="$complete EOL"
36374     arguments="${tmp#* }"
36375 
36376     # Cannot rely on the command "which" here since it doesn't always work.
36377     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36378     if test -z "$is_absolute_path"; then
36379       # Path to executable is not absolute. Find it.
36380       IFS_save="$IFS"
36381       IFS=:
36382       for p in $PATH; do
36383         if test -f "$p/$path" && test -x "$p/$path"; then
36384           new_path="$p/$path"
36385           break
36386         fi
36387       done
36388       IFS="$IFS_save"
36389     else
36390       # This is an absolute path, we can use it without further modifications.
36391       new_path="$path"
36392     fi
36393 
36394     if test "x$new_path" = x; then
36395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36396 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36397       has_space=`$ECHO "$complete" | $GREP " "`
36398       if test "x$has_space" != x; then
36399         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36400 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36401       fi
36402       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36403     fi
36404   fi
36405 
36406   # Now join together the path and the arguments once again
36407   if test "x$arguments" != xEOL; then
36408     new_complete="$new_path ${arguments% *}"
36409   else
36410     new_complete="$new_path"
36411   fi
36412 
36413   if test "x$complete" != "x$new_complete"; then
36414     GNM="$new_complete"
36415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36416 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36417   fi
36418 
36419 
36420 
36421 
36422   # Publish this variable in the help.
36423 
36424 
36425   if test "x$MCS" = x; then
36426     # The variable is not set by user, try to locate tool using the code snippet
36427     for ac_prog in mcs
36428 do
36429   # Extract the first word of "$ac_prog", so it can be a program name with args.
36430 set dummy $ac_prog; ac_word=$2
36431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36432 $as_echo_n "checking for $ac_word... " >&6; }
36433 if ${ac_cv_path_MCS+:} false; then :
36434   $as_echo_n "(cached) " >&6
36435 else
36436   case $MCS in
36437   [\\/]* | ?:[\\/]*)
36438   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36439   ;;
36440   *)
36441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36442 for as_dir in $PATH
36443 do
36444   IFS=$as_save_IFS
36445   test -z "$as_dir" && as_dir=.
36446     for ac_exec_ext in '' $ac_executable_extensions; do
36447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36448     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36450     break 2
36451   fi
36452 done
36453   done
36454 IFS=$as_save_IFS
36455 
36456   ;;
36457 esac
36458 fi
36459 MCS=$ac_cv_path_MCS
36460 if test -n "$MCS"; then
36461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36462 $as_echo "$MCS" >&6; }
36463 else
36464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36465 $as_echo "no" >&6; }
36466 fi
36467 
36468 
36469   test -n "$MCS" && break
36470 done
36471 
36472   else
36473     # The variable is set, but is it from the command line or the environment?
36474 
36475     # Try to remove the string !MCS! from our list.
36476     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36477     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36478       # If it failed, the variable was not from the command line. Ignore it,
36479       # but warn the user (except for BASH, which is always set by the calling BASH).
36480       if test "xMCS" != xBASH; then
36481         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36482 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36483       fi
36484       # Try to locate tool using the code snippet
36485       for ac_prog in mcs
36486 do
36487   # Extract the first word of "$ac_prog", so it can be a program name with args.
36488 set dummy $ac_prog; ac_word=$2
36489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36490 $as_echo_n "checking for $ac_word... " >&6; }
36491 if ${ac_cv_path_MCS+:} false; then :
36492   $as_echo_n "(cached) " >&6
36493 else
36494   case $MCS in
36495   [\\/]* | ?:[\\/]*)
36496   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36497   ;;
36498   *)
36499   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36500 for as_dir in $PATH
36501 do
36502   IFS=$as_save_IFS
36503   test -z "$as_dir" && as_dir=.
36504     for ac_exec_ext in '' $ac_executable_extensions; do
36505   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36506     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36507     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36508     break 2
36509   fi
36510 done
36511   done
36512 IFS=$as_save_IFS
36513 
36514   ;;
36515 esac
36516 fi
36517 MCS=$ac_cv_path_MCS
36518 if test -n "$MCS"; then
36519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36520 $as_echo "$MCS" >&6; }
36521 else
36522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36523 $as_echo "no" >&6; }
36524 fi
36525 
36526 
36527   test -n "$MCS" && break
36528 done
36529 
36530     else
36531       # If it succeeded, then it was overridden by the user. We will use it
36532       # for the tool.
36533 
36534       # First remove it from the list of overridden variables, so we can test
36535       # for unknown variables in the end.
36536       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36537 
36538       # Check if the provided tool contains a complete path.
36539       tool_specified="$MCS"
36540       tool_basename="${tool_specified##*/}"
36541       if test "x$tool_basename" = "x$tool_specified"; then
36542         # A command without a complete path is provided, search $PATH.
36543         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36544 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36545         # Extract the first word of "$tool_basename", so it can be a program name with args.
36546 set dummy $tool_basename; ac_word=$2
36547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36548 $as_echo_n "checking for $ac_word... " >&6; }
36549 if ${ac_cv_path_MCS+:} false; then :
36550   $as_echo_n "(cached) " >&6
36551 else
36552   case $MCS in
36553   [\\/]* | ?:[\\/]*)
36554   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36555   ;;
36556   *)
36557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36558 for as_dir in $PATH
36559 do
36560   IFS=$as_save_IFS
36561   test -z "$as_dir" && as_dir=.
36562     for ac_exec_ext in '' $ac_executable_extensions; do
36563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36564     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36566     break 2
36567   fi
36568 done
36569   done
36570 IFS=$as_save_IFS
36571 
36572   ;;
36573 esac
36574 fi
36575 MCS=$ac_cv_path_MCS
36576 if test -n "$MCS"; then
36577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36578 $as_echo "$MCS" >&6; }
36579 else
36580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36581 $as_echo "no" >&6; }
36582 fi
36583 
36584 
36585         if test "x$MCS" = x; then
36586           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36587         fi
36588       else
36589         # Otherwise we believe it is a complete path. Use it as it is.
36590         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36591 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36592         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36593 $as_echo_n "checking for MCS... " >&6; }
36594         if test ! -x "$tool_specified"; then
36595           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36596 $as_echo "not found" >&6; }
36597           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36598         fi
36599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36600 $as_echo "$tool_specified" >&6; }
36601       fi
36602     fi
36603   fi
36604 
36605 
36606 
36607   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36608 
36609   # First separate the path from the arguments. This will split at the first
36610   # space.
36611   complete="$MCS"
36612   path="${complete%% *}"
36613   tmp="$complete EOL"
36614   arguments="${tmp#* }"
36615 
36616   # Input might be given as Windows format, start by converting to
36617   # unix format.
36618   new_path=`$CYGPATH -u "$path"`
36619 
36620   # Now try to locate executable using which
36621   new_path=`$WHICH "$new_path" 2> /dev/null`
36622   # bat and cmd files are not always considered executable in cygwin causing which
36623   # to not find them
36624   if test "x$new_path" = x \
36625       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36626       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36627     new_path=`$CYGPATH -u "$path"`
36628   fi
36629   if test "x$new_path" = x; then
36630     # Oops. Which didn't find the executable.
36631     # The splitting of arguments from the executable at a space might have been incorrect,
36632     # since paths with space are more likely in Windows. Give it another try with the whole
36633     # argument.
36634     path="$complete"
36635     arguments="EOL"
36636     new_path=`$CYGPATH -u "$path"`
36637     new_path=`$WHICH "$new_path" 2> /dev/null`
36638     # bat and cmd files are not always considered executable in cygwin causing which
36639     # to not find them
36640     if test "x$new_path" = x \
36641         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36642         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36643       new_path=`$CYGPATH -u "$path"`
36644     fi
36645     if test "x$new_path" = x; then
36646       # It's still not found. Now this is an unrecoverable error.
36647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36648 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36649       has_space=`$ECHO "$complete" | $GREP " "`
36650       if test "x$has_space" != x; then
36651         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36652 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36653       fi
36654       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36655     fi
36656   fi
36657 
36658   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36659   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36660   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36661   # "foo.exe" is OK but "foo" is an error.
36662   #
36663   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36664   # It is also a way to make sure we got the proper file name for the real test later on.
36665   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36666   if test "x$test_shortpath" = x; then
36667     # Short path failed, file does not exist as specified.
36668     # Try adding .exe or .cmd
36669     if test -f "${new_path}.exe"; then
36670       input_to_shortpath="${new_path}.exe"
36671     elif test -f "${new_path}.cmd"; then
36672       input_to_shortpath="${new_path}.cmd"
36673     else
36674       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36675 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36676       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36677 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36678       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36679     fi
36680   else
36681     input_to_shortpath="$new_path"
36682   fi
36683 
36684   # Call helper function which possibly converts this using DOS-style short mode.
36685   # If so, the updated path is stored in $new_path.
36686   new_path="$input_to_shortpath"
36687 
36688   input_path="$input_to_shortpath"
36689   # Check if we need to convert this using DOS-style short mode. If the path
36690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36691   # take no chances and rewrite it.
36692   # Note: m4 eats our [], so we need to use [ and ] instead.
36693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36694   if test "x$has_forbidden_chars" != x; then
36695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36696     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36697     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36698     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36699       # Going to short mode and back again did indeed matter. Since short mode is
36700       # case insensitive, let's make it lowercase to improve readability.
36701       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36702       # Now convert it back to Unix-stile (cygpath)
36703       input_path=`$CYGPATH -u "$shortmode_path"`
36704       new_path="$input_path"
36705     fi
36706   fi
36707 
36708   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36709   if test "x$test_cygdrive_prefix" = x; then
36710     # As a simple fix, exclude /usr/bin since it's not a real path.
36711     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36712       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36713       # a path prefixed by /cygdrive for fixpath to work.
36714       new_path="$CYGWIN_ROOT_PATH$input_path"
36715     fi
36716   fi
36717 
36718   # remove trailing .exe if any
36719   new_path="${new_path/%.exe/}"
36720 
36721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36722 
36723   # First separate the path from the arguments. This will split at the first
36724   # space.
36725   complete="$MCS"
36726   path="${complete%% *}"
36727   tmp="$complete EOL"
36728   arguments="${tmp#* }"
36729 
36730   # Input might be given as Windows format, start by converting to
36731   # unix format.
36732   new_path="$path"
36733 
36734   windows_path="$new_path"
36735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36736     unix_path=`$CYGPATH -u "$windows_path"`
36737     new_path="$unix_path"
36738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36740     new_path="$unix_path"
36741   fi
36742 
36743 
36744   # Now try to locate executable using which
36745   new_path=`$WHICH "$new_path" 2> /dev/null`
36746 
36747   if test "x$new_path" = x; then
36748     # Oops. Which didn't find the executable.
36749     # The splitting of arguments from the executable at a space might have been incorrect,
36750     # since paths with space are more likely in Windows. Give it another try with the whole
36751     # argument.
36752     path="$complete"
36753     arguments="EOL"
36754     new_path="$path"
36755 
36756   windows_path="$new_path"
36757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36758     unix_path=`$CYGPATH -u "$windows_path"`
36759     new_path="$unix_path"
36760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36762     new_path="$unix_path"
36763   fi
36764 
36765 
36766     new_path=`$WHICH "$new_path" 2> /dev/null`
36767     # bat and cmd files are not always considered executable in MSYS causing which
36768     # to not find them
36769     if test "x$new_path" = x \
36770         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36771         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36772       new_path="$path"
36773 
36774   windows_path="$new_path"
36775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36776     unix_path=`$CYGPATH -u "$windows_path"`
36777     new_path="$unix_path"
36778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36780     new_path="$unix_path"
36781   fi
36782 
36783     fi
36784 
36785     if test "x$new_path" = x; then
36786       # It's still not found. Now this is an unrecoverable error.
36787       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36788 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36789       has_space=`$ECHO "$complete" | $GREP " "`
36790       if test "x$has_space" != x; then
36791         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36792 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36793       fi
36794       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36795     fi
36796   fi
36797 
36798   # Now new_path has a complete unix path to the binary
36799   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36800     # Keep paths in /bin as-is, but remove trailing .exe if any
36801     new_path="${new_path/%.exe/}"
36802     # Do not save /bin paths to all_fixpath_prefixes!
36803   else
36804     # Not in mixed or Windows style, start by that.
36805     new_path=`cmd //c echo $new_path`
36806 
36807   input_path="$new_path"
36808   # Check if we need to convert this using DOS-style short mode. If the path
36809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36810   # take no chances and rewrite it.
36811   # Note: m4 eats our [], so we need to use [ and ] instead.
36812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36813   if test "x$has_forbidden_chars" != x; then
36814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36816   fi
36817 
36818     # Output is in $new_path
36819 
36820   windows_path="$new_path"
36821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36822     unix_path=`$CYGPATH -u "$windows_path"`
36823     new_path="$unix_path"
36824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36826     new_path="$unix_path"
36827   fi
36828 
36829     # remove trailing .exe if any
36830     new_path="${new_path/%.exe/}"
36831 
36832     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36833     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36834   fi
36835 
36836   else
36837     # We're on a unix platform. Hooray! :)
36838     # First separate the path from the arguments. This will split at the first
36839     # space.
36840     complete="$MCS"
36841     path="${complete%% *}"
36842     tmp="$complete EOL"
36843     arguments="${tmp#* }"
36844 
36845     # Cannot rely on the command "which" here since it doesn't always work.
36846     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36847     if test -z "$is_absolute_path"; then
36848       # Path to executable is not absolute. Find it.
36849       IFS_save="$IFS"
36850       IFS=:
36851       for p in $PATH; do
36852         if test -f "$p/$path" && test -x "$p/$path"; then
36853           new_path="$p/$path"
36854           break
36855         fi
36856       done
36857       IFS="$IFS_save"
36858     else
36859       # This is an absolute path, we can use it without further modifications.
36860       new_path="$path"
36861     fi
36862 
36863     if test "x$new_path" = x; then
36864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36865 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36866       has_space=`$ECHO "$complete" | $GREP " "`
36867       if test "x$has_space" != x; then
36868         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36869 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36870       fi
36871       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36872     fi
36873   fi
36874 
36875   # Now join together the path and the arguments once again
36876   if test "x$arguments" != xEOL; then
36877     new_complete="$new_path ${arguments% *}"
36878   else
36879     new_complete="$new_path"
36880   fi
36881 
36882   if test "x$complete" != "x$new_complete"; then
36883     MCS="$new_complete"
36884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36885 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36886   fi
36887 
36888   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36889     # FIXME: we should unify this with the solaris case above.
36890 
36891 
36892   # Publish this variable in the help.
36893 
36894 
36895   if test "x$STRIP" = x; then
36896     # The variable is not set by user, try to locate tool using the code snippet
36897     if test -n "$ac_tool_prefix"; then
36898   for ac_prog in strip
36899   do
36900     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36901 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36903 $as_echo_n "checking for $ac_word... " >&6; }
36904 if ${ac_cv_prog_STRIP+:} false; then :
36905   $as_echo_n "(cached) " >&6
36906 else
36907   if test -n "$STRIP"; then
36908   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36909 else
36910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36911 for as_dir in $PATH
36912 do
36913   IFS=$as_save_IFS
36914   test -z "$as_dir" && as_dir=.
36915     for ac_exec_ext in '' $ac_executable_extensions; do
36916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36917     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36919     break 2
36920   fi
36921 done
36922   done
36923 IFS=$as_save_IFS
36924 
36925 fi
36926 fi
36927 STRIP=$ac_cv_prog_STRIP
36928 if test -n "$STRIP"; then
36929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36930 $as_echo "$STRIP" >&6; }
36931 else
36932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36933 $as_echo "no" >&6; }
36934 fi
36935 
36936 
36937     test -n "$STRIP" && break
36938   done
36939 fi
36940 if test -z "$STRIP"; then
36941   ac_ct_STRIP=$STRIP
36942   for ac_prog in strip
36943 do
36944   # Extract the first word of "$ac_prog", so it can be a program name with args.
36945 set dummy $ac_prog; ac_word=$2
36946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36947 $as_echo_n "checking for $ac_word... " >&6; }
36948 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36949   $as_echo_n "(cached) " >&6
36950 else
36951   if test -n "$ac_ct_STRIP"; then
36952   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36953 else
36954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36955 for as_dir in $PATH
36956 do
36957   IFS=$as_save_IFS
36958   test -z "$as_dir" && as_dir=.
36959     for ac_exec_ext in '' $ac_executable_extensions; do
36960   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36961     ac_cv_prog_ac_ct_STRIP="$ac_prog"
36962     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36963     break 2
36964   fi
36965 done
36966   done
36967 IFS=$as_save_IFS
36968 
36969 fi
36970 fi
36971 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36972 if test -n "$ac_ct_STRIP"; then
36973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36974 $as_echo "$ac_ct_STRIP" >&6; }
36975 else
36976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36977 $as_echo "no" >&6; }
36978 fi
36979 
36980 
36981   test -n "$ac_ct_STRIP" && break
36982 done
36983 
36984   if test "x$ac_ct_STRIP" = x; then
36985     STRIP=""
36986   else
36987     case $cross_compiling:$ac_tool_warned in
36988 yes:)
36989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36990 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36991 ac_tool_warned=yes ;;
36992 esac
36993     STRIP=$ac_ct_STRIP
36994   fi
36995 fi
36996 
36997   else
36998     # The variable is set, but is it from the command line or the environment?
36999 
37000     # Try to remove the string !STRIP! from our list.
37001     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37002     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37003       # If it failed, the variable was not from the command line. Ignore it,
37004       # but warn the user (except for BASH, which is always set by the calling BASH).
37005       if test "xSTRIP" != xBASH; then
37006         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37007 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37008       fi
37009       # Try to locate tool using the code snippet
37010       if test -n "$ac_tool_prefix"; then
37011   for ac_prog in strip
37012   do
37013     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37014 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37016 $as_echo_n "checking for $ac_word... " >&6; }
37017 if ${ac_cv_prog_STRIP+:} false; then :
37018   $as_echo_n "(cached) " >&6
37019 else
37020   if test -n "$STRIP"; then
37021   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37022 else
37023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37024 for as_dir in $PATH
37025 do
37026   IFS=$as_save_IFS
37027   test -z "$as_dir" && as_dir=.
37028     for ac_exec_ext in '' $ac_executable_extensions; do
37029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37030     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37032     break 2
37033   fi
37034 done
37035   done
37036 IFS=$as_save_IFS
37037 
37038 fi
37039 fi
37040 STRIP=$ac_cv_prog_STRIP
37041 if test -n "$STRIP"; then
37042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37043 $as_echo "$STRIP" >&6; }
37044 else
37045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37046 $as_echo "no" >&6; }
37047 fi
37048 
37049 
37050     test -n "$STRIP" && break
37051   done
37052 fi
37053 if test -z "$STRIP"; then
37054   ac_ct_STRIP=$STRIP
37055   for ac_prog in strip
37056 do
37057   # Extract the first word of "$ac_prog", so it can be a program name with args.
37058 set dummy $ac_prog; ac_word=$2
37059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37060 $as_echo_n "checking for $ac_word... " >&6; }
37061 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37062   $as_echo_n "(cached) " >&6
37063 else
37064   if test -n "$ac_ct_STRIP"; then
37065   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37066 else
37067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37068 for as_dir in $PATH
37069 do
37070   IFS=$as_save_IFS
37071   test -z "$as_dir" && as_dir=.
37072     for ac_exec_ext in '' $ac_executable_extensions; do
37073   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37074     ac_cv_prog_ac_ct_STRIP="$ac_prog"
37075     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37076     break 2
37077   fi
37078 done
37079   done
37080 IFS=$as_save_IFS
37081 
37082 fi
37083 fi
37084 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37085 if test -n "$ac_ct_STRIP"; then
37086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37087 $as_echo "$ac_ct_STRIP" >&6; }
37088 else
37089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37090 $as_echo "no" >&6; }
37091 fi
37092 
37093 
37094   test -n "$ac_ct_STRIP" && break
37095 done
37096 
37097   if test "x$ac_ct_STRIP" = x; then
37098     STRIP=""
37099   else
37100     case $cross_compiling:$ac_tool_warned in
37101 yes:)
37102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37103 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37104 ac_tool_warned=yes ;;
37105 esac
37106     STRIP=$ac_ct_STRIP
37107   fi
37108 fi
37109 
37110     else
37111       # If it succeeded, then it was overridden by the user. We will use it
37112       # for the tool.
37113 
37114       # First remove it from the list of overridden variables, so we can test
37115       # for unknown variables in the end.
37116       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37117 
37118       # Check if the provided tool contains a complete path.
37119       tool_specified="$STRIP"
37120       tool_basename="${tool_specified##*/}"
37121       if test "x$tool_basename" = "x$tool_specified"; then
37122         # A command without a complete path is provided, search $PATH.
37123         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37124 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37125         # Extract the first word of "$tool_basename", so it can be a program name with args.
37126 set dummy $tool_basename; ac_word=$2
37127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37128 $as_echo_n "checking for $ac_word... " >&6; }
37129 if ${ac_cv_path_STRIP+:} false; then :
37130   $as_echo_n "(cached) " >&6
37131 else
37132   case $STRIP in
37133   [\\/]* | ?:[\\/]*)
37134   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37135   ;;
37136   *)
37137   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37138 for as_dir in $PATH
37139 do
37140   IFS=$as_save_IFS
37141   test -z "$as_dir" && as_dir=.
37142     for ac_exec_ext in '' $ac_executable_extensions; do
37143   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37144     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37145     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37146     break 2
37147   fi
37148 done
37149   done
37150 IFS=$as_save_IFS
37151 
37152   ;;
37153 esac
37154 fi
37155 STRIP=$ac_cv_path_STRIP
37156 if test -n "$STRIP"; then
37157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37158 $as_echo "$STRIP" >&6; }
37159 else
37160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37161 $as_echo "no" >&6; }
37162 fi
37163 
37164 
37165         if test "x$STRIP" = x; then
37166           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37167         fi
37168       else
37169         # Otherwise we believe it is a complete path. Use it as it is.
37170         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37171 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37172         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37173 $as_echo_n "checking for STRIP... " >&6; }
37174         if test ! -x "$tool_specified"; then
37175           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37176 $as_echo "not found" >&6; }
37177           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37178         fi
37179         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37180 $as_echo "$tool_specified" >&6; }
37181       fi
37182     fi
37183   fi
37184 
37185 
37186 
37187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37188 
37189   # First separate the path from the arguments. This will split at the first
37190   # space.
37191   complete="$STRIP"
37192   path="${complete%% *}"
37193   tmp="$complete EOL"
37194   arguments="${tmp#* }"
37195 
37196   # Input might be given as Windows format, start by converting to
37197   # unix format.
37198   new_path=`$CYGPATH -u "$path"`
37199 
37200   # Now try to locate executable using which
37201   new_path=`$WHICH "$new_path" 2> /dev/null`
37202   # bat and cmd files are not always considered executable in cygwin causing which
37203   # to not find them
37204   if test "x$new_path" = x \
37205       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37206       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37207     new_path=`$CYGPATH -u "$path"`
37208   fi
37209   if test "x$new_path" = x; then
37210     # Oops. Which didn't find the executable.
37211     # The splitting of arguments from the executable at a space might have been incorrect,
37212     # since paths with space are more likely in Windows. Give it another try with the whole
37213     # argument.
37214     path="$complete"
37215     arguments="EOL"
37216     new_path=`$CYGPATH -u "$path"`
37217     new_path=`$WHICH "$new_path" 2> /dev/null`
37218     # bat and cmd files are not always considered executable in cygwin causing which
37219     # to not find them
37220     if test "x$new_path" = x \
37221         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37222         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37223       new_path=`$CYGPATH -u "$path"`
37224     fi
37225     if test "x$new_path" = x; then
37226       # It's still not found. Now this is an unrecoverable error.
37227       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37228 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37229       has_space=`$ECHO "$complete" | $GREP " "`
37230       if test "x$has_space" != x; then
37231         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37232 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37233       fi
37234       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37235     fi
37236   fi
37237 
37238   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37239   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37240   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37241   # "foo.exe" is OK but "foo" is an error.
37242   #
37243   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37244   # It is also a way to make sure we got the proper file name for the real test later on.
37245   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37246   if test "x$test_shortpath" = x; then
37247     # Short path failed, file does not exist as specified.
37248     # Try adding .exe or .cmd
37249     if test -f "${new_path}.exe"; then
37250       input_to_shortpath="${new_path}.exe"
37251     elif test -f "${new_path}.cmd"; then
37252       input_to_shortpath="${new_path}.cmd"
37253     else
37254       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37255 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37256       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37257 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37258       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37259     fi
37260   else
37261     input_to_shortpath="$new_path"
37262   fi
37263 
37264   # Call helper function which possibly converts this using DOS-style short mode.
37265   # If so, the updated path is stored in $new_path.
37266   new_path="$input_to_shortpath"
37267 
37268   input_path="$input_to_shortpath"
37269   # Check if we need to convert this using DOS-style short mode. If the path
37270   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37271   # take no chances and rewrite it.
37272   # Note: m4 eats our [], so we need to use [ and ] instead.
37273   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37274   if test "x$has_forbidden_chars" != x; then
37275     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37276     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37277     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37278     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37279       # Going to short mode and back again did indeed matter. Since short mode is
37280       # case insensitive, let's make it lowercase to improve readability.
37281       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37282       # Now convert it back to Unix-stile (cygpath)
37283       input_path=`$CYGPATH -u "$shortmode_path"`
37284       new_path="$input_path"
37285     fi
37286   fi
37287 
37288   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37289   if test "x$test_cygdrive_prefix" = x; then
37290     # As a simple fix, exclude /usr/bin since it's not a real path.
37291     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37292       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37293       # a path prefixed by /cygdrive for fixpath to work.
37294       new_path="$CYGWIN_ROOT_PATH$input_path"
37295     fi
37296   fi
37297 
37298   # remove trailing .exe if any
37299   new_path="${new_path/%.exe/}"
37300 
37301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37302 
37303   # First separate the path from the arguments. This will split at the first
37304   # space.
37305   complete="$STRIP"
37306   path="${complete%% *}"
37307   tmp="$complete EOL"
37308   arguments="${tmp#* }"
37309 
37310   # Input might be given as Windows format, start by converting to
37311   # unix format.
37312   new_path="$path"
37313 
37314   windows_path="$new_path"
37315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37316     unix_path=`$CYGPATH -u "$windows_path"`
37317     new_path="$unix_path"
37318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37320     new_path="$unix_path"
37321   fi
37322 
37323 
37324   # Now try to locate executable using which
37325   new_path=`$WHICH "$new_path" 2> /dev/null`
37326 
37327   if test "x$new_path" = x; then
37328     # Oops. Which didn't find the executable.
37329     # The splitting of arguments from the executable at a space might have been incorrect,
37330     # since paths with space are more likely in Windows. Give it another try with the whole
37331     # argument.
37332     path="$complete"
37333     arguments="EOL"
37334     new_path="$path"
37335 
37336   windows_path="$new_path"
37337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37338     unix_path=`$CYGPATH -u "$windows_path"`
37339     new_path="$unix_path"
37340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37342     new_path="$unix_path"
37343   fi
37344 
37345 
37346     new_path=`$WHICH "$new_path" 2> /dev/null`
37347     # bat and cmd files are not always considered executable in MSYS causing which
37348     # to not find them
37349     if test "x$new_path" = x \
37350         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37351         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37352       new_path="$path"
37353 
37354   windows_path="$new_path"
37355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37356     unix_path=`$CYGPATH -u "$windows_path"`
37357     new_path="$unix_path"
37358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37360     new_path="$unix_path"
37361   fi
37362 
37363     fi
37364 
37365     if test "x$new_path" = x; then
37366       # It's still not found. Now this is an unrecoverable error.
37367       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37368 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37369       has_space=`$ECHO "$complete" | $GREP " "`
37370       if test "x$has_space" != x; then
37371         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37372 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37373       fi
37374       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37375     fi
37376   fi
37377 
37378   # Now new_path has a complete unix path to the binary
37379   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37380     # Keep paths in /bin as-is, but remove trailing .exe if any
37381     new_path="${new_path/%.exe/}"
37382     # Do not save /bin paths to all_fixpath_prefixes!
37383   else
37384     # Not in mixed or Windows style, start by that.
37385     new_path=`cmd //c echo $new_path`
37386 
37387   input_path="$new_path"
37388   # Check if we need to convert this using DOS-style short mode. If the path
37389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37390   # take no chances and rewrite it.
37391   # Note: m4 eats our [], so we need to use [ and ] instead.
37392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37393   if test "x$has_forbidden_chars" != x; then
37394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37396   fi
37397 
37398     # Output is in $new_path
37399 
37400   windows_path="$new_path"
37401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37402     unix_path=`$CYGPATH -u "$windows_path"`
37403     new_path="$unix_path"
37404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37406     new_path="$unix_path"
37407   fi
37408 
37409     # remove trailing .exe if any
37410     new_path="${new_path/%.exe/}"
37411 
37412     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37413     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37414   fi
37415 
37416   else
37417     # We're on a unix platform. Hooray! :)
37418     # First separate the path from the arguments. This will split at the first
37419     # space.
37420     complete="$STRIP"
37421     path="${complete%% *}"
37422     tmp="$complete EOL"
37423     arguments="${tmp#* }"
37424 
37425     # Cannot rely on the command "which" here since it doesn't always work.
37426     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37427     if test -z "$is_absolute_path"; then
37428       # Path to executable is not absolute. Find it.
37429       IFS_save="$IFS"
37430       IFS=:
37431       for p in $PATH; do
37432         if test -f "$p/$path" && test -x "$p/$path"; then
37433           new_path="$p/$path"
37434           break
37435         fi
37436       done
37437       IFS="$IFS_save"
37438     else
37439       # This is an absolute path, we can use it without further modifications.
37440       new_path="$path"
37441     fi
37442 
37443     if test "x$new_path" = x; then
37444       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37445 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37446       has_space=`$ECHO "$complete" | $GREP " "`
37447       if test "x$has_space" != x; then
37448         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37449 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37450       fi
37451       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37452     fi
37453   fi
37454 
37455   # Now join together the path and the arguments once again
37456   if test "x$arguments" != xEOL; then
37457     new_complete="$new_path ${arguments% *}"
37458   else
37459     new_complete="$new_path"
37460   fi
37461 
37462   if test "x$complete" != "x$new_complete"; then
37463     STRIP="$new_complete"
37464     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37465 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37466   fi
37467 
37468 
37469 
37470   # Publish this variable in the help.
37471 
37472 
37473   if test "x$NM" = x; then
37474     # The variable is not set by user, try to locate tool using the code snippet
37475     if test -n "$ac_tool_prefix"; then
37476   for ac_prog in nm
37477   do
37478     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37479 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37481 $as_echo_n "checking for $ac_word... " >&6; }
37482 if ${ac_cv_prog_NM+:} false; then :
37483   $as_echo_n "(cached) " >&6
37484 else
37485   if test -n "$NM"; then
37486   ac_cv_prog_NM="$NM" # Let the user override the test.
37487 else
37488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37489 for as_dir in $PATH
37490 do
37491   IFS=$as_save_IFS
37492   test -z "$as_dir" && as_dir=.
37493     for ac_exec_ext in '' $ac_executable_extensions; do
37494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37495     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37497     break 2
37498   fi
37499 done
37500   done
37501 IFS=$as_save_IFS
37502 
37503 fi
37504 fi
37505 NM=$ac_cv_prog_NM
37506 if test -n "$NM"; then
37507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37508 $as_echo "$NM" >&6; }
37509 else
37510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37511 $as_echo "no" >&6; }
37512 fi
37513 
37514 
37515     test -n "$NM" && break
37516   done
37517 fi
37518 if test -z "$NM"; then
37519   ac_ct_NM=$NM
37520   for ac_prog in nm
37521 do
37522   # Extract the first word of "$ac_prog", so it can be a program name with args.
37523 set dummy $ac_prog; ac_word=$2
37524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37525 $as_echo_n "checking for $ac_word... " >&6; }
37526 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37527   $as_echo_n "(cached) " >&6
37528 else
37529   if test -n "$ac_ct_NM"; then
37530   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37531 else
37532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37533 for as_dir in $PATH
37534 do
37535   IFS=$as_save_IFS
37536   test -z "$as_dir" && as_dir=.
37537     for ac_exec_ext in '' $ac_executable_extensions; do
37538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37539     ac_cv_prog_ac_ct_NM="$ac_prog"
37540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37541     break 2
37542   fi
37543 done
37544   done
37545 IFS=$as_save_IFS
37546 
37547 fi
37548 fi
37549 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37550 if test -n "$ac_ct_NM"; then
37551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37552 $as_echo "$ac_ct_NM" >&6; }
37553 else
37554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37555 $as_echo "no" >&6; }
37556 fi
37557 
37558 
37559   test -n "$ac_ct_NM" && break
37560 done
37561 
37562   if test "x$ac_ct_NM" = x; then
37563     NM=""
37564   else
37565     case $cross_compiling:$ac_tool_warned in
37566 yes:)
37567 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37568 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37569 ac_tool_warned=yes ;;
37570 esac
37571     NM=$ac_ct_NM
37572   fi
37573 fi
37574 
37575   else
37576     # The variable is set, but is it from the command line or the environment?
37577 
37578     # Try to remove the string !NM! from our list.
37579     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37580     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37581       # If it failed, the variable was not from the command line. Ignore it,
37582       # but warn the user (except for BASH, which is always set by the calling BASH).
37583       if test "xNM" != xBASH; then
37584         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37585 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37586       fi
37587       # Try to locate tool using the code snippet
37588       if test -n "$ac_tool_prefix"; then
37589   for ac_prog in nm
37590   do
37591     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37592 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37594 $as_echo_n "checking for $ac_word... " >&6; }
37595 if ${ac_cv_prog_NM+:} false; then :
37596   $as_echo_n "(cached) " >&6
37597 else
37598   if test -n "$NM"; then
37599   ac_cv_prog_NM="$NM" # Let the user override the test.
37600 else
37601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37602 for as_dir in $PATH
37603 do
37604   IFS=$as_save_IFS
37605   test -z "$as_dir" && as_dir=.
37606     for ac_exec_ext in '' $ac_executable_extensions; do
37607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37608     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37610     break 2
37611   fi
37612 done
37613   done
37614 IFS=$as_save_IFS
37615 
37616 fi
37617 fi
37618 NM=$ac_cv_prog_NM
37619 if test -n "$NM"; then
37620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37621 $as_echo "$NM" >&6; }
37622 else
37623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37624 $as_echo "no" >&6; }
37625 fi
37626 
37627 
37628     test -n "$NM" && break
37629   done
37630 fi
37631 if test -z "$NM"; then
37632   ac_ct_NM=$NM
37633   for ac_prog in nm
37634 do
37635   # Extract the first word of "$ac_prog", so it can be a program name with args.
37636 set dummy $ac_prog; ac_word=$2
37637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37638 $as_echo_n "checking for $ac_word... " >&6; }
37639 if ${ac_cv_prog_ac_ct_NM+:} false; then :
37640   $as_echo_n "(cached) " >&6
37641 else
37642   if test -n "$ac_ct_NM"; then
37643   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37644 else
37645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37646 for as_dir in $PATH
37647 do
37648   IFS=$as_save_IFS
37649   test -z "$as_dir" && as_dir=.
37650     for ac_exec_ext in '' $ac_executable_extensions; do
37651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37652     ac_cv_prog_ac_ct_NM="$ac_prog"
37653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37654     break 2
37655   fi
37656 done
37657   done
37658 IFS=$as_save_IFS
37659 
37660 fi
37661 fi
37662 ac_ct_NM=$ac_cv_prog_ac_ct_NM
37663 if test -n "$ac_ct_NM"; then
37664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37665 $as_echo "$ac_ct_NM" >&6; }
37666 else
37667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37668 $as_echo "no" >&6; }
37669 fi
37670 
37671 
37672   test -n "$ac_ct_NM" && break
37673 done
37674 
37675   if test "x$ac_ct_NM" = x; then
37676     NM=""
37677   else
37678     case $cross_compiling:$ac_tool_warned in
37679 yes:)
37680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37681 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37682 ac_tool_warned=yes ;;
37683 esac
37684     NM=$ac_ct_NM
37685   fi
37686 fi
37687 
37688     else
37689       # If it succeeded, then it was overridden by the user. We will use it
37690       # for the tool.
37691 
37692       # First remove it from the list of overridden variables, so we can test
37693       # for unknown variables in the end.
37694       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37695 
37696       # Check if the provided tool contains a complete path.
37697       tool_specified="$NM"
37698       tool_basename="${tool_specified##*/}"
37699       if test "x$tool_basename" = "x$tool_specified"; then
37700         # A command without a complete path is provided, search $PATH.
37701         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37702 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37703         # Extract the first word of "$tool_basename", so it can be a program name with args.
37704 set dummy $tool_basename; ac_word=$2
37705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37706 $as_echo_n "checking for $ac_word... " >&6; }
37707 if ${ac_cv_path_NM+:} false; then :
37708   $as_echo_n "(cached) " >&6
37709 else
37710   case $NM in
37711   [\\/]* | ?:[\\/]*)
37712   ac_cv_path_NM="$NM" # Let the user override the test with a path.
37713   ;;
37714   *)
37715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37716 for as_dir in $PATH
37717 do
37718   IFS=$as_save_IFS
37719   test -z "$as_dir" && as_dir=.
37720     for ac_exec_ext in '' $ac_executable_extensions; do
37721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37722     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37724     break 2
37725   fi
37726 done
37727   done
37728 IFS=$as_save_IFS
37729 
37730   ;;
37731 esac
37732 fi
37733 NM=$ac_cv_path_NM
37734 if test -n "$NM"; then
37735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37736 $as_echo "$NM" >&6; }
37737 else
37738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37739 $as_echo "no" >&6; }
37740 fi
37741 
37742 
37743         if test "x$NM" = x; then
37744           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37745         fi
37746       else
37747         # Otherwise we believe it is a complete path. Use it as it is.
37748         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37749 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37751 $as_echo_n "checking for NM... " >&6; }
37752         if test ! -x "$tool_specified"; then
37753           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37754 $as_echo "not found" >&6; }
37755           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37756         fi
37757         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37758 $as_echo "$tool_specified" >&6; }
37759       fi
37760     fi
37761   fi
37762 
37763 
37764 
37765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37766 
37767   # First separate the path from the arguments. This will split at the first
37768   # space.
37769   complete="$NM"
37770   path="${complete%% *}"
37771   tmp="$complete EOL"
37772   arguments="${tmp#* }"
37773 
37774   # Input might be given as Windows format, start by converting to
37775   # unix format.
37776   new_path=`$CYGPATH -u "$path"`
37777 
37778   # Now try to locate executable using which
37779   new_path=`$WHICH "$new_path" 2> /dev/null`
37780   # bat and cmd files are not always considered executable in cygwin causing which
37781   # to not find them
37782   if test "x$new_path" = x \
37783       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37784       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37785     new_path=`$CYGPATH -u "$path"`
37786   fi
37787   if test "x$new_path" = x; then
37788     # Oops. Which didn't find the executable.
37789     # The splitting of arguments from the executable at a space might have been incorrect,
37790     # since paths with space are more likely in Windows. Give it another try with the whole
37791     # argument.
37792     path="$complete"
37793     arguments="EOL"
37794     new_path=`$CYGPATH -u "$path"`
37795     new_path=`$WHICH "$new_path" 2> /dev/null`
37796     # bat and cmd files are not always considered executable in cygwin causing which
37797     # to not find them
37798     if test "x$new_path" = x \
37799         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37800         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37801       new_path=`$CYGPATH -u "$path"`
37802     fi
37803     if test "x$new_path" = x; then
37804       # It's still not found. Now this is an unrecoverable error.
37805       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37806 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37807       has_space=`$ECHO "$complete" | $GREP " "`
37808       if test "x$has_space" != x; then
37809         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37810 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37811       fi
37812       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37813     fi
37814   fi
37815 
37816   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37817   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37818   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37819   # "foo.exe" is OK but "foo" is an error.
37820   #
37821   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37822   # It is also a way to make sure we got the proper file name for the real test later on.
37823   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37824   if test "x$test_shortpath" = x; then
37825     # Short path failed, file does not exist as specified.
37826     # Try adding .exe or .cmd
37827     if test -f "${new_path}.exe"; then
37828       input_to_shortpath="${new_path}.exe"
37829     elif test -f "${new_path}.cmd"; then
37830       input_to_shortpath="${new_path}.cmd"
37831     else
37832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37833 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37834       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37835 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37836       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37837     fi
37838   else
37839     input_to_shortpath="$new_path"
37840   fi
37841 
37842   # Call helper function which possibly converts this using DOS-style short mode.
37843   # If so, the updated path is stored in $new_path.
37844   new_path="$input_to_shortpath"
37845 
37846   input_path="$input_to_shortpath"
37847   # Check if we need to convert this using DOS-style short mode. If the path
37848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37849   # take no chances and rewrite it.
37850   # Note: m4 eats our [], so we need to use [ and ] instead.
37851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37852   if test "x$has_forbidden_chars" != x; then
37853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37854     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37855     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37856     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37857       # Going to short mode and back again did indeed matter. Since short mode is
37858       # case insensitive, let's make it lowercase to improve readability.
37859       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37860       # Now convert it back to Unix-stile (cygpath)
37861       input_path=`$CYGPATH -u "$shortmode_path"`
37862       new_path="$input_path"
37863     fi
37864   fi
37865 
37866   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37867   if test "x$test_cygdrive_prefix" = x; then
37868     # As a simple fix, exclude /usr/bin since it's not a real path.
37869     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37870       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37871       # a path prefixed by /cygdrive for fixpath to work.
37872       new_path="$CYGWIN_ROOT_PATH$input_path"
37873     fi
37874   fi
37875 
37876   # remove trailing .exe if any
37877   new_path="${new_path/%.exe/}"
37878 
37879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37880 
37881   # First separate the path from the arguments. This will split at the first
37882   # space.
37883   complete="$NM"
37884   path="${complete%% *}"
37885   tmp="$complete EOL"
37886   arguments="${tmp#* }"
37887 
37888   # Input might be given as Windows format, start by converting to
37889   # unix format.
37890   new_path="$path"
37891 
37892   windows_path="$new_path"
37893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37894     unix_path=`$CYGPATH -u "$windows_path"`
37895     new_path="$unix_path"
37896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37898     new_path="$unix_path"
37899   fi
37900 
37901 
37902   # Now try to locate executable using which
37903   new_path=`$WHICH "$new_path" 2> /dev/null`
37904 
37905   if test "x$new_path" = x; then
37906     # Oops. Which didn't find the executable.
37907     # The splitting of arguments from the executable at a space might have been incorrect,
37908     # since paths with space are more likely in Windows. Give it another try with the whole
37909     # argument.
37910     path="$complete"
37911     arguments="EOL"
37912     new_path="$path"
37913 
37914   windows_path="$new_path"
37915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37916     unix_path=`$CYGPATH -u "$windows_path"`
37917     new_path="$unix_path"
37918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37920     new_path="$unix_path"
37921   fi
37922 
37923 
37924     new_path=`$WHICH "$new_path" 2> /dev/null`
37925     # bat and cmd files are not always considered executable in MSYS causing which
37926     # to not find them
37927     if test "x$new_path" = x \
37928         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37929         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37930       new_path="$path"
37931 
37932   windows_path="$new_path"
37933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37934     unix_path=`$CYGPATH -u "$windows_path"`
37935     new_path="$unix_path"
37936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37938     new_path="$unix_path"
37939   fi
37940 
37941     fi
37942 
37943     if test "x$new_path" = x; then
37944       # It's still not found. Now this is an unrecoverable error.
37945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37946 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37947       has_space=`$ECHO "$complete" | $GREP " "`
37948       if test "x$has_space" != x; then
37949         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37950 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37951       fi
37952       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37953     fi
37954   fi
37955 
37956   # Now new_path has a complete unix path to the binary
37957   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37958     # Keep paths in /bin as-is, but remove trailing .exe if any
37959     new_path="${new_path/%.exe/}"
37960     # Do not save /bin paths to all_fixpath_prefixes!
37961   else
37962     # Not in mixed or Windows style, start by that.
37963     new_path=`cmd //c echo $new_path`
37964 
37965   input_path="$new_path"
37966   # Check if we need to convert this using DOS-style short mode. If the path
37967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37968   # take no chances and rewrite it.
37969   # Note: m4 eats our [], so we need to use [ and ] instead.
37970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37971   if test "x$has_forbidden_chars" != x; then
37972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37974   fi
37975 
37976     # Output is in $new_path
37977 
37978   windows_path="$new_path"
37979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37980     unix_path=`$CYGPATH -u "$windows_path"`
37981     new_path="$unix_path"
37982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37984     new_path="$unix_path"
37985   fi
37986 
37987     # remove trailing .exe if any
37988     new_path="${new_path/%.exe/}"
37989 
37990     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37991     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37992   fi
37993 
37994   else
37995     # We're on a unix platform. Hooray! :)
37996     # First separate the path from the arguments. This will split at the first
37997     # space.
37998     complete="$NM"
37999     path="${complete%% *}"
38000     tmp="$complete EOL"
38001     arguments="${tmp#* }"
38002 
38003     # Cannot rely on the command "which" here since it doesn't always work.
38004     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38005     if test -z "$is_absolute_path"; then
38006       # Path to executable is not absolute. Find it.
38007       IFS_save="$IFS"
38008       IFS=:
38009       for p in $PATH; do
38010         if test -f "$p/$path" && test -x "$p/$path"; then
38011           new_path="$p/$path"
38012           break
38013         fi
38014       done
38015       IFS="$IFS_save"
38016     else
38017       # This is an absolute path, we can use it without further modifications.
38018       new_path="$path"
38019     fi
38020 
38021     if test "x$new_path" = x; then
38022       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38023 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38024       has_space=`$ECHO "$complete" | $GREP " "`
38025       if test "x$has_space" != x; then
38026         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38027 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38028       fi
38029       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38030     fi
38031   fi
38032 
38033   # Now join together the path and the arguments once again
38034   if test "x$arguments" != xEOL; then
38035     new_complete="$new_path ${arguments% *}"
38036   else
38037     new_complete="$new_path"
38038   fi
38039 
38040   if test "x$complete" != "x$new_complete"; then
38041     NM="$new_complete"
38042     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38043 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38044   fi
38045 
38046     GNM="$NM"
38047 
38048   fi
38049 
38050   # objcopy is used for moving debug symbols to separate files when
38051   # full debug symbols are enabled.
38052   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38053 
38054 
38055   # Publish this variable in the help.
38056 
38057 
38058   if test "x$OBJCOPY" = x; then
38059     # The variable is not set by user, try to locate tool using the code snippet
38060     if test -n "$ac_tool_prefix"; then
38061   for ac_prog in gobjcopy objcopy
38062   do
38063     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38064 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38066 $as_echo_n "checking for $ac_word... " >&6; }
38067 if ${ac_cv_prog_OBJCOPY+:} false; then :
38068   $as_echo_n "(cached) " >&6
38069 else
38070   if test -n "$OBJCOPY"; then
38071   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38072 else
38073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38074 for as_dir in $PATH
38075 do
38076   IFS=$as_save_IFS
38077   test -z "$as_dir" && as_dir=.
38078     for ac_exec_ext in '' $ac_executable_extensions; do
38079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38080     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38082     break 2
38083   fi
38084 done
38085   done
38086 IFS=$as_save_IFS
38087 
38088 fi
38089 fi
38090 OBJCOPY=$ac_cv_prog_OBJCOPY
38091 if test -n "$OBJCOPY"; then
38092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38093 $as_echo "$OBJCOPY" >&6; }
38094 else
38095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38096 $as_echo "no" >&6; }
38097 fi
38098 
38099 
38100     test -n "$OBJCOPY" && break
38101   done
38102 fi
38103 if test -z "$OBJCOPY"; then
38104   ac_ct_OBJCOPY=$OBJCOPY
38105   for ac_prog in gobjcopy objcopy
38106 do
38107   # Extract the first word of "$ac_prog", so it can be a program name with args.
38108 set dummy $ac_prog; ac_word=$2
38109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38110 $as_echo_n "checking for $ac_word... " >&6; }
38111 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38112   $as_echo_n "(cached) " >&6
38113 else
38114   if test -n "$ac_ct_OBJCOPY"; then
38115   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38116 else
38117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38118 for as_dir in $PATH
38119 do
38120   IFS=$as_save_IFS
38121   test -z "$as_dir" && as_dir=.
38122     for ac_exec_ext in '' $ac_executable_extensions; do
38123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38124     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38126     break 2
38127   fi
38128 done
38129   done
38130 IFS=$as_save_IFS
38131 
38132 fi
38133 fi
38134 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38135 if test -n "$ac_ct_OBJCOPY"; then
38136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38137 $as_echo "$ac_ct_OBJCOPY" >&6; }
38138 else
38139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38140 $as_echo "no" >&6; }
38141 fi
38142 
38143 
38144   test -n "$ac_ct_OBJCOPY" && break
38145 done
38146 
38147   if test "x$ac_ct_OBJCOPY" = x; then
38148     OBJCOPY=""
38149   else
38150     case $cross_compiling:$ac_tool_warned in
38151 yes:)
38152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38153 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38154 ac_tool_warned=yes ;;
38155 esac
38156     OBJCOPY=$ac_ct_OBJCOPY
38157   fi
38158 fi
38159 
38160   else
38161     # The variable is set, but is it from the command line or the environment?
38162 
38163     # Try to remove the string !OBJCOPY! from our list.
38164     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38165     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38166       # If it failed, the variable was not from the command line. Ignore it,
38167       # but warn the user (except for BASH, which is always set by the calling BASH).
38168       if test "xOBJCOPY" != xBASH; then
38169         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38170 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38171       fi
38172       # Try to locate tool using the code snippet
38173       if test -n "$ac_tool_prefix"; then
38174   for ac_prog in gobjcopy objcopy
38175   do
38176     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38177 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38179 $as_echo_n "checking for $ac_word... " >&6; }
38180 if ${ac_cv_prog_OBJCOPY+:} false; then :
38181   $as_echo_n "(cached) " >&6
38182 else
38183   if test -n "$OBJCOPY"; then
38184   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38185 else
38186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38187 for as_dir in $PATH
38188 do
38189   IFS=$as_save_IFS
38190   test -z "$as_dir" && as_dir=.
38191     for ac_exec_ext in '' $ac_executable_extensions; do
38192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38193     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38195     break 2
38196   fi
38197 done
38198   done
38199 IFS=$as_save_IFS
38200 
38201 fi
38202 fi
38203 OBJCOPY=$ac_cv_prog_OBJCOPY
38204 if test -n "$OBJCOPY"; then
38205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38206 $as_echo "$OBJCOPY" >&6; }
38207 else
38208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38209 $as_echo "no" >&6; }
38210 fi
38211 
38212 
38213     test -n "$OBJCOPY" && break
38214   done
38215 fi
38216 if test -z "$OBJCOPY"; then
38217   ac_ct_OBJCOPY=$OBJCOPY
38218   for ac_prog in gobjcopy objcopy
38219 do
38220   # Extract the first word of "$ac_prog", so it can be a program name with args.
38221 set dummy $ac_prog; ac_word=$2
38222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38223 $as_echo_n "checking for $ac_word... " >&6; }
38224 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38225   $as_echo_n "(cached) " >&6
38226 else
38227   if test -n "$ac_ct_OBJCOPY"; then
38228   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38229 else
38230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38231 for as_dir in $PATH
38232 do
38233   IFS=$as_save_IFS
38234   test -z "$as_dir" && as_dir=.
38235     for ac_exec_ext in '' $ac_executable_extensions; do
38236   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38237     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38239     break 2
38240   fi
38241 done
38242   done
38243 IFS=$as_save_IFS
38244 
38245 fi
38246 fi
38247 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38248 if test -n "$ac_ct_OBJCOPY"; then
38249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38250 $as_echo "$ac_ct_OBJCOPY" >&6; }
38251 else
38252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38253 $as_echo "no" >&6; }
38254 fi
38255 
38256 
38257   test -n "$ac_ct_OBJCOPY" && break
38258 done
38259 
38260   if test "x$ac_ct_OBJCOPY" = x; then
38261     OBJCOPY=""
38262   else
38263     case $cross_compiling:$ac_tool_warned in
38264 yes:)
38265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38266 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38267 ac_tool_warned=yes ;;
38268 esac
38269     OBJCOPY=$ac_ct_OBJCOPY
38270   fi
38271 fi
38272 
38273     else
38274       # If it succeeded, then it was overridden by the user. We will use it
38275       # for the tool.
38276 
38277       # First remove it from the list of overridden variables, so we can test
38278       # for unknown variables in the end.
38279       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38280 
38281       # Check if the provided tool contains a complete path.
38282       tool_specified="$OBJCOPY"
38283       tool_basename="${tool_specified##*/}"
38284       if test "x$tool_basename" = "x$tool_specified"; then
38285         # A command without a complete path is provided, search $PATH.
38286         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38287 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38288         # Extract the first word of "$tool_basename", so it can be a program name with args.
38289 set dummy $tool_basename; ac_word=$2
38290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38291 $as_echo_n "checking for $ac_word... " >&6; }
38292 if ${ac_cv_path_OBJCOPY+:} false; then :
38293   $as_echo_n "(cached) " >&6
38294 else
38295   case $OBJCOPY in
38296   [\\/]* | ?:[\\/]*)
38297   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38298   ;;
38299   *)
38300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38301 for as_dir in $PATH
38302 do
38303   IFS=$as_save_IFS
38304   test -z "$as_dir" && as_dir=.
38305     for ac_exec_ext in '' $ac_executable_extensions; do
38306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38307     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38309     break 2
38310   fi
38311 done
38312   done
38313 IFS=$as_save_IFS
38314 
38315   ;;
38316 esac
38317 fi
38318 OBJCOPY=$ac_cv_path_OBJCOPY
38319 if test -n "$OBJCOPY"; then
38320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38321 $as_echo "$OBJCOPY" >&6; }
38322 else
38323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38324 $as_echo "no" >&6; }
38325 fi
38326 
38327 
38328         if test "x$OBJCOPY" = x; then
38329           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38330         fi
38331       else
38332         # Otherwise we believe it is a complete path. Use it as it is.
38333         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38334 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38335         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38336 $as_echo_n "checking for OBJCOPY... " >&6; }
38337         if test ! -x "$tool_specified"; then
38338           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38339 $as_echo "not found" >&6; }
38340           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38341         fi
38342         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38343 $as_echo "$tool_specified" >&6; }
38344       fi
38345     fi
38346   fi
38347 
38348 
38349     # Only call fixup if objcopy was found.
38350     if test -n "$OBJCOPY"; then
38351 
38352   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38353 
38354   # First separate the path from the arguments. This will split at the first
38355   # space.
38356   complete="$OBJCOPY"
38357   path="${complete%% *}"
38358   tmp="$complete EOL"
38359   arguments="${tmp#* }"
38360 
38361   # Input might be given as Windows format, start by converting to
38362   # unix format.
38363   new_path=`$CYGPATH -u "$path"`
38364 
38365   # Now try to locate executable using which
38366   new_path=`$WHICH "$new_path" 2> /dev/null`
38367   # bat and cmd files are not always considered executable in cygwin causing which
38368   # to not find them
38369   if test "x$new_path" = x \
38370       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38371       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38372     new_path=`$CYGPATH -u "$path"`
38373   fi
38374   if test "x$new_path" = x; then
38375     # Oops. Which didn't find the executable.
38376     # The splitting of arguments from the executable at a space might have been incorrect,
38377     # since paths with space are more likely in Windows. Give it another try with the whole
38378     # argument.
38379     path="$complete"
38380     arguments="EOL"
38381     new_path=`$CYGPATH -u "$path"`
38382     new_path=`$WHICH "$new_path" 2> /dev/null`
38383     # bat and cmd files are not always considered executable in cygwin causing which
38384     # to not find them
38385     if test "x$new_path" = x \
38386         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38387         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38388       new_path=`$CYGPATH -u "$path"`
38389     fi
38390     if test "x$new_path" = x; then
38391       # It's still not found. Now this is an unrecoverable error.
38392       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38393 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38394       has_space=`$ECHO "$complete" | $GREP " "`
38395       if test "x$has_space" != x; then
38396         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38397 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38398       fi
38399       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38400     fi
38401   fi
38402 
38403   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38404   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38405   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38406   # "foo.exe" is OK but "foo" is an error.
38407   #
38408   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38409   # It is also a way to make sure we got the proper file name for the real test later on.
38410   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38411   if test "x$test_shortpath" = x; then
38412     # Short path failed, file does not exist as specified.
38413     # Try adding .exe or .cmd
38414     if test -f "${new_path}.exe"; then
38415       input_to_shortpath="${new_path}.exe"
38416     elif test -f "${new_path}.cmd"; then
38417       input_to_shortpath="${new_path}.cmd"
38418     else
38419       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38420 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38421       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38422 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38423       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38424     fi
38425   else
38426     input_to_shortpath="$new_path"
38427   fi
38428 
38429   # Call helper function which possibly converts this using DOS-style short mode.
38430   # If so, the updated path is stored in $new_path.
38431   new_path="$input_to_shortpath"
38432 
38433   input_path="$input_to_shortpath"
38434   # Check if we need to convert this using DOS-style short mode. If the path
38435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38436   # take no chances and rewrite it.
38437   # Note: m4 eats our [], so we need to use [ and ] instead.
38438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38439   if test "x$has_forbidden_chars" != x; then
38440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38441     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38442     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38443     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38444       # Going to short mode and back again did indeed matter. Since short mode is
38445       # case insensitive, let's make it lowercase to improve readability.
38446       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38447       # Now convert it back to Unix-stile (cygpath)
38448       input_path=`$CYGPATH -u "$shortmode_path"`
38449       new_path="$input_path"
38450     fi
38451   fi
38452 
38453   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38454   if test "x$test_cygdrive_prefix" = x; then
38455     # As a simple fix, exclude /usr/bin since it's not a real path.
38456     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38457       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38458       # a path prefixed by /cygdrive for fixpath to work.
38459       new_path="$CYGWIN_ROOT_PATH$input_path"
38460     fi
38461   fi
38462 
38463   # remove trailing .exe if any
38464   new_path="${new_path/%.exe/}"
38465 
38466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38467 
38468   # First separate the path from the arguments. This will split at the first
38469   # space.
38470   complete="$OBJCOPY"
38471   path="${complete%% *}"
38472   tmp="$complete EOL"
38473   arguments="${tmp#* }"
38474 
38475   # Input might be given as Windows format, start by converting to
38476   # unix format.
38477   new_path="$path"
38478 
38479   windows_path="$new_path"
38480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38481     unix_path=`$CYGPATH -u "$windows_path"`
38482     new_path="$unix_path"
38483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38485     new_path="$unix_path"
38486   fi
38487 
38488 
38489   # Now try to locate executable using which
38490   new_path=`$WHICH "$new_path" 2> /dev/null`
38491 
38492   if test "x$new_path" = x; then
38493     # Oops. Which didn't find the executable.
38494     # The splitting of arguments from the executable at a space might have been incorrect,
38495     # since paths with space are more likely in Windows. Give it another try with the whole
38496     # argument.
38497     path="$complete"
38498     arguments="EOL"
38499     new_path="$path"
38500 
38501   windows_path="$new_path"
38502   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38503     unix_path=`$CYGPATH -u "$windows_path"`
38504     new_path="$unix_path"
38505   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38506     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38507     new_path="$unix_path"
38508   fi
38509 
38510 
38511     new_path=`$WHICH "$new_path" 2> /dev/null`
38512     # bat and cmd files are not always considered executable in MSYS causing which
38513     # to not find them
38514     if test "x$new_path" = x \
38515         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38516         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38517       new_path="$path"
38518 
38519   windows_path="$new_path"
38520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38521     unix_path=`$CYGPATH -u "$windows_path"`
38522     new_path="$unix_path"
38523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38525     new_path="$unix_path"
38526   fi
38527 
38528     fi
38529 
38530     if test "x$new_path" = x; then
38531       # It's still not found. Now this is an unrecoverable error.
38532       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38533 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38534       has_space=`$ECHO "$complete" | $GREP " "`
38535       if test "x$has_space" != x; then
38536         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38537 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38538       fi
38539       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38540     fi
38541   fi
38542 
38543   # Now new_path has a complete unix path to the binary
38544   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38545     # Keep paths in /bin as-is, but remove trailing .exe if any
38546     new_path="${new_path/%.exe/}"
38547     # Do not save /bin paths to all_fixpath_prefixes!
38548   else
38549     # Not in mixed or Windows style, start by that.
38550     new_path=`cmd //c echo $new_path`
38551 
38552   input_path="$new_path"
38553   # Check if we need to convert this using DOS-style short mode. If the path
38554   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38555   # take no chances and rewrite it.
38556   # Note: m4 eats our [], so we need to use [ and ] instead.
38557   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38558   if test "x$has_forbidden_chars" != x; then
38559     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38560     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38561   fi
38562 
38563     # Output is in $new_path
38564 
38565   windows_path="$new_path"
38566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38567     unix_path=`$CYGPATH -u "$windows_path"`
38568     new_path="$unix_path"
38569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38571     new_path="$unix_path"
38572   fi
38573 
38574     # remove trailing .exe if any
38575     new_path="${new_path/%.exe/}"
38576 
38577     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38578     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38579   fi
38580 
38581   else
38582     # We're on a unix platform. Hooray! :)
38583     # First separate the path from the arguments. This will split at the first
38584     # space.
38585     complete="$OBJCOPY"
38586     path="${complete%% *}"
38587     tmp="$complete EOL"
38588     arguments="${tmp#* }"
38589 
38590     # Cannot rely on the command "which" here since it doesn't always work.
38591     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38592     if test -z "$is_absolute_path"; then
38593       # Path to executable is not absolute. Find it.
38594       IFS_save="$IFS"
38595       IFS=:
38596       for p in $PATH; do
38597         if test -f "$p/$path" && test -x "$p/$path"; then
38598           new_path="$p/$path"
38599           break
38600         fi
38601       done
38602       IFS="$IFS_save"
38603     else
38604       # This is an absolute path, we can use it without further modifications.
38605       new_path="$path"
38606     fi
38607 
38608     if test "x$new_path" = x; then
38609       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38610 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38611       has_space=`$ECHO "$complete" | $GREP " "`
38612       if test "x$has_space" != x; then
38613         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38614 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38615       fi
38616       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38617     fi
38618   fi
38619 
38620   # Now join together the path and the arguments once again
38621   if test "x$arguments" != xEOL; then
38622     new_complete="$new_path ${arguments% *}"
38623   else
38624     new_complete="$new_path"
38625   fi
38626 
38627   if test "x$complete" != "x$new_complete"; then
38628     OBJCOPY="$new_complete"
38629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38630 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38631   fi
38632 
38633     fi
38634   fi
38635 
38636 
38637 
38638   # Publish this variable in the help.
38639 
38640 
38641   if test "x$OBJDUMP" = x; then
38642     # The variable is not set by user, try to locate tool using the code snippet
38643     if test -n "$ac_tool_prefix"; then
38644   for ac_prog in gobjdump objdump
38645   do
38646     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38647 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38649 $as_echo_n "checking for $ac_word... " >&6; }
38650 if ${ac_cv_prog_OBJDUMP+:} false; then :
38651   $as_echo_n "(cached) " >&6
38652 else
38653   if test -n "$OBJDUMP"; then
38654   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38655 else
38656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38657 for as_dir in $PATH
38658 do
38659   IFS=$as_save_IFS
38660   test -z "$as_dir" && as_dir=.
38661     for ac_exec_ext in '' $ac_executable_extensions; do
38662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38663     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38665     break 2
38666   fi
38667 done
38668   done
38669 IFS=$as_save_IFS
38670 
38671 fi
38672 fi
38673 OBJDUMP=$ac_cv_prog_OBJDUMP
38674 if test -n "$OBJDUMP"; then
38675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38676 $as_echo "$OBJDUMP" >&6; }
38677 else
38678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38679 $as_echo "no" >&6; }
38680 fi
38681 
38682 
38683     test -n "$OBJDUMP" && break
38684   done
38685 fi
38686 if test -z "$OBJDUMP"; then
38687   ac_ct_OBJDUMP=$OBJDUMP
38688   for ac_prog in gobjdump objdump
38689 do
38690   # Extract the first word of "$ac_prog", so it can be a program name with args.
38691 set dummy $ac_prog; ac_word=$2
38692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38693 $as_echo_n "checking for $ac_word... " >&6; }
38694 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38695   $as_echo_n "(cached) " >&6
38696 else
38697   if test -n "$ac_ct_OBJDUMP"; then
38698   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38699 else
38700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38701 for as_dir in $PATH
38702 do
38703   IFS=$as_save_IFS
38704   test -z "$as_dir" && as_dir=.
38705     for ac_exec_ext in '' $ac_executable_extensions; do
38706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38707     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38709     break 2
38710   fi
38711 done
38712   done
38713 IFS=$as_save_IFS
38714 
38715 fi
38716 fi
38717 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38718 if test -n "$ac_ct_OBJDUMP"; then
38719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38720 $as_echo "$ac_ct_OBJDUMP" >&6; }
38721 else
38722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38723 $as_echo "no" >&6; }
38724 fi
38725 
38726 
38727   test -n "$ac_ct_OBJDUMP" && break
38728 done
38729 
38730   if test "x$ac_ct_OBJDUMP" = x; then
38731     OBJDUMP=""
38732   else
38733     case $cross_compiling:$ac_tool_warned in
38734 yes:)
38735 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38736 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38737 ac_tool_warned=yes ;;
38738 esac
38739     OBJDUMP=$ac_ct_OBJDUMP
38740   fi
38741 fi
38742 
38743   else
38744     # The variable is set, but is it from the command line or the environment?
38745 
38746     # Try to remove the string !OBJDUMP! from our list.
38747     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38748     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38749       # If it failed, the variable was not from the command line. Ignore it,
38750       # but warn the user (except for BASH, which is always set by the calling BASH).
38751       if test "xOBJDUMP" != xBASH; then
38752         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38753 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38754       fi
38755       # Try to locate tool using the code snippet
38756       if test -n "$ac_tool_prefix"; then
38757   for ac_prog in gobjdump objdump
38758   do
38759     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38760 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38762 $as_echo_n "checking for $ac_word... " >&6; }
38763 if ${ac_cv_prog_OBJDUMP+:} false; then :
38764   $as_echo_n "(cached) " >&6
38765 else
38766   if test -n "$OBJDUMP"; then
38767   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38768 else
38769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38770 for as_dir in $PATH
38771 do
38772   IFS=$as_save_IFS
38773   test -z "$as_dir" && as_dir=.
38774     for ac_exec_ext in '' $ac_executable_extensions; do
38775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38776     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38778     break 2
38779   fi
38780 done
38781   done
38782 IFS=$as_save_IFS
38783 
38784 fi
38785 fi
38786 OBJDUMP=$ac_cv_prog_OBJDUMP
38787 if test -n "$OBJDUMP"; then
38788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38789 $as_echo "$OBJDUMP" >&6; }
38790 else
38791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38792 $as_echo "no" >&6; }
38793 fi
38794 
38795 
38796     test -n "$OBJDUMP" && break
38797   done
38798 fi
38799 if test -z "$OBJDUMP"; then
38800   ac_ct_OBJDUMP=$OBJDUMP
38801   for ac_prog in gobjdump objdump
38802 do
38803   # Extract the first word of "$ac_prog", so it can be a program name with args.
38804 set dummy $ac_prog; ac_word=$2
38805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38806 $as_echo_n "checking for $ac_word... " >&6; }
38807 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38808   $as_echo_n "(cached) " >&6
38809 else
38810   if test -n "$ac_ct_OBJDUMP"; then
38811   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38812 else
38813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38814 for as_dir in $PATH
38815 do
38816   IFS=$as_save_IFS
38817   test -z "$as_dir" && as_dir=.
38818     for ac_exec_ext in '' $ac_executable_extensions; do
38819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38820     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38822     break 2
38823   fi
38824 done
38825   done
38826 IFS=$as_save_IFS
38827 
38828 fi
38829 fi
38830 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38831 if test -n "$ac_ct_OBJDUMP"; then
38832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38833 $as_echo "$ac_ct_OBJDUMP" >&6; }
38834 else
38835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38836 $as_echo "no" >&6; }
38837 fi
38838 
38839 
38840   test -n "$ac_ct_OBJDUMP" && break
38841 done
38842 
38843   if test "x$ac_ct_OBJDUMP" = x; then
38844     OBJDUMP=""
38845   else
38846     case $cross_compiling:$ac_tool_warned in
38847 yes:)
38848 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38849 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38850 ac_tool_warned=yes ;;
38851 esac
38852     OBJDUMP=$ac_ct_OBJDUMP
38853   fi
38854 fi
38855 
38856     else
38857       # If it succeeded, then it was overridden by the user. We will use it
38858       # for the tool.
38859 
38860       # First remove it from the list of overridden variables, so we can test
38861       # for unknown variables in the end.
38862       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38863 
38864       # Check if the provided tool contains a complete path.
38865       tool_specified="$OBJDUMP"
38866       tool_basename="${tool_specified##*/}"
38867       if test "x$tool_basename" = "x$tool_specified"; then
38868         # A command without a complete path is provided, search $PATH.
38869         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38870 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38871         # Extract the first word of "$tool_basename", so it can be a program name with args.
38872 set dummy $tool_basename; ac_word=$2
38873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38874 $as_echo_n "checking for $ac_word... " >&6; }
38875 if ${ac_cv_path_OBJDUMP+:} false; then :
38876   $as_echo_n "(cached) " >&6
38877 else
38878   case $OBJDUMP in
38879   [\\/]* | ?:[\\/]*)
38880   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38881   ;;
38882   *)
38883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38884 for as_dir in $PATH
38885 do
38886   IFS=$as_save_IFS
38887   test -z "$as_dir" && as_dir=.
38888     for ac_exec_ext in '' $ac_executable_extensions; do
38889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38890     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38892     break 2
38893   fi
38894 done
38895   done
38896 IFS=$as_save_IFS
38897 
38898   ;;
38899 esac
38900 fi
38901 OBJDUMP=$ac_cv_path_OBJDUMP
38902 if test -n "$OBJDUMP"; then
38903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38904 $as_echo "$OBJDUMP" >&6; }
38905 else
38906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38907 $as_echo "no" >&6; }
38908 fi
38909 
38910 
38911         if test "x$OBJDUMP" = x; then
38912           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38913         fi
38914       else
38915         # Otherwise we believe it is a complete path. Use it as it is.
38916         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38917 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38918         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38919 $as_echo_n "checking for OBJDUMP... " >&6; }
38920         if test ! -x "$tool_specified"; then
38921           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38922 $as_echo "not found" >&6; }
38923           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38924         fi
38925         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38926 $as_echo "$tool_specified" >&6; }
38927       fi
38928     fi
38929   fi
38930 
38931 
38932   if test "x$OBJDUMP" != x; then
38933     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38934     # bails if argument is missing.
38935 
38936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38937 
38938   # First separate the path from the arguments. This will split at the first
38939   # space.
38940   complete="$OBJDUMP"
38941   path="${complete%% *}"
38942   tmp="$complete EOL"
38943   arguments="${tmp#* }"
38944 
38945   # Input might be given as Windows format, start by converting to
38946   # unix format.
38947   new_path=`$CYGPATH -u "$path"`
38948 
38949   # Now try to locate executable using which
38950   new_path=`$WHICH "$new_path" 2> /dev/null`
38951   # bat and cmd files are not always considered executable in cygwin causing which
38952   # to not find them
38953   if test "x$new_path" = x \
38954       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38955       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38956     new_path=`$CYGPATH -u "$path"`
38957   fi
38958   if test "x$new_path" = x; then
38959     # Oops. Which didn't find the executable.
38960     # The splitting of arguments from the executable at a space might have been incorrect,
38961     # since paths with space are more likely in Windows. Give it another try with the whole
38962     # argument.
38963     path="$complete"
38964     arguments="EOL"
38965     new_path=`$CYGPATH -u "$path"`
38966     new_path=`$WHICH "$new_path" 2> /dev/null`
38967     # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
38973     fi
38974     if test "x$new_path" = x; then
38975       # It's still not found. Now this is an unrecoverable error.
38976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38977 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38978       has_space=`$ECHO "$complete" | $GREP " "`
38979       if test "x$has_space" != x; then
38980         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38981 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38982       fi
38983       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38984     fi
38985   fi
38986 
38987   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38988   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38989   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38990   # "foo.exe" is OK but "foo" is an error.
38991   #
38992   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38993   # It is also a way to make sure we got the proper file name for the real test later on.
38994   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38995   if test "x$test_shortpath" = x; then
38996     # Short path failed, file does not exist as specified.
38997     # Try adding .exe or .cmd
38998     if test -f "${new_path}.exe"; then
38999       input_to_shortpath="${new_path}.exe"
39000     elif test -f "${new_path}.cmd"; then
39001       input_to_shortpath="${new_path}.cmd"
39002     else
39003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39004 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39005       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39006 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39007       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39008     fi
39009   else
39010     input_to_shortpath="$new_path"
39011   fi
39012 
39013   # Call helper function which possibly converts this using DOS-style short mode.
39014   # If so, the updated path is stored in $new_path.
39015   new_path="$input_to_shortpath"
39016 
39017   input_path="$input_to_shortpath"
39018   # Check if we need to convert this using DOS-style short mode. If the path
39019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39020   # take no chances and rewrite it.
39021   # Note: m4 eats our [], so we need to use [ and ] instead.
39022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39023   if test "x$has_forbidden_chars" != x; then
39024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39025     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39026     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39027     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39028       # Going to short mode and back again did indeed matter. Since short mode is
39029       # case insensitive, let's make it lowercase to improve readability.
39030       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39031       # Now convert it back to Unix-stile (cygpath)
39032       input_path=`$CYGPATH -u "$shortmode_path"`
39033       new_path="$input_path"
39034     fi
39035   fi
39036 
39037   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39038   if test "x$test_cygdrive_prefix" = x; then
39039     # As a simple fix, exclude /usr/bin since it's not a real path.
39040     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39041       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39042       # a path prefixed by /cygdrive for fixpath to work.
39043       new_path="$CYGWIN_ROOT_PATH$input_path"
39044     fi
39045   fi
39046 
39047   # remove trailing .exe if any
39048   new_path="${new_path/%.exe/}"
39049 
39050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39051 
39052   # First separate the path from the arguments. This will split at the first
39053   # space.
39054   complete="$OBJDUMP"
39055   path="${complete%% *}"
39056   tmp="$complete EOL"
39057   arguments="${tmp#* }"
39058 
39059   # Input might be given as Windows format, start by converting to
39060   # unix format.
39061   new_path="$path"
39062 
39063   windows_path="$new_path"
39064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39065     unix_path=`$CYGPATH -u "$windows_path"`
39066     new_path="$unix_path"
39067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39069     new_path="$unix_path"
39070   fi
39071 
39072 
39073   # Now try to locate executable using which
39074   new_path=`$WHICH "$new_path" 2> /dev/null`
39075 
39076   if test "x$new_path" = x; then
39077     # Oops. Which didn't find the executable.
39078     # The splitting of arguments from the executable at a space might have been incorrect,
39079     # since paths with space are more likely in Windows. Give it another try with the whole
39080     # argument.
39081     path="$complete"
39082     arguments="EOL"
39083     new_path="$path"
39084 
39085   windows_path="$new_path"
39086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39087     unix_path=`$CYGPATH -u "$windows_path"`
39088     new_path="$unix_path"
39089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39090     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39091     new_path="$unix_path"
39092   fi
39093 
39094 
39095     new_path=`$WHICH "$new_path" 2> /dev/null`
39096     # bat and cmd files are not always considered executable in MSYS causing which
39097     # to not find them
39098     if test "x$new_path" = x \
39099         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39100         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39101       new_path="$path"
39102 
39103   windows_path="$new_path"
39104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39105     unix_path=`$CYGPATH -u "$windows_path"`
39106     new_path="$unix_path"
39107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39109     new_path="$unix_path"
39110   fi
39111 
39112     fi
39113 
39114     if test "x$new_path" = x; then
39115       # It's still not found. Now this is an unrecoverable error.
39116       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39117 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39118       has_space=`$ECHO "$complete" | $GREP " "`
39119       if test "x$has_space" != x; then
39120         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39121 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39122       fi
39123       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39124     fi
39125   fi
39126 
39127   # Now new_path has a complete unix path to the binary
39128   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39129     # Keep paths in /bin as-is, but remove trailing .exe if any
39130     new_path="${new_path/%.exe/}"
39131     # Do not save /bin paths to all_fixpath_prefixes!
39132   else
39133     # Not in mixed or Windows style, start by that.
39134     new_path=`cmd //c echo $new_path`
39135 
39136   input_path="$new_path"
39137   # Check if we need to convert this using DOS-style short mode. If the path
39138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39139   # take no chances and rewrite it.
39140   # Note: m4 eats our [], so we need to use [ and ] instead.
39141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39142   if test "x$has_forbidden_chars" != x; then
39143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39144     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39145   fi
39146 
39147     # Output is in $new_path
39148 
39149   windows_path="$new_path"
39150   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39151     unix_path=`$CYGPATH -u "$windows_path"`
39152     new_path="$unix_path"
39153   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39154     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39155     new_path="$unix_path"
39156   fi
39157 
39158     # remove trailing .exe if any
39159     new_path="${new_path/%.exe/}"
39160 
39161     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39162     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39163   fi
39164 
39165   else
39166     # We're on a unix platform. Hooray! :)
39167     # First separate the path from the arguments. This will split at the first
39168     # space.
39169     complete="$OBJDUMP"
39170     path="${complete%% *}"
39171     tmp="$complete EOL"
39172     arguments="${tmp#* }"
39173 
39174     # Cannot rely on the command "which" here since it doesn't always work.
39175     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39176     if test -z "$is_absolute_path"; then
39177       # Path to executable is not absolute. Find it.
39178       IFS_save="$IFS"
39179       IFS=:
39180       for p in $PATH; do
39181         if test -f "$p/$path" && test -x "$p/$path"; then
39182           new_path="$p/$path"
39183           break
39184         fi
39185       done
39186       IFS="$IFS_save"
39187     else
39188       # This is an absolute path, we can use it without further modifications.
39189       new_path="$path"
39190     fi
39191 
39192     if test "x$new_path" = x; then
39193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39194 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39195       has_space=`$ECHO "$complete" | $GREP " "`
39196       if test "x$has_space" != x; then
39197         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39198 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39199       fi
39200       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39201     fi
39202   fi
39203 
39204   # Now join together the path and the arguments once again
39205   if test "x$arguments" != xEOL; then
39206     new_complete="$new_path ${arguments% *}"
39207   else
39208     new_complete="$new_path"
39209   fi
39210 
39211   if test "x$complete" != "x$new_complete"; then
39212     OBJDUMP="$new_complete"
39213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39214 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39215   fi
39216 
39217   fi
39218 
39219 
39220   # Restore old path.
39221   PATH="$OLD_PATH"
39222 
39223   # Restore the flags to the user specified values.
39224   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39225   CFLAGS="$ORG_CFLAGS"
39226   CXXFLAGS="$ORG_CXXFLAGS"
39227   OBJCFLAGS="$ORG_OBJCFLAGS"
39228 
39229 
39230 # Finally do some processing after the detection phase
39231 
39232   if test "x$COMPILE_TYPE" = "xcross"; then
39233     # Now we need to find a C/C++ compiler that can build executables for the
39234     # build platform. We can't use the AC_PROG_CC macro, since it can only be
39235     # used once. Also, we need to do this without adding a tools dir to the
39236     # path, otherwise we might pick up cross-compilers which don't use standard
39237     # naming.
39238 
39239     # FIXME: we should list the discovered compilers as an exclude pattern!
39240     # If we do that, we can do this detection before POST_DETECTION, and still
39241     # find the build compilers in the tools dir, if needed.
39242 
39243 
39244   # Publish this variable in the help.
39245 
39246 
39247   if test "x$BUILD_CC" = x; then
39248     # The variable is not set by user, try to locate tool using the code snippet
39249     for ac_prog in cl cc gcc
39250 do
39251   # Extract the first word of "$ac_prog", so it can be a program name with args.
39252 set dummy $ac_prog; ac_word=$2
39253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39254 $as_echo_n "checking for $ac_word... " >&6; }
39255 if ${ac_cv_path_BUILD_CC+:} false; then :
39256   $as_echo_n "(cached) " >&6
39257 else
39258   case $BUILD_CC in
39259   [\\/]* | ?:[\\/]*)
39260   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39261   ;;
39262   *)
39263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39264 for as_dir in $PATH
39265 do
39266   IFS=$as_save_IFS
39267   test -z "$as_dir" && as_dir=.
39268     for ac_exec_ext in '' $ac_executable_extensions; do
39269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39270     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39272     break 2
39273   fi
39274 done
39275   done
39276 IFS=$as_save_IFS
39277 
39278   ;;
39279 esac
39280 fi
39281 BUILD_CC=$ac_cv_path_BUILD_CC
39282 if test -n "$BUILD_CC"; then
39283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39284 $as_echo "$BUILD_CC" >&6; }
39285 else
39286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39287 $as_echo "no" >&6; }
39288 fi
39289 
39290 
39291   test -n "$BUILD_CC" && break
39292 done
39293 
39294   else
39295     # The variable is set, but is it from the command line or the environment?
39296 
39297     # Try to remove the string !BUILD_CC! from our list.
39298     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39299     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39300       # If it failed, the variable was not from the command line. Ignore it,
39301       # but warn the user (except for BASH, which is always set by the calling BASH).
39302       if test "xBUILD_CC" != xBASH; then
39303         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39304 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39305       fi
39306       # Try to locate tool using the code snippet
39307       for ac_prog in cl cc gcc
39308 do
39309   # Extract the first word of "$ac_prog", so it can be a program name with args.
39310 set dummy $ac_prog; ac_word=$2
39311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39312 $as_echo_n "checking for $ac_word... " >&6; }
39313 if ${ac_cv_path_BUILD_CC+:} false; then :
39314   $as_echo_n "(cached) " >&6
39315 else
39316   case $BUILD_CC in
39317   [\\/]* | ?:[\\/]*)
39318   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39319   ;;
39320   *)
39321   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39322 for as_dir in $PATH
39323 do
39324   IFS=$as_save_IFS
39325   test -z "$as_dir" && as_dir=.
39326     for ac_exec_ext in '' $ac_executable_extensions; do
39327   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39328     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39330     break 2
39331   fi
39332 done
39333   done
39334 IFS=$as_save_IFS
39335 
39336   ;;
39337 esac
39338 fi
39339 BUILD_CC=$ac_cv_path_BUILD_CC
39340 if test -n "$BUILD_CC"; then
39341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39342 $as_echo "$BUILD_CC" >&6; }
39343 else
39344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39345 $as_echo "no" >&6; }
39346 fi
39347 
39348 
39349   test -n "$BUILD_CC" && break
39350 done
39351 
39352     else
39353       # If it succeeded, then it was overridden by the user. We will use it
39354       # for the tool.
39355 
39356       # First remove it from the list of overridden variables, so we can test
39357       # for unknown variables in the end.
39358       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39359 
39360       # Check if the provided tool contains a complete path.
39361       tool_specified="$BUILD_CC"
39362       tool_basename="${tool_specified##*/}"
39363       if test "x$tool_basename" = "x$tool_specified"; then
39364         # A command without a complete path is provided, search $PATH.
39365         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39366 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39367         # Extract the first word of "$tool_basename", so it can be a program name with args.
39368 set dummy $tool_basename; ac_word=$2
39369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39370 $as_echo_n "checking for $ac_word... " >&6; }
39371 if ${ac_cv_path_BUILD_CC+:} false; then :
39372   $as_echo_n "(cached) " >&6
39373 else
39374   case $BUILD_CC in
39375   [\\/]* | ?:[\\/]*)
39376   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39377   ;;
39378   *)
39379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39380 for as_dir in $PATH
39381 do
39382   IFS=$as_save_IFS
39383   test -z "$as_dir" && as_dir=.
39384     for ac_exec_ext in '' $ac_executable_extensions; do
39385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39386     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39388     break 2
39389   fi
39390 done
39391   done
39392 IFS=$as_save_IFS
39393 
39394   ;;
39395 esac
39396 fi
39397 BUILD_CC=$ac_cv_path_BUILD_CC
39398 if test -n "$BUILD_CC"; then
39399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39400 $as_echo "$BUILD_CC" >&6; }
39401 else
39402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39403 $as_echo "no" >&6; }
39404 fi
39405 
39406 
39407         if test "x$BUILD_CC" = x; then
39408           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39409         fi
39410       else
39411         # Otherwise we believe it is a complete path. Use it as it is.
39412         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39413 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39414         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39415 $as_echo_n "checking for BUILD_CC... " >&6; }
39416         if test ! -x "$tool_specified"; then
39417           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39418 $as_echo "not found" >&6; }
39419           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39420         fi
39421         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39422 $as_echo "$tool_specified" >&6; }
39423       fi
39424     fi
39425   fi
39426 
39427 
39428 
39429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39430 
39431   # First separate the path from the arguments. This will split at the first
39432   # space.
39433   complete="$BUILD_CC"
39434   path="${complete%% *}"
39435   tmp="$complete EOL"
39436   arguments="${tmp#* }"
39437 
39438   # Input might be given as Windows format, start by converting to
39439   # unix format.
39440   new_path=`$CYGPATH -u "$path"`
39441 
39442   # Now try to locate executable using which
39443   new_path=`$WHICH "$new_path" 2> /dev/null`
39444   # bat and cmd files are not always considered executable in cygwin causing which
39445   # to not find them
39446   if test "x$new_path" = x \
39447       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39448       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39449     new_path=`$CYGPATH -u "$path"`
39450   fi
39451   if test "x$new_path" = x; then
39452     # Oops. Which didn't find the executable.
39453     # The splitting of arguments from the executable at a space might have been incorrect,
39454     # since paths with space are more likely in Windows. Give it another try with the whole
39455     # argument.
39456     path="$complete"
39457     arguments="EOL"
39458     new_path=`$CYGPATH -u "$path"`
39459     new_path=`$WHICH "$new_path" 2> /dev/null`
39460     # bat and cmd files are not always considered executable in cygwin causing which
39461     # to not find them
39462     if test "x$new_path" = x \
39463         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39464         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39465       new_path=`$CYGPATH -u "$path"`
39466     fi
39467     if test "x$new_path" = x; then
39468       # It's still not found. Now this is an unrecoverable error.
39469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39470 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39471       has_space=`$ECHO "$complete" | $GREP " "`
39472       if test "x$has_space" != x; then
39473         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39474 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39475       fi
39476       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39477     fi
39478   fi
39479 
39480   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39481   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39482   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39483   # "foo.exe" is OK but "foo" is an error.
39484   #
39485   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39486   # It is also a way to make sure we got the proper file name for the real test later on.
39487   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39488   if test "x$test_shortpath" = x; then
39489     # Short path failed, file does not exist as specified.
39490     # Try adding .exe or .cmd
39491     if test -f "${new_path}.exe"; then
39492       input_to_shortpath="${new_path}.exe"
39493     elif test -f "${new_path}.cmd"; then
39494       input_to_shortpath="${new_path}.cmd"
39495     else
39496       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39497 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39498       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39499 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39500       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39501     fi
39502   else
39503     input_to_shortpath="$new_path"
39504   fi
39505 
39506   # Call helper function which possibly converts this using DOS-style short mode.
39507   # If so, the updated path is stored in $new_path.
39508   new_path="$input_to_shortpath"
39509 
39510   input_path="$input_to_shortpath"
39511   # Check if we need to convert this using DOS-style short mode. If the path
39512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39513   # take no chances and rewrite it.
39514   # Note: m4 eats our [], so we need to use [ and ] instead.
39515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39516   if test "x$has_forbidden_chars" != x; then
39517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39518     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39519     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39520     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39521       # Going to short mode and back again did indeed matter. Since short mode is
39522       # case insensitive, let's make it lowercase to improve readability.
39523       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39524       # Now convert it back to Unix-stile (cygpath)
39525       input_path=`$CYGPATH -u "$shortmode_path"`
39526       new_path="$input_path"
39527     fi
39528   fi
39529 
39530   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39531   if test "x$test_cygdrive_prefix" = x; then
39532     # As a simple fix, exclude /usr/bin since it's not a real path.
39533     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39534       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39535       # a path prefixed by /cygdrive for fixpath to work.
39536       new_path="$CYGWIN_ROOT_PATH$input_path"
39537     fi
39538   fi
39539 
39540   # remove trailing .exe if any
39541   new_path="${new_path/%.exe/}"
39542 
39543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39544 
39545   # First separate the path from the arguments. This will split at the first
39546   # space.
39547   complete="$BUILD_CC"
39548   path="${complete%% *}"
39549   tmp="$complete EOL"
39550   arguments="${tmp#* }"
39551 
39552   # Input might be given as Windows format, start by converting to
39553   # unix format.
39554   new_path="$path"
39555 
39556   windows_path="$new_path"
39557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39558     unix_path=`$CYGPATH -u "$windows_path"`
39559     new_path="$unix_path"
39560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39562     new_path="$unix_path"
39563   fi
39564 
39565 
39566   # Now try to locate executable using which
39567   new_path=`$WHICH "$new_path" 2> /dev/null`
39568 
39569   if test "x$new_path" = x; then
39570     # Oops. Which didn't find the executable.
39571     # The splitting of arguments from the executable at a space might have been incorrect,
39572     # since paths with space are more likely in Windows. Give it another try with the whole
39573     # argument.
39574     path="$complete"
39575     arguments="EOL"
39576     new_path="$path"
39577 
39578   windows_path="$new_path"
39579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39580     unix_path=`$CYGPATH -u "$windows_path"`
39581     new_path="$unix_path"
39582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39584     new_path="$unix_path"
39585   fi
39586 
39587 
39588     new_path=`$WHICH "$new_path" 2> /dev/null`
39589     # bat and cmd files are not always considered executable in MSYS causing which
39590     # to not find them
39591     if test "x$new_path" = x \
39592         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39593         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39594       new_path="$path"
39595 
39596   windows_path="$new_path"
39597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39598     unix_path=`$CYGPATH -u "$windows_path"`
39599     new_path="$unix_path"
39600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39602     new_path="$unix_path"
39603   fi
39604 
39605     fi
39606 
39607     if test "x$new_path" = x; then
39608       # It's still not found. Now this is an unrecoverable error.
39609       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39610 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39611       has_space=`$ECHO "$complete" | $GREP " "`
39612       if test "x$has_space" != x; then
39613         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39614 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39615       fi
39616       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39617     fi
39618   fi
39619 
39620   # Now new_path has a complete unix path to the binary
39621   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39622     # Keep paths in /bin as-is, but remove trailing .exe if any
39623     new_path="${new_path/%.exe/}"
39624     # Do not save /bin paths to all_fixpath_prefixes!
39625   else
39626     # Not in mixed or Windows style, start by that.
39627     new_path=`cmd //c echo $new_path`
39628 
39629   input_path="$new_path"
39630   # Check if we need to convert this using DOS-style short mode. If the path
39631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39632   # take no chances and rewrite it.
39633   # Note: m4 eats our [], so we need to use [ and ] instead.
39634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39635   if test "x$has_forbidden_chars" != x; then
39636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39637     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39638   fi
39639 
39640     # Output is in $new_path
39641 
39642   windows_path="$new_path"
39643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39644     unix_path=`$CYGPATH -u "$windows_path"`
39645     new_path="$unix_path"
39646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39648     new_path="$unix_path"
39649   fi
39650 
39651     # remove trailing .exe if any
39652     new_path="${new_path/%.exe/}"
39653 
39654     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39655     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39656   fi
39657 
39658   else
39659     # We're on a unix platform. Hooray! :)
39660     # First separate the path from the arguments. This will split at the first
39661     # space.
39662     complete="$BUILD_CC"
39663     path="${complete%% *}"
39664     tmp="$complete EOL"
39665     arguments="${tmp#* }"
39666 
39667     # Cannot rely on the command "which" here since it doesn't always work.
39668     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39669     if test -z "$is_absolute_path"; then
39670       # Path to executable is not absolute. Find it.
39671       IFS_save="$IFS"
39672       IFS=:
39673       for p in $PATH; do
39674         if test -f "$p/$path" && test -x "$p/$path"; then
39675           new_path="$p/$path"
39676           break
39677         fi
39678       done
39679       IFS="$IFS_save"
39680     else
39681       # This is an absolute path, we can use it without further modifications.
39682       new_path="$path"
39683     fi
39684 
39685     if test "x$new_path" = x; then
39686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39687 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39688       has_space=`$ECHO "$complete" | $GREP " "`
39689       if test "x$has_space" != x; then
39690         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39691 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39692       fi
39693       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39694     fi
39695   fi
39696 
39697   # Now join together the path and the arguments once again
39698   if test "x$arguments" != xEOL; then
39699     new_complete="$new_path ${arguments% *}"
39700   else
39701     new_complete="$new_path"
39702   fi
39703 
39704   if test "x$complete" != "x$new_complete"; then
39705     BUILD_CC="$new_complete"
39706     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39707 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39708   fi
39709 
39710 
39711 
39712   # Publish this variable in the help.
39713 
39714 
39715   if test "x$BUILD_CXX" = x; then
39716     # The variable is not set by user, try to locate tool using the code snippet
39717     for ac_prog in cl CC g++
39718 do
39719   # Extract the first word of "$ac_prog", so it can be a program name with args.
39720 set dummy $ac_prog; ac_word=$2
39721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39722 $as_echo_n "checking for $ac_word... " >&6; }
39723 if ${ac_cv_path_BUILD_CXX+:} false; then :
39724   $as_echo_n "(cached) " >&6
39725 else
39726   case $BUILD_CXX in
39727   [\\/]* | ?:[\\/]*)
39728   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39729   ;;
39730   *)
39731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39732 for as_dir in $PATH
39733 do
39734   IFS=$as_save_IFS
39735   test -z "$as_dir" && as_dir=.
39736     for ac_exec_ext in '' $ac_executable_extensions; do
39737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39738     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39740     break 2
39741   fi
39742 done
39743   done
39744 IFS=$as_save_IFS
39745 
39746   ;;
39747 esac
39748 fi
39749 BUILD_CXX=$ac_cv_path_BUILD_CXX
39750 if test -n "$BUILD_CXX"; then
39751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39752 $as_echo "$BUILD_CXX" >&6; }
39753 else
39754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39755 $as_echo "no" >&6; }
39756 fi
39757 
39758 
39759   test -n "$BUILD_CXX" && break
39760 done
39761 
39762   else
39763     # The variable is set, but is it from the command line or the environment?
39764 
39765     # Try to remove the string !BUILD_CXX! from our list.
39766     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39767     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39768       # If it failed, the variable was not from the command line. Ignore it,
39769       # but warn the user (except for BASH, which is always set by the calling BASH).
39770       if test "xBUILD_CXX" != xBASH; then
39771         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39772 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39773       fi
39774       # Try to locate tool using the code snippet
39775       for ac_prog in cl CC g++
39776 do
39777   # Extract the first word of "$ac_prog", so it can be a program name with args.
39778 set dummy $ac_prog; ac_word=$2
39779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39780 $as_echo_n "checking for $ac_word... " >&6; }
39781 if ${ac_cv_path_BUILD_CXX+:} false; then :
39782   $as_echo_n "(cached) " >&6
39783 else
39784   case $BUILD_CXX in
39785   [\\/]* | ?:[\\/]*)
39786   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39787   ;;
39788   *)
39789   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39790 for as_dir in $PATH
39791 do
39792   IFS=$as_save_IFS
39793   test -z "$as_dir" && as_dir=.
39794     for ac_exec_ext in '' $ac_executable_extensions; do
39795   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39796     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39797     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39798     break 2
39799   fi
39800 done
39801   done
39802 IFS=$as_save_IFS
39803 
39804   ;;
39805 esac
39806 fi
39807 BUILD_CXX=$ac_cv_path_BUILD_CXX
39808 if test -n "$BUILD_CXX"; then
39809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39810 $as_echo "$BUILD_CXX" >&6; }
39811 else
39812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39813 $as_echo "no" >&6; }
39814 fi
39815 
39816 
39817   test -n "$BUILD_CXX" && break
39818 done
39819 
39820     else
39821       # If it succeeded, then it was overridden by the user. We will use it
39822       # for the tool.
39823 
39824       # First remove it from the list of overridden variables, so we can test
39825       # for unknown variables in the end.
39826       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39827 
39828       # Check if the provided tool contains a complete path.
39829       tool_specified="$BUILD_CXX"
39830       tool_basename="${tool_specified##*/}"
39831       if test "x$tool_basename" = "x$tool_specified"; then
39832         # A command without a complete path is provided, search $PATH.
39833         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39834 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39835         # Extract the first word of "$tool_basename", so it can be a program name with args.
39836 set dummy $tool_basename; ac_word=$2
39837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39838 $as_echo_n "checking for $ac_word... " >&6; }
39839 if ${ac_cv_path_BUILD_CXX+:} false; then :
39840   $as_echo_n "(cached) " >&6
39841 else
39842   case $BUILD_CXX in
39843   [\\/]* | ?:[\\/]*)
39844   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39845   ;;
39846   *)
39847   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39848 for as_dir in $PATH
39849 do
39850   IFS=$as_save_IFS
39851   test -z "$as_dir" && as_dir=.
39852     for ac_exec_ext in '' $ac_executable_extensions; do
39853   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39854     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39855     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39856     break 2
39857   fi
39858 done
39859   done
39860 IFS=$as_save_IFS
39861 
39862   ;;
39863 esac
39864 fi
39865 BUILD_CXX=$ac_cv_path_BUILD_CXX
39866 if test -n "$BUILD_CXX"; then
39867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39868 $as_echo "$BUILD_CXX" >&6; }
39869 else
39870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39871 $as_echo "no" >&6; }
39872 fi
39873 
39874 
39875         if test "x$BUILD_CXX" = x; then
39876           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39877         fi
39878       else
39879         # Otherwise we believe it is a complete path. Use it as it is.
39880         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39881 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39882         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39883 $as_echo_n "checking for BUILD_CXX... " >&6; }
39884         if test ! -x "$tool_specified"; then
39885           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39886 $as_echo "not found" >&6; }
39887           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39888         fi
39889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39890 $as_echo "$tool_specified" >&6; }
39891       fi
39892     fi
39893   fi
39894 
39895 
39896 
39897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39898 
39899   # First separate the path from the arguments. This will split at the first
39900   # space.
39901   complete="$BUILD_CXX"
39902   path="${complete%% *}"
39903   tmp="$complete EOL"
39904   arguments="${tmp#* }"
39905 
39906   # Input might be given as Windows format, start by converting to
39907   # unix format.
39908   new_path=`$CYGPATH -u "$path"`
39909 
39910   # Now try to locate executable using which
39911   new_path=`$WHICH "$new_path" 2> /dev/null`
39912   # bat and cmd files are not always considered executable in cygwin causing which
39913   # to not find them
39914   if test "x$new_path" = x \
39915       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39916       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39917     new_path=`$CYGPATH -u "$path"`
39918   fi
39919   if test "x$new_path" = x; then
39920     # Oops. Which didn't find the executable.
39921     # The splitting of arguments from the executable at a space might have been incorrect,
39922     # since paths with space are more likely in Windows. Give it another try with the whole
39923     # argument.
39924     path="$complete"
39925     arguments="EOL"
39926     new_path=`$CYGPATH -u "$path"`
39927     new_path=`$WHICH "$new_path" 2> /dev/null`
39928     # bat and cmd files are not always considered executable in cygwin causing which
39929     # to not find them
39930     if test "x$new_path" = x \
39931         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39932         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39933       new_path=`$CYGPATH -u "$path"`
39934     fi
39935     if test "x$new_path" = x; then
39936       # It's still not found. Now this is an unrecoverable error.
39937       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39938 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39939       has_space=`$ECHO "$complete" | $GREP " "`
39940       if test "x$has_space" != x; then
39941         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39942 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39943       fi
39944       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39945     fi
39946   fi
39947 
39948   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39949   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39950   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39951   # "foo.exe" is OK but "foo" is an error.
39952   #
39953   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39954   # It is also a way to make sure we got the proper file name for the real test later on.
39955   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39956   if test "x$test_shortpath" = x; then
39957     # Short path failed, file does not exist as specified.
39958     # Try adding .exe or .cmd
39959     if test -f "${new_path}.exe"; then
39960       input_to_shortpath="${new_path}.exe"
39961     elif test -f "${new_path}.cmd"; then
39962       input_to_shortpath="${new_path}.cmd"
39963     else
39964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39965 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39966       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39967 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39968       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39969     fi
39970   else
39971     input_to_shortpath="$new_path"
39972   fi
39973 
39974   # Call helper function which possibly converts this using DOS-style short mode.
39975   # If so, the updated path is stored in $new_path.
39976   new_path="$input_to_shortpath"
39977 
39978   input_path="$input_to_shortpath"
39979   # Check if we need to convert this using DOS-style short mode. If the path
39980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39981   # take no chances and rewrite it.
39982   # Note: m4 eats our [], so we need to use [ and ] instead.
39983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39984   if test "x$has_forbidden_chars" != x; then
39985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39986     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39987     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39988     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39989       # Going to short mode and back again did indeed matter. Since short mode is
39990       # case insensitive, let's make it lowercase to improve readability.
39991       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39992       # Now convert it back to Unix-stile (cygpath)
39993       input_path=`$CYGPATH -u "$shortmode_path"`
39994       new_path="$input_path"
39995     fi
39996   fi
39997 
39998   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39999   if test "x$test_cygdrive_prefix" = x; then
40000     # As a simple fix, exclude /usr/bin since it's not a real path.
40001     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40002       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40003       # a path prefixed by /cygdrive for fixpath to work.
40004       new_path="$CYGWIN_ROOT_PATH$input_path"
40005     fi
40006   fi
40007 
40008   # remove trailing .exe if any
40009   new_path="${new_path/%.exe/}"
40010 
40011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40012 
40013   # First separate the path from the arguments. This will split at the first
40014   # space.
40015   complete="$BUILD_CXX"
40016   path="${complete%% *}"
40017   tmp="$complete EOL"
40018   arguments="${tmp#* }"
40019 
40020   # Input might be given as Windows format, start by converting to
40021   # unix format.
40022   new_path="$path"
40023 
40024   windows_path="$new_path"
40025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40026     unix_path=`$CYGPATH -u "$windows_path"`
40027     new_path="$unix_path"
40028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40030     new_path="$unix_path"
40031   fi
40032 
40033 
40034   # Now try to locate executable using which
40035   new_path=`$WHICH "$new_path" 2> /dev/null`
40036 
40037   if test "x$new_path" = x; then
40038     # Oops. Which didn't find the executable.
40039     # The splitting of arguments from the executable at a space might have been incorrect,
40040     # since paths with space are more likely in Windows. Give it another try with the whole
40041     # argument.
40042     path="$complete"
40043     arguments="EOL"
40044     new_path="$path"
40045 
40046   windows_path="$new_path"
40047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40048     unix_path=`$CYGPATH -u "$windows_path"`
40049     new_path="$unix_path"
40050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40052     new_path="$unix_path"
40053   fi
40054 
40055 
40056     new_path=`$WHICH "$new_path" 2> /dev/null`
40057     # bat and cmd files are not always considered executable in MSYS causing which
40058     # to not find them
40059     if test "x$new_path" = x \
40060         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40061         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40062       new_path="$path"
40063 
40064   windows_path="$new_path"
40065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40066     unix_path=`$CYGPATH -u "$windows_path"`
40067     new_path="$unix_path"
40068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40070     new_path="$unix_path"
40071   fi
40072 
40073     fi
40074 
40075     if test "x$new_path" = x; then
40076       # It's still not found. Now this is an unrecoverable error.
40077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40078 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40079       has_space=`$ECHO "$complete" | $GREP " "`
40080       if test "x$has_space" != x; then
40081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40083       fi
40084       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40085     fi
40086   fi
40087 
40088   # Now new_path has a complete unix path to the binary
40089   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40090     # Keep paths in /bin as-is, but remove trailing .exe if any
40091     new_path="${new_path/%.exe/}"
40092     # Do not save /bin paths to all_fixpath_prefixes!
40093   else
40094     # Not in mixed or Windows style, start by that.
40095     new_path=`cmd //c echo $new_path`
40096 
40097   input_path="$new_path"
40098   # Check if we need to convert this using DOS-style short mode. If the path
40099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40100   # take no chances and rewrite it.
40101   # Note: m4 eats our [], so we need to use [ and ] instead.
40102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40103   if test "x$has_forbidden_chars" != x; then
40104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40105     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40106   fi
40107 
40108     # Output is in $new_path
40109 
40110   windows_path="$new_path"
40111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40112     unix_path=`$CYGPATH -u "$windows_path"`
40113     new_path="$unix_path"
40114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40116     new_path="$unix_path"
40117   fi
40118 
40119     # remove trailing .exe if any
40120     new_path="${new_path/%.exe/}"
40121 
40122     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40123     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40124   fi
40125 
40126   else
40127     # We're on a unix platform. Hooray! :)
40128     # First separate the path from the arguments. This will split at the first
40129     # space.
40130     complete="$BUILD_CXX"
40131     path="${complete%% *}"
40132     tmp="$complete EOL"
40133     arguments="${tmp#* }"
40134 
40135     # Cannot rely on the command "which" here since it doesn't always work.
40136     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40137     if test -z "$is_absolute_path"; then
40138       # Path to executable is not absolute. Find it.
40139       IFS_save="$IFS"
40140       IFS=:
40141       for p in $PATH; do
40142         if test -f "$p/$path" && test -x "$p/$path"; then
40143           new_path="$p/$path"
40144           break
40145         fi
40146       done
40147       IFS="$IFS_save"
40148     else
40149       # This is an absolute path, we can use it without further modifications.
40150       new_path="$path"
40151     fi
40152 
40153     if test "x$new_path" = x; then
40154       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40155 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40156       has_space=`$ECHO "$complete" | $GREP " "`
40157       if test "x$has_space" != x; then
40158         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40159 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40160       fi
40161       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40162     fi
40163   fi
40164 
40165   # Now join together the path and the arguments once again
40166   if test "x$arguments" != xEOL; then
40167     new_complete="$new_path ${arguments% *}"
40168   else
40169     new_complete="$new_path"
40170   fi
40171 
40172   if test "x$complete" != "x$new_complete"; then
40173     BUILD_CXX="$new_complete"
40174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40175 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40176   fi
40177 
40178 
40179 
40180   # Publish this variable in the help.
40181 
40182 
40183   if test "x$BUILD_LD" = x; then
40184     # The variable is not set by user, try to locate tool using the code snippet
40185     for ac_prog in ld
40186 do
40187   # Extract the first word of "$ac_prog", so it can be a program name with args.
40188 set dummy $ac_prog; ac_word=$2
40189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40190 $as_echo_n "checking for $ac_word... " >&6; }
40191 if ${ac_cv_path_BUILD_LD+:} false; then :
40192   $as_echo_n "(cached) " >&6
40193 else
40194   case $BUILD_LD in
40195   [\\/]* | ?:[\\/]*)
40196   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40197   ;;
40198   *)
40199   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40200 for as_dir in $PATH
40201 do
40202   IFS=$as_save_IFS
40203   test -z "$as_dir" && as_dir=.
40204     for ac_exec_ext in '' $ac_executable_extensions; do
40205   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40206     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40207     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40208     break 2
40209   fi
40210 done
40211   done
40212 IFS=$as_save_IFS
40213 
40214   ;;
40215 esac
40216 fi
40217 BUILD_LD=$ac_cv_path_BUILD_LD
40218 if test -n "$BUILD_LD"; then
40219   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40220 $as_echo "$BUILD_LD" >&6; }
40221 else
40222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40223 $as_echo "no" >&6; }
40224 fi
40225 
40226 
40227   test -n "$BUILD_LD" && break
40228 done
40229 
40230   else
40231     # The variable is set, but is it from the command line or the environment?
40232 
40233     # Try to remove the string !BUILD_LD! from our list.
40234     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40235     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40236       # If it failed, the variable was not from the command line. Ignore it,
40237       # but warn the user (except for BASH, which is always set by the calling BASH).
40238       if test "xBUILD_LD" != xBASH; then
40239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40240 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40241       fi
40242       # Try to locate tool using the code snippet
40243       for ac_prog in ld
40244 do
40245   # Extract the first word of "$ac_prog", so it can be a program name with args.
40246 set dummy $ac_prog; ac_word=$2
40247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40248 $as_echo_n "checking for $ac_word... " >&6; }
40249 if ${ac_cv_path_BUILD_LD+:} false; then :
40250   $as_echo_n "(cached) " >&6
40251 else
40252   case $BUILD_LD in
40253   [\\/]* | ?:[\\/]*)
40254   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40255   ;;
40256   *)
40257   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40258 for as_dir in $PATH
40259 do
40260   IFS=$as_save_IFS
40261   test -z "$as_dir" && as_dir=.
40262     for ac_exec_ext in '' $ac_executable_extensions; do
40263   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40264     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40265     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40266     break 2
40267   fi
40268 done
40269   done
40270 IFS=$as_save_IFS
40271 
40272   ;;
40273 esac
40274 fi
40275 BUILD_LD=$ac_cv_path_BUILD_LD
40276 if test -n "$BUILD_LD"; then
40277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40278 $as_echo "$BUILD_LD" >&6; }
40279 else
40280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40281 $as_echo "no" >&6; }
40282 fi
40283 
40284 
40285   test -n "$BUILD_LD" && break
40286 done
40287 
40288     else
40289       # If it succeeded, then it was overridden by the user. We will use it
40290       # for the tool.
40291 
40292       # First remove it from the list of overridden variables, so we can test
40293       # for unknown variables in the end.
40294       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40295 
40296       # Check if the provided tool contains a complete path.
40297       tool_specified="$BUILD_LD"
40298       tool_basename="${tool_specified##*/}"
40299       if test "x$tool_basename" = "x$tool_specified"; then
40300         # A command without a complete path is provided, search $PATH.
40301         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40302 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40303         # Extract the first word of "$tool_basename", so it can be a program name with args.
40304 set dummy $tool_basename; ac_word=$2
40305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40306 $as_echo_n "checking for $ac_word... " >&6; }
40307 if ${ac_cv_path_BUILD_LD+:} false; then :
40308   $as_echo_n "(cached) " >&6
40309 else
40310   case $BUILD_LD in
40311   [\\/]* | ?:[\\/]*)
40312   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40313   ;;
40314   *)
40315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40316 for as_dir in $PATH
40317 do
40318   IFS=$as_save_IFS
40319   test -z "$as_dir" && as_dir=.
40320     for ac_exec_ext in '' $ac_executable_extensions; do
40321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40322     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40324     break 2
40325   fi
40326 done
40327   done
40328 IFS=$as_save_IFS
40329 
40330   ;;
40331 esac
40332 fi
40333 BUILD_LD=$ac_cv_path_BUILD_LD
40334 if test -n "$BUILD_LD"; then
40335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40336 $as_echo "$BUILD_LD" >&6; }
40337 else
40338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40339 $as_echo "no" >&6; }
40340 fi
40341 
40342 
40343         if test "x$BUILD_LD" = x; then
40344           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40345         fi
40346       else
40347         # Otherwise we believe it is a complete path. Use it as it is.
40348         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40349 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40350         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40351 $as_echo_n "checking for BUILD_LD... " >&6; }
40352         if test ! -x "$tool_specified"; then
40353           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40354 $as_echo "not found" >&6; }
40355           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40356         fi
40357         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40358 $as_echo "$tool_specified" >&6; }
40359       fi
40360     fi
40361   fi
40362 
40363 
40364 
40365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40366 
40367   # First separate the path from the arguments. This will split at the first
40368   # space.
40369   complete="$BUILD_LD"
40370   path="${complete%% *}"
40371   tmp="$complete EOL"
40372   arguments="${tmp#* }"
40373 
40374   # Input might be given as Windows format, start by converting to
40375   # unix format.
40376   new_path=`$CYGPATH -u "$path"`
40377 
40378   # Now try to locate executable using which
40379   new_path=`$WHICH "$new_path" 2> /dev/null`
40380   # bat and cmd files are not always considered executable in cygwin causing which
40381   # to not find them
40382   if test "x$new_path" = x \
40383       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40384       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40385     new_path=`$CYGPATH -u "$path"`
40386   fi
40387   if test "x$new_path" = x; then
40388     # Oops. Which didn't find the executable.
40389     # The splitting of arguments from the executable at a space might have been incorrect,
40390     # since paths with space are more likely in Windows. Give it another try with the whole
40391     # argument.
40392     path="$complete"
40393     arguments="EOL"
40394     new_path=`$CYGPATH -u "$path"`
40395     new_path=`$WHICH "$new_path" 2> /dev/null`
40396     # bat and cmd files are not always considered executable in cygwin causing which
40397     # to not find them
40398     if test "x$new_path" = x \
40399         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40400         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40401       new_path=`$CYGPATH -u "$path"`
40402     fi
40403     if test "x$new_path" = x; then
40404       # It's still not found. Now this is an unrecoverable error.
40405       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40406 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40407       has_space=`$ECHO "$complete" | $GREP " "`
40408       if test "x$has_space" != x; then
40409         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40410 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40411       fi
40412       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40413     fi
40414   fi
40415 
40416   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40417   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40418   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40419   # "foo.exe" is OK but "foo" is an error.
40420   #
40421   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40422   # It is also a way to make sure we got the proper file name for the real test later on.
40423   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40424   if test "x$test_shortpath" = x; then
40425     # Short path failed, file does not exist as specified.
40426     # Try adding .exe or .cmd
40427     if test -f "${new_path}.exe"; then
40428       input_to_shortpath="${new_path}.exe"
40429     elif test -f "${new_path}.cmd"; then
40430       input_to_shortpath="${new_path}.cmd"
40431     else
40432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40433 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40434       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40435 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40436       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40437     fi
40438   else
40439     input_to_shortpath="$new_path"
40440   fi
40441 
40442   # Call helper function which possibly converts this using DOS-style short mode.
40443   # If so, the updated path is stored in $new_path.
40444   new_path="$input_to_shortpath"
40445 
40446   input_path="$input_to_shortpath"
40447   # Check if we need to convert this using DOS-style short mode. If the path
40448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40449   # take no chances and rewrite it.
40450   # Note: m4 eats our [], so we need to use [ and ] instead.
40451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40452   if test "x$has_forbidden_chars" != x; then
40453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40454     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40455     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40456     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40457       # Going to short mode and back again did indeed matter. Since short mode is
40458       # case insensitive, let's make it lowercase to improve readability.
40459       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40460       # Now convert it back to Unix-stile (cygpath)
40461       input_path=`$CYGPATH -u "$shortmode_path"`
40462       new_path="$input_path"
40463     fi
40464   fi
40465 
40466   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40467   if test "x$test_cygdrive_prefix" = x; then
40468     # As a simple fix, exclude /usr/bin since it's not a real path.
40469     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40470       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40471       # a path prefixed by /cygdrive for fixpath to work.
40472       new_path="$CYGWIN_ROOT_PATH$input_path"
40473     fi
40474   fi
40475 
40476   # remove trailing .exe if any
40477   new_path="${new_path/%.exe/}"
40478 
40479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40480 
40481   # First separate the path from the arguments. This will split at the first
40482   # space.
40483   complete="$BUILD_LD"
40484   path="${complete%% *}"
40485   tmp="$complete EOL"
40486   arguments="${tmp#* }"
40487 
40488   # Input might be given as Windows format, start by converting to
40489   # unix format.
40490   new_path="$path"
40491 
40492   windows_path="$new_path"
40493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40494     unix_path=`$CYGPATH -u "$windows_path"`
40495     new_path="$unix_path"
40496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40498     new_path="$unix_path"
40499   fi
40500 
40501 
40502   # Now try to locate executable using which
40503   new_path=`$WHICH "$new_path" 2> /dev/null`
40504 
40505   if test "x$new_path" = x; then
40506     # Oops. Which didn't find the executable.
40507     # The splitting of arguments from the executable at a space might have been incorrect,
40508     # since paths with space are more likely in Windows. Give it another try with the whole
40509     # argument.
40510     path="$complete"
40511     arguments="EOL"
40512     new_path="$path"
40513 
40514   windows_path="$new_path"
40515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40516     unix_path=`$CYGPATH -u "$windows_path"`
40517     new_path="$unix_path"
40518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40520     new_path="$unix_path"
40521   fi
40522 
40523 
40524     new_path=`$WHICH "$new_path" 2> /dev/null`
40525     # bat and cmd files are not always considered executable in MSYS causing which
40526     # to not find them
40527     if test "x$new_path" = x \
40528         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40529         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40530       new_path="$path"
40531 
40532   windows_path="$new_path"
40533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40534     unix_path=`$CYGPATH -u "$windows_path"`
40535     new_path="$unix_path"
40536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40538     new_path="$unix_path"
40539   fi
40540 
40541     fi
40542 
40543     if test "x$new_path" = x; then
40544       # It's still not found. Now this is an unrecoverable error.
40545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40546 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40547       has_space=`$ECHO "$complete" | $GREP " "`
40548       if test "x$has_space" != x; then
40549         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40551       fi
40552       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40553     fi
40554   fi
40555 
40556   # Now new_path has a complete unix path to the binary
40557   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40558     # Keep paths in /bin as-is, but remove trailing .exe if any
40559     new_path="${new_path/%.exe/}"
40560     # Do not save /bin paths to all_fixpath_prefixes!
40561   else
40562     # Not in mixed or Windows style, start by that.
40563     new_path=`cmd //c echo $new_path`
40564 
40565   input_path="$new_path"
40566   # Check if we need to convert this using DOS-style short mode. If the path
40567   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40568   # take no chances and rewrite it.
40569   # Note: m4 eats our [], so we need to use [ and ] instead.
40570   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40571   if test "x$has_forbidden_chars" != x; then
40572     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40573     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40574   fi
40575 
40576     # Output is in $new_path
40577 
40578   windows_path="$new_path"
40579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40580     unix_path=`$CYGPATH -u "$windows_path"`
40581     new_path="$unix_path"
40582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40584     new_path="$unix_path"
40585   fi
40586 
40587     # remove trailing .exe if any
40588     new_path="${new_path/%.exe/}"
40589 
40590     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40591     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40592   fi
40593 
40594   else
40595     # We're on a unix platform. Hooray! :)
40596     # First separate the path from the arguments. This will split at the first
40597     # space.
40598     complete="$BUILD_LD"
40599     path="${complete%% *}"
40600     tmp="$complete EOL"
40601     arguments="${tmp#* }"
40602 
40603     # Cannot rely on the command "which" here since it doesn't always work.
40604     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40605     if test -z "$is_absolute_path"; then
40606       # Path to executable is not absolute. Find it.
40607       IFS_save="$IFS"
40608       IFS=:
40609       for p in $PATH; do
40610         if test -f "$p/$path" && test -x "$p/$path"; then
40611           new_path="$p/$path"
40612           break
40613         fi
40614       done
40615       IFS="$IFS_save"
40616     else
40617       # This is an absolute path, we can use it without further modifications.
40618       new_path="$path"
40619     fi
40620 
40621     if test "x$new_path" = x; then
40622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40623 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40624       has_space=`$ECHO "$complete" | $GREP " "`
40625       if test "x$has_space" != x; then
40626         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40627 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40628       fi
40629       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40630     fi
40631   fi
40632 
40633   # Now join together the path and the arguments once again
40634   if test "x$arguments" != xEOL; then
40635     new_complete="$new_path ${arguments% *}"
40636   else
40637     new_complete="$new_path"
40638   fi
40639 
40640   if test "x$complete" != "x$new_complete"; then
40641     BUILD_LD="$new_complete"
40642     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40643 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40644   fi
40645 
40646   else
40647     # If we are not cross compiling, use the normal target compilers for
40648     # building the build platform executables.
40649     BUILD_CC="$CC"
40650     BUILD_CXX="$CXX"
40651     BUILD_LD="$LD"
40652   fi
40653 
40654 
40655 
40656 
40657 
40658 
40659   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40660     # For hotspot, we need these in Windows mixed path,
40661     # so rewrite them all. Need added .exe suffix.
40662     HOTSPOT_CXX="$CXX.exe"
40663     HOTSPOT_LD="$LD.exe"
40664     HOTSPOT_MT="$MT.exe"
40665     HOTSPOT_RC="$RC.exe"
40666 
40667   unix_path="$HOTSPOT_CXX"
40668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40669     windows_path=`$CYGPATH -m "$unix_path"`
40670     HOTSPOT_CXX="$windows_path"
40671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40672     windows_path=`cmd //c echo $unix_path`
40673     HOTSPOT_CXX="$windows_path"
40674   fi
40675 
40676 
40677   unix_path="$HOTSPOT_LD"
40678   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40679     windows_path=`$CYGPATH -m "$unix_path"`
40680     HOTSPOT_LD="$windows_path"
40681   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40682     windows_path=`cmd //c echo $unix_path`
40683     HOTSPOT_LD="$windows_path"
40684   fi
40685 
40686 
40687   unix_path="$HOTSPOT_MT"
40688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40689     windows_path=`$CYGPATH -m "$unix_path"`
40690     HOTSPOT_MT="$windows_path"
40691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40692     windows_path=`cmd //c echo $unix_path`
40693     HOTSPOT_MT="$windows_path"
40694   fi
40695 
40696 
40697   unix_path="$HOTSPOT_RC"
40698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40699     windows_path=`$CYGPATH -m "$unix_path"`
40700     HOTSPOT_RC="$windows_path"
40701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40702     windows_path=`cmd //c echo $unix_path`
40703     HOTSPOT_RC="$windows_path"
40704   fi
40705 
40706 
40707 
40708   else
40709     HOTSPOT_CXX="$CXX"
40710     HOTSPOT_LD="$LD"
40711   fi
40712 
40713 
40714 
40715   if test  "x$TOOLCHAIN_TYPE" = xclang; then
40716     USE_CLANG=true
40717   fi
40718 
40719 
40720   # LDEXE is the linker to use, when creating executables. Not really used.
40721   # FIXME: These should just be removed!
40722   LDEXE="$LD"
40723   LDEXECXX="$LDCXX"
40724 
40725 
40726 
40727 
40728 
40729 
40730   # The package path is used only on macosx?
40731   # FIXME: clean this up, and/or move it elsewhere.
40732   PACKAGE_PATH=/opt/local
40733 
40734 
40735   # Check for extra potential brokenness.
40736   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40737     # On Windows, double-check that we got the right compiler.
40738     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40739     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40740     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40741       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40742         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40743       fi
40744     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40745       if test "x$COMPILER_CPU_TEST" != "xx64"; then
40746         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40747       fi
40748     fi
40749   fi
40750 
40751   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40752     # If this is a --hash-style=gnu system, use --hash-style=both, why?
40753     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40754     # This is later checked when setting flags.
40755 
40756     # "-Og" suppported for GCC 4.8 and later
40757     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40758 
40759   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40760 $as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40761   supports=yes
40762 
40763   saved_cflags="$CFLAGS"
40764   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40765   ac_ext=c
40766 ac_cpp='$CPP $CPPFLAGS'
40767 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40768 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40769 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40770 
40771   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40772 /* end confdefs.h.  */
40773 int i;
40774 _ACEOF
40775 if ac_fn_c_try_compile "$LINENO"; then :
40776 
40777 else
40778   supports=no
40779 fi
40780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40781   ac_ext=cpp
40782 ac_cpp='$CXXCPP $CPPFLAGS'
40783 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40784 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40785 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40786 
40787   CFLAGS="$saved_cflags"
40788 
40789   saved_cxxflags="$CXXFLAGS"
40790   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40791   ac_ext=cpp
40792 ac_cpp='$CXXCPP $CPPFLAGS'
40793 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40794 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40795 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40796 
40797   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40798 /* end confdefs.h.  */
40799 int i;
40800 _ACEOF
40801 if ac_fn_cxx_try_compile "$LINENO"; then :
40802 
40803 else
40804   supports=no
40805 fi
40806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40807   ac_ext=cpp
40808 ac_cpp='$CXXCPP $CPPFLAGS'
40809 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40810 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40811 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40812 
40813   CXXFLAGS="$saved_cxxflags"
40814 
40815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40816 $as_echo "$supports" >&6; }
40817   if test "x$supports" = "xyes" ; then
40818     HAS_CFLAG_OPTIMIZE_DEBUG=true
40819   else
40820     HAS_CFLAG_OPTIMIZE_DEBUG=false
40821   fi
40822 
40823 
40824     # "-z relro" supported in GNU binutils 2.17 and later
40825     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40826 
40827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40828 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40829   supports=yes
40830 
40831   saved_ldflags="$LDFLAGS"
40832   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40833   ac_ext=c
40834 ac_cpp='$CPP $CPPFLAGS'
40835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40838 
40839   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40840 /* end confdefs.h.  */
40841 
40842 int
40843 main ()
40844 {
40845 
40846   ;
40847   return 0;
40848 }
40849 _ACEOF
40850 if ac_fn_c_try_link "$LINENO"; then :
40851 
40852 else
40853   supports=no
40854 fi
40855 rm -f core conftest.err conftest.$ac_objext \
40856     conftest$ac_exeext conftest.$ac_ext
40857   ac_ext=cpp
40858 ac_cpp='$CXXCPP $CPPFLAGS'
40859 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40860 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40861 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40862 
40863   LDFLAGS="$saved_ldflags"
40864 
40865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40866 $as_echo "$supports" >&6; }
40867   if test "x$supports" = "xyes" ; then
40868     HAS_LINKER_RELRO=true
40869   else
40870     HAS_LINKER_RELRO=false
40871   fi
40872 
40873 
40874     # "-z now" supported in GNU binutils 2.11 and later
40875     LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40876 
40877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40878 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40879   supports=yes
40880 
40881   saved_ldflags="$LDFLAGS"
40882   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40883   ac_ext=c
40884 ac_cpp='$CPP $CPPFLAGS'
40885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40888 
40889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40890 /* end confdefs.h.  */
40891 
40892 int
40893 main ()
40894 {
40895 
40896   ;
40897   return 0;
40898 }
40899 _ACEOF
40900 if ac_fn_c_try_link "$LINENO"; then :
40901 
40902 else
40903   supports=no
40904 fi
40905 rm -f core conftest.err conftest.$ac_objext \
40906     conftest$ac_exeext conftest.$ac_ext
40907   ac_ext=cpp
40908 ac_cpp='$CXXCPP $CPPFLAGS'
40909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40912 
40913   LDFLAGS="$saved_ldflags"
40914 
40915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40916 $as_echo "$supports" >&6; }
40917   if test "x$supports" = "xyes" ; then
40918     HAS_LINKER_NOW=true
40919   else
40920     HAS_LINKER_NOW=false
40921   fi
40922 
40923   fi
40924 
40925   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40926   # in executable.'
40927   USING_BROKEN_SUSE_LD=no
40928   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40929     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40930 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40931     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40932     $ECHO "int main() { }" > main.c
40933     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40934       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40935 $as_echo "no" >&6; }
40936       USING_BROKEN_SUSE_LD=no
40937     else
40938       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40939 $as_echo "yes" >&6; }
40940       USING_BROKEN_SUSE_LD=yes
40941     fi
40942     rm -rf version-script.map main.c a.out
40943   fi
40944 
40945 
40946 
40947 # Setup the JTReg Regression Test Harness.
40948 
40949 
40950 # Check whether --with-jtreg was given.
40951 if test "${with_jtreg+set}" = set; then :
40952   withval=$with_jtreg;
40953 else
40954   with_jtreg=no
40955 fi
40956 
40957 
40958   if test "x$with_jtreg" = xno; then
40959     # jtreg disabled
40960     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40961 $as_echo_n "checking for jtreg... " >&6; }
40962     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40963 $as_echo "no" >&6; }
40964   else
40965     if test "x$with_jtreg" != xyes; then
40966       # with path specified.
40967       JT_HOME="$with_jtreg"
40968     fi
40969 
40970     if test "x$JT_HOME" != x; then
40971       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40972 $as_echo_n "checking for jtreg... " >&6; }
40973 
40974       # use JT_HOME enviroment var.
40975 
40976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40977 
40978   # Input might be given as Windows format, start by converting to
40979   # unix format.
40980   path="$JT_HOME"
40981   new_path=`$CYGPATH -u "$path"`
40982 
40983   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40984   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40985   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40986   # "foo.exe" is OK but "foo" is an error.
40987   #
40988   # This test is therefore slightly more accurate than "test -f" to check for file precense.
40989   # It is also a way to make sure we got the proper file name for the real test later on.
40990   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40991   if test "x$test_shortpath" = x; then
40992     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40993 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40994     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40995   fi
40996 
40997   # Call helper function which possibly converts this using DOS-style short mode.
40998   # If so, the updated path is stored in $new_path.
40999 
41000   input_path="$new_path"
41001   # Check if we need to convert this using DOS-style short mode. If the path
41002   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41003   # take no chances and rewrite it.
41004   # Note: m4 eats our [], so we need to use [ and ] instead.
41005   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41006   if test "x$has_forbidden_chars" != x; then
41007     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41008     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41009     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41010     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41011       # Going to short mode and back again did indeed matter. Since short mode is
41012       # case insensitive, let's make it lowercase to improve readability.
41013       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41014       # Now convert it back to Unix-stile (cygpath)
41015       input_path=`$CYGPATH -u "$shortmode_path"`
41016       new_path="$input_path"
41017     fi
41018   fi
41019 
41020   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41021   if test "x$test_cygdrive_prefix" = x; then
41022     # As a simple fix, exclude /usr/bin since it's not a real path.
41023     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41024       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41025       # a path prefixed by /cygdrive for fixpath to work.
41026       new_path="$CYGWIN_ROOT_PATH$input_path"
41027     fi
41028   fi
41029 
41030 
41031   if test "x$path" != "x$new_path"; then
41032     JT_HOME="$new_path"
41033     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41034 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41035   fi
41036 
41037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41038 
41039   path="$JT_HOME"
41040   has_colon=`$ECHO $path | $GREP ^.:`
41041   new_path="$path"
41042   if test "x$has_colon" = x; then
41043     # Not in mixed or Windows style, start by that.
41044     new_path=`cmd //c echo $path`
41045   fi
41046 
41047 
41048   input_path="$new_path"
41049   # Check if we need to convert this using DOS-style short mode. If the path
41050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41051   # take no chances and rewrite it.
41052   # Note: m4 eats our [], so we need to use [ and ] instead.
41053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41054   if test "x$has_forbidden_chars" != x; then
41055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41056     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41057   fi
41058 
41059 
41060   windows_path="$new_path"
41061   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41062     unix_path=`$CYGPATH -u "$windows_path"`
41063     new_path="$unix_path"
41064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41065     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41066     new_path="$unix_path"
41067   fi
41068 
41069   if test "x$path" != "x$new_path"; then
41070     JT_HOME="$new_path"
41071     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41072 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41073   fi
41074 
41075   # Save the first 10 bytes of this path to the storage, so fixpath can work.
41076   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41077 
41078   else
41079     # We're on a unix platform. Hooray! :)
41080     path="$JT_HOME"
41081     has_space=`$ECHO "$path" | $GREP " "`
41082     if test "x$has_space" != x; then
41083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41084 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41085       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41086     fi
41087 
41088     # Use eval to expand a potential ~
41089     eval path="$path"
41090     if test ! -f "$path" && test ! -d "$path"; then
41091       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41092     fi
41093 
41094     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41095   fi
41096 
41097 
41098       # jtreg win32 script works for everybody
41099       JTREGEXE="$JT_HOME/win32/bin/jtreg"
41100 
41101       if test ! -f "$JTREGEXE"; then
41102         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41103       fi
41104 
41105       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41106 $as_echo "$JTREGEXE" >&6; }
41107     else
41108       # try to find jtreg on path
41109 
41110 
41111 
41112   # Publish this variable in the help.
41113 
41114 
41115   if test "x$JTREGEXE" = x; then
41116     # The variable is not set by user, try to locate tool using the code snippet
41117     for ac_prog in jtreg
41118 do
41119   # Extract the first word of "$ac_prog", so it can be a program name with args.
41120 set dummy $ac_prog; ac_word=$2
41121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41122 $as_echo_n "checking for $ac_word... " >&6; }
41123 if ${ac_cv_path_JTREGEXE+:} false; then :
41124   $as_echo_n "(cached) " >&6
41125 else
41126   case $JTREGEXE in
41127   [\\/]* | ?:[\\/]*)
41128   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41129   ;;
41130   *)
41131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41132 for as_dir in $PATH
41133 do
41134   IFS=$as_save_IFS
41135   test -z "$as_dir" && as_dir=.
41136     for ac_exec_ext in '' $ac_executable_extensions; do
41137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41138     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41140     break 2
41141   fi
41142 done
41143   done
41144 IFS=$as_save_IFS
41145 
41146   ;;
41147 esac
41148 fi
41149 JTREGEXE=$ac_cv_path_JTREGEXE
41150 if test -n "$JTREGEXE"; then
41151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41152 $as_echo "$JTREGEXE" >&6; }
41153 else
41154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41155 $as_echo "no" >&6; }
41156 fi
41157 
41158 
41159   test -n "$JTREGEXE" && break
41160 done
41161 
41162   else
41163     # The variable is set, but is it from the command line or the environment?
41164 
41165     # Try to remove the string !JTREGEXE! from our list.
41166     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41167     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41168       # If it failed, the variable was not from the command line. Ignore it,
41169       # but warn the user (except for BASH, which is always set by the calling BASH).
41170       if test "xJTREGEXE" != xBASH; then
41171         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41172 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41173       fi
41174       # Try to locate tool using the code snippet
41175       for ac_prog in jtreg
41176 do
41177   # Extract the first word of "$ac_prog", so it can be a program name with args.
41178 set dummy $ac_prog; ac_word=$2
41179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41180 $as_echo_n "checking for $ac_word... " >&6; }
41181 if ${ac_cv_path_JTREGEXE+:} false; then :
41182   $as_echo_n "(cached) " >&6
41183 else
41184   case $JTREGEXE in
41185   [\\/]* | ?:[\\/]*)
41186   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41187   ;;
41188   *)
41189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41190 for as_dir in $PATH
41191 do
41192   IFS=$as_save_IFS
41193   test -z "$as_dir" && as_dir=.
41194     for ac_exec_ext in '' $ac_executable_extensions; do
41195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41196     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41198     break 2
41199   fi
41200 done
41201   done
41202 IFS=$as_save_IFS
41203 
41204   ;;
41205 esac
41206 fi
41207 JTREGEXE=$ac_cv_path_JTREGEXE
41208 if test -n "$JTREGEXE"; then
41209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41210 $as_echo "$JTREGEXE" >&6; }
41211 else
41212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41213 $as_echo "no" >&6; }
41214 fi
41215 
41216 
41217   test -n "$JTREGEXE" && break
41218 done
41219 
41220     else
41221       # If it succeeded, then it was overridden by the user. We will use it
41222       # for the tool.
41223 
41224       # First remove it from the list of overridden variables, so we can test
41225       # for unknown variables in the end.
41226       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41227 
41228       # Check if the provided tool contains a complete path.
41229       tool_specified="$JTREGEXE"
41230       tool_basename="${tool_specified##*/}"
41231       if test "x$tool_basename" = "x$tool_specified"; then
41232         # A command without a complete path is provided, search $PATH.
41233         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41234 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41235         # Extract the first word of "$tool_basename", so it can be a program name with args.
41236 set dummy $tool_basename; ac_word=$2
41237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41238 $as_echo_n "checking for $ac_word... " >&6; }
41239 if ${ac_cv_path_JTREGEXE+:} false; then :
41240   $as_echo_n "(cached) " >&6
41241 else
41242   case $JTREGEXE in
41243   [\\/]* | ?:[\\/]*)
41244   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41245   ;;
41246   *)
41247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41248 for as_dir in $PATH
41249 do
41250   IFS=$as_save_IFS
41251   test -z "$as_dir" && as_dir=.
41252     for ac_exec_ext in '' $ac_executable_extensions; do
41253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41254     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41256     break 2
41257   fi
41258 done
41259   done
41260 IFS=$as_save_IFS
41261 
41262   ;;
41263 esac
41264 fi
41265 JTREGEXE=$ac_cv_path_JTREGEXE
41266 if test -n "$JTREGEXE"; then
41267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41268 $as_echo "$JTREGEXE" >&6; }
41269 else
41270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41271 $as_echo "no" >&6; }
41272 fi
41273 
41274 
41275         if test "x$JTREGEXE" = x; then
41276           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41277         fi
41278       else
41279         # Otherwise we believe it is a complete path. Use it as it is.
41280         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41281 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41282         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41283 $as_echo_n "checking for JTREGEXE... " >&6; }
41284         if test ! -x "$tool_specified"; then
41285           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41286 $as_echo "not found" >&6; }
41287           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41288         fi
41289         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41290 $as_echo "$tool_specified" >&6; }
41291       fi
41292     fi
41293   fi
41294 
41295 
41296 
41297   if test "x$JTREGEXE" = x; then
41298     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41299   fi
41300 
41301 
41302       JT_HOME="`$DIRNAME $JTREGEXE`"
41303     fi
41304   fi
41305 
41306 
41307 
41308 
41309 
41310 
41311   # Option used to tell the compiler whether to create 32- or 64-bit executables
41312   if test "x$TOOLCHAIN_TYPE" = xxlc; then
41313     COMPILER_TARGET_BITS_FLAG="-q"
41314   else
41315     COMPILER_TARGET_BITS_FLAG="-m"
41316   fi
41317 
41318 
41319   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41320   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41321     ARFLAGS="-r"
41322   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41323     ARFLAGS="-X64"
41324   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41325     # lib.exe is used as AR to create static libraries.
41326     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41327   else
41328     ARFLAGS=""
41329   fi
41330 
41331 
41332   ## Setup strip.
41333   # FIXME: should this really be per platform, or should it be per toolchain type?
41334   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41335   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41336   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41337     STRIPFLAGS="-g"
41338   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41339     STRIPFLAGS="-x"
41340   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41341     STRIPFLAGS="-S"
41342   elif test "x$OPENJDK_TARGET_OS" = xaix; then
41343     STRIPFLAGS="-X32_64"
41344   fi
41345 
41346   if test "x$OPENJDK_TARGET_OS" != xwindows; then
41347     POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41348   fi
41349 
41350 
41351   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41352     # FIXME: break out into MCSFLAGS
41353     POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41354   fi
41355 
41356 
41357   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41358     CC_OUT_OPTION=-Fo
41359     EXE_OUT_OPTION=-out:
41360     LD_OUT_OPTION=-out:
41361     AR_OUT_OPTION=-out:
41362   else
41363     # The option used to specify the target .o,.a or .so file.
41364     # When compiling, how to specify the to be created object file.
41365     CC_OUT_OPTION='-o$(SPACE)'
41366     # When linking, how to specify the to be created executable.
41367     EXE_OUT_OPTION='-o$(SPACE)'
41368     # When linking, how to specify the to be created dynamically linkable library.
41369     LD_OUT_OPTION='-o$(SPACE)'
41370     # When archiving, how to specify the to be create static archive for object files.
41371     AR_OUT_OPTION='rcs$(SPACE)'
41372   fi
41373 
41374 
41375 
41376 
41377 
41378   # On Windows, we need to set RC flags.
41379   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41380     RC_FLAGS="-nologo -l0x409"
41381     if test "x$VARIANT" = xOPT; then
41382       RC_FLAGS="$RC_FLAGS -DNDEBUG"
41383     fi
41384 
41385     # The version variables used to create RC_FLAGS may be overridden
41386     # in a custom configure script, or possibly the command line.
41387     # Let those variables be expanded at make time in spec.gmk.
41388     # The \$ are escaped to the shell, and the $(...) variables
41389     # are evaluated by make.
41390     RC_FLAGS="$RC_FLAGS \
41391         -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41392         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41393         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41394         -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41395         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41396         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41397         -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41398   fi
41399 
41400 
41401   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41402     # silence copyright notice and other headers.
41403     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41404   fi
41405 
41406   if test "x$SYSROOT" != "x"; then
41407     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41408       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41409         # Solaris Studio does not have a concept of sysroot. Instead we must
41410         # make sure the default include and lib dirs are appended to each
41411         # compile and link command line.
41412         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41413         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41414             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41415             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41416       fi
41417     elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41418       # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41419       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41420       SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41421     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41422       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41423       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41424     elif test "x$TOOLCHAIN_TYPE" = xclang; then
41425       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41426       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41427     fi
41428     # Propagate the sysroot args to hotspot
41429     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41430     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41431     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41432   fi
41433 
41434   # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41435   # set this here so it doesn't have to be peppered throughout the forest
41436   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41437     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41438     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41439   fi
41440 
41441 
41442 
41443 
41444 
41445 # FIXME: Currently we must test this after toolchain but before flags. Fix!
41446 
41447 # Now we can test some aspects on the target using configure macros.
41448 
41449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41450 $as_echo_n "checking for ANSI C header files... " >&6; }
41451 if ${ac_cv_header_stdc+:} false; then :
41452   $as_echo_n "(cached) " >&6
41453 else
41454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41455 /* end confdefs.h.  */
41456 #include <stdlib.h>
41457 #include <stdarg.h>
41458 #include <string.h>
41459 #include <float.h>
41460 
41461 int
41462 main ()
41463 {
41464 
41465   ;
41466   return 0;
41467 }
41468 _ACEOF
41469 if ac_fn_cxx_try_compile "$LINENO"; then :
41470   ac_cv_header_stdc=yes
41471 else
41472   ac_cv_header_stdc=no
41473 fi
41474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41475 
41476 if test $ac_cv_header_stdc = yes; then
41477   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41479 /* end confdefs.h.  */
41480 #include <string.h>
41481 
41482 _ACEOF
41483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41484   $EGREP "memchr" >/dev/null 2>&1; then :
41485 
41486 else
41487   ac_cv_header_stdc=no
41488 fi
41489 rm -f conftest*
41490 
41491 fi
41492 
41493 if test $ac_cv_header_stdc = yes; then
41494   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41495   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41496 /* end confdefs.h.  */
41497 #include <stdlib.h>
41498 
41499 _ACEOF
41500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41501   $EGREP "free" >/dev/null 2>&1; then :
41502 
41503 else
41504   ac_cv_header_stdc=no
41505 fi
41506 rm -f conftest*
41507 
41508 fi
41509 
41510 if test $ac_cv_header_stdc = yes; then
41511   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41512   if test "$cross_compiling" = yes; then :
41513   :
41514 else
41515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41516 /* end confdefs.h.  */
41517 #include <ctype.h>
41518 #include <stdlib.h>
41519 #if ((' ' & 0x0FF) == 0x020)
41520 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41521 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41522 #else
41523 # define ISLOWER(c) \
41524                    (('a' <= (c) && (c) <= 'i') \
41525                      || ('j' <= (c) && (c) <= 'r') \
41526                      || ('s' <= (c) && (c) <= 'z'))
41527 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41528 #endif
41529 
41530 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41531 int
41532 main ()
41533 {
41534   int i;
41535   for (i = 0; i < 256; i++)
41536     if (XOR (islower (i), ISLOWER (i))
41537         || toupper (i) != TOUPPER (i))
41538       return 2;
41539   return 0;
41540 }
41541 _ACEOF
41542 if ac_fn_cxx_try_run "$LINENO"; then :
41543 
41544 else
41545   ac_cv_header_stdc=no
41546 fi
41547 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41548   conftest.$ac_objext conftest.beam conftest.$ac_ext
41549 fi
41550 
41551 fi
41552 fi
41553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41554 $as_echo "$ac_cv_header_stdc" >&6; }
41555 if test $ac_cv_header_stdc = yes; then
41556 
41557 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41558 
41559 fi
41560 
41561 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41562 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41563                   inttypes.h stdint.h unistd.h
41564 do :
41565   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41566 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41567 "
41568 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41569   cat >>confdefs.h <<_ACEOF
41570 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41571 _ACEOF
41572 
41573 fi
41574 
41575 done
41576 
41577 
41578 
41579   ###############################################################################
41580   #
41581   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41582   # (The JVM can use 32 or 64 bit Java pointers but that decision
41583   # is made at runtime.)
41584   #
41585 
41586   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41587     # Always specify -m flag on Solaris
41588     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41589 
41590   # When we add flags to the "official" CFLAGS etc, we need to
41591   # keep track of these additions in ADDED_CFLAGS etc. These
41592   # will later be checked to make sure only controlled additions
41593   # have been made to CFLAGS etc.
41594   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41595   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41596   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41597 
41598   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41599   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41600   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41601 
41602   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41603   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41604   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41605 
41606   elif test "x$COMPILE_TYPE" = xreduced; then
41607     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41608       # Specify -m if running reduced on unix platforms
41609 
41610   # When we add flags to the "official" CFLAGS etc, we need to
41611   # keep track of these additions in ADDED_CFLAGS etc. These
41612   # will later be checked to make sure only controlled additions
41613   # have been made to CFLAGS etc.
41614   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41615   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41616   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41617 
41618   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41619   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41620   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41621 
41622   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41623   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41624   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41625 
41626     fi
41627   fi
41628 
41629   # Make compilation sanity check
41630   for ac_header in stdio.h
41631 do :
41632   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41633 if test "x$ac_cv_header_stdio_h" = xyes; then :
41634   cat >>confdefs.h <<_ACEOF
41635 #define HAVE_STDIO_H 1
41636 _ACEOF
41637 
41638 else
41639 
41640     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41641 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41642     if test "x$COMPILE_TYPE" = xreduced; then
41643       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41644 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41645     elif test "x$COMPILE_TYPE" = xcross; then
41646       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41647 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41648     fi
41649     as_fn_error $? "Cannot continue." "$LINENO" 5
41650 
41651 fi
41652 
41653 done
41654 
41655 
41656   # The cast to long int works around a bug in the HP C Compiler
41657 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41658 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41659 # This bug is HP SR number 8606223364.
41660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41661 $as_echo_n "checking size of int *... " >&6; }
41662 if ${ac_cv_sizeof_int_p+:} false; then :
41663   $as_echo_n "(cached) " >&6
41664 else
41665   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41666 
41667 else
41668   if test "$ac_cv_type_int_p" = yes; then
41669      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41670 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41671 as_fn_error 77 "cannot compute sizeof (int *)
41672 See \`config.log' for more details" "$LINENO" 5; }
41673    else
41674      ac_cv_sizeof_int_p=0
41675    fi
41676 fi
41677 
41678 fi
41679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41680 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41681 
41682 
41683 
41684 cat >>confdefs.h <<_ACEOF
41685 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41686 _ACEOF
41687 
41688 
41689 
41690   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41691   if test "x$ac_cv_sizeof_int_p" = x; then
41692     # The test failed, lets stick to the assumed value.
41693     { $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
41694 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41695   else
41696     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41697 
41698     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41699       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41700       # Let's try to implicitely set the compilers target architecture and retry the test
41701       { $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
41702 $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;}
41703       { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41704 $as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41705 
41706   # When we add flags to the "official" CFLAGS etc, we need to
41707   # keep track of these additions in ADDED_CFLAGS etc. These
41708   # will later be checked to make sure only controlled additions
41709   # have been made to CFLAGS etc.
41710   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41711   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41712   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41713 
41714   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41715   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41716   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41717 
41718   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41719   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41720   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41721 
41722 
41723       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41724       unset ac_cv_sizeof_int_p
41725       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41726       cat >>confdefs.h <<_ACEOF
41727 #undef SIZEOF_INT_P
41728 _ACEOF
41729 
41730       # The cast to long int works around a bug in the HP C Compiler
41731 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41732 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41733 # This bug is HP SR number 8606223364.
41734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41735 $as_echo_n "checking size of int *... " >&6; }
41736 if ${ac_cv_sizeof_int_p+:} false; then :
41737   $as_echo_n "(cached) " >&6
41738 else
41739   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41740 
41741 else
41742   if test "$ac_cv_type_int_p" = yes; then
41743      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41744 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41745 as_fn_error 77 "cannot compute sizeof (int *)
41746 See \`config.log' for more details" "$LINENO" 5; }
41747    else
41748      ac_cv_sizeof_int_p=0
41749    fi
41750 fi
41751 
41752 fi
41753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41754 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41755 
41756 
41757 
41758 cat >>confdefs.h <<_ACEOF
41759 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41760 _ACEOF
41761 
41762 
41763 
41764       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41765 
41766       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41767         as_fn_error $? "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)" "$LINENO" 5
41768       fi
41769     fi
41770   fi
41771 
41772   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41773 $as_echo_n "checking for target address size... " >&6; }
41774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41775 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41776 
41777 
41778   ###############################################################################
41779   #
41780   # Is the target little of big endian?
41781   #
41782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41783 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41784 if ${ac_cv_c_bigendian+:} false; then :
41785   $as_echo_n "(cached) " >&6
41786 else
41787   ac_cv_c_bigendian=unknown
41788     # See if we're dealing with a universal compiler.
41789     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41790 /* end confdefs.h.  */
41791 #ifndef __APPLE_CC__
41792                not a universal capable compiler
41793              #endif
41794              typedef int dummy;
41795 
41796 _ACEOF
41797 if ac_fn_cxx_try_compile "$LINENO"; then :
41798 
41799         # Check for potential -arch flags.  It is not universal unless
41800         # there are at least two -arch flags with different values.
41801         ac_arch=
41802         ac_prev=
41803         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41804          if test -n "$ac_prev"; then
41805            case $ac_word in
41806              i?86 | x86_64 | ppc | ppc64)
41807                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41808                  ac_arch=$ac_word
41809                else
41810                  ac_cv_c_bigendian=universal
41811                  break
41812                fi
41813                ;;
41814            esac
41815            ac_prev=
41816          elif test "x$ac_word" = "x-arch"; then
41817            ac_prev=arch
41818          fi
41819        done
41820 fi
41821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41822     if test $ac_cv_c_bigendian = unknown; then
41823       # See if sys/param.h defines the BYTE_ORDER macro.
41824       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41825 /* end confdefs.h.  */
41826 #include <sys/types.h>
41827              #include <sys/param.h>
41828 
41829 int
41830 main ()
41831 {
41832 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41833                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41834                      && LITTLE_ENDIAN)
41835               bogus endian macros
41836              #endif
41837 
41838   ;
41839   return 0;
41840 }
41841 _ACEOF
41842 if ac_fn_cxx_try_compile "$LINENO"; then :
41843   # It does; now see whether it defined to BIG_ENDIAN or not.
41844          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41845 /* end confdefs.h.  */
41846 #include <sys/types.h>
41847                 #include <sys/param.h>
41848 
41849 int
41850 main ()
41851 {
41852 #if BYTE_ORDER != BIG_ENDIAN
41853                  not big endian
41854                 #endif
41855 
41856   ;
41857   return 0;
41858 }
41859 _ACEOF
41860 if ac_fn_cxx_try_compile "$LINENO"; then :
41861   ac_cv_c_bigendian=yes
41862 else
41863   ac_cv_c_bigendian=no
41864 fi
41865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41866 fi
41867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41868     fi
41869     if test $ac_cv_c_bigendian = unknown; then
41870       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41871       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41872 /* end confdefs.h.  */
41873 #include <limits.h>
41874 
41875 int
41876 main ()
41877 {
41878 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41879               bogus endian macros
41880              #endif
41881 
41882   ;
41883   return 0;
41884 }
41885 _ACEOF
41886 if ac_fn_cxx_try_compile "$LINENO"; then :
41887   # It does; now see whether it defined to _BIG_ENDIAN or not.
41888          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41889 /* end confdefs.h.  */
41890 #include <limits.h>
41891 
41892 int
41893 main ()
41894 {
41895 #ifndef _BIG_ENDIAN
41896                  not big endian
41897                 #endif
41898 
41899   ;
41900   return 0;
41901 }
41902 _ACEOF
41903 if ac_fn_cxx_try_compile "$LINENO"; then :
41904   ac_cv_c_bigendian=yes
41905 else
41906   ac_cv_c_bigendian=no
41907 fi
41908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41909 fi
41910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41911     fi
41912     if test $ac_cv_c_bigendian = unknown; then
41913       # Compile a test program.
41914       if test "$cross_compiling" = yes; then :
41915   # Try to guess by grepping values from an object file.
41916          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41917 /* end confdefs.h.  */
41918 short int ascii_mm[] =
41919                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41920                 short int ascii_ii[] =
41921                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41922                 int use_ascii (int i) {
41923                   return ascii_mm[i] + ascii_ii[i];
41924                 }
41925                 short int ebcdic_ii[] =
41926                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41927                 short int ebcdic_mm[] =
41928                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41929                 int use_ebcdic (int i) {
41930                   return ebcdic_mm[i] + ebcdic_ii[i];
41931                 }
41932                 extern int foo;
41933 
41934 int
41935 main ()
41936 {
41937 return use_ascii (foo) == use_ebcdic (foo);
41938   ;
41939   return 0;
41940 }
41941 _ACEOF
41942 if ac_fn_cxx_try_compile "$LINENO"; then :
41943   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41944               ac_cv_c_bigendian=yes
41945             fi
41946             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41947               if test "$ac_cv_c_bigendian" = unknown; then
41948                 ac_cv_c_bigendian=no
41949               else
41950                 # finding both strings is unlikely to happen, but who knows?
41951                 ac_cv_c_bigendian=unknown
41952               fi
41953             fi
41954 fi
41955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41956 else
41957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41958 /* end confdefs.h.  */
41959 $ac_includes_default
41960 int
41961 main ()
41962 {
41963 
41964              /* Are we little or big endian?  From Harbison&Steele.  */
41965              union
41966              {
41967                long int l;
41968                char c[sizeof (long int)];
41969              } u;
41970              u.l = 1;
41971              return u.c[sizeof (long int) - 1] == 1;
41972 
41973   ;
41974   return 0;
41975 }
41976 _ACEOF
41977 if ac_fn_cxx_try_run "$LINENO"; then :
41978   ac_cv_c_bigendian=no
41979 else
41980   ac_cv_c_bigendian=yes
41981 fi
41982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41983   conftest.$ac_objext conftest.beam conftest.$ac_ext
41984 fi
41985 
41986     fi
41987 fi
41988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41989 $as_echo "$ac_cv_c_bigendian" >&6; }
41990  case $ac_cv_c_bigendian in #(
41991    yes)
41992      ENDIAN="big";; #(
41993    no)
41994      ENDIAN="little" ;; #(
41995    universal)
41996      ENDIAN="universal_endianness"
41997      ;; #(
41998    *)
41999      ENDIAN="unknown" ;;
42000  esac
42001 
42002 
42003   if test "x$ENDIAN" = xuniversal_endianness; then
42004     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42005   fi
42006   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42007     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
42008   fi
42009 
42010 
42011 # Configure flags for the tools
42012 
42013   ###############################################################################
42014   #
42015   # How to compile shared libraries.
42016   #
42017 
42018   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42019     PICFLAG="-fPIC"
42020     C_FLAG_REORDER=''
42021     CXX_FLAG_REORDER=''
42022 
42023     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42024       # Linking is different on MacOSX
42025       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42026       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42027       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42028       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42029       SET_SHARED_LIBRARY_MAPFILE=''
42030     else
42031       # Default works for linux, might work on other platforms as well.
42032       SHARED_LIBRARY_FLAGS='-shared'
42033       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42034       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42035       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42036       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42037     fi
42038   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42039     PICFLAG=''
42040     C_FLAG_REORDER=''
42041     CXX_FLAG_REORDER=''
42042 
42043     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42044       # Linking is different on MacOSX
42045       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42046       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42047       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42048       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42049       SET_SHARED_LIBRARY_MAPFILE=''
42050     else
42051       # Default works for linux, might work on other platforms as well.
42052       SHARED_LIBRARY_FLAGS='-shared'
42053       SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42054       SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42055       SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42056       SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42057     fi
42058   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42059     PICFLAG="-KPIC"
42060     C_FLAG_REORDER='-xF'
42061     CXX_FLAG_REORDER='-xF'
42062     SHARED_LIBRARY_FLAGS="-G"
42063     SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42064     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42065     SET_SHARED_LIBRARY_NAME=''
42066     SET_SHARED_LIBRARY_MAPFILE='-M$1'
42067   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42068     PICFLAG="-qpic=large"
42069     C_FLAG_REORDER=''
42070     CXX_FLAG_REORDER=''
42071     SHARED_LIBRARY_FLAGS="-qmkshrobj"
42072     SET_EXECUTABLE_ORIGIN=""
42073     SET_SHARED_LIBRARY_ORIGIN=''
42074     SET_SHARED_LIBRARY_NAME=''
42075     SET_SHARED_LIBRARY_MAPFILE=''
42076   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42077     PICFLAG=""
42078     C_FLAG_REORDER=''
42079     CXX_FLAG_REORDER=''
42080     SHARED_LIBRARY_FLAGS="-LD"
42081     SET_EXECUTABLE_ORIGIN=''
42082     SET_SHARED_LIBRARY_ORIGIN=''
42083     SET_SHARED_LIBRARY_NAME=''
42084     SET_SHARED_LIBRARY_MAPFILE=''
42085   fi
42086 
42087 
42088 
42089 
42090 
42091 
42092 
42093 
42094 
42095   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42096     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42097     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42098     CFLAGS_JDKLIB_EXTRA='-xstrconst'
42099   fi
42100   # The (cross) compiler is now configured, we can now test capabilities
42101   # of the target platform.
42102 
42103 
42104 
42105   ###############################################################################
42106   #
42107   # Setup the opt flags for different compilers
42108   # and different operating systems.
42109   #
42110 
42111   # FIXME: this was indirectly the old default, but just inherited.
42112   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42113   #   C_FLAG_DEPS="-MMD -MF"
42114   # fi
42115 
42116   # Generate make dependency files
42117   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42118     C_FLAG_DEPS="-MMD -MF"
42119   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42120     C_FLAG_DEPS="-MMD -MF"
42121   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42122     C_FLAG_DEPS="-xMMD -xMF"
42123   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42124     C_FLAG_DEPS="-qmakedep=gcc -MF"
42125   fi
42126   CXX_FLAG_DEPS="$C_FLAG_DEPS"
42127 
42128 
42129 
42130   # Debug symbols
42131   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42132     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42133       # reduce from default "-g2" option to save space
42134       CFLAGS_DEBUG_SYMBOLS="-g1"
42135       CXXFLAGS_DEBUG_SYMBOLS="-g1"
42136     else
42137       CFLAGS_DEBUG_SYMBOLS="-g"
42138       CXXFLAGS_DEBUG_SYMBOLS="-g"
42139     fi
42140   elif test "x$TOOLCHAIN_TYPE" = xclang; then
42141     CFLAGS_DEBUG_SYMBOLS="-g"
42142     CXXFLAGS_DEBUG_SYMBOLS="-g"
42143   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42144     CFLAGS_DEBUG_SYMBOLS="-g -xs"
42145     # FIXME: likely a bug, this disables debug symbols rather than enables them
42146     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42147   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42148     CFLAGS_DEBUG_SYMBOLS="-g"
42149     CXXFLAGS_DEBUG_SYMBOLS="-g"
42150   fi
42151 
42152 
42153 
42154   # bounds, memory and behavior checking options
42155   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42156     case $DEBUG_LEVEL in
42157     release )
42158       # no adjustment
42159       ;;
42160     fastdebug )
42161       # no adjustment
42162       ;;
42163     slowdebug )
42164       # Add runtime stack smashing and undefined behavior checks
42165       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42166       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42167       ;;
42168     esac
42169   fi
42170 
42171 
42172 
42173   # Optimization levels
42174   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42175     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42176 
42177     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42178       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42179       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42180       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42181       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42182       C_O_FLAG_DEBUG="-xregs=no%frameptr"
42183       C_O_FLAG_NONE="-xregs=no%frameptr"
42184       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42185       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42186       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42187       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42188       CXX_O_FLAG_NONE="-xregs=no%frameptr"
42189       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42190         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42191         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42192       fi
42193     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42194       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42195       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42196       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42197       C_O_FLAG_DEBUG=""
42198       C_O_FLAG_NONE=""
42199       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42200       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42201       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42202       C_O_FLAG_DEBUG=""
42203       CXX_O_FLAG_NONE=""
42204     fi
42205   else
42206     # The remaining toolchains share opt flags between CC and CXX;
42207     # setup for C and duplicate afterwards.
42208     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42209       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42210         # On MacOSX we optimize for size, something
42211         # we should do for all platforms?
42212         C_O_FLAG_HIGHEST="-Os"
42213         C_O_FLAG_HI="-Os"
42214         C_O_FLAG_NORM="-Os"
42215       else
42216         C_O_FLAG_HIGHEST="-O3"
42217         C_O_FLAG_HI="-O3"
42218         C_O_FLAG_NORM="-O2"
42219       fi
42220       C_O_FLAG_DEBUG="-O0"
42221       C_O_FLAG_NONE="-O0"
42222     elif test "x$TOOLCHAIN_TYPE" = xclang; then
42223       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42224         # On MacOSX we optimize for size, something
42225         # we should do for all platforms?
42226         C_O_FLAG_HIGHEST="-Os"
42227         C_O_FLAG_HI="-Os"
42228         C_O_FLAG_NORM="-Os"
42229       else
42230         C_O_FLAG_HIGHEST="-O3"
42231         C_O_FLAG_HI="-O3"
42232         C_O_FLAG_NORM="-O2"
42233       fi
42234       C_O_FLAG_DEBUG="-O0"
42235       C_O_FLAG_NONE="-O0"
42236     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42237       C_O_FLAG_HIGHEST="-O3"
42238       C_O_FLAG_HI="-O3 -qstrict"
42239       C_O_FLAG_NORM="-O2"
42240       C_O_FLAG_DEBUG="-qnoopt"
42241       C_O_FLAG_NONE="-qnoop"
42242     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42243       C_O_FLAG_HIGHEST="-O2"
42244       C_O_FLAG_HI="-O1"
42245       C_O_FLAG_NORM="-O1"
42246       C_O_FLAG_DEBUG="-Od"
42247       C_O_FLAG_NONE="-Od"
42248     fi
42249     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42250     CXX_O_FLAG_HI="$C_O_FLAG_HI"
42251     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42252     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42253     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42254   fi
42255 
42256   # Adjust optimization flags according to debug level.
42257   case $DEBUG_LEVEL in
42258     release )
42259       # no adjustment
42260       ;;
42261     fastdebug )
42262       # Not quite so much optimization
42263       C_O_FLAG_HI="$C_O_FLAG_NORM"
42264       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42265       ;;
42266     slowdebug )
42267       # Disable optimization
42268       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42269       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42270       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42271       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42272       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42273       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42274       ;;
42275   esac
42276 
42277 
42278 
42279 
42280 
42281 
42282 
42283 
42284 
42285 
42286 
42287 
42288 
42289   # Special extras...
42290   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42291     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42292       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42293       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42294     fi
42295   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42296     LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42297     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42298     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42299   fi
42300 
42301   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42302     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42303 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42304   fi
42305 
42306   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42307     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42308 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42309   fi
42310 
42311   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42312     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42313 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42314   fi
42315 
42316 
42317 # Check whether --with-extra-cflags was given.
42318 if test "${with_extra_cflags+set}" = set; then :
42319   withval=$with_extra_cflags;
42320 fi
42321 
42322 
42323 
42324 # Check whether --with-extra-cxxflags was given.
42325 if test "${with_extra_cxxflags+set}" = set; then :
42326   withval=$with_extra_cxxflags;
42327 fi
42328 
42329 
42330 
42331 # Check whether --with-extra-ldflags was given.
42332 if test "${with_extra_ldflags+set}" = set; then :
42333   withval=$with_extra_ldflags;
42334 fi
42335 
42336 
42337   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42338   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42339   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42340 
42341   # Hotspot needs these set in their legacy form
42342   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42343   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42344   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42345 
42346 
42347 
42348 
42349 
42350   ###############################################################################
42351   #
42352   # Now setup the CFLAGS and LDFLAGS for the JDK build.
42353   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42354   #
42355 
42356   # Setup compiler/platform specific flags into
42357   #    CFLAGS_JDK    - C Compiler flags
42358   #    CXXFLAGS_JDK  - C++ Compiler flags
42359   #    COMMON_CCXXFLAGS_JDK - common to C and C++
42360   if test "x$TOOLCHAIN_TYPE" = xgcc; then
42361     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42362         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42363     case $OPENJDK_TARGET_CPU_ARCH in
42364       arm )
42365         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42366         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42367         ;;
42368       ppc )
42369         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42370         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42371         ;;
42372       * )
42373         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42374         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42375         ;;
42376     esac
42377   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42378     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42379     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42380       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42381       CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42382     fi
42383 
42384     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42385     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42386   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42387     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42388     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42389   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42390     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42391     -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42392     -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42393     -DWIN32 -DIAL"
42394     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42395       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42396     else
42397       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42398     fi
42399   fi
42400 
42401   ###############################################################################
42402 
42403   # Adjust flags according to debug level.
42404   case $DEBUG_LEVEL in
42405     fastdebug | slowdebug )
42406       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42407       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42408       JAVAC_FLAGS="$JAVAC_FLAGS -g"
42409       ;;
42410     release )
42411       ;;
42412     * )
42413       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42414       ;;
42415   esac
42416 
42417   # Setup LP64
42418   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42419 
42420   # Set some common defines. These works for all compilers, but assume
42421   # -D is universally accepted.
42422 
42423   # Setup endianness
42424   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42425     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42426     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42427     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42428     #   Note: -Dmacro         is the same as    #define macro 1
42429     #         -Dmacro=        is the same as    #define macro
42430     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42431       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42432     else
42433       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42434     fi
42435   else
42436     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42437     # are defined in the system?
42438     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42439       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42440     else
42441       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42442     fi
42443   fi
42444 
42445   # Setup target OS define. Use OS target name but in upper case.
42446   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42447   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42448 
42449   # Setup target CPU
42450   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42451 
42452   # Setup debug/release defines
42453   if test "x$DEBUG_LEVEL" = xrelease; then
42454     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42455     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42456       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42457     fi
42458   else
42459     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42460   fi
42461 
42462   # Setup release name
42463   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42464 
42465 
42466   # Set some additional per-OS defines.
42467   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42468     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42469   elif test "x$OPENJDK_TARGET_OS" = xaix; then
42470     # FIXME: PPC64 should not be here.
42471     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42472   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42473     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42474   fi
42475 
42476   # Additional macosx handling
42477   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42478     # Setting these parameters makes it an error to link to macosx APIs that are
42479     # newer than the given OS version and makes the linked binaries compatible
42480     # even if built on a newer version of the OS.
42481     # The expected format is X.Y.Z
42482     MACOSX_VERSION_MIN=10.7.0
42483 
42484 
42485     # The macro takes the version with no dots, ex: 1070
42486     # Let the flags variables get resolved in make for easier override on make
42487     # command line.
42488     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42489     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42490   fi
42491 
42492   # Setup some hard coded includes
42493   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42494       -I${JDK_TOPDIR}/src/java.base/share/native/include \
42495       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42496       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42497 
42498   # The shared libraries are compiled using the picflag.
42499   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42500   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42501 
42502   # Executable flags
42503   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42504   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42505 
42506 
42507 
42508 
42509 
42510 
42511   # Setup LDFLAGS et al.
42512   #
42513 
42514   # Now this is odd. The JDK native libraries have to link against libjvm.so
42515   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42516   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42517   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42518   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42519   # libraries will link to whatever is in memory. Yuck.
42520   #
42521   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42522   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42523     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42524     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42525       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42526     fi
42527     # TODO: make -debug optional "--disable-full-debug-symbols"
42528     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42529   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42530     # If this is a --hash-style=gnu system, use --hash-style=both, why?
42531     # We have previously set HAS_GNU_HASH if this is the case
42532     if test -n "$HAS_GNU_HASH"; then
42533       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42534     fi
42535     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42536       # And since we now know that the linker is gnu, then add -z defs, to forbid
42537       # undefined symbols in object files.
42538       LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42539       case $DEBUG_LEVEL in
42540         release )
42541           # tell linker to optimize libraries.
42542           # Should this be supplied to the OSS linker as well?
42543           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42544           ;;
42545         slowdebug )
42546           if test "x$HAS_LINKER_NOW" = "xtrue"; then
42547             # do relocations at load
42548             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42549             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42550           fi
42551           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42552             # mark relocations read only
42553             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42554             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42555           fi
42556           ;;
42557         fastdebug )
42558           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42559             # mark relocations read only
42560             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42561             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42562           fi
42563           ;;
42564         * )
42565           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42566           ;;
42567         esac
42568     fi
42569   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42570     LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42571     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42572   fi
42573 
42574   # Customize LDFLAGS for executables
42575 
42576   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42577 
42578   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42579     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42580       LDFLAGS_STACK_SIZE=1048576
42581     else
42582       LDFLAGS_STACK_SIZE=327680
42583     fi
42584     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42585   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42586     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42587   fi
42588 
42589   # Customize LDFLAGS for libs
42590   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42591 
42592   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42593     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42594     LDFLAGS_JDKLIB_SUFFIX=""
42595   else
42596     LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42597         -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42598 
42599     # On some platforms (mac) the linker warns about non existing -L dirs.
42600     # Add server first if available. Linking aginst client does not always produce the same results.
42601     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42602     # Default to server for other variants.
42603     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42604       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42605     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42606       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42607     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42608       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42609     else
42610       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42611     fi
42612 
42613     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42614     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42615       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42616     fi
42617   fi
42618 
42619 
42620 
42621 
42622 
42623 
42624 
42625 
42626   # Some Zero and Shark settings.
42627   # ZERO_ARCHFLAG tells the compiler which mode to build for
42628   case "${OPENJDK_TARGET_CPU}" in
42629     s390)
42630       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42631       ;;
42632     *)
42633       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42634   esac
42635 
42636   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42637 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42638   supports=yes
42639 
42640   saved_cflags="$CFLAGS"
42641   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42642   ac_ext=c
42643 ac_cpp='$CPP $CPPFLAGS'
42644 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42645 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42646 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42647 
42648   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42649 /* end confdefs.h.  */
42650 int i;
42651 _ACEOF
42652 if ac_fn_c_try_compile "$LINENO"; then :
42653 
42654 else
42655   supports=no
42656 fi
42657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42658   ac_ext=cpp
42659 ac_cpp='$CXXCPP $CPPFLAGS'
42660 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42661 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42662 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42663 
42664   CFLAGS="$saved_cflags"
42665 
42666   saved_cxxflags="$CXXFLAGS"
42667   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42668   ac_ext=cpp
42669 ac_cpp='$CXXCPP $CPPFLAGS'
42670 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42671 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42672 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42673 
42674   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42675 /* end confdefs.h.  */
42676 int i;
42677 _ACEOF
42678 if ac_fn_cxx_try_compile "$LINENO"; then :
42679 
42680 else
42681   supports=no
42682 fi
42683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42684   ac_ext=cpp
42685 ac_cpp='$CXXCPP $CPPFLAGS'
42686 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42687 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42688 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42689 
42690   CXXFLAGS="$saved_cxxflags"
42691 
42692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42693 $as_echo "$supports" >&6; }
42694   if test "x$supports" = "xyes" ; then
42695     :
42696   else
42697     ZERO_ARCHFLAG=""
42698   fi
42699 
42700 
42701 
42702   # Check that the compiler supports -mX (or -qX on AIX) flags
42703   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42704 
42705   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42706 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42707   supports=yes
42708 
42709   saved_cflags="$CFLAGS"
42710   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42711   ac_ext=c
42712 ac_cpp='$CPP $CPPFLAGS'
42713 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42714 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42715 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42716 
42717   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42718 /* end confdefs.h.  */
42719 int i;
42720 _ACEOF
42721 if ac_fn_c_try_compile "$LINENO"; then :
42722 
42723 else
42724   supports=no
42725 fi
42726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42727   ac_ext=cpp
42728 ac_cpp='$CXXCPP $CPPFLAGS'
42729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42732 
42733   CFLAGS="$saved_cflags"
42734 
42735   saved_cxxflags="$CXXFLAGS"
42736   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42737   ac_ext=cpp
42738 ac_cpp='$CXXCPP $CPPFLAGS'
42739 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42740 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42741 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42742 
42743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42744 /* end confdefs.h.  */
42745 int i;
42746 _ACEOF
42747 if ac_fn_cxx_try_compile "$LINENO"; then :
42748 
42749 else
42750   supports=no
42751 fi
42752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42753   ac_ext=cpp
42754 ac_cpp='$CXXCPP $CPPFLAGS'
42755 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42756 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42757 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42758 
42759   CXXFLAGS="$saved_cxxflags"
42760 
42761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42762 $as_echo "$supports" >&6; }
42763   if test "x$supports" = "xyes" ; then
42764     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42765   else
42766     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42767   fi
42768 
42769 
42770 
42771   case "${TOOLCHAIN_TYPE}" in
42772     microsoft)
42773       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42774       ;;
42775     solstudio)
42776       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42777       ;;
42778     gcc)
42779       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42780       ;;
42781     clang)
42782       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42783       ;;
42784   esac
42785 
42786 
42787 
42788 # Setup debug symbols (need objcopy from the toolchain for that)
42789 
42790   #
42791   # ENABLE_DEBUG_SYMBOLS
42792   # This must be done after the toolchain is setup, since we're looking at objcopy.
42793   #
42794   # Check whether --enable-debug-symbols was given.
42795 if test "${enable_debug_symbols+set}" = set; then :
42796   enableval=$enable_debug_symbols;
42797 fi
42798 
42799 
42800   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42801 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42802 
42803   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42804     # explicit enabling of enable-debug-symbols and can't find objcopy
42805     #   this is an error
42806     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42807   fi
42808 
42809   if test "x$enable_debug_symbols" = "xyes"; then
42810     ENABLE_DEBUG_SYMBOLS=true
42811   elif test "x$enable_debug_symbols" = "xno"; then
42812     ENABLE_DEBUG_SYMBOLS=false
42813   else
42814     # Default is on if objcopy is found
42815     if test "x$OBJCOPY" != x; then
42816       ENABLE_DEBUG_SYMBOLS=true
42817     # MacOS X and Windows don't use objcopy but default is on for those OSes
42818     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42819       ENABLE_DEBUG_SYMBOLS=true
42820     else
42821       ENABLE_DEBUG_SYMBOLS=false
42822     fi
42823   fi
42824 
42825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42826 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42827 
42828   #
42829   # ZIP_DEBUGINFO_FILES
42830   #
42831   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42832 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42833   # Check whether --enable-zip-debug-info was given.
42834 if test "${enable_zip_debug_info+set}" = set; then :
42835   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42836 else
42837   enable_zip_debug_info="yes"
42838 fi
42839 
42840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42841 $as_echo "${enable_zip_debug_info}" >&6; }
42842 
42843   if test "x${enable_zip_debug_info}" = "xno"; then
42844     ZIP_DEBUGINFO_FILES=false
42845   else
42846     ZIP_DEBUGINFO_FILES=true
42847   fi
42848 
42849 
42850 
42851 
42852 
42853 ###############################################################################
42854 #
42855 # Check dependencies for external and internal libraries.
42856 #
42857 ###############################################################################
42858 
42859 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42860 
42861   # When using cygwin or msys, we need a wrapper binary that renames
42862   # /cygdrive/c/ arguments into c:/ arguments and peeks into
42863   # @files and rewrites these too! This wrapper binary is
42864   # called fixpath.
42865   FIXPATH=
42866   if test "x$OPENJDK_BUILD_OS" = xwindows; then
42867     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42868 $as_echo_n "checking if fixpath can be created... " >&6; }
42869     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42870     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42871     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42872       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42873       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42874       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42875       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42876     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42877       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42878       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42879 
42880       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42881       # @ was chosen as separator to minimize risk of other tools messing around with it
42882       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42883       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42884 
42885       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42886     fi
42887     rm -f $OUTPUT_ROOT/fixpath*
42888     cd $OUTPUT_ROOT
42889     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42890     cd $CURDIR
42891 
42892     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42893       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42894 $as_echo "no" >&6; }
42895       cat $OUTPUT_ROOT/fixpath1.log
42896       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42897     fi
42898     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42899 $as_echo "yes" >&6; }
42900     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42901 $as_echo_n "checking if fixpath.exe works... " >&6; }
42902     cd $OUTPUT_ROOT
42903     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42904     cd $CURDIR
42905     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42906       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42907 $as_echo "no" >&6; }
42908       cat $OUTPUT_ROOT/fixpath2.log
42909       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42910     fi
42911     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42912 $as_echo "yes" >&6; }
42913     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42914   fi
42915 
42916 
42917 
42918 
42919 
42920 
42921   ###############################################################################
42922   #
42923   # OS specific settings that we never will need to probe.
42924   #
42925   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42927 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42928     PULSE_NOT_NEEDED=yes
42929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42930 $as_echo "pulse" >&6; }
42931   fi
42932 
42933   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42935 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42936     ALSA_NOT_NEEDED=yes
42937     PULSE_NOT_NEEDED=yes
42938     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42939 $as_echo "alsa pulse" >&6; }
42940   fi
42941 
42942   if test "x$OPENJDK_TARGET_OS" = xaix; then
42943     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42944 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42945     ALSA_NOT_NEEDED=yes
42946     PULSE_NOT_NEEDED=yes
42947     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42948 $as_echo "alsa pulse" >&6; }
42949   fi
42950 
42951 
42952   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42953     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42954 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42955     CUPS_NOT_NEEDED=yes
42956     ALSA_NOT_NEEDED=yes
42957     PULSE_NOT_NEEDED=yes
42958     X11_NOT_NEEDED=yes
42959     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42960 $as_echo "alsa cups pulse x11" >&6; }
42961   fi
42962 
42963   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42964     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42965 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42966     ALSA_NOT_NEEDED=yes
42967     PULSE_NOT_NEEDED=yes
42968     X11_NOT_NEEDED=yes
42969     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42970 $as_echo "alsa pulse x11" >&6; }
42971   fi
42972 
42973   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42974     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42975 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42976     ALSA_NOT_NEEDED=yes
42977     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42978 $as_echo "alsa" >&6; }
42979   fi
42980 
42981   if test "x$OPENJDK" = "xfalse"; then
42982     FREETYPE_NOT_NEEDED=yes
42983   fi
42984 
42985   if test "x$SUPPORT_HEADFUL" = xno; then
42986     X11_NOT_NEEDED=yes
42987   fi
42988 
42989 
42990 
42991   ###############################################################################
42992   #
42993   # Check for X Windows
42994   #
42995 
42996   if test "x$X11_NOT_NEEDED" = xyes; then
42997     if test "x${with_x}" != x; then
42998       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42999 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43000     fi
43001     X_CFLAGS=
43002     X_LIBS=
43003   else
43004     # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43005     # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43006     # --x-libraries for the sysroot, if that seems to be correct.
43007     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43008       if test "x$SYSROOT" != "x"; then
43009         if test "x$x_includes" = xNONE; then
43010           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43011             x_includes="$SYSROOT/usr/X11R6/include"
43012           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43013             x_includes="$SYSROOT/usr/include"
43014           fi
43015         fi
43016         if test "x$x_libraries" = xNONE; then
43017           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43018             x_libraries="$SYSROOT/usr/X11R6/lib"
43019           elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43020             x_libraries="$SYSROOT/usr/lib64"
43021           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43022             x_libraries="$SYSROOT/usr/lib"
43023           fi
43024         fi
43025       fi
43026     fi
43027 
43028     # Now let autoconf do it's magic
43029     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43030 $as_echo_n "checking for X... " >&6; }
43031 
43032 
43033 # Check whether --with-x was given.
43034 if test "${with_x+set}" = set; then :
43035   withval=$with_x;
43036 fi
43037 
43038 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43039 if test "x$with_x" = xno; then
43040   # The user explicitly disabled X.
43041   have_x=disabled
43042 else
43043   case $x_includes,$x_libraries in #(
43044     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43045     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43046   $as_echo_n "(cached) " >&6
43047 else
43048   # One or both of the vars are not set, and there is no cached value.
43049 ac_x_includes=no ac_x_libraries=no
43050 rm -f -r conftest.dir
43051 if mkdir conftest.dir; then
43052   cd conftest.dir
43053   cat >Imakefile <<'_ACEOF'
43054 incroot:
43055         @echo incroot='${INCROOT}'
43056 usrlibdir:
43057         @echo usrlibdir='${USRLIBDIR}'
43058 libdir:
43059         @echo libdir='${LIBDIR}'
43060 _ACEOF
43061   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43062     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43063     for ac_var in incroot usrlibdir libdir; do
43064       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43065     done
43066     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43067     for ac_extension in a so sl dylib la dll; do
43068       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43069          test -f "$ac_im_libdir/libX11.$ac_extension"; then
43070         ac_im_usrlibdir=$ac_im_libdir; break
43071       fi
43072     done
43073     # Screen out bogus values from the imake configuration.  They are
43074     # bogus both because they are the default anyway, and because
43075     # using them would break gcc on systems where it needs fixed includes.
43076     case $ac_im_incroot in
43077         /usr/include) ac_x_includes= ;;
43078         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43079     esac
43080     case $ac_im_usrlibdir in
43081         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
43082         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43083     esac
43084   fi
43085   cd ..
43086   rm -f -r conftest.dir
43087 fi
43088 
43089 # Standard set of common directories for X headers.
43090 # Check X11 before X11Rn because it is often a symlink to the current release.
43091 ac_x_header_dirs='
43092 /usr/X11/include
43093 /usr/X11R7/include
43094 /usr/X11R6/include
43095 /usr/X11R5/include
43096 /usr/X11R4/include
43097 
43098 /usr/include/X11
43099 /usr/include/X11R7
43100 /usr/include/X11R6
43101 /usr/include/X11R5
43102 /usr/include/X11R4
43103 
43104 /usr/local/X11/include
43105 /usr/local/X11R7/include
43106 /usr/local/X11R6/include
43107 /usr/local/X11R5/include
43108 /usr/local/X11R4/include
43109 
43110 /usr/local/include/X11
43111 /usr/local/include/X11R7
43112 /usr/local/include/X11R6
43113 /usr/local/include/X11R5
43114 /usr/local/include/X11R4
43115 
43116 /usr/X386/include
43117 /usr/x386/include
43118 /usr/XFree86/include/X11
43119 
43120 /usr/include
43121 /usr/local/include
43122 /usr/unsupported/include
43123 /usr/athena/include
43124 /usr/local/x11r5/include
43125 /usr/lpp/Xamples/include
43126 
43127 /usr/openwin/include
43128 /usr/openwin/share/include'
43129 
43130 if test "$ac_x_includes" = no; then
43131   # Guess where to find include files, by looking for Xlib.h.
43132   # First, try using that file with no special directory specified.
43133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43134 /* end confdefs.h.  */
43135 #include <X11/Xlib.h>
43136 _ACEOF
43137 if ac_fn_cxx_try_cpp "$LINENO"; then :
43138   # We can compile using X headers with no special include directory.
43139 ac_x_includes=
43140 else
43141   for ac_dir in $ac_x_header_dirs; do
43142   if test -r "$ac_dir/X11/Xlib.h"; then
43143     ac_x_includes=$ac_dir
43144     break
43145   fi
43146 done
43147 fi
43148 rm -f conftest.err conftest.i conftest.$ac_ext
43149 fi # $ac_x_includes = no
43150 
43151 if test "$ac_x_libraries" = no; then
43152   # Check for the libraries.
43153   # See if we find them without any special options.
43154   # Don't add to $LIBS permanently.
43155   ac_save_LIBS=$LIBS
43156   LIBS="-lX11 $LIBS"
43157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43158 /* end confdefs.h.  */
43159 #include <X11/Xlib.h>
43160 int
43161 main ()
43162 {
43163 XrmInitialize ()
43164   ;
43165   return 0;
43166 }
43167 _ACEOF
43168 if ac_fn_cxx_try_link "$LINENO"; then :
43169   LIBS=$ac_save_LIBS
43170 # We can link X programs with no special library path.
43171 ac_x_libraries=
43172 else
43173   LIBS=$ac_save_LIBS
43174 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43175 do
43176   # Don't even attempt the hair of trying to link an X program!
43177   for ac_extension in a so sl dylib la dll; do
43178     if test -r "$ac_dir/libX11.$ac_extension"; then
43179       ac_x_libraries=$ac_dir
43180       break 2
43181     fi
43182   done
43183 done
43184 fi
43185 rm -f core conftest.err conftest.$ac_objext \
43186     conftest$ac_exeext conftest.$ac_ext
43187 fi # $ac_x_libraries = no
43188 
43189 case $ac_x_includes,$ac_x_libraries in #(
43190   no,* | *,no | *\'*)
43191     # Didn't find X, or a directory has "'" in its name.
43192     ac_cv_have_x="have_x=no";; #(
43193   *)
43194     # Record where we found X for the cache.
43195     ac_cv_have_x="have_x=yes\
43196         ac_x_includes='$ac_x_includes'\
43197         ac_x_libraries='$ac_x_libraries'"
43198 esac
43199 fi
43200 ;; #(
43201     *) have_x=yes;;
43202   esac
43203   eval "$ac_cv_have_x"
43204 fi # $with_x != no
43205 
43206 if test "$have_x" != yes; then
43207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43208 $as_echo "$have_x" >&6; }
43209   no_x=yes
43210 else
43211   # If each of the values was on the command line, it overrides each guess.
43212   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43213   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43214   # Update the cache value to reflect the command line values.
43215   ac_cv_have_x="have_x=yes\
43216         ac_x_includes='$x_includes'\
43217         ac_x_libraries='$x_libraries'"
43218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43219 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43220 fi
43221 
43222     if test "$no_x" = yes; then
43223   # Not all programs may use this symbol, but it does not hurt to define it.
43224 
43225 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43226 
43227   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43228 else
43229   if test -n "$x_includes"; then
43230     X_CFLAGS="$X_CFLAGS -I$x_includes"
43231   fi
43232 
43233   # It would also be nice to do this for all -L options, not just this one.
43234   if test -n "$x_libraries"; then
43235     X_LIBS="$X_LIBS -L$x_libraries"
43236     # For Solaris; some versions of Sun CC require a space after -R and
43237     # others require no space.  Words are not sufficient . . . .
43238     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43239 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
43240     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43241     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43242     ac_cxx_werror_flag=yes
43243     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43244 /* end confdefs.h.  */
43245 
43246 int
43247 main ()
43248 {
43249 
43250   ;
43251   return 0;
43252 }
43253 _ACEOF
43254 if ac_fn_cxx_try_link "$LINENO"; then :
43255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43256 $as_echo "no" >&6; }
43257        X_LIBS="$X_LIBS -R$x_libraries"
43258 else
43259   LIBS="$ac_xsave_LIBS -R $x_libraries"
43260        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43261 /* end confdefs.h.  */
43262 
43263 int
43264 main ()
43265 {
43266 
43267   ;
43268   return 0;
43269 }
43270 _ACEOF
43271 if ac_fn_cxx_try_link "$LINENO"; then :
43272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43273 $as_echo "yes" >&6; }
43274           X_LIBS="$X_LIBS -R $x_libraries"
43275 else
43276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43277 $as_echo "neither works" >&6; }
43278 fi
43279 rm -f core conftest.err conftest.$ac_objext \
43280     conftest$ac_exeext conftest.$ac_ext
43281 fi
43282 rm -f core conftest.err conftest.$ac_objext \
43283     conftest$ac_exeext conftest.$ac_ext
43284     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43285     LIBS=$ac_xsave_LIBS
43286   fi
43287 
43288   # Check for system-dependent libraries X programs must link with.
43289   # Do this before checking for the system-independent R6 libraries
43290   # (-lICE), since we may need -lsocket or whatever for X linking.
43291 
43292   if test "$ISC" = yes; then
43293     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43294   else
43295     # Martyn Johnson says this is needed for Ultrix, if the X
43296     # libraries were built with DECnet support.  And Karl Berry says
43297     # the Alpha needs dnet_stub (dnet does not exist).
43298     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43299     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43300 /* end confdefs.h.  */
43301 
43302 /* Override any GCC internal prototype to avoid an error.
43303    Use char because int might match the return type of a GCC
43304    builtin and then its argument prototype would still apply.  */
43305 #ifdef __cplusplus
43306 extern "C"
43307 #endif
43308 char XOpenDisplay ();
43309 int
43310 main ()
43311 {
43312 return XOpenDisplay ();
43313   ;
43314   return 0;
43315 }
43316 _ACEOF
43317 if ac_fn_cxx_try_link "$LINENO"; then :
43318 
43319 else
43320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43321 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43322 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43323   $as_echo_n "(cached) " >&6
43324 else
43325   ac_check_lib_save_LIBS=$LIBS
43326 LIBS="-ldnet  $LIBS"
43327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43328 /* end confdefs.h.  */
43329 
43330 /* Override any GCC internal prototype to avoid an error.
43331    Use char because int might match the return type of a GCC
43332    builtin and then its argument prototype would still apply.  */
43333 #ifdef __cplusplus
43334 extern "C"
43335 #endif
43336 char dnet_ntoa ();
43337 int
43338 main ()
43339 {
43340 return dnet_ntoa ();
43341   ;
43342   return 0;
43343 }
43344 _ACEOF
43345 if ac_fn_cxx_try_link "$LINENO"; then :
43346   ac_cv_lib_dnet_dnet_ntoa=yes
43347 else
43348   ac_cv_lib_dnet_dnet_ntoa=no
43349 fi
43350 rm -f core conftest.err conftest.$ac_objext \
43351     conftest$ac_exeext conftest.$ac_ext
43352 LIBS=$ac_check_lib_save_LIBS
43353 fi
43354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43355 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43356 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43357   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43358 fi
43359 
43360     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43361       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43362 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43363 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43364   $as_echo_n "(cached) " >&6
43365 else
43366   ac_check_lib_save_LIBS=$LIBS
43367 LIBS="-ldnet_stub  $LIBS"
43368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43369 /* end confdefs.h.  */
43370 
43371 /* Override any GCC internal prototype to avoid an error.
43372    Use char because int might match the return type of a GCC
43373    builtin and then its argument prototype would still apply.  */
43374 #ifdef __cplusplus
43375 extern "C"
43376 #endif
43377 char dnet_ntoa ();
43378 int
43379 main ()
43380 {
43381 return dnet_ntoa ();
43382   ;
43383   return 0;
43384 }
43385 _ACEOF
43386 if ac_fn_cxx_try_link "$LINENO"; then :
43387   ac_cv_lib_dnet_stub_dnet_ntoa=yes
43388 else
43389   ac_cv_lib_dnet_stub_dnet_ntoa=no
43390 fi
43391 rm -f core conftest.err conftest.$ac_objext \
43392     conftest$ac_exeext conftest.$ac_ext
43393 LIBS=$ac_check_lib_save_LIBS
43394 fi
43395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43396 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43397 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43398   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43399 fi
43400 
43401     fi
43402 fi
43403 rm -f core conftest.err conftest.$ac_objext \
43404     conftest$ac_exeext conftest.$ac_ext
43405     LIBS="$ac_xsave_LIBS"
43406 
43407     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43408     # to get the SysV transport functions.
43409     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43410     # needs -lnsl.
43411     # The nsl library prevents programs from opening the X display
43412     # on Irix 5.2, according to T.E. Dickey.
43413     # The functions gethostbyname, getservbyname, and inet_addr are
43414     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43415     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43416 if test "x$ac_cv_func_gethostbyname" = xyes; then :
43417 
43418 fi
43419 
43420     if test $ac_cv_func_gethostbyname = no; then
43421       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43422 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43423 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43424   $as_echo_n "(cached) " >&6
43425 else
43426   ac_check_lib_save_LIBS=$LIBS
43427 LIBS="-lnsl  $LIBS"
43428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43429 /* end confdefs.h.  */
43430 
43431 /* Override any GCC internal prototype to avoid an error.
43432    Use char because int might match the return type of a GCC
43433    builtin and then its argument prototype would still apply.  */
43434 #ifdef __cplusplus
43435 extern "C"
43436 #endif
43437 char gethostbyname ();
43438 int
43439 main ()
43440 {
43441 return gethostbyname ();
43442   ;
43443   return 0;
43444 }
43445 _ACEOF
43446 if ac_fn_cxx_try_link "$LINENO"; then :
43447   ac_cv_lib_nsl_gethostbyname=yes
43448 else
43449   ac_cv_lib_nsl_gethostbyname=no
43450 fi
43451 rm -f core conftest.err conftest.$ac_objext \
43452     conftest$ac_exeext conftest.$ac_ext
43453 LIBS=$ac_check_lib_save_LIBS
43454 fi
43455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43456 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43457 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43458   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43459 fi
43460 
43461       if test $ac_cv_lib_nsl_gethostbyname = no; then
43462         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43463 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43464 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43465   $as_echo_n "(cached) " >&6
43466 else
43467   ac_check_lib_save_LIBS=$LIBS
43468 LIBS="-lbsd  $LIBS"
43469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43470 /* end confdefs.h.  */
43471 
43472 /* Override any GCC internal prototype to avoid an error.
43473    Use char because int might match the return type of a GCC
43474    builtin and then its argument prototype would still apply.  */
43475 #ifdef __cplusplus
43476 extern "C"
43477 #endif
43478 char gethostbyname ();
43479 int
43480 main ()
43481 {
43482 return gethostbyname ();
43483   ;
43484   return 0;
43485 }
43486 _ACEOF
43487 if ac_fn_cxx_try_link "$LINENO"; then :
43488   ac_cv_lib_bsd_gethostbyname=yes
43489 else
43490   ac_cv_lib_bsd_gethostbyname=no
43491 fi
43492 rm -f core conftest.err conftest.$ac_objext \
43493     conftest$ac_exeext conftest.$ac_ext
43494 LIBS=$ac_check_lib_save_LIBS
43495 fi
43496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43497 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43498 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43499   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43500 fi
43501 
43502       fi
43503     fi
43504 
43505     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43506     # socket/setsockopt and other routines are undefined under SCO ODT
43507     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43508     # on later versions), says Simon Leinen: it contains gethostby*
43509     # variants that don't use the name server (or something).  -lsocket
43510     # must be given before -lnsl if both are needed.  We assume that
43511     # if connect needs -lnsl, so does gethostbyname.
43512     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43513 if test "x$ac_cv_func_connect" = xyes; then :
43514 
43515 fi
43516 
43517     if test $ac_cv_func_connect = no; then
43518       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43519 $as_echo_n "checking for connect in -lsocket... " >&6; }
43520 if ${ac_cv_lib_socket_connect+:} false; then :
43521   $as_echo_n "(cached) " >&6
43522 else
43523   ac_check_lib_save_LIBS=$LIBS
43524 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43526 /* end confdefs.h.  */
43527 
43528 /* Override any GCC internal prototype to avoid an error.
43529    Use char because int might match the return type of a GCC
43530    builtin and then its argument prototype would still apply.  */
43531 #ifdef __cplusplus
43532 extern "C"
43533 #endif
43534 char connect ();
43535 int
43536 main ()
43537 {
43538 return connect ();
43539   ;
43540   return 0;
43541 }
43542 _ACEOF
43543 if ac_fn_cxx_try_link "$LINENO"; then :
43544   ac_cv_lib_socket_connect=yes
43545 else
43546   ac_cv_lib_socket_connect=no
43547 fi
43548 rm -f core conftest.err conftest.$ac_objext \
43549     conftest$ac_exeext conftest.$ac_ext
43550 LIBS=$ac_check_lib_save_LIBS
43551 fi
43552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43553 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43554 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43555   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43556 fi
43557 
43558     fi
43559 
43560     # Guillermo Gomez says -lposix is necessary on A/UX.
43561     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43562 if test "x$ac_cv_func_remove" = xyes; then :
43563 
43564 fi
43565 
43566     if test $ac_cv_func_remove = no; then
43567       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43568 $as_echo_n "checking for remove in -lposix... " >&6; }
43569 if ${ac_cv_lib_posix_remove+:} false; then :
43570   $as_echo_n "(cached) " >&6
43571 else
43572   ac_check_lib_save_LIBS=$LIBS
43573 LIBS="-lposix  $LIBS"
43574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43575 /* end confdefs.h.  */
43576 
43577 /* Override any GCC internal prototype to avoid an error.
43578    Use char because int might match the return type of a GCC
43579    builtin and then its argument prototype would still apply.  */
43580 #ifdef __cplusplus
43581 extern "C"
43582 #endif
43583 char remove ();
43584 int
43585 main ()
43586 {
43587 return remove ();
43588   ;
43589   return 0;
43590 }
43591 _ACEOF
43592 if ac_fn_cxx_try_link "$LINENO"; then :
43593   ac_cv_lib_posix_remove=yes
43594 else
43595   ac_cv_lib_posix_remove=no
43596 fi
43597 rm -f core conftest.err conftest.$ac_objext \
43598     conftest$ac_exeext conftest.$ac_ext
43599 LIBS=$ac_check_lib_save_LIBS
43600 fi
43601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43602 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43603 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43604   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43605 fi
43606 
43607     fi
43608 
43609     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43610     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43611 if test "x$ac_cv_func_shmat" = xyes; then :
43612 
43613 fi
43614 
43615     if test $ac_cv_func_shmat = no; then
43616       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43617 $as_echo_n "checking for shmat in -lipc... " >&6; }
43618 if ${ac_cv_lib_ipc_shmat+:} false; then :
43619   $as_echo_n "(cached) " >&6
43620 else
43621   ac_check_lib_save_LIBS=$LIBS
43622 LIBS="-lipc  $LIBS"
43623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43624 /* end confdefs.h.  */
43625 
43626 /* Override any GCC internal prototype to avoid an error.
43627    Use char because int might match the return type of a GCC
43628    builtin and then its argument prototype would still apply.  */
43629 #ifdef __cplusplus
43630 extern "C"
43631 #endif
43632 char shmat ();
43633 int
43634 main ()
43635 {
43636 return shmat ();
43637   ;
43638   return 0;
43639 }
43640 _ACEOF
43641 if ac_fn_cxx_try_link "$LINENO"; then :
43642   ac_cv_lib_ipc_shmat=yes
43643 else
43644   ac_cv_lib_ipc_shmat=no
43645 fi
43646 rm -f core conftest.err conftest.$ac_objext \
43647     conftest$ac_exeext conftest.$ac_ext
43648 LIBS=$ac_check_lib_save_LIBS
43649 fi
43650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43651 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43652 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43653   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43654 fi
43655 
43656     fi
43657   fi
43658 
43659   # Check for libraries that X11R6 Xt/Xaw programs need.
43660   ac_save_LDFLAGS=$LDFLAGS
43661   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43662   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43663   # check for ICE first), but we must link in the order -lSM -lICE or
43664   # we get undefined symbols.  So assume we have SM if we have ICE.
43665   # These have to be linked with before -lX11, unlike the other
43666   # libraries we check for below, so use a different variable.
43667   # John Interrante, Karl Berry
43668   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43669 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43670 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43671   $as_echo_n "(cached) " >&6
43672 else
43673   ac_check_lib_save_LIBS=$LIBS
43674 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43676 /* end confdefs.h.  */
43677 
43678 /* Override any GCC internal prototype to avoid an error.
43679    Use char because int might match the return type of a GCC
43680    builtin and then its argument prototype would still apply.  */
43681 #ifdef __cplusplus
43682 extern "C"
43683 #endif
43684 char IceConnectionNumber ();
43685 int
43686 main ()
43687 {
43688 return IceConnectionNumber ();
43689   ;
43690   return 0;
43691 }
43692 _ACEOF
43693 if ac_fn_cxx_try_link "$LINENO"; then :
43694   ac_cv_lib_ICE_IceConnectionNumber=yes
43695 else
43696   ac_cv_lib_ICE_IceConnectionNumber=no
43697 fi
43698 rm -f core conftest.err conftest.$ac_objext \
43699     conftest$ac_exeext conftest.$ac_ext
43700 LIBS=$ac_check_lib_save_LIBS
43701 fi
43702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43703 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43704 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43705   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43706 fi
43707 
43708   LDFLAGS=$ac_save_LDFLAGS
43709 
43710 fi
43711 
43712 
43713     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43714     # this doesn't make sense so we remove it.
43715     if test "x$COMPILE_TYPE" = xcross; then
43716       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43717     fi
43718 
43719     if test "x$no_x" = xyes; then
43720 
43721   # Print a helpful message on how to acquire the necessary build dependency.
43722   # x11 is the help tag: freetype, cups, pulse, alsa etc
43723   MISSING_DEPENDENCY=x11
43724 
43725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43726     cygwin_help $MISSING_DEPENDENCY
43727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43728     msys_help $MISSING_DEPENDENCY
43729   else
43730     PKGHANDLER_COMMAND=
43731 
43732     case $PKGHANDLER in
43733       apt-get)
43734         apt_help     $MISSING_DEPENDENCY ;;
43735       yum)
43736         yum_help     $MISSING_DEPENDENCY ;;
43737       port)
43738         port_help    $MISSING_DEPENDENCY ;;
43739       pkgutil)
43740         pkgutil_help $MISSING_DEPENDENCY ;;
43741       pkgadd)
43742         pkgadd_help  $MISSING_DEPENDENCY ;;
43743     esac
43744 
43745     if test "x$PKGHANDLER_COMMAND" != x; then
43746       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43747     fi
43748   fi
43749 
43750       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43751     fi
43752 
43753     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43754       OPENWIN_HOME="/usr/openwin"
43755       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43756       X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43757           -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43758           -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43759           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43760     fi
43761 
43762     ac_ext=c
43763 ac_cpp='$CPP $CPPFLAGS'
43764 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43765 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43766 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43767 
43768     OLD_CFLAGS="$CFLAGS"
43769     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43770 
43771     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43772     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43773 do :
43774   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43775 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43776           # include <X11/Xlib.h>
43777           # include <X11/Xutil.h>
43778 
43779 
43780 "
43781 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43782   cat >>confdefs.h <<_ACEOF
43783 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43784 _ACEOF
43785  X11_HEADERS_OK=yes
43786 else
43787   X11_HEADERS_OK=no; break
43788 fi
43789 
43790 done
43791 
43792 
43793     if test "x$X11_HEADERS_OK" = xno; then
43794 
43795   # Print a helpful message on how to acquire the necessary build dependency.
43796   # x11 is the help tag: freetype, cups, pulse, alsa etc
43797   MISSING_DEPENDENCY=x11
43798 
43799   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43800     cygwin_help $MISSING_DEPENDENCY
43801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43802     msys_help $MISSING_DEPENDENCY
43803   else
43804     PKGHANDLER_COMMAND=
43805 
43806     case $PKGHANDLER in
43807       apt-get)
43808         apt_help     $MISSING_DEPENDENCY ;;
43809       yum)
43810         yum_help     $MISSING_DEPENDENCY ;;
43811       port)
43812         port_help    $MISSING_DEPENDENCY ;;
43813       pkgutil)
43814         pkgutil_help $MISSING_DEPENDENCY ;;
43815       pkgadd)
43816         pkgadd_help  $MISSING_DEPENDENCY ;;
43817     esac
43818 
43819     if test "x$PKGHANDLER_COMMAND" != x; then
43820       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43821     fi
43822   fi
43823 
43824       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43825     fi
43826 
43827     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43828     # defined in libawt_xawt.
43829     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43830 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43831     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43832 /* end confdefs.h.  */
43833 #include <X11/extensions/Xrender.h>
43834 int
43835 main ()
43836 {
43837 XLinearGradient x;
43838   ;
43839   return 0;
43840 }
43841 _ACEOF
43842 if ac_fn_c_try_compile "$LINENO"; then :
43843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43844 $as_echo "yes" >&6; }
43845 else
43846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43847 $as_echo "no" >&6; }
43848          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43849 fi
43850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43851 
43852     CFLAGS="$OLD_CFLAGS"
43853     ac_ext=cpp
43854 ac_cpp='$CXXCPP $CPPFLAGS'
43855 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43856 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43857 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43858 
43859   fi # X11_NOT_NEEDED
43860 
43861 
43862 
43863 
43864 
43865 
43866   ###############################################################################
43867   #
43868   # The common unix printing system cups is used to print from java.
43869   #
43870 
43871 # Check whether --with-cups was given.
43872 if test "${with_cups+set}" = set; then :
43873   withval=$with_cups;
43874 fi
43875 
43876 
43877 # Check whether --with-cups-include was given.
43878 if test "${with_cups_include+set}" = set; then :
43879   withval=$with_cups_include;
43880 fi
43881 
43882 
43883   if test "x$CUPS_NOT_NEEDED" = xyes; then
43884     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43885       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43886 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43887     fi
43888     CUPS_CFLAGS=
43889   else
43890     CUPS_FOUND=no
43891 
43892     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43893       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43894     fi
43895 
43896     if test "x${with_cups}" != x; then
43897       CUPS_CFLAGS="-I${with_cups}/include"
43898       CUPS_FOUND=yes
43899     fi
43900     if test "x${with_cups_include}" != x; then
43901       CUPS_CFLAGS="-I${with_cups_include}"
43902       CUPS_FOUND=yes
43903     fi
43904     if test "x$CUPS_FOUND" = xno; then
43905 
43906 
43907   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43908     # Source the builddeps file again, to make sure it uses the latest variables!
43909     . $builddepsfile
43910     # Look for a target and build machine specific resource!
43911     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43912     if test "x$resource" = x; then
43913       # Ok, lets instead look for a target specific resource
43914       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43915     fi
43916     if test "x$resource" = x; then
43917       # Ok, lets instead look for a build specific resource
43918       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43919     fi
43920     if test "x$resource" = x; then
43921       # Ok, lets instead look for a generic resource
43922       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43923       resource=${builddep_cups}
43924     fi
43925     if test "x$resource" != x; then
43926       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43927 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43928       # If the resource in the builddeps.conf file is an existing directory,
43929       # for example /java/linux/cups
43930       if test -d ${resource}; then
43931         depdir=${resource}
43932       else
43933 
43934   # cups is for example mymodule
43935   # $resource is for example libs/general/libmymod_1_2_3.zip
43936   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43937   # $with_builddeps_dir is for example /localhome/builddeps
43938   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43939   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43940   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43941   filename=`basename $resource`
43942   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43943   filebase=${filename%%.*}
43944   extension=${filename#*.}
43945   installdir=$with_builddeps_dir/$filebase
43946   if test ! -f $installdir/$filename.unpacked; then
43947     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43948 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43949     if test ! -d $installdir; then
43950       mkdir -p $installdir
43951     fi
43952     if test ! -d $installdir; then
43953       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43954     fi
43955     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43956     touch $tmpfile
43957     if test ! -f $tmpfile; then
43958       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43959     fi
43960 
43961   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43962   # $tmpfile is the local file name for the downloaded file.
43963   VALID_TOOL=no
43964   if test "x$BDEPS_FTP" = xwget; then
43965     VALID_TOOL=yes
43966     wget -O $tmpfile $with_builddeps_server/$resource
43967   fi
43968   if test "x$BDEPS_FTP" = xlftp; then
43969     VALID_TOOL=yes
43970     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43971   fi
43972   if test "x$BDEPS_FTP" = xftp; then
43973     VALID_TOOL=yes
43974     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43975     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43976     FTPUSERPWD=${FTPSERVER%%@*}
43977     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43978       FTPUSER=${userpwd%%:*}
43979       FTPPWD=${userpwd#*@}
43980       FTPSERVER=${FTPSERVER#*@}
43981     else
43982       FTPUSER=ftp
43983       FTPPWD=ftp
43984     fi
43985     # the "pass" command does not work on some
43986     # ftp clients (read ftp.exe) but if it works,
43987     # passive mode is better!
43988     ( \
43989         echo "user $FTPUSER $FTPPWD"        ; \
43990         echo "pass"                         ; \
43991         echo "bin"                          ; \
43992         echo "get $FTPPATH $tmpfile"              ; \
43993     ) | ftp -in $FTPSERVER
43994   fi
43995   if test "x$VALID_TOOL" != xyes; then
43996     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43997   fi
43998 
43999     mv $tmpfile $installdir/$filename
44000     if test ! -s $installdir/$filename; then
44001       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44002     fi
44003     case "$extension" in
44004       zip)  echo "Unzipping $installdir/$filename..."
44005         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44006         ;;
44007       tar.gz) echo "Untaring $installdir/$filename..."
44008         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44009         ;;
44010       tgz) echo "Untaring $installdir/$filename..."
44011         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44012         ;;
44013       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44014         ;;
44015     esac
44016   fi
44017   if test -f $installdir/$filename.unpacked; then
44018     depdir=$installdir
44019   fi
44020 
44021       fi
44022       # Source the builddeps file again, because in the previous command, the depdir
44023       # was updated to point at the current build dependency install directory.
44024       . $builddepsfile
44025       # Now extract variables from the builddeps.conf files.
44026       theroot=${builddep_cups_ROOT}
44027       thecflags=${builddep_cups_CFLAGS}
44028       thelibs=${builddep_cups_LIBS}
44029       if test "x$depdir" = x; then
44030         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44031       fi
44032       CUPS=$depdir
44033       if test "x$theroot" != x; then
44034         CUPS="$theroot"
44035       fi
44036       if test "x$thecflags" != x; then
44037         CUPS_CFLAGS="$thecflags"
44038       fi
44039       if test "x$thelibs" != x; then
44040         CUPS_LIBS="$thelibs"
44041       fi
44042       CUPS_FOUND=yes
44043 
44044     fi
44045 
44046   fi
44047 
44048     fi
44049     if test "x$CUPS_FOUND" = xno; then
44050       # Are the cups headers installed in the default /usr/include location?
44051       for ac_header in cups/cups.h cups/ppd.h
44052 do :
44053   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44054 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44055 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44056   cat >>confdefs.h <<_ACEOF
44057 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44058 _ACEOF
44059 
44060             CUPS_FOUND=yes
44061             CUPS_CFLAGS=
44062             DEFAULT_CUPS=yes
44063 
44064 
44065 fi
44066 
44067 done
44068 
44069     fi
44070     if test "x$CUPS_FOUND" = xno; then
44071       # Getting nervous now? Lets poke around for standard Solaris third-party
44072       # package installation locations.
44073       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44074 $as_echo_n "checking for cups headers... " >&6; }
44075       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44076         # An SFW package seems to be installed!
44077         CUPS_FOUND=yes
44078         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44079       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44080         # A CSW package seems to be installed!
44081         CUPS_FOUND=yes
44082         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44083       fi
44084       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44085 $as_echo "$CUPS_FOUND" >&6; }
44086     fi
44087     if test "x$CUPS_FOUND" = xno; then
44088 
44089   # Print a helpful message on how to acquire the necessary build dependency.
44090   # cups is the help tag: freetype, cups, pulse, alsa etc
44091   MISSING_DEPENDENCY=cups
44092 
44093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44094     cygwin_help $MISSING_DEPENDENCY
44095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44096     msys_help $MISSING_DEPENDENCY
44097   else
44098     PKGHANDLER_COMMAND=
44099 
44100     case $PKGHANDLER in
44101       apt-get)
44102         apt_help     $MISSING_DEPENDENCY ;;
44103       yum)
44104         yum_help     $MISSING_DEPENDENCY ;;
44105       port)
44106         port_help    $MISSING_DEPENDENCY ;;
44107       pkgutil)
44108         pkgutil_help $MISSING_DEPENDENCY ;;
44109       pkgadd)
44110         pkgadd_help  $MISSING_DEPENDENCY ;;
44111     esac
44112 
44113     if test "x$PKGHANDLER_COMMAND" != x; then
44114       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44115     fi
44116   fi
44117 
44118       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44119     fi
44120   fi
44121 
44122 
44123 
44124 
44125 
44126 
44127   ###############################################################################
44128   #
44129   # The ubiquitous freetype library is used to render fonts.
44130   #
44131 
44132 # Check whether --with-freetype was given.
44133 if test "${with_freetype+set}" = set; then :
44134   withval=$with_freetype;
44135 fi
44136 
44137 
44138 # Check whether --with-freetype-include was given.
44139 if test "${with_freetype_include+set}" = set; then :
44140   withval=$with_freetype_include;
44141 fi
44142 
44143 
44144 # Check whether --with-freetype-lib was given.
44145 if test "${with_freetype_lib+set}" = set; then :
44146   withval=$with_freetype_lib;
44147 fi
44148 
44149 
44150 # Check whether --with-freetype-src was given.
44151 if test "${with_freetype_src+set}" = set; then :
44152   withval=$with_freetype_src;
44153 fi
44154 
44155   # Check whether --enable-freetype-bundling was given.
44156 if test "${enable_freetype_bundling+set}" = set; then :
44157   enableval=$enable_freetype_bundling;
44158 fi
44159 
44160 
44161   # Need to specify explicitly since it needs to be overridden on some versions of macosx
44162   FREETYPE_BASE_NAME=freetype
44163   FREETYPE_CFLAGS=
44164   FREETYPE_LIBS=
44165   FREETYPE_BUNDLE_LIB_PATH=
44166 
44167   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44168     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44169       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44170 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44171     fi
44172     if test "x$enable_freetype_bundling" != x; then
44173       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44174 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44175     fi
44176   else
44177     # freetype is needed to build; go get it!
44178 
44179     BUNDLE_FREETYPE="$enable_freetype_bundling"
44180 
44181     if  test "x$with_freetype_src" != x; then
44182       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44183         # Try to build freetype if --with-freetype-src was given on Windows
44184 
44185   FREETYPE_SRC_PATH="$with_freetype_src"
44186   BUILD_FREETYPE=yes
44187 
44188   # Check if the freetype sources are acessible..
44189   if ! test -d $FREETYPE_SRC_PATH; then
44190     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44191 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44192     BUILD_FREETYPE=no
44193   fi
44194   # ..and contain a vc2010 project file
44195   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44196   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44197     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44198 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44199     BUILD_FREETYPE=no
44200   fi
44201   # Now check if configure found a version of 'msbuild.exe'
44202   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44203     { $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
44204 $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;}
44205     BUILD_FREETYPE=no
44206   fi
44207 
44208   # Ready to go..
44209   if test "x$BUILD_FREETYPE" = xyes; then
44210 
44211     # msbuild requires trailing slashes for output directories
44212     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44213     freetype_lib_path_unix="$freetype_lib_path"
44214     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44215 
44216   unix_path="$vcxproj_path"
44217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44218     windows_path=`$CYGPATH -m "$unix_path"`
44219     vcxproj_path="$windows_path"
44220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44221     windows_path=`cmd //c echo $unix_path`
44222     vcxproj_path="$windows_path"
44223   fi
44224 
44225 
44226   unix_path="$freetype_lib_path"
44227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44228     windows_path=`$CYGPATH -m "$unix_path"`
44229     freetype_lib_path="$windows_path"
44230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44231     windows_path=`cmd //c echo $unix_path`
44232     freetype_lib_path="$windows_path"
44233   fi
44234 
44235 
44236   unix_path="$freetype_obj_path"
44237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44238     windows_path=`$CYGPATH -m "$unix_path"`
44239     freetype_obj_path="$windows_path"
44240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44241     windows_path=`cmd //c echo $unix_path`
44242     freetype_obj_path="$windows_path"
44243   fi
44244 
44245     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44246       freetype_platform=x64
44247     else
44248       freetype_platform=win32
44249     fi
44250 
44251     # The original freetype project file is for VS 2010 (i.e. 'v100'),
44252     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44253     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44254     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44255     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44256 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44257 
44258     # First we try to build the freetype.dll
44259     $ECHO -e "@echo off\n"\
44260              "$MSBUILD $vcxproj_path "\
44261                        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44262                        "/p:Configuration=\"Release Multithreaded\" "\
44263                        "/p:Platform=$freetype_platform "\
44264                        "/p:ConfigurationType=DynamicLibrary "\
44265                        "/p:TargetName=freetype "\
44266                        "/p:OutDir=\"$freetype_lib_path\" "\
44267                        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44268     cmd /c freetype.bat
44269 
44270     if test -s "$freetype_lib_path_unix/freetype.dll"; then
44271       # If that succeeds we also build freetype.lib
44272       $ECHO -e "@echo off\n"\
44273                "$MSBUILD $vcxproj_path "\
44274                          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44275                          "/p:Configuration=\"Release Multithreaded\" "\
44276                          "/p:Platform=$freetype_platform "\
44277                          "/p:ConfigurationType=StaticLibrary "\
44278                          "/p:TargetName=freetype "\
44279                          "/p:OutDir=\"$freetype_lib_path\" "\
44280                          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44281       cmd /c freetype.bat
44282 
44283       if test -s "$freetype_lib_path_unix/freetype.lib"; then
44284         # Once we build both, lib and dll, set freetype lib and include path appropriately
44285         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44286         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44287         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44288 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44289       else
44290         BUILD_FREETYPE=no
44291       fi
44292     else
44293       BUILD_FREETYPE=no
44294     fi
44295   fi
44296 
44297         if test "x$BUILD_FREETYPE" = xyes; then
44298           # Okay, we built it. Check that it works.
44299 
44300   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44301   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44302   METHOD="--with-freetype-src"
44303 
44304   # Let's start with an optimistic view of the world :-)
44305   FOUND_FREETYPE=yes
44306 
44307   # First look for the canonical freetype main include file ft2build.h.
44308   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44309     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44310     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44311     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44312       # Fail.
44313       FOUND_FREETYPE=no
44314     fi
44315   fi
44316 
44317   if test "x$FOUND_FREETYPE" = xyes; then
44318     # Include file found, let's continue the sanity check.
44319     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44320 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44321 
44322     # Reset to default value
44323     FREETYPE_BASE_NAME=freetype
44324     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44325     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44326       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44327           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44328         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44329         # for the .6 version explicitly.
44330         FREETYPE_BASE_NAME=freetype.6
44331         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44332         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44333 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44334       else
44335         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44336 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44337         FOUND_FREETYPE=no
44338       fi
44339     else
44340       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44341         # On Windows, we will need both .lib and .dll file.
44342         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44343           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44344 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44345           FOUND_FREETYPE=no
44346         fi
44347       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44348           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44349         # Found lib in isa dir, use that instead.
44350         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44351         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44352 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44353       fi
44354     fi
44355   fi
44356 
44357   if test "x$FOUND_FREETYPE" = xyes; then
44358 
44359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44360 
44361   # Input might be given as Windows format, start by converting to
44362   # unix format.
44363   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44364   new_path=`$CYGPATH -u "$path"`
44365 
44366   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44367   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44368   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44369   # "foo.exe" is OK but "foo" is an error.
44370   #
44371   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44372   # It is also a way to make sure we got the proper file name for the real test later on.
44373   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44374   if test "x$test_shortpath" = x; then
44375     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44376 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44377     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44378   fi
44379 
44380   # Call helper function which possibly converts this using DOS-style short mode.
44381   # If so, the updated path is stored in $new_path.
44382 
44383   input_path="$new_path"
44384   # Check if we need to convert this using DOS-style short mode. If the path
44385   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44386   # take no chances and rewrite it.
44387   # Note: m4 eats our [], so we need to use [ and ] instead.
44388   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44389   if test "x$has_forbidden_chars" != x; then
44390     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44391     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44392     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44393     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44394       # Going to short mode and back again did indeed matter. Since short mode is
44395       # case insensitive, let's make it lowercase to improve readability.
44396       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44397       # Now convert it back to Unix-stile (cygpath)
44398       input_path=`$CYGPATH -u "$shortmode_path"`
44399       new_path="$input_path"
44400     fi
44401   fi
44402 
44403   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44404   if test "x$test_cygdrive_prefix" = x; then
44405     # As a simple fix, exclude /usr/bin since it's not a real path.
44406     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44407       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44408       # a path prefixed by /cygdrive for fixpath to work.
44409       new_path="$CYGWIN_ROOT_PATH$input_path"
44410     fi
44411   fi
44412 
44413 
44414   if test "x$path" != "x$new_path"; then
44415     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44416     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44417 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44418   fi
44419 
44420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44421 
44422   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44423   has_colon=`$ECHO $path | $GREP ^.:`
44424   new_path="$path"
44425   if test "x$has_colon" = x; then
44426     # Not in mixed or Windows style, start by that.
44427     new_path=`cmd //c echo $path`
44428   fi
44429 
44430 
44431   input_path="$new_path"
44432   # Check if we need to convert this using DOS-style short mode. If the path
44433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44434   # take no chances and rewrite it.
44435   # Note: m4 eats our [], so we need to use [ and ] instead.
44436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44437   if test "x$has_forbidden_chars" != x; then
44438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44439     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44440   fi
44441 
44442 
44443   windows_path="$new_path"
44444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44445     unix_path=`$CYGPATH -u "$windows_path"`
44446     new_path="$unix_path"
44447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44449     new_path="$unix_path"
44450   fi
44451 
44452   if test "x$path" != "x$new_path"; then
44453     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44454     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44455 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44456   fi
44457 
44458   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44459   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44460 
44461   else
44462     # We're on a unix platform. Hooray! :)
44463     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44464     has_space=`$ECHO "$path" | $GREP " "`
44465     if test "x$has_space" != x; then
44466       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44467 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44468       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44469     fi
44470 
44471     # Use eval to expand a potential ~
44472     eval path="$path"
44473     if test ! -f "$path" && test ! -d "$path"; then
44474       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44475     fi
44476 
44477     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44478   fi
44479 
44480 
44481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44482 
44483   # Input might be given as Windows format, start by converting to
44484   # unix format.
44485   path="$POTENTIAL_FREETYPE_LIB_PATH"
44486   new_path=`$CYGPATH -u "$path"`
44487 
44488   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44489   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44490   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44491   # "foo.exe" is OK but "foo" is an error.
44492   #
44493   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44494   # It is also a way to make sure we got the proper file name for the real test later on.
44495   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44496   if test "x$test_shortpath" = x; then
44497     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44498 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44499     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44500   fi
44501 
44502   # Call helper function which possibly converts this using DOS-style short mode.
44503   # If so, the updated path is stored in $new_path.
44504 
44505   input_path="$new_path"
44506   # Check if we need to convert this using DOS-style short mode. If the path
44507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44508   # take no chances and rewrite it.
44509   # Note: m4 eats our [], so we need to use [ and ] instead.
44510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44511   if test "x$has_forbidden_chars" != x; then
44512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44513     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44514     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44515     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44516       # Going to short mode and back again did indeed matter. Since short mode is
44517       # case insensitive, let's make it lowercase to improve readability.
44518       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44519       # Now convert it back to Unix-stile (cygpath)
44520       input_path=`$CYGPATH -u "$shortmode_path"`
44521       new_path="$input_path"
44522     fi
44523   fi
44524 
44525   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44526   if test "x$test_cygdrive_prefix" = x; then
44527     # As a simple fix, exclude /usr/bin since it's not a real path.
44528     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44529       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44530       # a path prefixed by /cygdrive for fixpath to work.
44531       new_path="$CYGWIN_ROOT_PATH$input_path"
44532     fi
44533   fi
44534 
44535 
44536   if test "x$path" != "x$new_path"; then
44537     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44539 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44540   fi
44541 
44542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44543 
44544   path="$POTENTIAL_FREETYPE_LIB_PATH"
44545   has_colon=`$ECHO $path | $GREP ^.:`
44546   new_path="$path"
44547   if test "x$has_colon" = x; then
44548     # Not in mixed or Windows style, start by that.
44549     new_path=`cmd //c echo $path`
44550   fi
44551 
44552 
44553   input_path="$new_path"
44554   # Check if we need to convert this using DOS-style short mode. If the path
44555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44556   # take no chances and rewrite it.
44557   # Note: m4 eats our [], so we need to use [ and ] instead.
44558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44559   if test "x$has_forbidden_chars" != x; then
44560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44561     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44562   fi
44563 
44564 
44565   windows_path="$new_path"
44566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44567     unix_path=`$CYGPATH -u "$windows_path"`
44568     new_path="$unix_path"
44569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44571     new_path="$unix_path"
44572   fi
44573 
44574   if test "x$path" != "x$new_path"; then
44575     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44577 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44578   fi
44579 
44580   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44581   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44582 
44583   else
44584     # We're on a unix platform. Hooray! :)
44585     path="$POTENTIAL_FREETYPE_LIB_PATH"
44586     has_space=`$ECHO "$path" | $GREP " "`
44587     if test "x$has_space" != x; then
44588       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44589 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44590       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44591     fi
44592 
44593     # Use eval to expand a potential ~
44594     eval path="$path"
44595     if test ! -f "$path" && test ! -d "$path"; then
44596       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44597     fi
44598 
44599     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44600   fi
44601 
44602 
44603     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44604     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44605 $as_echo_n "checking for freetype includes... " >&6; }
44606     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44607 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44608     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44609     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44610 $as_echo_n "checking for freetype libraries... " >&6; }
44611     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44612 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44613   fi
44614 
44615           if test "x$FOUND_FREETYPE" != xyes; then
44616             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44617           fi
44618         else
44619           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44620 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44621           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44622         fi
44623       else
44624         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44625 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44626       fi
44627     fi
44628 
44629     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44630       # User has specified settings
44631 
44632       if test "x$BUNDLE_FREETYPE" = x; then
44633         # If not specified, default is to bundle freetype
44634         BUNDLE_FREETYPE=yes
44635       fi
44636 
44637       if test "x$with_freetype" != x; then
44638         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44639         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44640       fi
44641 
44642       # Allow --with-freetype-lib and --with-freetype-include to override
44643       if test "x$with_freetype_include" != x; then
44644         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44645       fi
44646       if test "x$with_freetype_lib" != x; then
44647         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44648       fi
44649 
44650       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44651         # Okay, we got it. Check that it works.
44652 
44653   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44654   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44655   METHOD="--with-freetype"
44656 
44657   # Let's start with an optimistic view of the world :-)
44658   FOUND_FREETYPE=yes
44659 
44660   # First look for the canonical freetype main include file ft2build.h.
44661   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44662     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44663     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44664     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44665       # Fail.
44666       FOUND_FREETYPE=no
44667     fi
44668   fi
44669 
44670   if test "x$FOUND_FREETYPE" = xyes; then
44671     # Include file found, let's continue the sanity check.
44672     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44673 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44674 
44675     # Reset to default value
44676     FREETYPE_BASE_NAME=freetype
44677     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44678     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44679       if test "x$OPENJDK_TARGET_OS" = xmacosx \
44680           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44681         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44682         # for the .6 version explicitly.
44683         FREETYPE_BASE_NAME=freetype.6
44684         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44685         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44686 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44687       else
44688         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44689 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44690         FOUND_FREETYPE=no
44691       fi
44692     else
44693       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44694         # On Windows, we will need both .lib and .dll file.
44695         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44696           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44697 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44698           FOUND_FREETYPE=no
44699         fi
44700       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44701           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44702         # Found lib in isa dir, use that instead.
44703         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44704         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44705 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44706       fi
44707     fi
44708   fi
44709 
44710   if test "x$FOUND_FREETYPE" = xyes; then
44711 
44712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44713 
44714   # Input might be given as Windows format, start by converting to
44715   # unix format.
44716   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44717   new_path=`$CYGPATH -u "$path"`
44718 
44719   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44720   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44721   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44722   # "foo.exe" is OK but "foo" is an error.
44723   #
44724   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44725   # It is also a way to make sure we got the proper file name for the real test later on.
44726   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44727   if test "x$test_shortpath" = x; then
44728     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44729 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44730     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44731   fi
44732 
44733   # Call helper function which possibly converts this using DOS-style short mode.
44734   # If so, the updated path is stored in $new_path.
44735 
44736   input_path="$new_path"
44737   # Check if we need to convert this using DOS-style short mode. If the path
44738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44739   # take no chances and rewrite it.
44740   # Note: m4 eats our [], so we need to use [ and ] instead.
44741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44742   if test "x$has_forbidden_chars" != x; then
44743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44747       # Going to short mode and back again did indeed matter. Since short mode is
44748       # case insensitive, let's make it lowercase to improve readability.
44749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44750       # Now convert it back to Unix-stile (cygpath)
44751       input_path=`$CYGPATH -u "$shortmode_path"`
44752       new_path="$input_path"
44753     fi
44754   fi
44755 
44756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44757   if test "x$test_cygdrive_prefix" = x; then
44758     # As a simple fix, exclude /usr/bin since it's not a real path.
44759     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44761       # a path prefixed by /cygdrive for fixpath to work.
44762       new_path="$CYGWIN_ROOT_PATH$input_path"
44763     fi
44764   fi
44765 
44766 
44767   if test "x$path" != "x$new_path"; then
44768     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44769     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44770 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44771   fi
44772 
44773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44774 
44775   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44776   has_colon=`$ECHO $path | $GREP ^.:`
44777   new_path="$path"
44778   if test "x$has_colon" = x; then
44779     # Not in mixed or Windows style, start by that.
44780     new_path=`cmd //c echo $path`
44781   fi
44782 
44783 
44784   input_path="$new_path"
44785   # Check if we need to convert this using DOS-style short mode. If the path
44786   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44787   # take no chances and rewrite it.
44788   # Note: m4 eats our [], so we need to use [ and ] instead.
44789   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44790   if test "x$has_forbidden_chars" != x; then
44791     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44792     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44793   fi
44794 
44795 
44796   windows_path="$new_path"
44797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44798     unix_path=`$CYGPATH -u "$windows_path"`
44799     new_path="$unix_path"
44800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44802     new_path="$unix_path"
44803   fi
44804 
44805   if test "x$path" != "x$new_path"; then
44806     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44808 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44809   fi
44810 
44811   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44812   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44813 
44814   else
44815     # We're on a unix platform. Hooray! :)
44816     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44817     has_space=`$ECHO "$path" | $GREP " "`
44818     if test "x$has_space" != x; then
44819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44820 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44821       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44822     fi
44823 
44824     # Use eval to expand a potential ~
44825     eval path="$path"
44826     if test ! -f "$path" && test ! -d "$path"; then
44827       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44828     fi
44829 
44830     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44831   fi
44832 
44833 
44834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44835 
44836   # Input might be given as Windows format, start by converting to
44837   # unix format.
44838   path="$POTENTIAL_FREETYPE_LIB_PATH"
44839   new_path=`$CYGPATH -u "$path"`
44840 
44841   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44842   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44843   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44844   # "foo.exe" is OK but "foo" is an error.
44845   #
44846   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44847   # It is also a way to make sure we got the proper file name for the real test later on.
44848   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44849   if test "x$test_shortpath" = x; then
44850     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44851 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44852     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44853   fi
44854 
44855   # Call helper function which possibly converts this using DOS-style short mode.
44856   # If so, the updated path is stored in $new_path.
44857 
44858   input_path="$new_path"
44859   # Check if we need to convert this using DOS-style short mode. If the path
44860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44861   # take no chances and rewrite it.
44862   # Note: m4 eats our [], so we need to use [ and ] instead.
44863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44864   if test "x$has_forbidden_chars" != x; then
44865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44869       # Going to short mode and back again did indeed matter. Since short mode is
44870       # case insensitive, let's make it lowercase to improve readability.
44871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44872       # Now convert it back to Unix-stile (cygpath)
44873       input_path=`$CYGPATH -u "$shortmode_path"`
44874       new_path="$input_path"
44875     fi
44876   fi
44877 
44878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44879   if test "x$test_cygdrive_prefix" = x; then
44880     # As a simple fix, exclude /usr/bin since it's not a real path.
44881     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44883       # a path prefixed by /cygdrive for fixpath to work.
44884       new_path="$CYGWIN_ROOT_PATH$input_path"
44885     fi
44886   fi
44887 
44888 
44889   if test "x$path" != "x$new_path"; then
44890     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44892 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44893   fi
44894 
44895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44896 
44897   path="$POTENTIAL_FREETYPE_LIB_PATH"
44898   has_colon=`$ECHO $path | $GREP ^.:`
44899   new_path="$path"
44900   if test "x$has_colon" = x; then
44901     # Not in mixed or Windows style, start by that.
44902     new_path=`cmd //c echo $path`
44903   fi
44904 
44905 
44906   input_path="$new_path"
44907   # Check if we need to convert this using DOS-style short mode. If the path
44908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44909   # take no chances and rewrite it.
44910   # Note: m4 eats our [], so we need to use [ and ] instead.
44911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44912   if test "x$has_forbidden_chars" != x; then
44913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44914     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44915   fi
44916 
44917 
44918   windows_path="$new_path"
44919   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44920     unix_path=`$CYGPATH -u "$windows_path"`
44921     new_path="$unix_path"
44922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44923     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44924     new_path="$unix_path"
44925   fi
44926 
44927   if test "x$path" != "x$new_path"; then
44928     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44929     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44930 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44931   fi
44932 
44933   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44934   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44935 
44936   else
44937     # We're on a unix platform. Hooray! :)
44938     path="$POTENTIAL_FREETYPE_LIB_PATH"
44939     has_space=`$ECHO "$path" | $GREP " "`
44940     if test "x$has_space" != x; then
44941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44942 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44943       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44944     fi
44945 
44946     # Use eval to expand a potential ~
44947     eval path="$path"
44948     if test ! -f "$path" && test ! -d "$path"; then
44949       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44950     fi
44951 
44952     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44953   fi
44954 
44955 
44956     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44957     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44958 $as_echo_n "checking for freetype includes... " >&6; }
44959     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44960 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44961     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44962     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44963 $as_echo_n "checking for freetype libraries... " >&6; }
44964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44965 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44966   fi
44967 
44968         if test "x$FOUND_FREETYPE" != xyes; then
44969           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44970         fi
44971       else
44972         # User specified only one of lib or include. This is an error.
44973         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44974           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44975 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44976           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44977         else
44978           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44979 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44980           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44981         fi
44982       fi
44983     else
44984       # User did not specify settings, but we need freetype. Try to locate it.
44985 
44986       if test "x$BUNDLE_FREETYPE" = x; then
44987         # If not specified, default is to bundle freetype only on windows
44988         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44989           BUNDLE_FREETYPE=yes
44990         else
44991           BUNDLE_FREETYPE=no
44992         fi
44993       fi
44994 
44995       if test "x$FOUND_FREETYPE" != xyes; then
44996         # Check builddeps
44997 
44998 
44999   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45000     # Source the builddeps file again, to make sure it uses the latest variables!
45001     . $builddepsfile
45002     # Look for a target and build machine specific resource!
45003     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45004     if test "x$resource" = x; then
45005       # Ok, lets instead look for a target specific resource
45006       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45007     fi
45008     if test "x$resource" = x; then
45009       # Ok, lets instead look for a build specific resource
45010       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45011     fi
45012     if test "x$resource" = x; then
45013       # Ok, lets instead look for a generic resource
45014       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45015       resource=${builddep_freetype2}
45016     fi
45017     if test "x$resource" != x; then
45018       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45019 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45020       # If the resource in the builddeps.conf file is an existing directory,
45021       # for example /java/linux/cups
45022       if test -d ${resource}; then
45023         depdir=${resource}
45024       else
45025 
45026   # freetype2 is for example mymodule
45027   # $resource is for example libs/general/libmymod_1_2_3.zip
45028   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45029   # $with_builddeps_dir is for example /localhome/builddeps
45030   # depdir is the name of the variable into which we store the depdir, eg MYMOD
45031   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45032   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45033   filename=`basename $resource`
45034   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45035   filebase=${filename%%.*}
45036   extension=${filename#*.}
45037   installdir=$with_builddeps_dir/$filebase
45038   if test ! -f $installdir/$filename.unpacked; then
45039     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45040 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45041     if test ! -d $installdir; then
45042       mkdir -p $installdir
45043     fi
45044     if test ! -d $installdir; then
45045       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45046     fi
45047     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45048     touch $tmpfile
45049     if test ! -f $tmpfile; then
45050       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45051     fi
45052 
45053   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45054   # $tmpfile is the local file name for the downloaded file.
45055   VALID_TOOL=no
45056   if test "x$BDEPS_FTP" = xwget; then
45057     VALID_TOOL=yes
45058     wget -O $tmpfile $with_builddeps_server/$resource
45059   fi
45060   if test "x$BDEPS_FTP" = xlftp; then
45061     VALID_TOOL=yes
45062     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45063   fi
45064   if test "x$BDEPS_FTP" = xftp; then
45065     VALID_TOOL=yes
45066     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45067     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45068     FTPUSERPWD=${FTPSERVER%%@*}
45069     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45070       FTPUSER=${userpwd%%:*}
45071       FTPPWD=${userpwd#*@}
45072       FTPSERVER=${FTPSERVER#*@}
45073     else
45074       FTPUSER=ftp
45075       FTPPWD=ftp
45076     fi
45077     # the "pass" command does not work on some
45078     # ftp clients (read ftp.exe) but if it works,
45079     # passive mode is better!
45080     ( \
45081         echo "user $FTPUSER $FTPPWD"        ; \
45082         echo "pass"                         ; \
45083         echo "bin"                          ; \
45084         echo "get $FTPPATH $tmpfile"              ; \
45085     ) | ftp -in $FTPSERVER
45086   fi
45087   if test "x$VALID_TOOL" != xyes; then
45088     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45089   fi
45090 
45091     mv $tmpfile $installdir/$filename
45092     if test ! -s $installdir/$filename; then
45093       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45094     fi
45095     case "$extension" in
45096       zip)  echo "Unzipping $installdir/$filename..."
45097         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45098         ;;
45099       tar.gz) echo "Untaring $installdir/$filename..."
45100         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45101         ;;
45102       tgz) echo "Untaring $installdir/$filename..."
45103         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45104         ;;
45105       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45106         ;;
45107     esac
45108   fi
45109   if test -f $installdir/$filename.unpacked; then
45110     depdir=$installdir
45111   fi
45112 
45113       fi
45114       # Source the builddeps file again, because in the previous command, the depdir
45115       # was updated to point at the current build dependency install directory.
45116       . $builddepsfile
45117       # Now extract variables from the builddeps.conf files.
45118       theroot=${builddep_freetype2_ROOT}
45119       thecflags=${builddep_freetype2_CFLAGS}
45120       thelibs=${builddep_freetype2_LIBS}
45121       if test "x$depdir" = x; then
45122         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45123       fi
45124       FREETYPE=$depdir
45125       if test "x$theroot" != x; then
45126         FREETYPE="$theroot"
45127       fi
45128       if test "x$thecflags" != x; then
45129         FREETYPE_CFLAGS="$thecflags"
45130       fi
45131       if test "x$thelibs" != x; then
45132         FREETYPE_LIBS="$thelibs"
45133       fi
45134       FOUND_FREETYPE=yes
45135       else FOUND_FREETYPE=no
45136 
45137     fi
45138     else FOUND_FREETYPE=no
45139 
45140   fi
45141 
45142         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45143         if test "x$FOUND_FREETYPE" = xyes; then
45144           if test "x$BUNDLE_FREETYPE" = xyes; then
45145             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45146 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45147             FOUND_FREETYPE=no
45148           else
45149             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45150 $as_echo_n "checking for freetype... " >&6; }
45151             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45152 $as_echo "yes (using builddeps)" >&6; }
45153           fi
45154         fi
45155       fi
45156 
45157       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45158       if test "x$SYSROOT" = x; then
45159         if test "x$FOUND_FREETYPE" != xyes; then
45160           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45161           if test "x$PKG_CONFIG" != x; then
45162 
45163 pkg_failed=no
45164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45165 $as_echo_n "checking for FREETYPE... " >&6; }
45166 
45167 if test -n "$FREETYPE_CFLAGS"; then
45168     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45169  elif test -n "$PKG_CONFIG"; then
45170     if test -n "$PKG_CONFIG" && \
45171     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45172   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45173   ac_status=$?
45174   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45175   test $ac_status = 0; }; then
45176   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45177 else
45178   pkg_failed=yes
45179 fi
45180  else
45181     pkg_failed=untried
45182 fi
45183 if test -n "$FREETYPE_LIBS"; then
45184     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45185  elif test -n "$PKG_CONFIG"; then
45186     if test -n "$PKG_CONFIG" && \
45187     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45188   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45189   ac_status=$?
45190   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45191   test $ac_status = 0; }; then
45192   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45193 else
45194   pkg_failed=yes
45195 fi
45196  else
45197     pkg_failed=untried
45198 fi
45199 
45200 
45201 
45202 if test $pkg_failed = yes; then
45203 
45204 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45205         _pkg_short_errors_supported=yes
45206 else
45207         _pkg_short_errors_supported=no
45208 fi
45209         if test $_pkg_short_errors_supported = yes; then
45210                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45211         else
45212                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45213         fi
45214         # Put the nasty error message in config.log where it belongs
45215         echo "$FREETYPE_PKG_ERRORS" >&5
45216 
45217         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45218 $as_echo "no" >&6; }
45219                 FOUND_FREETYPE=no
45220 elif test $pkg_failed = untried; then
45221         FOUND_FREETYPE=no
45222 else
45223         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45224         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45225         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45226 $as_echo "yes" >&6; }
45227         FOUND_FREETYPE=yes
45228 fi
45229             if test "x$FOUND_FREETYPE" = xyes; then
45230               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45231               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45232               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45233               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45234                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45235               fi
45236               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45237               if test "x$BUNDLE_FREETYPE" = xyes; then
45238                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45239 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45240                 FOUND_FREETYPE=no
45241               else
45242                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45243 $as_echo_n "checking for freetype... " >&6; }
45244                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45245 $as_echo "yes (using pkg-config)" >&6; }
45246               fi
45247             fi
45248           fi
45249         fi
45250       fi
45251 
45252       if test "x$FOUND_FREETYPE" != xyes; then
45253         # Check in well-known locations
45254         if test "x$OPENJDK_TARGET_OS" = xwindows; then
45255           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45256 
45257   windows_path="$FREETYPE_BASE_DIR"
45258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45259     unix_path=`$CYGPATH -u "$windows_path"`
45260     FREETYPE_BASE_DIR="$unix_path"
45261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45263     FREETYPE_BASE_DIR="$unix_path"
45264   fi
45265 
45266 
45267   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45268   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45269   METHOD="well-known location"
45270 
45271   # Let's start with an optimistic view of the world :-)
45272   FOUND_FREETYPE=yes
45273 
45274   # First look for the canonical freetype main include file ft2build.h.
45275   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45276     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45277     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45278     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45279       # Fail.
45280       FOUND_FREETYPE=no
45281     fi
45282   fi
45283 
45284   if test "x$FOUND_FREETYPE" = xyes; then
45285     # Include file found, let's continue the sanity check.
45286     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45287 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45288 
45289     # Reset to default value
45290     FREETYPE_BASE_NAME=freetype
45291     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45292     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45293       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45294           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45295         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45296         # for the .6 version explicitly.
45297         FREETYPE_BASE_NAME=freetype.6
45298         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45299         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45300 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45301       else
45302         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45303 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45304         FOUND_FREETYPE=no
45305       fi
45306     else
45307       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45308         # On Windows, we will need both .lib and .dll file.
45309         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45310           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45311 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45312           FOUND_FREETYPE=no
45313         fi
45314       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45315           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45316         # Found lib in isa dir, use that instead.
45317         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45318         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45319 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45320       fi
45321     fi
45322   fi
45323 
45324   if test "x$FOUND_FREETYPE" = xyes; then
45325 
45326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45327 
45328   # Input might be given as Windows format, start by converting to
45329   # unix format.
45330   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45331   new_path=`$CYGPATH -u "$path"`
45332 
45333   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45334   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45335   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45336   # "foo.exe" is OK but "foo" is an error.
45337   #
45338   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45339   # It is also a way to make sure we got the proper file name for the real test later on.
45340   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45341   if test "x$test_shortpath" = x; then
45342     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45343 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45344     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45345   fi
45346 
45347   # Call helper function which possibly converts this using DOS-style short mode.
45348   # If so, the updated path is stored in $new_path.
45349 
45350   input_path="$new_path"
45351   # Check if we need to convert this using DOS-style short mode. If the path
45352   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45353   # take no chances and rewrite it.
45354   # Note: m4 eats our [], so we need to use [ and ] instead.
45355   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45356   if test "x$has_forbidden_chars" != x; then
45357     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45358     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45359     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45360     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45361       # Going to short mode and back again did indeed matter. Since short mode is
45362       # case insensitive, let's make it lowercase to improve readability.
45363       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45364       # Now convert it back to Unix-stile (cygpath)
45365       input_path=`$CYGPATH -u "$shortmode_path"`
45366       new_path="$input_path"
45367     fi
45368   fi
45369 
45370   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45371   if test "x$test_cygdrive_prefix" = x; then
45372     # As a simple fix, exclude /usr/bin since it's not a real path.
45373     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45374       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45375       # a path prefixed by /cygdrive for fixpath to work.
45376       new_path="$CYGWIN_ROOT_PATH$input_path"
45377     fi
45378   fi
45379 
45380 
45381   if test "x$path" != "x$new_path"; then
45382     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45384 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45385   fi
45386 
45387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45388 
45389   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45390   has_colon=`$ECHO $path | $GREP ^.:`
45391   new_path="$path"
45392   if test "x$has_colon" = x; then
45393     # Not in mixed or Windows style, start by that.
45394     new_path=`cmd //c echo $path`
45395   fi
45396 
45397 
45398   input_path="$new_path"
45399   # Check if we need to convert this using DOS-style short mode. If the path
45400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45401   # take no chances and rewrite it.
45402   # Note: m4 eats our [], so we need to use [ and ] instead.
45403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45404   if test "x$has_forbidden_chars" != x; then
45405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45407   fi
45408 
45409 
45410   windows_path="$new_path"
45411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45412     unix_path=`$CYGPATH -u "$windows_path"`
45413     new_path="$unix_path"
45414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45416     new_path="$unix_path"
45417   fi
45418 
45419   if test "x$path" != "x$new_path"; then
45420     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45421     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45422 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45423   fi
45424 
45425   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45426   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45427 
45428   else
45429     # We're on a unix platform. Hooray! :)
45430     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45431     has_space=`$ECHO "$path" | $GREP " "`
45432     if test "x$has_space" != x; then
45433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45434 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45435       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45436     fi
45437 
45438     # Use eval to expand a potential ~
45439     eval path="$path"
45440     if test ! -f "$path" && test ! -d "$path"; then
45441       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45442     fi
45443 
45444     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45445   fi
45446 
45447 
45448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45449 
45450   # Input might be given as Windows format, start by converting to
45451   # unix format.
45452   path="$POTENTIAL_FREETYPE_LIB_PATH"
45453   new_path=`$CYGPATH -u "$path"`
45454 
45455   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45456   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45457   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45458   # "foo.exe" is OK but "foo" is an error.
45459   #
45460   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45461   # It is also a way to make sure we got the proper file name for the real test later on.
45462   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45463   if test "x$test_shortpath" = x; then
45464     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45465 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45466     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45467   fi
45468 
45469   # Call helper function which possibly converts this using DOS-style short mode.
45470   # If so, the updated path is stored in $new_path.
45471 
45472   input_path="$new_path"
45473   # Check if we need to convert this using DOS-style short mode. If the path
45474   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45475   # take no chances and rewrite it.
45476   # Note: m4 eats our [], so we need to use [ and ] instead.
45477   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45478   if test "x$has_forbidden_chars" != x; then
45479     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45480     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45481     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45482     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45483       # Going to short mode and back again did indeed matter. Since short mode is
45484       # case insensitive, let's make it lowercase to improve readability.
45485       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45486       # Now convert it back to Unix-stile (cygpath)
45487       input_path=`$CYGPATH -u "$shortmode_path"`
45488       new_path="$input_path"
45489     fi
45490   fi
45491 
45492   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45493   if test "x$test_cygdrive_prefix" = x; then
45494     # As a simple fix, exclude /usr/bin since it's not a real path.
45495     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45496       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45497       # a path prefixed by /cygdrive for fixpath to work.
45498       new_path="$CYGWIN_ROOT_PATH$input_path"
45499     fi
45500   fi
45501 
45502 
45503   if test "x$path" != "x$new_path"; then
45504     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45506 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45507   fi
45508 
45509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45510 
45511   path="$POTENTIAL_FREETYPE_LIB_PATH"
45512   has_colon=`$ECHO $path | $GREP ^.:`
45513   new_path="$path"
45514   if test "x$has_colon" = x; then
45515     # Not in mixed or Windows style, start by that.
45516     new_path=`cmd //c echo $path`
45517   fi
45518 
45519 
45520   input_path="$new_path"
45521   # Check if we need to convert this using DOS-style short mode. If the path
45522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45523   # take no chances and rewrite it.
45524   # Note: m4 eats our [], so we need to use [ and ] instead.
45525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45526   if test "x$has_forbidden_chars" != x; then
45527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45528     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45529   fi
45530 
45531 
45532   windows_path="$new_path"
45533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45534     unix_path=`$CYGPATH -u "$windows_path"`
45535     new_path="$unix_path"
45536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45538     new_path="$unix_path"
45539   fi
45540 
45541   if test "x$path" != "x$new_path"; then
45542     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45543     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45544 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45545   fi
45546 
45547   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45548   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45549 
45550   else
45551     # We're on a unix platform. Hooray! :)
45552     path="$POTENTIAL_FREETYPE_LIB_PATH"
45553     has_space=`$ECHO "$path" | $GREP " "`
45554     if test "x$has_space" != x; then
45555       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45556 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45557       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45558     fi
45559 
45560     # Use eval to expand a potential ~
45561     eval path="$path"
45562     if test ! -f "$path" && test ! -d "$path"; then
45563       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45564     fi
45565 
45566     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45567   fi
45568 
45569 
45570     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45571     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45572 $as_echo_n "checking for freetype includes... " >&6; }
45573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45574 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45575     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45576     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45577 $as_echo_n "checking for freetype libraries... " >&6; }
45578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45579 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45580   fi
45581 
45582           if test "x$FOUND_FREETYPE" != xyes; then
45583             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45584 
45585   windows_path="$FREETYPE_BASE_DIR"
45586   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45587     unix_path=`$CYGPATH -u "$windows_path"`
45588     FREETYPE_BASE_DIR="$unix_path"
45589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45590     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45591     FREETYPE_BASE_DIR="$unix_path"
45592   fi
45593 
45594 
45595   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45596   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45597   METHOD="well-known location"
45598 
45599   # Let's start with an optimistic view of the world :-)
45600   FOUND_FREETYPE=yes
45601 
45602   # First look for the canonical freetype main include file ft2build.h.
45603   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45604     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45605     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45606     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45607       # Fail.
45608       FOUND_FREETYPE=no
45609     fi
45610   fi
45611 
45612   if test "x$FOUND_FREETYPE" = xyes; then
45613     # Include file found, let's continue the sanity check.
45614     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45615 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45616 
45617     # Reset to default value
45618     FREETYPE_BASE_NAME=freetype
45619     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45620     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45621       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45622           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45623         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45624         # for the .6 version explicitly.
45625         FREETYPE_BASE_NAME=freetype.6
45626         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45627         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45628 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45629       else
45630         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45631 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45632         FOUND_FREETYPE=no
45633       fi
45634     else
45635       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45636         # On Windows, we will need both .lib and .dll file.
45637         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45638           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45639 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45640           FOUND_FREETYPE=no
45641         fi
45642       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45643           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45644         # Found lib in isa dir, use that instead.
45645         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45646         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45647 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45648       fi
45649     fi
45650   fi
45651 
45652   if test "x$FOUND_FREETYPE" = xyes; then
45653 
45654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45655 
45656   # Input might be given as Windows format, start by converting to
45657   # unix format.
45658   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45659   new_path=`$CYGPATH -u "$path"`
45660 
45661   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45662   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45663   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45664   # "foo.exe" is OK but "foo" is an error.
45665   #
45666   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45667   # It is also a way to make sure we got the proper file name for the real test later on.
45668   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45669   if test "x$test_shortpath" = x; then
45670     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45671 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45672     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45673   fi
45674 
45675   # Call helper function which possibly converts this using DOS-style short mode.
45676   # If so, the updated path is stored in $new_path.
45677 
45678   input_path="$new_path"
45679   # Check if we need to convert this using DOS-style short mode. If the path
45680   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45681   # take no chances and rewrite it.
45682   # Note: m4 eats our [], so we need to use [ and ] instead.
45683   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45684   if test "x$has_forbidden_chars" != x; then
45685     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45686     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45687     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45688     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45689       # Going to short mode and back again did indeed matter. Since short mode is
45690       # case insensitive, let's make it lowercase to improve readability.
45691       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45692       # Now convert it back to Unix-stile (cygpath)
45693       input_path=`$CYGPATH -u "$shortmode_path"`
45694       new_path="$input_path"
45695     fi
45696   fi
45697 
45698   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45699   if test "x$test_cygdrive_prefix" = x; then
45700     # As a simple fix, exclude /usr/bin since it's not a real path.
45701     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45702       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45703       # a path prefixed by /cygdrive for fixpath to work.
45704       new_path="$CYGWIN_ROOT_PATH$input_path"
45705     fi
45706   fi
45707 
45708 
45709   if test "x$path" != "x$new_path"; then
45710     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45711     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45712 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45713   fi
45714 
45715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45716 
45717   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45718   has_colon=`$ECHO $path | $GREP ^.:`
45719   new_path="$path"
45720   if test "x$has_colon" = x; then
45721     # Not in mixed or Windows style, start by that.
45722     new_path=`cmd //c echo $path`
45723   fi
45724 
45725 
45726   input_path="$new_path"
45727   # Check if we need to convert this using DOS-style short mode. If the path
45728   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45729   # take no chances and rewrite it.
45730   # Note: m4 eats our [], so we need to use [ and ] instead.
45731   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45732   if test "x$has_forbidden_chars" != x; then
45733     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45734     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45735   fi
45736 
45737 
45738   windows_path="$new_path"
45739   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45740     unix_path=`$CYGPATH -u "$windows_path"`
45741     new_path="$unix_path"
45742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45743     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45744     new_path="$unix_path"
45745   fi
45746 
45747   if test "x$path" != "x$new_path"; then
45748     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45749     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45750 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45751   fi
45752 
45753   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45754   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45755 
45756   else
45757     # We're on a unix platform. Hooray! :)
45758     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45759     has_space=`$ECHO "$path" | $GREP " "`
45760     if test "x$has_space" != x; then
45761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45762 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45763       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45764     fi
45765 
45766     # Use eval to expand a potential ~
45767     eval path="$path"
45768     if test ! -f "$path" && test ! -d "$path"; then
45769       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45770     fi
45771 
45772     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45773   fi
45774 
45775 
45776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45777 
45778   # Input might be given as Windows format, start by converting to
45779   # unix format.
45780   path="$POTENTIAL_FREETYPE_LIB_PATH"
45781   new_path=`$CYGPATH -u "$path"`
45782 
45783   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45784   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45785   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45786   # "foo.exe" is OK but "foo" is an error.
45787   #
45788   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45789   # It is also a way to make sure we got the proper file name for the real test later on.
45790   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45791   if test "x$test_shortpath" = x; then
45792     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45793 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45794     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45795   fi
45796 
45797   # Call helper function which possibly converts this using DOS-style short mode.
45798   # If so, the updated path is stored in $new_path.
45799 
45800   input_path="$new_path"
45801   # Check if we need to convert this using DOS-style short mode. If the path
45802   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45803   # take no chances and rewrite it.
45804   # Note: m4 eats our [], so we need to use [ and ] instead.
45805   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45806   if test "x$has_forbidden_chars" != x; then
45807     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45808     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45809     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45810     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45811       # Going to short mode and back again did indeed matter. Since short mode is
45812       # case insensitive, let's make it lowercase to improve readability.
45813       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45814       # Now convert it back to Unix-stile (cygpath)
45815       input_path=`$CYGPATH -u "$shortmode_path"`
45816       new_path="$input_path"
45817     fi
45818   fi
45819 
45820   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45821   if test "x$test_cygdrive_prefix" = x; then
45822     # As a simple fix, exclude /usr/bin since it's not a real path.
45823     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45824       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45825       # a path prefixed by /cygdrive for fixpath to work.
45826       new_path="$CYGWIN_ROOT_PATH$input_path"
45827     fi
45828   fi
45829 
45830 
45831   if test "x$path" != "x$new_path"; then
45832     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45834 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45835   fi
45836 
45837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45838 
45839   path="$POTENTIAL_FREETYPE_LIB_PATH"
45840   has_colon=`$ECHO $path | $GREP ^.:`
45841   new_path="$path"
45842   if test "x$has_colon" = x; then
45843     # Not in mixed or Windows style, start by that.
45844     new_path=`cmd //c echo $path`
45845   fi
45846 
45847 
45848   input_path="$new_path"
45849   # Check if we need to convert this using DOS-style short mode. If the path
45850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45851   # take no chances and rewrite it.
45852   # Note: m4 eats our [], so we need to use [ and ] instead.
45853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45854   if test "x$has_forbidden_chars" != x; then
45855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45856     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45857   fi
45858 
45859 
45860   windows_path="$new_path"
45861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45862     unix_path=`$CYGPATH -u "$windows_path"`
45863     new_path="$unix_path"
45864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45866     new_path="$unix_path"
45867   fi
45868 
45869   if test "x$path" != "x$new_path"; then
45870     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45871     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45872 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45873   fi
45874 
45875   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45876   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45877 
45878   else
45879     # We're on a unix platform. Hooray! :)
45880     path="$POTENTIAL_FREETYPE_LIB_PATH"
45881     has_space=`$ECHO "$path" | $GREP " "`
45882     if test "x$has_space" != x; then
45883       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45884 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45885       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45886     fi
45887 
45888     # Use eval to expand a potential ~
45889     eval path="$path"
45890     if test ! -f "$path" && test ! -d "$path"; then
45891       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45892     fi
45893 
45894     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45895   fi
45896 
45897 
45898     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45899     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45900 $as_echo_n "checking for freetype includes... " >&6; }
45901     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45902 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45903     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45904     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45905 $as_echo_n "checking for freetype libraries... " >&6; }
45906     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45907 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45908   fi
45909 
45910           fi
45911         else
45912           FREETYPE_BASE_DIR="$SYSROOT/usr"
45913 
45914   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45915   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45916   METHOD="well-known location"
45917 
45918   # Let's start with an optimistic view of the world :-)
45919   FOUND_FREETYPE=yes
45920 
45921   # First look for the canonical freetype main include file ft2build.h.
45922   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45923     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45924     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45925     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45926       # Fail.
45927       FOUND_FREETYPE=no
45928     fi
45929   fi
45930 
45931   if test "x$FOUND_FREETYPE" = xyes; then
45932     # Include file found, let's continue the sanity check.
45933     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45934 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45935 
45936     # Reset to default value
45937     FREETYPE_BASE_NAME=freetype
45938     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45939     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45940       if test "x$OPENJDK_TARGET_OS" = xmacosx \
45941           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45942         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45943         # for the .6 version explicitly.
45944         FREETYPE_BASE_NAME=freetype.6
45945         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45946         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45947 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45948       else
45949         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45950 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45951         FOUND_FREETYPE=no
45952       fi
45953     else
45954       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45955         # On Windows, we will need both .lib and .dll file.
45956         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45957           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45958 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45959           FOUND_FREETYPE=no
45960         fi
45961       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45962           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45963         # Found lib in isa dir, use that instead.
45964         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45965         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45966 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45967       fi
45968     fi
45969   fi
45970 
45971   if test "x$FOUND_FREETYPE" = xyes; then
45972 
45973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45974 
45975   # Input might be given as Windows format, start by converting to
45976   # unix format.
45977   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45978   new_path=`$CYGPATH -u "$path"`
45979 
45980   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45981   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45982   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45983   # "foo.exe" is OK but "foo" is an error.
45984   #
45985   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45986   # It is also a way to make sure we got the proper file name for the real test later on.
45987   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45988   if test "x$test_shortpath" = x; then
45989     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45990 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45991     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45992   fi
45993 
45994   # Call helper function which possibly converts this using DOS-style short mode.
45995   # If so, the updated path is stored in $new_path.
45996 
45997   input_path="$new_path"
45998   # Check if we need to convert this using DOS-style short mode. If the path
45999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46000   # take no chances and rewrite it.
46001   # Note: m4 eats our [], so we need to use [ and ] instead.
46002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46003   if test "x$has_forbidden_chars" != x; then
46004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46005     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46006     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46007     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46008       # Going to short mode and back again did indeed matter. Since short mode is
46009       # case insensitive, let's make it lowercase to improve readability.
46010       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46011       # Now convert it back to Unix-stile (cygpath)
46012       input_path=`$CYGPATH -u "$shortmode_path"`
46013       new_path="$input_path"
46014     fi
46015   fi
46016 
46017   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46018   if test "x$test_cygdrive_prefix" = x; then
46019     # As a simple fix, exclude /usr/bin since it's not a real path.
46020     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46021       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46022       # a path prefixed by /cygdrive for fixpath to work.
46023       new_path="$CYGWIN_ROOT_PATH$input_path"
46024     fi
46025   fi
46026 
46027 
46028   if test "x$path" != "x$new_path"; then
46029     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46030     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46031 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46032   fi
46033 
46034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46035 
46036   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46037   has_colon=`$ECHO $path | $GREP ^.:`
46038   new_path="$path"
46039   if test "x$has_colon" = x; then
46040     # Not in mixed or Windows style, start by that.
46041     new_path=`cmd //c echo $path`
46042   fi
46043 
46044 
46045   input_path="$new_path"
46046   # Check if we need to convert this using DOS-style short mode. If the path
46047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46048   # take no chances and rewrite it.
46049   # Note: m4 eats our [], so we need to use [ and ] instead.
46050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46051   if test "x$has_forbidden_chars" != x; then
46052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46053     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46054   fi
46055 
46056 
46057   windows_path="$new_path"
46058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46059     unix_path=`$CYGPATH -u "$windows_path"`
46060     new_path="$unix_path"
46061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46063     new_path="$unix_path"
46064   fi
46065 
46066   if test "x$path" != "x$new_path"; then
46067     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46068     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46069 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46070   fi
46071 
46072   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46073   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46074 
46075   else
46076     # We're on a unix platform. Hooray! :)
46077     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46078     has_space=`$ECHO "$path" | $GREP " "`
46079     if test "x$has_space" != x; then
46080       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46081 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46082       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46083     fi
46084 
46085     # Use eval to expand a potential ~
46086     eval path="$path"
46087     if test ! -f "$path" && test ! -d "$path"; then
46088       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46089     fi
46090 
46091     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46092   fi
46093 
46094 
46095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46096 
46097   # Input might be given as Windows format, start by converting to
46098   # unix format.
46099   path="$POTENTIAL_FREETYPE_LIB_PATH"
46100   new_path=`$CYGPATH -u "$path"`
46101 
46102   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46103   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46104   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46105   # "foo.exe" is OK but "foo" is an error.
46106   #
46107   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46108   # It is also a way to make sure we got the proper file name for the real test later on.
46109   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46110   if test "x$test_shortpath" = x; then
46111     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46112 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46113     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46114   fi
46115 
46116   # Call helper function which possibly converts this using DOS-style short mode.
46117   # If so, the updated path is stored in $new_path.
46118 
46119   input_path="$new_path"
46120   # Check if we need to convert this using DOS-style short mode. If the path
46121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46122   # take no chances and rewrite it.
46123   # Note: m4 eats our [], so we need to use [ and ] instead.
46124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46125   if test "x$has_forbidden_chars" != x; then
46126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46127     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46128     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46129     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46130       # Going to short mode and back again did indeed matter. Since short mode is
46131       # case insensitive, let's make it lowercase to improve readability.
46132       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46133       # Now convert it back to Unix-stile (cygpath)
46134       input_path=`$CYGPATH -u "$shortmode_path"`
46135       new_path="$input_path"
46136     fi
46137   fi
46138 
46139   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46140   if test "x$test_cygdrive_prefix" = x; then
46141     # As a simple fix, exclude /usr/bin since it's not a real path.
46142     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46143       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46144       # a path prefixed by /cygdrive for fixpath to work.
46145       new_path="$CYGWIN_ROOT_PATH$input_path"
46146     fi
46147   fi
46148 
46149 
46150   if test "x$path" != "x$new_path"; then
46151     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46152     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46153 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46154   fi
46155 
46156   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46157 
46158   path="$POTENTIAL_FREETYPE_LIB_PATH"
46159   has_colon=`$ECHO $path | $GREP ^.:`
46160   new_path="$path"
46161   if test "x$has_colon" = x; then
46162     # Not in mixed or Windows style, start by that.
46163     new_path=`cmd //c echo $path`
46164   fi
46165 
46166 
46167   input_path="$new_path"
46168   # Check if we need to convert this using DOS-style short mode. If the path
46169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46170   # take no chances and rewrite it.
46171   # Note: m4 eats our [], so we need to use [ and ] instead.
46172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46173   if test "x$has_forbidden_chars" != x; then
46174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46175     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46176   fi
46177 
46178 
46179   windows_path="$new_path"
46180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46181     unix_path=`$CYGPATH -u "$windows_path"`
46182     new_path="$unix_path"
46183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46185     new_path="$unix_path"
46186   fi
46187 
46188   if test "x$path" != "x$new_path"; then
46189     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46190     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46191 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46192   fi
46193 
46194   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46195   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46196 
46197   else
46198     # We're on a unix platform. Hooray! :)
46199     path="$POTENTIAL_FREETYPE_LIB_PATH"
46200     has_space=`$ECHO "$path" | $GREP " "`
46201     if test "x$has_space" != x; then
46202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46203 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46204       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46205     fi
46206 
46207     # Use eval to expand a potential ~
46208     eval path="$path"
46209     if test ! -f "$path" && test ! -d "$path"; then
46210       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46211     fi
46212 
46213     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46214   fi
46215 
46216 
46217     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46218     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46219 $as_echo_n "checking for freetype includes... " >&6; }
46220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46221 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46222     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46223     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46224 $as_echo_n "checking for freetype libraries... " >&6; }
46225     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46226 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46227   fi
46228 
46229 
46230           if test "x$FOUND_FREETYPE" != xyes; then
46231             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46232 
46233   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46234   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46235   METHOD="well-known location"
46236 
46237   # Let's start with an optimistic view of the world :-)
46238   FOUND_FREETYPE=yes
46239 
46240   # First look for the canonical freetype main include file ft2build.h.
46241   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46242     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46243     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46244     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46245       # Fail.
46246       FOUND_FREETYPE=no
46247     fi
46248   fi
46249 
46250   if test "x$FOUND_FREETYPE" = xyes; then
46251     # Include file found, let's continue the sanity check.
46252     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46253 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46254 
46255     # Reset to default value
46256     FREETYPE_BASE_NAME=freetype
46257     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46258     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46259       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46260           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46261         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46262         # for the .6 version explicitly.
46263         FREETYPE_BASE_NAME=freetype.6
46264         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46265         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46266 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46267       else
46268         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46269 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46270         FOUND_FREETYPE=no
46271       fi
46272     else
46273       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46274         # On Windows, we will need both .lib and .dll file.
46275         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46276           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46277 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46278           FOUND_FREETYPE=no
46279         fi
46280       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46281           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46282         # Found lib in isa dir, use that instead.
46283         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46284         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46285 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46286       fi
46287     fi
46288   fi
46289 
46290   if test "x$FOUND_FREETYPE" = xyes; then
46291 
46292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46293 
46294   # Input might be given as Windows format, start by converting to
46295   # unix format.
46296   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46297   new_path=`$CYGPATH -u "$path"`
46298 
46299   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46300   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46301   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46302   # "foo.exe" is OK but "foo" is an error.
46303   #
46304   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46305   # It is also a way to make sure we got the proper file name for the real test later on.
46306   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46307   if test "x$test_shortpath" = x; then
46308     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46309 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46310     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46311   fi
46312 
46313   # Call helper function which possibly converts this using DOS-style short mode.
46314   # If so, the updated path is stored in $new_path.
46315 
46316   input_path="$new_path"
46317   # Check if we need to convert this using DOS-style short mode. If the path
46318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46319   # take no chances and rewrite it.
46320   # Note: m4 eats our [], so we need to use [ and ] instead.
46321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46322   if test "x$has_forbidden_chars" != x; then
46323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46324     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46325     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46326     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46327       # Going to short mode and back again did indeed matter. Since short mode is
46328       # case insensitive, let's make it lowercase to improve readability.
46329       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46330       # Now convert it back to Unix-stile (cygpath)
46331       input_path=`$CYGPATH -u "$shortmode_path"`
46332       new_path="$input_path"
46333     fi
46334   fi
46335 
46336   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46337   if test "x$test_cygdrive_prefix" = x; then
46338     # As a simple fix, exclude /usr/bin since it's not a real path.
46339     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46340       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46341       # a path prefixed by /cygdrive for fixpath to work.
46342       new_path="$CYGWIN_ROOT_PATH$input_path"
46343     fi
46344   fi
46345 
46346 
46347   if test "x$path" != "x$new_path"; then
46348     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46349     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46350 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46351   fi
46352 
46353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46354 
46355   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46356   has_colon=`$ECHO $path | $GREP ^.:`
46357   new_path="$path"
46358   if test "x$has_colon" = x; then
46359     # Not in mixed or Windows style, start by that.
46360     new_path=`cmd //c echo $path`
46361   fi
46362 
46363 
46364   input_path="$new_path"
46365   # Check if we need to convert this using DOS-style short mode. If the path
46366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46367   # take no chances and rewrite it.
46368   # Note: m4 eats our [], so we need to use [ and ] instead.
46369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46370   if test "x$has_forbidden_chars" != x; then
46371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46372     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46373   fi
46374 
46375 
46376   windows_path="$new_path"
46377   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46378     unix_path=`$CYGPATH -u "$windows_path"`
46379     new_path="$unix_path"
46380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46381     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46382     new_path="$unix_path"
46383   fi
46384 
46385   if test "x$path" != "x$new_path"; then
46386     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46387     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46388 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46389   fi
46390 
46391   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46392   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46393 
46394   else
46395     # We're on a unix platform. Hooray! :)
46396     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46397     has_space=`$ECHO "$path" | $GREP " "`
46398     if test "x$has_space" != x; then
46399       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46400 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46401       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46402     fi
46403 
46404     # Use eval to expand a potential ~
46405     eval path="$path"
46406     if test ! -f "$path" && test ! -d "$path"; then
46407       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46408     fi
46409 
46410     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46411   fi
46412 
46413 
46414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46415 
46416   # Input might be given as Windows format, start by converting to
46417   # unix format.
46418   path="$POTENTIAL_FREETYPE_LIB_PATH"
46419   new_path=`$CYGPATH -u "$path"`
46420 
46421   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46422   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46423   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46424   # "foo.exe" is OK but "foo" is an error.
46425   #
46426   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46427   # It is also a way to make sure we got the proper file name for the real test later on.
46428   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46429   if test "x$test_shortpath" = x; then
46430     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46431 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46432     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46433   fi
46434 
46435   # Call helper function which possibly converts this using DOS-style short mode.
46436   # If so, the updated path is stored in $new_path.
46437 
46438   input_path="$new_path"
46439   # Check if we need to convert this using DOS-style short mode. If the path
46440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46441   # take no chances and rewrite it.
46442   # Note: m4 eats our [], so we need to use [ and ] instead.
46443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46444   if test "x$has_forbidden_chars" != x; then
46445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46446     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46447     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46448     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46449       # Going to short mode and back again did indeed matter. Since short mode is
46450       # case insensitive, let's make it lowercase to improve readability.
46451       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46452       # Now convert it back to Unix-stile (cygpath)
46453       input_path=`$CYGPATH -u "$shortmode_path"`
46454       new_path="$input_path"
46455     fi
46456   fi
46457 
46458   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46459   if test "x$test_cygdrive_prefix" = x; then
46460     # As a simple fix, exclude /usr/bin since it's not a real path.
46461     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46462       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46463       # a path prefixed by /cygdrive for fixpath to work.
46464       new_path="$CYGWIN_ROOT_PATH$input_path"
46465     fi
46466   fi
46467 
46468 
46469   if test "x$path" != "x$new_path"; then
46470     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46471     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46472 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46473   fi
46474 
46475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46476 
46477   path="$POTENTIAL_FREETYPE_LIB_PATH"
46478   has_colon=`$ECHO $path | $GREP ^.:`
46479   new_path="$path"
46480   if test "x$has_colon" = x; then
46481     # Not in mixed or Windows style, start by that.
46482     new_path=`cmd //c echo $path`
46483   fi
46484 
46485 
46486   input_path="$new_path"
46487   # Check if we need to convert this using DOS-style short mode. If the path
46488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46489   # take no chances and rewrite it.
46490   # Note: m4 eats our [], so we need to use [ and ] instead.
46491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46492   if test "x$has_forbidden_chars" != x; then
46493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46494     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46495   fi
46496 
46497 
46498   windows_path="$new_path"
46499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46500     unix_path=`$CYGPATH -u "$windows_path"`
46501     new_path="$unix_path"
46502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46504     new_path="$unix_path"
46505   fi
46506 
46507   if test "x$path" != "x$new_path"; then
46508     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46509     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46510 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46511   fi
46512 
46513   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46514   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46515 
46516   else
46517     # We're on a unix platform. Hooray! :)
46518     path="$POTENTIAL_FREETYPE_LIB_PATH"
46519     has_space=`$ECHO "$path" | $GREP " "`
46520     if test "x$has_space" != x; then
46521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46522 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46523       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46524     fi
46525 
46526     # Use eval to expand a potential ~
46527     eval path="$path"
46528     if test ! -f "$path" && test ! -d "$path"; then
46529       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46530     fi
46531 
46532     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46533   fi
46534 
46535 
46536     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46537     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46538 $as_echo_n "checking for freetype includes... " >&6; }
46539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46540 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46541     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46542     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46543 $as_echo_n "checking for freetype libraries... " >&6; }
46544     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46545 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46546   fi
46547 
46548           fi
46549 
46550           if test "x$FOUND_FREETYPE" != xyes; then
46551             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46552 
46553   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46554   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46555   METHOD="well-known location"
46556 
46557   # Let's start with an optimistic view of the world :-)
46558   FOUND_FREETYPE=yes
46559 
46560   # First look for the canonical freetype main include file ft2build.h.
46561   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46562     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46563     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46564     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46565       # Fail.
46566       FOUND_FREETYPE=no
46567     fi
46568   fi
46569 
46570   if test "x$FOUND_FREETYPE" = xyes; then
46571     # Include file found, let's continue the sanity check.
46572     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46573 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46574 
46575     # Reset to default value
46576     FREETYPE_BASE_NAME=freetype
46577     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46578     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46579       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46580           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46581         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46582         # for the .6 version explicitly.
46583         FREETYPE_BASE_NAME=freetype.6
46584         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46585         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46586 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46587       else
46588         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46589 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46590         FOUND_FREETYPE=no
46591       fi
46592     else
46593       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46594         # On Windows, we will need both .lib and .dll file.
46595         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46596           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46597 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46598           FOUND_FREETYPE=no
46599         fi
46600       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46601           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46602         # Found lib in isa dir, use that instead.
46603         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46604         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46605 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46606       fi
46607     fi
46608   fi
46609 
46610   if test "x$FOUND_FREETYPE" = xyes; then
46611 
46612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46613 
46614   # Input might be given as Windows format, start by converting to
46615   # unix format.
46616   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46617   new_path=`$CYGPATH -u "$path"`
46618 
46619   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46620   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46621   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46622   # "foo.exe" is OK but "foo" is an error.
46623   #
46624   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46625   # It is also a way to make sure we got the proper file name for the real test later on.
46626   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46627   if test "x$test_shortpath" = x; then
46628     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46629 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46630     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46631   fi
46632 
46633   # Call helper function which possibly converts this using DOS-style short mode.
46634   # If so, the updated path is stored in $new_path.
46635 
46636   input_path="$new_path"
46637   # Check if we need to convert this using DOS-style short mode. If the path
46638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46639   # take no chances and rewrite it.
46640   # Note: m4 eats our [], so we need to use [ and ] instead.
46641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46642   if test "x$has_forbidden_chars" != x; then
46643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46644     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46645     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46646     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46647       # Going to short mode and back again did indeed matter. Since short mode is
46648       # case insensitive, let's make it lowercase to improve readability.
46649       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46650       # Now convert it back to Unix-stile (cygpath)
46651       input_path=`$CYGPATH -u "$shortmode_path"`
46652       new_path="$input_path"
46653     fi
46654   fi
46655 
46656   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46657   if test "x$test_cygdrive_prefix" = x; then
46658     # As a simple fix, exclude /usr/bin since it's not a real path.
46659     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46660       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46661       # a path prefixed by /cygdrive for fixpath to work.
46662       new_path="$CYGWIN_ROOT_PATH$input_path"
46663     fi
46664   fi
46665 
46666 
46667   if test "x$path" != "x$new_path"; then
46668     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46669     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46670 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46671   fi
46672 
46673   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46674 
46675   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46676   has_colon=`$ECHO $path | $GREP ^.:`
46677   new_path="$path"
46678   if test "x$has_colon" = x; then
46679     # Not in mixed or Windows style, start by that.
46680     new_path=`cmd //c echo $path`
46681   fi
46682 
46683 
46684   input_path="$new_path"
46685   # Check if we need to convert this using DOS-style short mode. If the path
46686   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46687   # take no chances and rewrite it.
46688   # Note: m4 eats our [], so we need to use [ and ] instead.
46689   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46690   if test "x$has_forbidden_chars" != x; then
46691     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46692     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46693   fi
46694 
46695 
46696   windows_path="$new_path"
46697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46698     unix_path=`$CYGPATH -u "$windows_path"`
46699     new_path="$unix_path"
46700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46702     new_path="$unix_path"
46703   fi
46704 
46705   if test "x$path" != "x$new_path"; then
46706     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46707     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46708 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46709   fi
46710 
46711   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46712   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46713 
46714   else
46715     # We're on a unix platform. Hooray! :)
46716     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46717     has_space=`$ECHO "$path" | $GREP " "`
46718     if test "x$has_space" != x; then
46719       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46720 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46721       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46722     fi
46723 
46724     # Use eval to expand a potential ~
46725     eval path="$path"
46726     if test ! -f "$path" && test ! -d "$path"; then
46727       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46728     fi
46729 
46730     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46731   fi
46732 
46733 
46734   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46735 
46736   # Input might be given as Windows format, start by converting to
46737   # unix format.
46738   path="$POTENTIAL_FREETYPE_LIB_PATH"
46739   new_path=`$CYGPATH -u "$path"`
46740 
46741   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46742   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46743   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46744   # "foo.exe" is OK but "foo" is an error.
46745   #
46746   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46747   # It is also a way to make sure we got the proper file name for the real test later on.
46748   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46749   if test "x$test_shortpath" = x; then
46750     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46751 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46752     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46753   fi
46754 
46755   # Call helper function which possibly converts this using DOS-style short mode.
46756   # If so, the updated path is stored in $new_path.
46757 
46758   input_path="$new_path"
46759   # Check if we need to convert this using DOS-style short mode. If the path
46760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46761   # take no chances and rewrite it.
46762   # Note: m4 eats our [], so we need to use [ and ] instead.
46763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46764   if test "x$has_forbidden_chars" != x; then
46765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46766     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46767     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46768     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46769       # Going to short mode and back again did indeed matter. Since short mode is
46770       # case insensitive, let's make it lowercase to improve readability.
46771       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46772       # Now convert it back to Unix-stile (cygpath)
46773       input_path=`$CYGPATH -u "$shortmode_path"`
46774       new_path="$input_path"
46775     fi
46776   fi
46777 
46778   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46779   if test "x$test_cygdrive_prefix" = x; then
46780     # As a simple fix, exclude /usr/bin since it's not a real path.
46781     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46782       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46783       # a path prefixed by /cygdrive for fixpath to work.
46784       new_path="$CYGWIN_ROOT_PATH$input_path"
46785     fi
46786   fi
46787 
46788 
46789   if test "x$path" != "x$new_path"; then
46790     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46791     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46792 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46793   fi
46794 
46795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46796 
46797   path="$POTENTIAL_FREETYPE_LIB_PATH"
46798   has_colon=`$ECHO $path | $GREP ^.:`
46799   new_path="$path"
46800   if test "x$has_colon" = x; then
46801     # Not in mixed or Windows style, start by that.
46802     new_path=`cmd //c echo $path`
46803   fi
46804 
46805 
46806   input_path="$new_path"
46807   # Check if we need to convert this using DOS-style short mode. If the path
46808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46809   # take no chances and rewrite it.
46810   # Note: m4 eats our [], so we need to use [ and ] instead.
46811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46812   if test "x$has_forbidden_chars" != x; then
46813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46814     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46815   fi
46816 
46817 
46818   windows_path="$new_path"
46819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820     unix_path=`$CYGPATH -u "$windows_path"`
46821     new_path="$unix_path"
46822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46824     new_path="$unix_path"
46825   fi
46826 
46827   if test "x$path" != "x$new_path"; then
46828     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46830 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46831   fi
46832 
46833   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46834   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46835 
46836   else
46837     # We're on a unix platform. Hooray! :)
46838     path="$POTENTIAL_FREETYPE_LIB_PATH"
46839     has_space=`$ECHO "$path" | $GREP " "`
46840     if test "x$has_space" != x; then
46841       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46842 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46843       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46844     fi
46845 
46846     # Use eval to expand a potential ~
46847     eval path="$path"
46848     if test ! -f "$path" && test ! -d "$path"; then
46849       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46850     fi
46851 
46852     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46853   fi
46854 
46855 
46856     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46857     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46858 $as_echo_n "checking for freetype includes... " >&6; }
46859     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46860 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46861     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46862     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46863 $as_echo_n "checking for freetype libraries... " >&6; }
46864     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46865 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46866   fi
46867 
46868           fi
46869 
46870           if test "x$FOUND_FREETYPE" != xyes; then
46871             FREETYPE_BASE_DIR="$SYSROOT/usr"
46872             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46873 
46874   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46875   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46876   METHOD="well-known location"
46877 
46878   # Let's start with an optimistic view of the world :-)
46879   FOUND_FREETYPE=yes
46880 
46881   # First look for the canonical freetype main include file ft2build.h.
46882   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46883     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46884     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46885     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46886       # Fail.
46887       FOUND_FREETYPE=no
46888     fi
46889   fi
46890 
46891   if test "x$FOUND_FREETYPE" = xyes; then
46892     # Include file found, let's continue the sanity check.
46893     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46894 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46895 
46896     # Reset to default value
46897     FREETYPE_BASE_NAME=freetype
46898     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46899     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46900       if test "x$OPENJDK_TARGET_OS" = xmacosx \
46901           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46902         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46903         # for the .6 version explicitly.
46904         FREETYPE_BASE_NAME=freetype.6
46905         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46906         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46907 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46908       else
46909         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46910 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46911         FOUND_FREETYPE=no
46912       fi
46913     else
46914       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46915         # On Windows, we will need both .lib and .dll file.
46916         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46917           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46918 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46919           FOUND_FREETYPE=no
46920         fi
46921       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46922           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46923         # Found lib in isa dir, use that instead.
46924         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46925         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46926 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46927       fi
46928     fi
46929   fi
46930 
46931   if test "x$FOUND_FREETYPE" = xyes; then
46932 
46933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46934 
46935   # Input might be given as Windows format, start by converting to
46936   # unix format.
46937   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46938   new_path=`$CYGPATH -u "$path"`
46939 
46940   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46941   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46942   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46943   # "foo.exe" is OK but "foo" is an error.
46944   #
46945   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46946   # It is also a way to make sure we got the proper file name for the real test later on.
46947   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46948   if test "x$test_shortpath" = x; then
46949     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46950 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46951     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46952   fi
46953 
46954   # Call helper function which possibly converts this using DOS-style short mode.
46955   # If so, the updated path is stored in $new_path.
46956 
46957   input_path="$new_path"
46958   # Check if we need to convert this using DOS-style short mode. If the path
46959   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46960   # take no chances and rewrite it.
46961   # Note: m4 eats our [], so we need to use [ and ] instead.
46962   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46963   if test "x$has_forbidden_chars" != x; then
46964     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46965     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46966     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46967     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46968       # Going to short mode and back again did indeed matter. Since short mode is
46969       # case insensitive, let's make it lowercase to improve readability.
46970       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46971       # Now convert it back to Unix-stile (cygpath)
46972       input_path=`$CYGPATH -u "$shortmode_path"`
46973       new_path="$input_path"
46974     fi
46975   fi
46976 
46977   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46978   if test "x$test_cygdrive_prefix" = x; then
46979     # As a simple fix, exclude /usr/bin since it's not a real path.
46980     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46981       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46982       # a path prefixed by /cygdrive for fixpath to work.
46983       new_path="$CYGWIN_ROOT_PATH$input_path"
46984     fi
46985   fi
46986 
46987 
46988   if test "x$path" != "x$new_path"; then
46989     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46990     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46991 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46992   fi
46993 
46994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46995 
46996   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46997   has_colon=`$ECHO $path | $GREP ^.:`
46998   new_path="$path"
46999   if test "x$has_colon" = x; then
47000     # Not in mixed or Windows style, start by that.
47001     new_path=`cmd //c echo $path`
47002   fi
47003 
47004 
47005   input_path="$new_path"
47006   # Check if we need to convert this using DOS-style short mode. If the path
47007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47008   # take no chances and rewrite it.
47009   # Note: m4 eats our [], so we need to use [ and ] instead.
47010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47011   if test "x$has_forbidden_chars" != x; then
47012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47013     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47014   fi
47015 
47016 
47017   windows_path="$new_path"
47018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47019     unix_path=`$CYGPATH -u "$windows_path"`
47020     new_path="$unix_path"
47021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47023     new_path="$unix_path"
47024   fi
47025 
47026   if test "x$path" != "x$new_path"; then
47027     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47028     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47029 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47030   fi
47031 
47032   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47033   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47034 
47035   else
47036     # We're on a unix platform. Hooray! :)
47037     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47038     has_space=`$ECHO "$path" | $GREP " "`
47039     if test "x$has_space" != x; then
47040       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47041 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47042       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47043     fi
47044 
47045     # Use eval to expand a potential ~
47046     eval path="$path"
47047     if test ! -f "$path" && test ! -d "$path"; then
47048       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47049     fi
47050 
47051     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47052   fi
47053 
47054 
47055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47056 
47057   # Input might be given as Windows format, start by converting to
47058   # unix format.
47059   path="$POTENTIAL_FREETYPE_LIB_PATH"
47060   new_path=`$CYGPATH -u "$path"`
47061 
47062   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47063   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47064   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47065   # "foo.exe" is OK but "foo" is an error.
47066   #
47067   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47068   # It is also a way to make sure we got the proper file name for the real test later on.
47069   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47070   if test "x$test_shortpath" = x; then
47071     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47072 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47073     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47074   fi
47075 
47076   # Call helper function which possibly converts this using DOS-style short mode.
47077   # If so, the updated path is stored in $new_path.
47078 
47079   input_path="$new_path"
47080   # Check if we need to convert this using DOS-style short mode. If the path
47081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47082   # take no chances and rewrite it.
47083   # Note: m4 eats our [], so we need to use [ and ] instead.
47084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47085   if test "x$has_forbidden_chars" != x; then
47086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47087     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47088     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47089     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47090       # Going to short mode and back again did indeed matter. Since short mode is
47091       # case insensitive, let's make it lowercase to improve readability.
47092       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47093       # Now convert it back to Unix-stile (cygpath)
47094       input_path=`$CYGPATH -u "$shortmode_path"`
47095       new_path="$input_path"
47096     fi
47097   fi
47098 
47099   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47100   if test "x$test_cygdrive_prefix" = x; then
47101     # As a simple fix, exclude /usr/bin since it's not a real path.
47102     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47103       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47104       # a path prefixed by /cygdrive for fixpath to work.
47105       new_path="$CYGWIN_ROOT_PATH$input_path"
47106     fi
47107   fi
47108 
47109 
47110   if test "x$path" != "x$new_path"; then
47111     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47113 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47114   fi
47115 
47116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47117 
47118   path="$POTENTIAL_FREETYPE_LIB_PATH"
47119   has_colon=`$ECHO $path | $GREP ^.:`
47120   new_path="$path"
47121   if test "x$has_colon" = x; then
47122     # Not in mixed or Windows style, start by that.
47123     new_path=`cmd //c echo $path`
47124   fi
47125 
47126 
47127   input_path="$new_path"
47128   # Check if we need to convert this using DOS-style short mode. If the path
47129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47130   # take no chances and rewrite it.
47131   # Note: m4 eats our [], so we need to use [ and ] instead.
47132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47133   if test "x$has_forbidden_chars" != x; then
47134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47135     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47136   fi
47137 
47138 
47139   windows_path="$new_path"
47140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47141     unix_path=`$CYGPATH -u "$windows_path"`
47142     new_path="$unix_path"
47143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47145     new_path="$unix_path"
47146   fi
47147 
47148   if test "x$path" != "x$new_path"; then
47149     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47151 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47152   fi
47153 
47154   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47155   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47156 
47157   else
47158     # We're on a unix platform. Hooray! :)
47159     path="$POTENTIAL_FREETYPE_LIB_PATH"
47160     has_space=`$ECHO "$path" | $GREP " "`
47161     if test "x$has_space" != x; then
47162       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47163 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47164       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47165     fi
47166 
47167     # Use eval to expand a potential ~
47168     eval path="$path"
47169     if test ! -f "$path" && test ! -d "$path"; then
47170       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47171     fi
47172 
47173     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47174   fi
47175 
47176 
47177     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47179 $as_echo_n "checking for freetype includes... " >&6; }
47180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47181 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47182     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47184 $as_echo_n "checking for freetype libraries... " >&6; }
47185     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47186 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47187   fi
47188 
47189             else
47190 
47191   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47192   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47193   METHOD="well-known location"
47194 
47195   # Let's start with an optimistic view of the world :-)
47196   FOUND_FREETYPE=yes
47197 
47198   # First look for the canonical freetype main include file ft2build.h.
47199   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47200     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47201     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47202     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47203       # Fail.
47204       FOUND_FREETYPE=no
47205     fi
47206   fi
47207 
47208   if test "x$FOUND_FREETYPE" = xyes; then
47209     # Include file found, let's continue the sanity check.
47210     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47211 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47212 
47213     # Reset to default value
47214     FREETYPE_BASE_NAME=freetype
47215     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47216     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47217       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47218           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47219         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47220         # for the .6 version explicitly.
47221         FREETYPE_BASE_NAME=freetype.6
47222         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47223         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47224 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47225       else
47226         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47227 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47228         FOUND_FREETYPE=no
47229       fi
47230     else
47231       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47232         # On Windows, we will need both .lib and .dll file.
47233         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47234           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47235 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47236           FOUND_FREETYPE=no
47237         fi
47238       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47239           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47240         # Found lib in isa dir, use that instead.
47241         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47242         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47243 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47244       fi
47245     fi
47246   fi
47247 
47248   if test "x$FOUND_FREETYPE" = xyes; then
47249 
47250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47251 
47252   # Input might be given as Windows format, start by converting to
47253   # unix format.
47254   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47255   new_path=`$CYGPATH -u "$path"`
47256 
47257   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47258   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47259   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47260   # "foo.exe" is OK but "foo" is an error.
47261   #
47262   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47263   # It is also a way to make sure we got the proper file name for the real test later on.
47264   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47265   if test "x$test_shortpath" = x; then
47266     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47267 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47268     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47269   fi
47270 
47271   # Call helper function which possibly converts this using DOS-style short mode.
47272   # If so, the updated path is stored in $new_path.
47273 
47274   input_path="$new_path"
47275   # Check if we need to convert this using DOS-style short mode. If the path
47276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47277   # take no chances and rewrite it.
47278   # Note: m4 eats our [], so we need to use [ and ] instead.
47279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47280   if test "x$has_forbidden_chars" != x; then
47281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47282     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47283     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47284     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47285       # Going to short mode and back again did indeed matter. Since short mode is
47286       # case insensitive, let's make it lowercase to improve readability.
47287       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47288       # Now convert it back to Unix-stile (cygpath)
47289       input_path=`$CYGPATH -u "$shortmode_path"`
47290       new_path="$input_path"
47291     fi
47292   fi
47293 
47294   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47295   if test "x$test_cygdrive_prefix" = x; then
47296     # As a simple fix, exclude /usr/bin since it's not a real path.
47297     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47298       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47299       # a path prefixed by /cygdrive for fixpath to work.
47300       new_path="$CYGWIN_ROOT_PATH$input_path"
47301     fi
47302   fi
47303 
47304 
47305   if test "x$path" != "x$new_path"; then
47306     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47308 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47309   fi
47310 
47311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47312 
47313   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47314   has_colon=`$ECHO $path | $GREP ^.:`
47315   new_path="$path"
47316   if test "x$has_colon" = x; then
47317     # Not in mixed or Windows style, start by that.
47318     new_path=`cmd //c echo $path`
47319   fi
47320 
47321 
47322   input_path="$new_path"
47323   # Check if we need to convert this using DOS-style short mode. If the path
47324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47325   # take no chances and rewrite it.
47326   # Note: m4 eats our [], so we need to use [ and ] instead.
47327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47328   if test "x$has_forbidden_chars" != x; then
47329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47330     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47331   fi
47332 
47333 
47334   windows_path="$new_path"
47335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47336     unix_path=`$CYGPATH -u "$windows_path"`
47337     new_path="$unix_path"
47338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47340     new_path="$unix_path"
47341   fi
47342 
47343   if test "x$path" != "x$new_path"; then
47344     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47346 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47347   fi
47348 
47349   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47350   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47351 
47352   else
47353     # We're on a unix platform. Hooray! :)
47354     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47355     has_space=`$ECHO "$path" | $GREP " "`
47356     if test "x$has_space" != x; then
47357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47358 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47359       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47360     fi
47361 
47362     # Use eval to expand a potential ~
47363     eval path="$path"
47364     if test ! -f "$path" && test ! -d "$path"; then
47365       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47366     fi
47367 
47368     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47369   fi
47370 
47371 
47372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47373 
47374   # Input might be given as Windows format, start by converting to
47375   # unix format.
47376   path="$POTENTIAL_FREETYPE_LIB_PATH"
47377   new_path=`$CYGPATH -u "$path"`
47378 
47379   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47380   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47381   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47382   # "foo.exe" is OK but "foo" is an error.
47383   #
47384   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47385   # It is also a way to make sure we got the proper file name for the real test later on.
47386   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47387   if test "x$test_shortpath" = x; then
47388     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47389 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47390     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47391   fi
47392 
47393   # Call helper function which possibly converts this using DOS-style short mode.
47394   # If so, the updated path is stored in $new_path.
47395 
47396   input_path="$new_path"
47397   # Check if we need to convert this using DOS-style short mode. If the path
47398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47399   # take no chances and rewrite it.
47400   # Note: m4 eats our [], so we need to use [ and ] instead.
47401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47402   if test "x$has_forbidden_chars" != x; then
47403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47404     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47405     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47406     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47407       # Going to short mode and back again did indeed matter. Since short mode is
47408       # case insensitive, let's make it lowercase to improve readability.
47409       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47410       # Now convert it back to Unix-stile (cygpath)
47411       input_path=`$CYGPATH -u "$shortmode_path"`
47412       new_path="$input_path"
47413     fi
47414   fi
47415 
47416   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47417   if test "x$test_cygdrive_prefix" = x; then
47418     # As a simple fix, exclude /usr/bin since it's not a real path.
47419     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47420       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47421       # a path prefixed by /cygdrive for fixpath to work.
47422       new_path="$CYGWIN_ROOT_PATH$input_path"
47423     fi
47424   fi
47425 
47426 
47427   if test "x$path" != "x$new_path"; then
47428     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47430 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47431   fi
47432 
47433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47434 
47435   path="$POTENTIAL_FREETYPE_LIB_PATH"
47436   has_colon=`$ECHO $path | $GREP ^.:`
47437   new_path="$path"
47438   if test "x$has_colon" = x; then
47439     # Not in mixed or Windows style, start by that.
47440     new_path=`cmd //c echo $path`
47441   fi
47442 
47443 
47444   input_path="$new_path"
47445   # Check if we need to convert this using DOS-style short mode. If the path
47446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47447   # take no chances and rewrite it.
47448   # Note: m4 eats our [], so we need to use [ and ] instead.
47449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47450   if test "x$has_forbidden_chars" != x; then
47451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47452     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47453   fi
47454 
47455 
47456   windows_path="$new_path"
47457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47458     unix_path=`$CYGPATH -u "$windows_path"`
47459     new_path="$unix_path"
47460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47462     new_path="$unix_path"
47463   fi
47464 
47465   if test "x$path" != "x$new_path"; then
47466     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47467     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47468 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47469   fi
47470 
47471   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47472   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47473 
47474   else
47475     # We're on a unix platform. Hooray! :)
47476     path="$POTENTIAL_FREETYPE_LIB_PATH"
47477     has_space=`$ECHO "$path" | $GREP " "`
47478     if test "x$has_space" != x; then
47479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47480 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47481       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47482     fi
47483 
47484     # Use eval to expand a potential ~
47485     eval path="$path"
47486     if test ! -f "$path" && test ! -d "$path"; then
47487       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47488     fi
47489 
47490     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47491   fi
47492 
47493 
47494     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47495     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47496 $as_echo_n "checking for freetype includes... " >&6; }
47497     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47498 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47499     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47500     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47501 $as_echo_n "checking for freetype libraries... " >&6; }
47502     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47503 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47504   fi
47505 
47506               if test "x$FOUND_FREETYPE" != xyes; then
47507 
47508   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47509   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47510   METHOD="well-known location"
47511 
47512   # Let's start with an optimistic view of the world :-)
47513   FOUND_FREETYPE=yes
47514 
47515   # First look for the canonical freetype main include file ft2build.h.
47516   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47517     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47518     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47519     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47520       # Fail.
47521       FOUND_FREETYPE=no
47522     fi
47523   fi
47524 
47525   if test "x$FOUND_FREETYPE" = xyes; then
47526     # Include file found, let's continue the sanity check.
47527     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47528 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47529 
47530     # Reset to default value
47531     FREETYPE_BASE_NAME=freetype
47532     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47533     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47534       if test "x$OPENJDK_TARGET_OS" = xmacosx \
47535           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47536         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47537         # for the .6 version explicitly.
47538         FREETYPE_BASE_NAME=freetype.6
47539         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47540         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47541 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47542       else
47543         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47544 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47545         FOUND_FREETYPE=no
47546       fi
47547     else
47548       if test "x$OPENJDK_TARGET_OS" = xwindows; then
47549         # On Windows, we will need both .lib and .dll file.
47550         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47551           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47552 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47553           FOUND_FREETYPE=no
47554         fi
47555       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47556           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47557         # Found lib in isa dir, use that instead.
47558         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47559         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47560 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47561       fi
47562     fi
47563   fi
47564 
47565   if test "x$FOUND_FREETYPE" = xyes; then
47566 
47567   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47568 
47569   # Input might be given as Windows format, start by converting to
47570   # unix format.
47571   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47572   new_path=`$CYGPATH -u "$path"`
47573 
47574   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47575   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47576   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47577   # "foo.exe" is OK but "foo" is an error.
47578   #
47579   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47580   # It is also a way to make sure we got the proper file name for the real test later on.
47581   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47582   if test "x$test_shortpath" = x; then
47583     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47584 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47585     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47586   fi
47587 
47588   # Call helper function which possibly converts this using DOS-style short mode.
47589   # If so, the updated path is stored in $new_path.
47590 
47591   input_path="$new_path"
47592   # Check if we need to convert this using DOS-style short mode. If the path
47593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47594   # take no chances and rewrite it.
47595   # Note: m4 eats our [], so we need to use [ and ] instead.
47596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47597   if test "x$has_forbidden_chars" != x; then
47598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47602       # Going to short mode and back again did indeed matter. Since short mode is
47603       # case insensitive, let's make it lowercase to improve readability.
47604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47605       # Now convert it back to Unix-stile (cygpath)
47606       input_path=`$CYGPATH -u "$shortmode_path"`
47607       new_path="$input_path"
47608     fi
47609   fi
47610 
47611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47612   if test "x$test_cygdrive_prefix" = x; then
47613     # As a simple fix, exclude /usr/bin since it's not a real path.
47614     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47616       # a path prefixed by /cygdrive for fixpath to work.
47617       new_path="$CYGWIN_ROOT_PATH$input_path"
47618     fi
47619   fi
47620 
47621 
47622   if test "x$path" != "x$new_path"; then
47623     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47625 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47626   fi
47627 
47628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47629 
47630   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47631   has_colon=`$ECHO $path | $GREP ^.:`
47632   new_path="$path"
47633   if test "x$has_colon" = x; then
47634     # Not in mixed or Windows style, start by that.
47635     new_path=`cmd //c echo $path`
47636   fi
47637 
47638 
47639   input_path="$new_path"
47640   # Check if we need to convert this using DOS-style short mode. If the path
47641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47642   # take no chances and rewrite it.
47643   # Note: m4 eats our [], so we need to use [ and ] instead.
47644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47645   if test "x$has_forbidden_chars" != x; then
47646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47647     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47648   fi
47649 
47650 
47651   windows_path="$new_path"
47652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47653     unix_path=`$CYGPATH -u "$windows_path"`
47654     new_path="$unix_path"
47655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47657     new_path="$unix_path"
47658   fi
47659 
47660   if test "x$path" != "x$new_path"; then
47661     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47663 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47664   fi
47665 
47666   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47667   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47668 
47669   else
47670     # We're on a unix platform. Hooray! :)
47671     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47672     has_space=`$ECHO "$path" | $GREP " "`
47673     if test "x$has_space" != x; then
47674       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47675 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47676       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47677     fi
47678 
47679     # Use eval to expand a potential ~
47680     eval path="$path"
47681     if test ! -f "$path" && test ! -d "$path"; then
47682       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47683     fi
47684 
47685     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47686   fi
47687 
47688 
47689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47690 
47691   # Input might be given as Windows format, start by converting to
47692   # unix format.
47693   path="$POTENTIAL_FREETYPE_LIB_PATH"
47694   new_path=`$CYGPATH -u "$path"`
47695 
47696   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47697   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47698   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47699   # "foo.exe" is OK but "foo" is an error.
47700   #
47701   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47702   # It is also a way to make sure we got the proper file name for the real test later on.
47703   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47704   if test "x$test_shortpath" = x; then
47705     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47706 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47707     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47708   fi
47709 
47710   # Call helper function which possibly converts this using DOS-style short mode.
47711   # If so, the updated path is stored in $new_path.
47712 
47713   input_path="$new_path"
47714   # Check if we need to convert this using DOS-style short mode. If the path
47715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47716   # take no chances and rewrite it.
47717   # Note: m4 eats our [], so we need to use [ and ] instead.
47718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47719   if test "x$has_forbidden_chars" != x; then
47720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47721     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47722     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47723     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47724       # Going to short mode and back again did indeed matter. Since short mode is
47725       # case insensitive, let's make it lowercase to improve readability.
47726       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47727       # Now convert it back to Unix-stile (cygpath)
47728       input_path=`$CYGPATH -u "$shortmode_path"`
47729       new_path="$input_path"
47730     fi
47731   fi
47732 
47733   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47734   if test "x$test_cygdrive_prefix" = x; then
47735     # As a simple fix, exclude /usr/bin since it's not a real path.
47736     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47737       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47738       # a path prefixed by /cygdrive for fixpath to work.
47739       new_path="$CYGWIN_ROOT_PATH$input_path"
47740     fi
47741   fi
47742 
47743 
47744   if test "x$path" != "x$new_path"; then
47745     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47747 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47748   fi
47749 
47750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47751 
47752   path="$POTENTIAL_FREETYPE_LIB_PATH"
47753   has_colon=`$ECHO $path | $GREP ^.:`
47754   new_path="$path"
47755   if test "x$has_colon" = x; then
47756     # Not in mixed or Windows style, start by that.
47757     new_path=`cmd //c echo $path`
47758   fi
47759 
47760 
47761   input_path="$new_path"
47762   # Check if we need to convert this using DOS-style short mode. If the path
47763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47764   # take no chances and rewrite it.
47765   # Note: m4 eats our [], so we need to use [ and ] instead.
47766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47767   if test "x$has_forbidden_chars" != x; then
47768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47769     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47770   fi
47771 
47772 
47773   windows_path="$new_path"
47774   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47775     unix_path=`$CYGPATH -u "$windows_path"`
47776     new_path="$unix_path"
47777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47778     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47779     new_path="$unix_path"
47780   fi
47781 
47782   if test "x$path" != "x$new_path"; then
47783     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47784     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47785 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47786   fi
47787 
47788   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47789   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47790 
47791   else
47792     # We're on a unix platform. Hooray! :)
47793     path="$POTENTIAL_FREETYPE_LIB_PATH"
47794     has_space=`$ECHO "$path" | $GREP " "`
47795     if test "x$has_space" != x; then
47796       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47797 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47798       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47799     fi
47800 
47801     # Use eval to expand a potential ~
47802     eval path="$path"
47803     if test ! -f "$path" && test ! -d "$path"; then
47804       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47805     fi
47806 
47807     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47808   fi
47809 
47810 
47811     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47813 $as_echo_n "checking for freetype includes... " >&6; }
47814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47815 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47816     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47818 $as_echo_n "checking for freetype libraries... " >&6; }
47819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47820 $as_echo "$FREETYPE_LIB_PATH" >&6; }
47821   fi
47822 
47823               fi
47824             fi
47825           fi
47826         fi
47827       fi # end check in well-known locations
47828 
47829       if test "x$FOUND_FREETYPE" != xyes; then
47830 
47831   # Print a helpful message on how to acquire the necessary build dependency.
47832   # freetype is the help tag: freetype, cups, pulse, alsa etc
47833   MISSING_DEPENDENCY=freetype
47834 
47835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47836     cygwin_help $MISSING_DEPENDENCY
47837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47838     msys_help $MISSING_DEPENDENCY
47839   else
47840     PKGHANDLER_COMMAND=
47841 
47842     case $PKGHANDLER in
47843       apt-get)
47844         apt_help     $MISSING_DEPENDENCY ;;
47845       yum)
47846         yum_help     $MISSING_DEPENDENCY ;;
47847       port)
47848         port_help    $MISSING_DEPENDENCY ;;
47849       pkgutil)
47850         pkgutil_help $MISSING_DEPENDENCY ;;
47851       pkgadd)
47852         pkgadd_help  $MISSING_DEPENDENCY ;;
47853     esac
47854 
47855     if test "x$PKGHANDLER_COMMAND" != x; then
47856       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47857     fi
47858   fi
47859 
47860         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47861       fi
47862     fi # end user specified settings
47863 
47864     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47865     if test "x$FREETYPE_CFLAGS" = x; then
47866 
47867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47868 
47869   # Input might be given as Windows format, start by converting to
47870   # unix format.
47871   path="$FREETYPE_INCLUDE_PATH"
47872   new_path=`$CYGPATH -u "$path"`
47873 
47874   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47875   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47876   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47877   # "foo.exe" is OK but "foo" is an error.
47878   #
47879   # This test is therefore slightly more accurate than "test -f" to check for file precense.
47880   # It is also a way to make sure we got the proper file name for the real test later on.
47881   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47882   if test "x$test_shortpath" = x; then
47883     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47884 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47885     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47886   fi
47887 
47888   # Call helper function which possibly converts this using DOS-style short mode.
47889   # If so, the updated path is stored in $new_path.
47890 
47891   input_path="$new_path"
47892   # Check if we need to convert this using DOS-style short mode. If the path
47893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47894   # take no chances and rewrite it.
47895   # Note: m4 eats our [], so we need to use [ and ] instead.
47896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47897   if test "x$has_forbidden_chars" != x; then
47898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47899     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47900     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47901     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47902       # Going to short mode and back again did indeed matter. Since short mode is
47903       # case insensitive, let's make it lowercase to improve readability.
47904       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47905       # Now convert it back to Unix-stile (cygpath)
47906       input_path=`$CYGPATH -u "$shortmode_path"`
47907       new_path="$input_path"
47908     fi
47909   fi
47910 
47911   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47912   if test "x$test_cygdrive_prefix" = x; then
47913     # As a simple fix, exclude /usr/bin since it's not a real path.
47914     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47915       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47916       # a path prefixed by /cygdrive for fixpath to work.
47917       new_path="$CYGWIN_ROOT_PATH$input_path"
47918     fi
47919   fi
47920 
47921 
47922   if test "x$path" != "x$new_path"; then
47923     FREETYPE_INCLUDE_PATH="$new_path"
47924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47925 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47926   fi
47927 
47928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47929 
47930   path="$FREETYPE_INCLUDE_PATH"
47931   has_colon=`$ECHO $path | $GREP ^.:`
47932   new_path="$path"
47933   if test "x$has_colon" = x; then
47934     # Not in mixed or Windows style, start by that.
47935     new_path=`cmd //c echo $path`
47936   fi
47937 
47938 
47939   input_path="$new_path"
47940   # Check if we need to convert this using DOS-style short mode. If the path
47941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47942   # take no chances and rewrite it.
47943   # Note: m4 eats our [], so we need to use [ and ] instead.
47944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47945   if test "x$has_forbidden_chars" != x; then
47946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47948   fi
47949 
47950 
47951   windows_path="$new_path"
47952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47953     unix_path=`$CYGPATH -u "$windows_path"`
47954     new_path="$unix_path"
47955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47957     new_path="$unix_path"
47958   fi
47959 
47960   if test "x$path" != "x$new_path"; then
47961     FREETYPE_INCLUDE_PATH="$new_path"
47962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47963 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47964   fi
47965 
47966   # Save the first 10 bytes of this path to the storage, so fixpath can work.
47967   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47968 
47969   else
47970     # We're on a unix platform. Hooray! :)
47971     path="$FREETYPE_INCLUDE_PATH"
47972     has_space=`$ECHO "$path" | $GREP " "`
47973     if test "x$has_space" != x; then
47974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47975 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47976       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47977     fi
47978 
47979     # Use eval to expand a potential ~
47980     eval path="$path"
47981     if test ! -f "$path" && test ! -d "$path"; then
47982       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47983     fi
47984 
47985     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47986   fi
47987 
47988       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47989         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47990       else
47991         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47992       fi
47993     fi
47994 
47995     if test "x$FREETYPE_LIBS" = x; then
47996 
47997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47998 
47999   # Input might be given as Windows format, start by converting to
48000   # unix format.
48001   path="$FREETYPE_LIB_PATH"
48002   new_path=`$CYGPATH -u "$path"`
48003 
48004   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48005   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48006   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48007   # "foo.exe" is OK but "foo" is an error.
48008   #
48009   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48010   # It is also a way to make sure we got the proper file name for the real test later on.
48011   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48012   if test "x$test_shortpath" = x; then
48013     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48014 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48015     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48016   fi
48017 
48018   # Call helper function which possibly converts this using DOS-style short mode.
48019   # If so, the updated path is stored in $new_path.
48020 
48021   input_path="$new_path"
48022   # Check if we need to convert this using DOS-style short mode. If the path
48023   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48024   # take no chances and rewrite it.
48025   # Note: m4 eats our [], so we need to use [ and ] instead.
48026   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48027   if test "x$has_forbidden_chars" != x; then
48028     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48029     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48030     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48031     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48032       # Going to short mode and back again did indeed matter. Since short mode is
48033       # case insensitive, let's make it lowercase to improve readability.
48034       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48035       # Now convert it back to Unix-stile (cygpath)
48036       input_path=`$CYGPATH -u "$shortmode_path"`
48037       new_path="$input_path"
48038     fi
48039   fi
48040 
48041   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48042   if test "x$test_cygdrive_prefix" = x; then
48043     # As a simple fix, exclude /usr/bin since it's not a real path.
48044     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48045       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48046       # a path prefixed by /cygdrive for fixpath to work.
48047       new_path="$CYGWIN_ROOT_PATH$input_path"
48048     fi
48049   fi
48050 
48051 
48052   if test "x$path" != "x$new_path"; then
48053     FREETYPE_LIB_PATH="$new_path"
48054     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48055 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48056   fi
48057 
48058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48059 
48060   path="$FREETYPE_LIB_PATH"
48061   has_colon=`$ECHO $path | $GREP ^.:`
48062   new_path="$path"
48063   if test "x$has_colon" = x; then
48064     # Not in mixed or Windows style, start by that.
48065     new_path=`cmd //c echo $path`
48066   fi
48067 
48068 
48069   input_path="$new_path"
48070   # Check if we need to convert this using DOS-style short mode. If the path
48071   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48072   # take no chances and rewrite it.
48073   # Note: m4 eats our [], so we need to use [ and ] instead.
48074   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48075   if test "x$has_forbidden_chars" != x; then
48076     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48077     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48078   fi
48079 
48080 
48081   windows_path="$new_path"
48082   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48083     unix_path=`$CYGPATH -u "$windows_path"`
48084     new_path="$unix_path"
48085   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48086     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48087     new_path="$unix_path"
48088   fi
48089 
48090   if test "x$path" != "x$new_path"; then
48091     FREETYPE_LIB_PATH="$new_path"
48092     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48093 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48094   fi
48095 
48096   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48097   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48098 
48099   else
48100     # We're on a unix platform. Hooray! :)
48101     path="$FREETYPE_LIB_PATH"
48102     has_space=`$ECHO "$path" | $GREP " "`
48103     if test "x$has_space" != x; then
48104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48105 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48106       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48107     fi
48108 
48109     # Use eval to expand a potential ~
48110     eval path="$path"
48111     if test ! -f "$path" && test ! -d "$path"; then
48112       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48113     fi
48114 
48115     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48116   fi
48117 
48118       if test "x$OPENJDK_TARGET_OS" = xwindows; then
48119         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48120       else
48121         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48122       fi
48123     fi
48124 
48125     # Try to compile it
48126     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48127 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
48128     ac_ext=cpp
48129 ac_cpp='$CXXCPP $CPPFLAGS'
48130 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48131 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48132 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48133 
48134     PREV_CXXCFLAGS="$CXXFLAGS"
48135     PREV_LIBS="$LIBS"
48136     PREV_CXX="$CXX"
48137     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48138     LIBS="$LIBS $FREETYPE_LIBS"
48139     CXX="$FIXPATH $CXX"
48140     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48141 /* end confdefs.h.  */
48142 
48143           #include<ft2build.h>
48144           #include FT_FREETYPE_H
48145           int main () {
48146             FT_Init_FreeType(NULL);
48147             return 0;
48148           }
48149 
48150 _ACEOF
48151 if ac_fn_cxx_try_link "$LINENO"; then :
48152 
48153           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48154 $as_echo "yes" >&6; }
48155 
48156 else
48157 
48158           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48159 $as_echo "no" >&6; }
48160           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48161 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48162           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48163 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48164 
48165 
48166   # Print a helpful message on how to acquire the necessary build dependency.
48167   # freetype is the help tag: freetype, cups, pulse, alsa etc
48168   MISSING_DEPENDENCY=freetype
48169 
48170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48171     cygwin_help $MISSING_DEPENDENCY
48172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48173     msys_help $MISSING_DEPENDENCY
48174   else
48175     PKGHANDLER_COMMAND=
48176 
48177     case $PKGHANDLER in
48178       apt-get)
48179         apt_help     $MISSING_DEPENDENCY ;;
48180       yum)
48181         yum_help     $MISSING_DEPENDENCY ;;
48182       port)
48183         port_help    $MISSING_DEPENDENCY ;;
48184       pkgutil)
48185         pkgutil_help $MISSING_DEPENDENCY ;;
48186       pkgadd)
48187         pkgadd_help  $MISSING_DEPENDENCY ;;
48188     esac
48189 
48190     if test "x$PKGHANDLER_COMMAND" != x; then
48191       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48192     fi
48193   fi
48194 
48195 
48196           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48197 
48198 
48199 fi
48200 rm -f core conftest.err conftest.$ac_objext \
48201     conftest$ac_exeext conftest.$ac_ext
48202     CXXCFLAGS="$PREV_CXXFLAGS"
48203     LIBS="$PREV_LIBS"
48204     CXX="$PREV_CXX"
48205     ac_ext=cpp
48206 ac_cpp='$CXXCPP $CPPFLAGS'
48207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48210 
48211 
48212     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48213 $as_echo_n "checking if we should bundle freetype... " >&6; }
48214     if test "x$BUNDLE_FREETYPE" = xyes; then
48215       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48216     fi
48217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48218 $as_echo "$BUNDLE_FREETYPE" >&6; }
48219 
48220   fi # end freetype needed
48221 
48222 
48223 
48224 
48225 
48226 
48227 
48228   ###############################################################################
48229   #
48230   # Check for alsa headers and libraries. Used on Linux/GNU systems.
48231   #
48232 
48233 # Check whether --with-alsa was given.
48234 if test "${with_alsa+set}" = set; then :
48235   withval=$with_alsa;
48236 fi
48237 
48238 
48239 # Check whether --with-alsa-include was given.
48240 if test "${with_alsa_include+set}" = set; then :
48241   withval=$with_alsa_include;
48242 fi
48243 
48244 
48245 # Check whether --with-alsa-lib was given.
48246 if test "${with_alsa_lib+set}" = set; then :
48247   withval=$with_alsa_lib;
48248 fi
48249 
48250 
48251   if test "x$ALSA_NOT_NEEDED" = xyes; then
48252     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48253       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48254 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48255     fi
48256     ALSA_CFLAGS=
48257     ALSA_LIBS=
48258   else
48259     ALSA_FOUND=no
48260 
48261     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48262       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48263     fi
48264 
48265     if test "x${with_alsa}" != x; then
48266       ALSA_LIBS="-L${with_alsa}/lib -lasound"
48267       ALSA_CFLAGS="-I${with_alsa}/include"
48268       ALSA_FOUND=yes
48269     fi
48270     if test "x${with_alsa_include}" != x; then
48271       ALSA_CFLAGS="-I${with_alsa_include}"
48272       ALSA_FOUND=yes
48273     fi
48274     if test "x${with_alsa_lib}" != x; then
48275       ALSA_LIBS="-L${with_alsa_lib} -lasound"
48276       ALSA_FOUND=yes
48277     fi
48278     if test "x$ALSA_FOUND" = xno; then
48279 
48280 
48281   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48282     # Source the builddeps file again, to make sure it uses the latest variables!
48283     . $builddepsfile
48284     # Look for a target and build machine specific resource!
48285     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48286     if test "x$resource" = x; then
48287       # Ok, lets instead look for a target specific resource
48288       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48289     fi
48290     if test "x$resource" = x; then
48291       # Ok, lets instead look for a build specific resource
48292       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48293     fi
48294     if test "x$resource" = x; then
48295       # Ok, lets instead look for a generic resource
48296       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48297       resource=${builddep_alsa}
48298     fi
48299     if test "x$resource" != x; then
48300       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48301 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48302       # If the resource in the builddeps.conf file is an existing directory,
48303       # for example /java/linux/cups
48304       if test -d ${resource}; then
48305         depdir=${resource}
48306       else
48307 
48308   # alsa is for example mymodule
48309   # $resource is for example libs/general/libmymod_1_2_3.zip
48310   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48311   # $with_builddeps_dir is for example /localhome/builddeps
48312   # depdir is the name of the variable into which we store the depdir, eg MYMOD
48313   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48314   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48315   filename=`basename $resource`
48316   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48317   filebase=${filename%%.*}
48318   extension=${filename#*.}
48319   installdir=$with_builddeps_dir/$filebase
48320   if test ! -f $installdir/$filename.unpacked; then
48321     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48322 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48323     if test ! -d $installdir; then
48324       mkdir -p $installdir
48325     fi
48326     if test ! -d $installdir; then
48327       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48328     fi
48329     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48330     touch $tmpfile
48331     if test ! -f $tmpfile; then
48332       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48333     fi
48334 
48335   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48336   # $tmpfile is the local file name for the downloaded file.
48337   VALID_TOOL=no
48338   if test "x$BDEPS_FTP" = xwget; then
48339     VALID_TOOL=yes
48340     wget -O $tmpfile $with_builddeps_server/$resource
48341   fi
48342   if test "x$BDEPS_FTP" = xlftp; then
48343     VALID_TOOL=yes
48344     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48345   fi
48346   if test "x$BDEPS_FTP" = xftp; then
48347     VALID_TOOL=yes
48348     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48349     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48350     FTPUSERPWD=${FTPSERVER%%@*}
48351     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48352       FTPUSER=${userpwd%%:*}
48353       FTPPWD=${userpwd#*@}
48354       FTPSERVER=${FTPSERVER#*@}
48355     else
48356       FTPUSER=ftp
48357       FTPPWD=ftp
48358     fi
48359     # the "pass" command does not work on some
48360     # ftp clients (read ftp.exe) but if it works,
48361     # passive mode is better!
48362     ( \
48363         echo "user $FTPUSER $FTPPWD"        ; \
48364         echo "pass"                         ; \
48365         echo "bin"                          ; \
48366         echo "get $FTPPATH $tmpfile"              ; \
48367     ) | ftp -in $FTPSERVER
48368   fi
48369   if test "x$VALID_TOOL" != xyes; then
48370     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48371   fi
48372 
48373     mv $tmpfile $installdir/$filename
48374     if test ! -s $installdir/$filename; then
48375       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48376     fi
48377     case "$extension" in
48378       zip)  echo "Unzipping $installdir/$filename..."
48379         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48380         ;;
48381       tar.gz) echo "Untaring $installdir/$filename..."
48382         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48383         ;;
48384       tgz) echo "Untaring $installdir/$filename..."
48385         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48386         ;;
48387       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48388         ;;
48389     esac
48390   fi
48391   if test -f $installdir/$filename.unpacked; then
48392     depdir=$installdir
48393   fi
48394 
48395       fi
48396       # Source the builddeps file again, because in the previous command, the depdir
48397       # was updated to point at the current build dependency install directory.
48398       . $builddepsfile
48399       # Now extract variables from the builddeps.conf files.
48400       theroot=${builddep_alsa_ROOT}
48401       thecflags=${builddep_alsa_CFLAGS}
48402       thelibs=${builddep_alsa_LIBS}
48403       if test "x$depdir" = x; then
48404         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48405       fi
48406       ALSA=$depdir
48407       if test "x$theroot" != x; then
48408         ALSA="$theroot"
48409       fi
48410       if test "x$thecflags" != x; then
48411         ALSA_CFLAGS="$thecflags"
48412       fi
48413       if test "x$thelibs" != x; then
48414         ALSA_LIBS="$thelibs"
48415       fi
48416       ALSA_FOUND=yes
48417       else ALSA_FOUND=no
48418 
48419     fi
48420     else ALSA_FOUND=no
48421 
48422   fi
48423 
48424     fi
48425     # Do not try pkg-config if we have a sysroot set.
48426     if test "x$SYSROOT" = x; then
48427       if test "x$ALSA_FOUND" = xno; then
48428 
48429 pkg_failed=no
48430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48431 $as_echo_n "checking for ALSA... " >&6; }
48432 
48433 if test -n "$ALSA_CFLAGS"; then
48434     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48435  elif test -n "$PKG_CONFIG"; then
48436     if test -n "$PKG_CONFIG" && \
48437     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48438   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48439   ac_status=$?
48440   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48441   test $ac_status = 0; }; then
48442   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48443 else
48444   pkg_failed=yes
48445 fi
48446  else
48447     pkg_failed=untried
48448 fi
48449 if test -n "$ALSA_LIBS"; then
48450     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48451  elif test -n "$PKG_CONFIG"; then
48452     if test -n "$PKG_CONFIG" && \
48453     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48454   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48455   ac_status=$?
48456   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48457   test $ac_status = 0; }; then
48458   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48459 else
48460   pkg_failed=yes
48461 fi
48462  else
48463     pkg_failed=untried
48464 fi
48465 
48466 
48467 
48468 if test $pkg_failed = yes; then
48469 
48470 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48471         _pkg_short_errors_supported=yes
48472 else
48473         _pkg_short_errors_supported=no
48474 fi
48475         if test $_pkg_short_errors_supported = yes; then
48476                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48477         else
48478                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48479         fi
48480         # Put the nasty error message in config.log where it belongs
48481         echo "$ALSA_PKG_ERRORS" >&5
48482 
48483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48484 $as_echo "no" >&6; }
48485                 ALSA_FOUND=no
48486 elif test $pkg_failed = untried; then
48487         ALSA_FOUND=no
48488 else
48489         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48490         ALSA_LIBS=$pkg_cv_ALSA_LIBS
48491         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48492 $as_echo "yes" >&6; }
48493         ALSA_FOUND=yes
48494 fi
48495       fi
48496     fi
48497     if test "x$ALSA_FOUND" = xno; then
48498       for ac_header in alsa/asoundlib.h
48499 do :
48500   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48501 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48502   cat >>confdefs.h <<_ACEOF
48503 #define HAVE_ALSA_ASOUNDLIB_H 1
48504 _ACEOF
48505 
48506             ALSA_FOUND=yes
48507             ALSA_CFLAGS=-Iignoreme
48508             ALSA_LIBS=-lasound
48509             DEFAULT_ALSA=yes
48510 
48511 else
48512   ALSA_FOUND=no
48513 fi
48514 
48515 done
48516 
48517     fi
48518     if test "x$ALSA_FOUND" = xno; then
48519 
48520   # Print a helpful message on how to acquire the necessary build dependency.
48521   # alsa is the help tag: freetype, cups, pulse, alsa etc
48522   MISSING_DEPENDENCY=alsa
48523 
48524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48525     cygwin_help $MISSING_DEPENDENCY
48526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48527     msys_help $MISSING_DEPENDENCY
48528   else
48529     PKGHANDLER_COMMAND=
48530 
48531     case $PKGHANDLER in
48532       apt-get)
48533         apt_help     $MISSING_DEPENDENCY ;;
48534       yum)
48535         yum_help     $MISSING_DEPENDENCY ;;
48536       port)
48537         port_help    $MISSING_DEPENDENCY ;;
48538       pkgutil)
48539         pkgutil_help $MISSING_DEPENDENCY ;;
48540       pkgadd)
48541         pkgadd_help  $MISSING_DEPENDENCY ;;
48542     esac
48543 
48544     if test "x$PKGHANDLER_COMMAND" != x; then
48545       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48546     fi
48547   fi
48548 
48549       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48550     fi
48551   fi
48552 
48553 
48554 
48555 
48556 
48557 
48558   ###############################################################################
48559   #
48560   # Check for the jpeg library
48561   #
48562 
48563 
48564 # Check whether --with-libjpeg was given.
48565 if test "${with_libjpeg+set}" = set; then :
48566   withval=$with_libjpeg;
48567 fi
48568 
48569 
48570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48571 $as_echo_n "checking for which libjpeg to use... " >&6; }
48572 
48573   # default is bundled
48574   DEFAULT_LIBJPEG=bundled
48575 
48576   #
48577   # if user didn't specify, use DEFAULT_LIBJPEG
48578   #
48579   if test "x${with_libjpeg}" = "x"; then
48580     with_libjpeg=${DEFAULT_LIBJPEG}
48581   fi
48582 
48583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48584 $as_echo "${with_libjpeg}" >&6; }
48585 
48586   if test "x${with_libjpeg}" = "xbundled"; then
48587     USE_EXTERNAL_LIBJPEG=false
48588   elif test "x${with_libjpeg}" = "xsystem"; then
48589     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48590 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48591 
48592 else
48593    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48594 fi
48595 
48596 
48597     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48598 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48599 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48600   $as_echo_n "(cached) " >&6
48601 else
48602   ac_check_lib_save_LIBS=$LIBS
48603 LIBS="-ljpeg  $LIBS"
48604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48605 /* end confdefs.h.  */
48606 
48607 /* Override any GCC internal prototype to avoid an error.
48608    Use char because int might match the return type of a GCC
48609    builtin and then its argument prototype would still apply.  */
48610 #ifdef __cplusplus
48611 extern "C"
48612 #endif
48613 char jpeg_CreateDecompress ();
48614 int
48615 main ()
48616 {
48617 return jpeg_CreateDecompress ();
48618   ;
48619   return 0;
48620 }
48621 _ACEOF
48622 if ac_fn_cxx_try_link "$LINENO"; then :
48623   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48624 else
48625   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48626 fi
48627 rm -f core conftest.err conftest.$ac_objext \
48628     conftest$ac_exeext conftest.$ac_ext
48629 LIBS=$ac_check_lib_save_LIBS
48630 fi
48631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48632 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48633 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48634   cat >>confdefs.h <<_ACEOF
48635 #define HAVE_LIBJPEG 1
48636 _ACEOF
48637 
48638   LIBS="-ljpeg $LIBS"
48639 
48640 else
48641    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48642 fi
48643 
48644 
48645     USE_EXTERNAL_LIBJPEG=true
48646   else
48647     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48648   fi
48649 
48650 
48651 
48652   ###############################################################################
48653   #
48654   # Check for the gif library
48655   #
48656 
48657 
48658 # Check whether --with-giflib was given.
48659 if test "${with_giflib+set}" = set; then :
48660   withval=$with_giflib;
48661 fi
48662 
48663 
48664 
48665   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48666 $as_echo_n "checking for which giflib to use... " >&6; }
48667 
48668   # default is bundled
48669   DEFAULT_GIFLIB=bundled
48670 
48671   #
48672   # if user didn't specify, use DEFAULT_GIFLIB
48673   #
48674   if test "x${with_giflib}" = "x"; then
48675     with_giflib=${DEFAULT_GIFLIB}
48676   fi
48677 
48678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48679 $as_echo "${with_giflib}" >&6; }
48680 
48681   if test "x${with_giflib}" = "xbundled"; then
48682     USE_EXTERNAL_LIBGIF=false
48683   elif test "x${with_giflib}" = "xsystem"; then
48684     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48685 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48686 
48687 else
48688    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48689 fi
48690 
48691 
48692     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48693 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48694 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48695   $as_echo_n "(cached) " >&6
48696 else
48697   ac_check_lib_save_LIBS=$LIBS
48698 LIBS="-lgif  $LIBS"
48699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48700 /* end confdefs.h.  */
48701 
48702 /* Override any GCC internal prototype to avoid an error.
48703    Use char because int might match the return type of a GCC
48704    builtin and then its argument prototype would still apply.  */
48705 #ifdef __cplusplus
48706 extern "C"
48707 #endif
48708 char DGifGetCode ();
48709 int
48710 main ()
48711 {
48712 return DGifGetCode ();
48713   ;
48714   return 0;
48715 }
48716 _ACEOF
48717 if ac_fn_cxx_try_link "$LINENO"; then :
48718   ac_cv_lib_gif_DGifGetCode=yes
48719 else
48720   ac_cv_lib_gif_DGifGetCode=no
48721 fi
48722 rm -f core conftest.err conftest.$ac_objext \
48723     conftest$ac_exeext conftest.$ac_ext
48724 LIBS=$ac_check_lib_save_LIBS
48725 fi
48726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48727 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48728 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48729   cat >>confdefs.h <<_ACEOF
48730 #define HAVE_LIBGIF 1
48731 _ACEOF
48732 
48733   LIBS="-lgif $LIBS"
48734 
48735 else
48736    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48737 fi
48738 
48739 
48740     USE_EXTERNAL_LIBGIF=true
48741   else
48742     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48743   fi
48744 
48745 
48746   ###############################################################################
48747   #
48748   # Check for the lcms2 library
48749   #
48750 
48751 
48752 # Check whether --with-lcms was given.
48753 if test "${with_lcms+set}" = set; then :
48754   withval=$with_lcms;
48755 fi
48756 
48757 
48758   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48759 $as_echo_n "checking for which lcms to use... " >&6; }
48760 
48761   DEFAULT_LCMS=bundled
48762 
48763   #
48764   # If user didn't specify, use DEFAULT_LCMS
48765   #
48766   if test "x${with_lcms}" = "x"; then
48767       with_lcms=${DEFAULT_LCMS}
48768   fi
48769 
48770   if test "x${with_lcms}" = "xbundled"; then
48771     USE_EXTERNAL_LCMS=false
48772     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48773 $as_echo "bundled" >&6; }
48774   elif test "x${with_lcms}" = "xsystem"; then
48775     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48776 $as_echo "system" >&6; }
48777 
48778 pkg_failed=no
48779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48780 $as_echo_n "checking for LCMS... " >&6; }
48781 
48782 if test -n "$LCMS_CFLAGS"; then
48783     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48784  elif test -n "$PKG_CONFIG"; then
48785     if test -n "$PKG_CONFIG" && \
48786     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48787   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48788   ac_status=$?
48789   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48790   test $ac_status = 0; }; then
48791   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48792 else
48793   pkg_failed=yes
48794 fi
48795  else
48796     pkg_failed=untried
48797 fi
48798 if test -n "$LCMS_LIBS"; then
48799     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48800  elif test -n "$PKG_CONFIG"; then
48801     if test -n "$PKG_CONFIG" && \
48802     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48803   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48804   ac_status=$?
48805   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48806   test $ac_status = 0; }; then
48807   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48808 else
48809   pkg_failed=yes
48810 fi
48811  else
48812     pkg_failed=untried
48813 fi
48814 
48815 
48816 
48817 if test $pkg_failed = yes; then
48818 
48819 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48820         _pkg_short_errors_supported=yes
48821 else
48822         _pkg_short_errors_supported=no
48823 fi
48824         if test $_pkg_short_errors_supported = yes; then
48825                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48826         else
48827                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48828         fi
48829         # Put the nasty error message in config.log where it belongs
48830         echo "$LCMS_PKG_ERRORS" >&5
48831 
48832         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48833 $as_echo "no" >&6; }
48834                 LCMS_FOUND=no
48835 elif test $pkg_failed = untried; then
48836         LCMS_FOUND=no
48837 else
48838         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48839         LCMS_LIBS=$pkg_cv_LCMS_LIBS
48840         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48841 $as_echo "yes" >&6; }
48842         LCMS_FOUND=yes
48843 fi
48844     if test "x${LCMS_FOUND}" = "xyes"; then
48845       USE_EXTERNAL_LCMS=true
48846     else
48847       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48848     fi
48849   else
48850     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48851   fi
48852 
48853 
48854 
48855   ###############################################################################
48856   #
48857   # Check for the png library
48858   #
48859 
48860 
48861 # Check whether --with-libpng was given.
48862 if test "${with_libpng+set}" = set; then :
48863   withval=$with_libpng;
48864 fi
48865 
48866 
48867 
48868   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48869 $as_echo_n "checking for which libpng to use... " >&6; }
48870 
48871   # default is bundled
48872   DEFAULT_LIBPNG=bundled
48873 
48874   #
48875   # if user didn't specify, use DEFAULT_LIBPNG
48876   #
48877   if test "x${with_libpng}" = "x"; then
48878       with_libpng=${DEFAULT_LIBPNG}
48879   fi
48880 
48881   if test "x${with_libpng}" = "xbundled"; then
48882       USE_EXTERNAL_LIBPNG=false
48883       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48884 $as_echo "bundled" >&6; }
48885   elif test "x${with_libpng}" = "xsystem"; then
48886 
48887 pkg_failed=no
48888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48889 $as_echo_n "checking for PNG... " >&6; }
48890 
48891 if test -n "$PNG_CFLAGS"; then
48892     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48893  elif test -n "$PKG_CONFIG"; then
48894     if test -n "$PKG_CONFIG" && \
48895     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48896   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48897   ac_status=$?
48898   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48899   test $ac_status = 0; }; then
48900   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48901 else
48902   pkg_failed=yes
48903 fi
48904  else
48905     pkg_failed=untried
48906 fi
48907 if test -n "$PNG_LIBS"; then
48908     pkg_cv_PNG_LIBS="$PNG_LIBS"
48909  elif test -n "$PKG_CONFIG"; then
48910     if test -n "$PKG_CONFIG" && \
48911     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48912   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48913   ac_status=$?
48914   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48915   test $ac_status = 0; }; then
48916   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48917 else
48918   pkg_failed=yes
48919 fi
48920  else
48921     pkg_failed=untried
48922 fi
48923 
48924 
48925 
48926 if test $pkg_failed = yes; then
48927 
48928 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48929         _pkg_short_errors_supported=yes
48930 else
48931         _pkg_short_errors_supported=no
48932 fi
48933         if test $_pkg_short_errors_supported = yes; then
48934                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48935         else
48936                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48937         fi
48938         # Put the nasty error message in config.log where it belongs
48939         echo "$PNG_PKG_ERRORS" >&5
48940 
48941         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48942 $as_echo "no" >&6; }
48943                  LIBPNG_FOUND=no
48944 elif test $pkg_failed = untried; then
48945          LIBPNG_FOUND=no
48946 else
48947         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48948         PNG_LIBS=$pkg_cv_PNG_LIBS
48949         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48950 $as_echo "yes" >&6; }
48951          LIBPNG_FOUND=yes
48952 fi
48953       if test "x${LIBPNG_FOUND}" = "xyes"; then
48954           USE_EXTERNAL_LIBPNG=true
48955           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48956 $as_echo "system" >&6; }
48957       else
48958           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48959 $as_echo "system not found" >&6; }
48960           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48961       fi
48962   else
48963       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48964   fi
48965 
48966 
48967   ###############################################################################
48968   #
48969   # Check for the zlib library
48970   #
48971 
48972 
48973 # Check whether --with-zlib was given.
48974 if test "${with_zlib+set}" = set; then :
48975   withval=$with_zlib;
48976 fi
48977 
48978 
48979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48980 $as_echo_n "checking for compress in -lz... " >&6; }
48981 if ${ac_cv_lib_z_compress+:} false; then :
48982   $as_echo_n "(cached) " >&6
48983 else
48984   ac_check_lib_save_LIBS=$LIBS
48985 LIBS="-lz  $LIBS"
48986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48987 /* end confdefs.h.  */
48988 
48989 /* Override any GCC internal prototype to avoid an error.
48990    Use char because int might match the return type of a GCC
48991    builtin and then its argument prototype would still apply.  */
48992 #ifdef __cplusplus
48993 extern "C"
48994 #endif
48995 char compress ();
48996 int
48997 main ()
48998 {
48999 return compress ();
49000   ;
49001   return 0;
49002 }
49003 _ACEOF
49004 if ac_fn_cxx_try_link "$LINENO"; then :
49005   ac_cv_lib_z_compress=yes
49006 else
49007   ac_cv_lib_z_compress=no
49008 fi
49009 rm -f core conftest.err conftest.$ac_objext \
49010     conftest$ac_exeext conftest.$ac_ext
49011 LIBS=$ac_check_lib_save_LIBS
49012 fi
49013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49014 $as_echo "$ac_cv_lib_z_compress" >&6; }
49015 if test "x$ac_cv_lib_z_compress" = xyes; then :
49016    ZLIB_FOUND=yes
49017 else
49018    ZLIB_FOUND=no
49019 fi
49020 
49021 
49022   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49023 $as_echo_n "checking for which zlib to use... " >&6; }
49024 
49025   DEFAULT_ZLIB=bundled
49026   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49027     #
49028     # On macosx default is system...on others default is
49029     #
49030     DEFAULT_ZLIB=system
49031   fi
49032 
49033   if test "x${ZLIB_FOUND}" != "xyes"; then
49034     #
49035     # If we don't find any system...set default to bundled
49036     #
49037     DEFAULT_ZLIB=bundled
49038   fi
49039 
49040   #
49041   # If user didn't specify, use DEFAULT_ZLIB
49042   #
49043   if test "x${with_zlib}" = "x"; then
49044     with_zlib=${DEFAULT_ZLIB}
49045   fi
49046 
49047   if test "x${with_zlib}" = "xbundled"; then
49048     USE_EXTERNAL_LIBZ=false
49049     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49050 $as_echo "bundled" >&6; }
49051   elif test "x${with_zlib}" = "xsystem"; then
49052     if test "x${ZLIB_FOUND}" = "xyes"; then
49053       USE_EXTERNAL_LIBZ=true
49054       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49055 $as_echo "system" >&6; }
49056     else
49057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49058 $as_echo "system not found" >&6; }
49059       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49060     fi
49061   else
49062     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49063   fi
49064 
49065 
49066 
49067   ###############################################################################
49068   LIBZIP_CAN_USE_MMAP=true
49069 
49070 
49071 
49072   ###############################################################################
49073   #
49074   # Check if altzone exists in time.h
49075   #
49076 
49077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49078 /* end confdefs.h.  */
49079 #include <time.h>
49080 int
49081 main ()
49082 {
49083 return (int)altzone;
49084   ;
49085   return 0;
49086 }
49087 _ACEOF
49088 if ac_fn_cxx_try_link "$LINENO"; then :
49089   has_altzone=yes
49090 else
49091   has_altzone=no
49092 fi
49093 rm -f core conftest.err conftest.$ac_objext \
49094     conftest$ac_exeext conftest.$ac_ext
49095   if test "x$has_altzone" = xyes; then
49096 
49097 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49098 
49099   fi
49100 
49101   ###############################################################################
49102   #
49103   # Check the maths library
49104   #
49105 
49106   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49107 $as_echo_n "checking for cos in -lm... " >&6; }
49108 if ${ac_cv_lib_m_cos+:} false; then :
49109   $as_echo_n "(cached) " >&6
49110 else
49111   ac_check_lib_save_LIBS=$LIBS
49112 LIBS="-lm  $LIBS"
49113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49114 /* end confdefs.h.  */
49115 
49116 /* Override any GCC internal prototype to avoid an error.
49117    Use char because int might match the return type of a GCC
49118    builtin and then its argument prototype would still apply.  */
49119 #ifdef __cplusplus
49120 extern "C"
49121 #endif
49122 char cos ();
49123 int
49124 main ()
49125 {
49126 return cos ();
49127   ;
49128   return 0;
49129 }
49130 _ACEOF
49131 if ac_fn_cxx_try_link "$LINENO"; then :
49132   ac_cv_lib_m_cos=yes
49133 else
49134   ac_cv_lib_m_cos=no
49135 fi
49136 rm -f core conftest.err conftest.$ac_objext \
49137     conftest$ac_exeext conftest.$ac_ext
49138 LIBS=$ac_check_lib_save_LIBS
49139 fi
49140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49141 $as_echo "$ac_cv_lib_m_cos" >&6; }
49142 if test "x$ac_cv_lib_m_cos" = xyes; then :
49143   cat >>confdefs.h <<_ACEOF
49144 #define HAVE_LIBM 1
49145 _ACEOF
49146 
49147   LIBS="-lm $LIBS"
49148 
49149 else
49150 
49151         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49152 $as_echo "$as_me: Maths library was not found" >&6;}
49153 
49154 
49155 fi
49156 
49157 
49158 
49159   ###############################################################################
49160   #
49161   # Check for libdl.so
49162 
49163   save_LIBS="$LIBS"
49164   LIBS=""
49165   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49166 $as_echo_n "checking for dlopen in -ldl... " >&6; }
49167 if ${ac_cv_lib_dl_dlopen+:} false; then :
49168   $as_echo_n "(cached) " >&6
49169 else
49170   ac_check_lib_save_LIBS=$LIBS
49171 LIBS="-ldl  $LIBS"
49172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49173 /* end confdefs.h.  */
49174 
49175 /* Override any GCC internal prototype to avoid an error.
49176    Use char because int might match the return type of a GCC
49177    builtin and then its argument prototype would still apply.  */
49178 #ifdef __cplusplus
49179 extern "C"
49180 #endif
49181 char dlopen ();
49182 int
49183 main ()
49184 {
49185 return dlopen ();
49186   ;
49187   return 0;
49188 }
49189 _ACEOF
49190 if ac_fn_cxx_try_link "$LINENO"; then :
49191   ac_cv_lib_dl_dlopen=yes
49192 else
49193   ac_cv_lib_dl_dlopen=no
49194 fi
49195 rm -f core conftest.err conftest.$ac_objext \
49196     conftest$ac_exeext conftest.$ac_ext
49197 LIBS=$ac_check_lib_save_LIBS
49198 fi
49199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49200 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49201 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49202   cat >>confdefs.h <<_ACEOF
49203 #define HAVE_LIBDL 1
49204 _ACEOF
49205 
49206   LIBS="-ldl $LIBS"
49207 
49208 fi
49209 
49210   LIBDL="$LIBS"
49211 
49212   LIBS="$save_LIBS"
49213 
49214 
49215   ###############################################################################
49216   #
49217   # statically link libstdc++ before C++ ABI is stablized on Linux unless
49218   # dynamic build is configured on command line.
49219   #
49220 
49221 # Check whether --with-stdc++lib was given.
49222 if test "${with_stdc__lib+set}" = set; then :
49223   withval=$with_stdc__lib;
49224         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49225                 && test "x$with_stdc__lib" != xdefault; then
49226           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49227         fi
49228 
49229 else
49230   with_stdc__lib=default
49231 
49232 fi
49233 
49234 
49235   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49236     # Test if -lstdc++ works.
49237     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49238 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49239     ac_ext=cpp
49240 ac_cpp='$CXXCPP $CPPFLAGS'
49241 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49242 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49243 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49244 
49245     OLD_CXXFLAGS="$CXXFLAGS"
49246     CXXFLAGS="$CXXFLAGS -lstdc++"
49247     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49248 /* end confdefs.h.  */
49249 
49250 int
49251 main ()
49252 {
49253 return 0;
49254   ;
49255   return 0;
49256 }
49257 _ACEOF
49258 if ac_fn_cxx_try_link "$LINENO"; then :
49259   has_dynamic_libstdcxx=yes
49260 else
49261   has_dynamic_libstdcxx=no
49262 fi
49263 rm -f core conftest.err conftest.$ac_objext \
49264     conftest$ac_exeext conftest.$ac_ext
49265     CXXFLAGS="$OLD_CXXFLAGS"
49266     ac_ext=cpp
49267 ac_cpp='$CXXCPP $CPPFLAGS'
49268 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49269 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49270 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49271 
49272     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49273 $as_echo "$has_dynamic_libstdcxx" >&6; }
49274 
49275     # Test if stdc++ can be linked statically.
49276     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49277 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49278     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49279     ac_ext=cpp
49280 ac_cpp='$CXXCPP $CPPFLAGS'
49281 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49282 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49283 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49284 
49285     OLD_LIBS="$LIBS"
49286     OLD_CXX="$CXX"
49287     LIBS="$STATIC_STDCXX_FLAGS"
49288     CXX="$CC"
49289     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49290 /* end confdefs.h.  */
49291 
49292 int
49293 main ()
49294 {
49295 return 0;
49296   ;
49297   return 0;
49298 }
49299 _ACEOF
49300 if ac_fn_cxx_try_link "$LINENO"; then :
49301   has_static_libstdcxx=yes
49302 else
49303   has_static_libstdcxx=no
49304 fi
49305 rm -f core conftest.err conftest.$ac_objext \
49306     conftest$ac_exeext conftest.$ac_ext
49307     LIBS="$OLD_LIBS"
49308     CXX="$OLD_CXX"
49309     ac_ext=cpp
49310 ac_cpp='$CXXCPP $CPPFLAGS'
49311 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49312 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49313 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49314 
49315     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49316 $as_echo "$has_static_libstdcxx" >&6; }
49317 
49318     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49319       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49320     fi
49321 
49322     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49323       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49324     fi
49325 
49326     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49327       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49328     fi
49329 
49330     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49331 $as_echo_n "checking how to link with libstdc++... " >&6; }
49332     # If dynamic was requested, it's available since it would fail above otherwise.
49333     # If dynamic wasn't requested, go with static unless it isn't available.
49334     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49335       LIBCXX="$LIBCXX -lstdc++"
49336       LDCXX="$CXX"
49337       STATIC_CXX_SETTING="STATIC_CXX=false"
49338       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49339 $as_echo "dynamic" >&6; }
49340     else
49341       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49342       LDCXX="$CC"
49343       STATIC_CXX_SETTING="STATIC_CXX=true"
49344       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49345 $as_echo "static" >&6; }
49346     fi
49347   fi
49348 
49349 
49350   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49351     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49352 
49353 pkg_failed=no
49354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49355 $as_echo_n "checking for LIBFFI... " >&6; }
49356 
49357 if test -n "$LIBFFI_CFLAGS"; then
49358     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49359  elif test -n "$PKG_CONFIG"; then
49360     if test -n "$PKG_CONFIG" && \
49361     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49362   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49363   ac_status=$?
49364   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49365   test $ac_status = 0; }; then
49366   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49367 else
49368   pkg_failed=yes
49369 fi
49370  else
49371     pkg_failed=untried
49372 fi
49373 if test -n "$LIBFFI_LIBS"; then
49374     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49375  elif test -n "$PKG_CONFIG"; then
49376     if test -n "$PKG_CONFIG" && \
49377     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49378   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49379   ac_status=$?
49380   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49381   test $ac_status = 0; }; then
49382   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49383 else
49384   pkg_failed=yes
49385 fi
49386  else
49387     pkg_failed=untried
49388 fi
49389 
49390 
49391 
49392 if test $pkg_failed = yes; then
49393 
49394 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49395         _pkg_short_errors_supported=yes
49396 else
49397         _pkg_short_errors_supported=no
49398 fi
49399         if test $_pkg_short_errors_supported = yes; then
49400                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49401         else
49402                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49403         fi
49404         # Put the nasty error message in config.log where it belongs
49405         echo "$LIBFFI_PKG_ERRORS" >&5
49406 
49407         as_fn_error $? "Package requirements (libffi) were not met:
49408 
49409 $LIBFFI_PKG_ERRORS
49410 
49411 Consider adjusting the PKG_CONFIG_PATH environment variable if you
49412 installed software in a non-standard prefix.
49413 
49414 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49415 and LIBFFI_LIBS to avoid the need to call pkg-config.
49416 See the pkg-config man page for more details.
49417 " "$LINENO" 5
49418 elif test $pkg_failed = untried; then
49419         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49420 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49421 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49422 is in your PATH or set the PKG_CONFIG environment variable to the full
49423 path to pkg-config.
49424 
49425 Alternatively, you may set the environment variables LIBFFI_CFLAGS
49426 and LIBFFI_LIBS to avoid the need to call pkg-config.
49427 See the pkg-config man page for more details.
49428 
49429 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49430 See \`config.log' for more details" "$LINENO" 5; }
49431 else
49432         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49433         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49434         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49435 $as_echo "yes" >&6; }
49436         :
49437 fi
49438 
49439   fi
49440 
49441   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49442     # Extract the first word of "llvm-config", so it can be a program name with args.
49443 set dummy llvm-config; ac_word=$2
49444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49445 $as_echo_n "checking for $ac_word... " >&6; }
49446 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49447   $as_echo_n "(cached) " >&6
49448 else
49449   if test -n "$LLVM_CONFIG"; then
49450   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49451 else
49452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49453 for as_dir in $PATH
49454 do
49455   IFS=$as_save_IFS
49456   test -z "$as_dir" && as_dir=.
49457     for ac_exec_ext in '' $ac_executable_extensions; do
49458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49459     ac_cv_prog_LLVM_CONFIG="llvm-config"
49460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49461     break 2
49462   fi
49463 done
49464   done
49465 IFS=$as_save_IFS
49466 
49467 fi
49468 fi
49469 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49470 if test -n "$LLVM_CONFIG"; then
49471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49472 $as_echo "$LLVM_CONFIG" >&6; }
49473 else
49474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49475 $as_echo "no" >&6; }
49476 fi
49477 
49478 
49479 
49480     if test "x$LLVM_CONFIG" != xllvm-config; then
49481       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49482     fi
49483 
49484     llvm_components="jit mcjit engine nativecodegen native"
49485     unset LLVM_CFLAGS
49486     for flag in $("$LLVM_CONFIG" --cxxflags); do
49487       if echo "${flag}" | grep -q '^-[ID]'; then
49488         if test "${flag}" != "-D_DEBUG" ; then
49489           if test "${LLVM_CFLAGS}" != "" ; then
49490             LLVM_CFLAGS="${LLVM_CFLAGS} "
49491           fi
49492           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49493         fi
49494       fi
49495     done
49496     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49497     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49498 
49499     unset LLVM_LDFLAGS
49500     for flag in $("${LLVM_CONFIG}" --ldflags); do
49501       if echo "${flag}" | grep -q '^-L'; then
49502         if test "${LLVM_LDFLAGS}" != ""; then
49503           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49504         fi
49505         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49506       fi
49507     done
49508 
49509     unset LLVM_LIBS
49510     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49511       if echo "${flag}" | grep -q '^-l'; then
49512         if test "${LLVM_LIBS}" != ""; then
49513           LLVM_LIBS="${LLVM_LIBS} "
49514         fi
49515         LLVM_LIBS="${LLVM_LIBS}${flag}"
49516       fi
49517     done
49518 
49519 
49520 
49521 
49522   fi
49523 
49524   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49525   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49526     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49527   fi
49528 
49529   # TODO better (platform agnostic) test
49530   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49531     LIBCXX="-lstdc++"
49532   fi
49533 
49534 
49535 
49536 
49537   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49538 
49539 
49540 # Check whether --with-msvcr-dll was given.
49541 if test "${with_msvcr_dll+set}" = set; then :
49542   withval=$with_msvcr_dll;
49543 fi
49544 
49545 
49546   if test "x$with_msvcr_dll" != x; then
49547     # If given explicitely by user, do not probe. If not present, fail directly.
49548 
49549   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
49550   METHOD="--with-msvcr-dll"
49551   if test -e "$POSSIBLE_MSVCR_DLL"; then
49552     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49553 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49554 
49555     # Need to check if the found msvcr is correct architecture
49556     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49557 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49558     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49559     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49560       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49561       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49562       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49563         CORRECT_MSVCR_ARCH="PE32 executable"
49564       else
49565         CORRECT_MSVCR_ARCH="PE32+ executable"
49566       fi
49567     else
49568       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49569         CORRECT_MSVCR_ARCH=386
49570       else
49571         CORRECT_MSVCR_ARCH=x86-64
49572       fi
49573     fi
49574     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49575       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49576 $as_echo "ok" >&6; }
49577       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49578       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49579 $as_echo_n "checking for msvcr100.dll... " >&6; }
49580       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49581 $as_echo "$MSVCR_DLL" >&6; }
49582     else
49583       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49584 $as_echo "incorrect, ignoring" >&6; }
49585       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49586 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49587     fi
49588   fi
49589 
49590     if test "x$MSVCR_DLL" = x; then
49591       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
49592     fi
49593   fi
49594 
49595   if test "x$MSVCR_DLL" = x; then
49596     # Probe: Using well-known location from Visual Studio 10.0
49597     if test "x$VCINSTALLDIR" != x; then
49598       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49599 
49600   windows_path="$CYGWIN_VC_INSTALL_DIR"
49601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49602     unix_path=`$CYGPATH -u "$windows_path"`
49603     CYGWIN_VC_INSTALL_DIR="$unix_path"
49604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49605     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49606     CYGWIN_VC_INSTALL_DIR="$unix_path"
49607   fi
49608 
49609       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49610         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
49611       else
49612         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
49613       fi
49614 
49615   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49616   METHOD="well-known location in VCINSTALLDIR"
49617   if test -e "$POSSIBLE_MSVCR_DLL"; then
49618     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49619 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49620 
49621     # Need to check if the found msvcr is correct architecture
49622     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49623 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49624     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49625     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49626       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49627       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49628       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49629         CORRECT_MSVCR_ARCH="PE32 executable"
49630       else
49631         CORRECT_MSVCR_ARCH="PE32+ executable"
49632       fi
49633     else
49634       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49635         CORRECT_MSVCR_ARCH=386
49636       else
49637         CORRECT_MSVCR_ARCH=x86-64
49638       fi
49639     fi
49640     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49641       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49642 $as_echo "ok" >&6; }
49643       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49644       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49645 $as_echo_n "checking for msvcr100.dll... " >&6; }
49646       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49647 $as_echo "$MSVCR_DLL" >&6; }
49648     else
49649       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49650 $as_echo "incorrect, ignoring" >&6; }
49651       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49652 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49653     fi
49654   fi
49655 
49656     fi
49657   fi
49658 
49659   if test "x$MSVCR_DLL" = x; then
49660     # Probe: Check in the Boot JDK directory.
49661     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
49662 
49663   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49664   METHOD="well-known location in Boot JDK"
49665   if test -e "$POSSIBLE_MSVCR_DLL"; then
49666     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49667 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49668 
49669     # Need to check if the found msvcr is correct architecture
49670     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49671 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49672     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49673     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49674       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49675       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49676       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49677         CORRECT_MSVCR_ARCH="PE32 executable"
49678       else
49679         CORRECT_MSVCR_ARCH="PE32+ executable"
49680       fi
49681     else
49682       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49683         CORRECT_MSVCR_ARCH=386
49684       else
49685         CORRECT_MSVCR_ARCH=x86-64
49686       fi
49687     fi
49688     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49689       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49690 $as_echo "ok" >&6; }
49691       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49692       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49693 $as_echo_n "checking for msvcr100.dll... " >&6; }
49694       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49695 $as_echo "$MSVCR_DLL" >&6; }
49696     else
49697       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49698 $as_echo "incorrect, ignoring" >&6; }
49699       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49700 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49701     fi
49702   fi
49703 
49704   fi
49705 
49706   if test "x$MSVCR_DLL" = x; then
49707     # Probe: Look in the Windows system32 directory
49708     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49709 
49710   windows_path="$CYGWIN_SYSTEMROOT"
49711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49712     unix_path=`$CYGPATH -u "$windows_path"`
49713     CYGWIN_SYSTEMROOT="$unix_path"
49714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49716     CYGWIN_SYSTEMROOT="$unix_path"
49717   fi
49718 
49719     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
49720 
49721   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49722   METHOD="well-known location in SYSTEMROOT"
49723   if test -e "$POSSIBLE_MSVCR_DLL"; then
49724     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49725 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49726 
49727     # Need to check if the found msvcr is correct architecture
49728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49729 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49730     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49731     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49732       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49733       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49734       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49735         CORRECT_MSVCR_ARCH="PE32 executable"
49736       else
49737         CORRECT_MSVCR_ARCH="PE32+ executable"
49738       fi
49739     else
49740       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49741         CORRECT_MSVCR_ARCH=386
49742       else
49743         CORRECT_MSVCR_ARCH=x86-64
49744       fi
49745     fi
49746     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49747       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49748 $as_echo "ok" >&6; }
49749       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49750       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49751 $as_echo_n "checking for msvcr100.dll... " >&6; }
49752       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49753 $as_echo "$MSVCR_DLL" >&6; }
49754     else
49755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49756 $as_echo "incorrect, ignoring" >&6; }
49757       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49758 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49759     fi
49760   fi
49761 
49762   fi
49763 
49764   if test "x$MSVCR_DLL" = x; then
49765     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49766     if test "x$VS100COMNTOOLS" != x; then
49767       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49768 
49769   windows_path="$CYGWIN_VS_TOOLS_DIR"
49770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49771     unix_path=`$CYGPATH -u "$windows_path"`
49772     CYGWIN_VS_TOOLS_DIR="$unix_path"
49773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49775     CYGWIN_VS_TOOLS_DIR="$unix_path"
49776   fi
49777 
49778       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49779         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
49780       else
49781         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
49782       fi
49783 
49784   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49785   METHOD="search of VS100COMNTOOLS"
49786   if test -e "$POSSIBLE_MSVCR_DLL"; then
49787     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49788 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49789 
49790     # Need to check if the found msvcr is correct architecture
49791     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49792 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49793     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49794     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49795       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49796       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49797       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49798         CORRECT_MSVCR_ARCH="PE32 executable"
49799       else
49800         CORRECT_MSVCR_ARCH="PE32+ executable"
49801       fi
49802     else
49803       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49804         CORRECT_MSVCR_ARCH=386
49805       else
49806         CORRECT_MSVCR_ARCH=x86-64
49807       fi
49808     fi
49809     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49810       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49811 $as_echo "ok" >&6; }
49812       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49813       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49814 $as_echo_n "checking for msvcr100.dll... " >&6; }
49815       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49816 $as_echo "$MSVCR_DLL" >&6; }
49817     else
49818       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49819 $as_echo "incorrect, ignoring" >&6; }
49820       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49821 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49822     fi
49823   fi
49824 
49825     fi
49826   fi
49827 
49828   if test "x$MSVCR_DLL" = x; then
49829     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49830     # (This was the original behaviour; kept since it might turn up something)
49831     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49832       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49833         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
49834       else
49835         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49836         if test "x$POSSIBLE_MSVCR_DLL" = x; then
49837           # We're grasping at straws now...
49838           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
49839         fi
49840       fi
49841 
49842 
49843   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49844   METHOD="search of VCINSTALLDIR"
49845   if test -e "$POSSIBLE_MSVCR_DLL"; then
49846     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
49847 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
49848 
49849     # Need to check if the found msvcr is correct architecture
49850     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
49851 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
49852     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
49853     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49854       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49855       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49856       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49857         CORRECT_MSVCR_ARCH="PE32 executable"
49858       else
49859         CORRECT_MSVCR_ARCH="PE32+ executable"
49860       fi
49861     else
49862       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49863         CORRECT_MSVCR_ARCH=386
49864       else
49865         CORRECT_MSVCR_ARCH=x86-64
49866       fi
49867     fi
49868     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49869       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49870 $as_echo "ok" >&6; }
49871       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
49872       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49873 $as_echo_n "checking for msvcr100.dll... " >&6; }
49874       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
49875 $as_echo "$MSVCR_DLL" >&6; }
49876     else
49877       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49878 $as_echo "incorrect, ignoring" >&6; }
49879       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
49880 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
49881     fi
49882   fi
49883 
49884     fi
49885   fi
49886 
49887   if test "x$MSVCR_DLL" = x; then
49888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
49889 $as_echo_n "checking for msvcr100.dll... " >&6; }
49890     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49891 $as_echo "no" >&6; }
49892     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
49893   fi
49894 
49895 
49896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49897 
49898   # Input might be given as Windows format, start by converting to
49899   # unix format.
49900   path="$MSVCR_DLL"
49901   new_path=`$CYGPATH -u "$path"`
49902 
49903   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49904   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49905   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49906   # "foo.exe" is OK but "foo" is an error.
49907   #
49908   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49909   # It is also a way to make sure we got the proper file name for the real test later on.
49910   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49911   if test "x$test_shortpath" = x; then
49912     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49913 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49914     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49915   fi
49916 
49917   # Call helper function which possibly converts this using DOS-style short mode.
49918   # If so, the updated path is stored in $new_path.
49919 
49920   input_path="$new_path"
49921   # Check if we need to convert this using DOS-style short mode. If the path
49922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49923   # take no chances and rewrite it.
49924   # Note: m4 eats our [], so we need to use [ and ] instead.
49925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49926   if test "x$has_forbidden_chars" != x; then
49927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49928     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49929     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49930     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49931       # Going to short mode and back again did indeed matter. Since short mode is
49932       # case insensitive, let's make it lowercase to improve readability.
49933       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49934       # Now convert it back to Unix-stile (cygpath)
49935       input_path=`$CYGPATH -u "$shortmode_path"`
49936       new_path="$input_path"
49937     fi
49938   fi
49939 
49940   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49941   if test "x$test_cygdrive_prefix" = x; then
49942     # As a simple fix, exclude /usr/bin since it's not a real path.
49943     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49944       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49945       # a path prefixed by /cygdrive for fixpath to work.
49946       new_path="$CYGWIN_ROOT_PATH$input_path"
49947     fi
49948   fi
49949 
49950 
49951   if test "x$path" != "x$new_path"; then
49952     MSVCR_DLL="$new_path"
49953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49954 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49955   fi
49956 
49957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49958 
49959   path="$MSVCR_DLL"
49960   has_colon=`$ECHO $path | $GREP ^.:`
49961   new_path="$path"
49962   if test "x$has_colon" = x; then
49963     # Not in mixed or Windows style, start by that.
49964     new_path=`cmd //c echo $path`
49965   fi
49966 
49967 
49968   input_path="$new_path"
49969   # Check if we need to convert this using DOS-style short mode. If the path
49970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49971   # take no chances and rewrite it.
49972   # Note: m4 eats our [], so we need to use [ and ] instead.
49973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49974   if test "x$has_forbidden_chars" != x; then
49975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49976     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49977   fi
49978 
49979 
49980   windows_path="$new_path"
49981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49982     unix_path=`$CYGPATH -u "$windows_path"`
49983     new_path="$unix_path"
49984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49986     new_path="$unix_path"
49987   fi
49988 
49989   if test "x$path" != "x$new_path"; then
49990     MSVCR_DLL="$new_path"
49991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49992 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49993   fi
49994 
49995   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49996   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49997 
49998   else
49999     # We're on a unix platform. Hooray! :)
50000     path="$MSVCR_DLL"
50001     has_space=`$ECHO "$path" | $GREP " "`
50002     if test "x$has_space" != x; then
50003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50004 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50005       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50006     fi
50007 
50008     # Use eval to expand a potential ~
50009     eval path="$path"
50010     if test ! -f "$path" && test ! -d "$path"; then
50011       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50012     fi
50013 
50014     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50015   fi
50016 
50017 
50018 
50019 
50020 # Check whether --with-dxsdk was given.
50021 if test "${with_dxsdk+set}" = set; then :
50022   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50023 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50024 fi
50025 
50026 
50027 
50028 
50029 # Check whether --with-dxsdk-lib was given.
50030 if test "${with_dxsdk_lib+set}" = set; then :
50031   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50032 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50033 fi
50034 
50035 
50036 
50037 
50038 # Check whether --with-dxsdk-include was given.
50039 if test "${with_dxsdk_include+set}" = set; then :
50040   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50041 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50042 fi
50043 
50044 
50045   fi
50046 
50047 
50048 
50049 ###############################################################################
50050 #
50051 # We need to do some final tweaking, when everything else is done.
50052 #
50053 ###############################################################################
50054 
50055 
50056   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50057 
50058 
50059   # The name of the Service Agent jar.
50060   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50061   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50062     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50063   fi
50064 
50065 
50066 
50067     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50068 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50069 
50070     if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50071       ENABLE_INTREE_EC=yes
50072       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50073 $as_echo "yes" >&6; }
50074     else
50075       ENABLE_INTREE_EC=no
50076       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50077 $as_echo "no" >&6; }
50078     fi
50079 
50080 
50081 
50082 
50083 ###############################################################################
50084 #
50085 # Configure parts of the build that only affect the build performance,
50086 # not the result.
50087 #
50088 ###############################################################################
50089 
50090 
50091   # How many cores do we have on this build system?
50092 
50093 # Check whether --with-num-cores was given.
50094 if test "${with_num_cores+set}" = set; then :
50095   withval=$with_num_cores;
50096 fi
50097 
50098   if test "x$with_num_cores" = x; then
50099     # The number of cores were not specified, try to probe them.
50100 
50101   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50102 $as_echo_n "checking for number of cores... " >&6; }
50103   NUM_CORES=1
50104   FOUND_CORES=no
50105 
50106   if test -f /proc/cpuinfo; then
50107     # Looks like a Linux (or cygwin) system
50108     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50109     FOUND_CORES=yes
50110   elif test -x /usr/sbin/psrinfo; then
50111     # Looks like a Solaris system
50112     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50113     FOUND_CORES=yes
50114   elif test -x /usr/sbin/system_profiler; then
50115     # Looks like a MacOSX system
50116     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50117     FOUND_CORES=yes
50118   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50119     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50120     FOUND_CORES=yes
50121   elif test -n "$NUMBER_OF_PROCESSORS"; then
50122     # On windows, look in the env
50123     NUM_CORES=$NUMBER_OF_PROCESSORS
50124     FOUND_CORES=yes
50125   fi
50126 
50127   if test "x$FOUND_CORES" = xyes; then
50128     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50129 $as_echo "$NUM_CORES" >&6; }
50130   else
50131     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50132 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
50133     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50134 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50135   fi
50136 
50137   else
50138     NUM_CORES=$with_num_cores
50139   fi
50140 
50141 
50142 
50143   # How much memory do we have on this build system?
50144 
50145 # Check whether --with-memory-size was given.
50146 if test "${with_memory_size+set}" = set; then :
50147   withval=$with_memory_size;
50148 fi
50149 
50150   if test "x$with_memory_size" = x; then
50151     # The memory size was not specified, try to probe it.
50152 
50153   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50154 $as_echo_n "checking for memory size... " >&6; }
50155   # Default to 1024 MB
50156   MEMORY_SIZE=1024
50157   FOUND_MEM=no
50158 
50159   if test -f /proc/meminfo; then
50160     # Looks like a Linux (or cygwin) system
50161     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50162     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50163     FOUND_MEM=yes
50164   elif test -x /usr/sbin/prtconf; then
50165     # Looks like a Solaris or AIX system
50166     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50167     FOUND_MEM=yes
50168   elif test -x /usr/sbin/system_profiler; then
50169     # Looks like a MacOSX system
50170     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50171     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50172     FOUND_MEM=yes
50173   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50174     # Windows, but without cygwin
50175     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50176     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50177     FOUND_MEM=yes
50178   fi
50179 
50180   if test "x$FOUND_MEM" = xyes; then
50181     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50182 $as_echo "$MEMORY_SIZE MB" >&6; }
50183   else
50184     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50185 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50186     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50187 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50188   fi
50189 
50190   else
50191     MEMORY_SIZE=$with_memory_size
50192   fi
50193 
50194 
50195 
50196   # Provide a decent default number of parallel jobs for make depending on
50197   # number of cores, amount of memory and machine architecture.
50198 
50199 # Check whether --with-jobs was given.
50200 if test "${with_jobs+set}" = set; then :
50201   withval=$with_jobs;
50202 fi
50203 
50204   if test "x$with_jobs" = x; then
50205     # Number of jobs was not specified, calculate.
50206     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50207 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50208     # Approximate memory in GB.
50209     memory_gb=`expr $MEMORY_SIZE / 1024`
50210     # Pick the lowest of memory in gb and number of cores.
50211     if test "$memory_gb" -lt "$NUM_CORES"; then
50212       JOBS="$memory_gb"
50213     else
50214       JOBS="$NUM_CORES"
50215       # On bigger machines, leave some room for other processes to run
50216       if test "$JOBS" -gt "4"; then
50217         JOBS=`expr $JOBS '*' 90 / 100`
50218       fi
50219     fi
50220     # Cap number of jobs to 16
50221     if test "$JOBS" -gt "16"; then
50222       JOBS=16
50223     fi
50224     if test "$JOBS" -eq "0"; then
50225       JOBS=1
50226     fi
50227     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50228 $as_echo "$JOBS" >&6; }
50229   else
50230     JOBS=$with_jobs
50231   fi
50232 
50233 
50234 
50235 # Setup arguments for the boot jdk (after cores and memory have been setup)
50236 
50237   ##############################################################################
50238   #
50239   # Specify jvm options for anything that is run with the Boot JDK.
50240   # Not all JVM:s accept the same arguments on the command line.
50241   #
50242 
50243 # Check whether --with-boot-jdk-jvmargs was given.
50244 if test "${with_boot_jdk_jvmargs+set}" = set; then :
50245   withval=$with_boot_jdk_jvmargs;
50246 fi
50247 
50248 
50249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50250 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
50251 
50252   # Disable special log output when a debug build is used as Boot JDK...
50253 
50254   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50255   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50256   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50257   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50258   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50259   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50260     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50261     JVM_ARG_OK=true
50262   else
50263     $ECHO "Arg failed:" >&5
50264     $ECHO "$OUTPUT" >&5
50265     JVM_ARG_OK=false
50266   fi
50267 
50268 
50269   # Apply user provided options.
50270 
50271   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50272   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50273   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50274   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50275   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50276   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50277     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50278     JVM_ARG_OK=true
50279   else
50280     $ECHO "Arg failed:" >&5
50281     $ECHO "$OUTPUT" >&5
50282     JVM_ARG_OK=false
50283   fi
50284 
50285 
50286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50287 $as_echo "$boot_jdk_jvmargs" >&6; }
50288 
50289   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50290   JAVA_FLAGS=$boot_jdk_jvmargs
50291 
50292 
50293 
50294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50295 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50296 
50297   # Starting amount of heap memory.
50298 
50299   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50300   $ECHO "Command: $JAVA -Xms64M -version" >&5
50301   OUTPUT=`$JAVA -Xms64M -version 2>&1`
50302   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50303   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50304   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50305     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50306     JVM_ARG_OK=true
50307   else
50308     $ECHO "Arg failed:" >&5
50309     $ECHO "$OUTPUT" >&5
50310     JVM_ARG_OK=false
50311   fi
50312 
50313 
50314   # Maximum amount of heap memory.
50315   # Maximum stack size.
50316   JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50317   if test "x$BUILD_NUM_BITS" = x32; then
50318     if test "$JVM_MAX_HEAP" -gt "1100"; then
50319       JVM_MAX_HEAP=1100
50320     elif test "$JVM_MAX_HEAP" -lt "512"; then
50321       JVM_MAX_HEAP=512
50322     fi
50323     STACK_SIZE=768
50324   else
50325     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50326     # pointers are used. Apparently, we need to increase the heap and stack
50327     # space for the jvm. More specifically, when running javac to build huge
50328     # jdk batch
50329     if test "$JVM_MAX_HEAP" -gt "1600"; then
50330       JVM_MAX_HEAP=1600
50331     elif test "$JVM_MAX_HEAP" -lt "512"; then
50332       JVM_MAX_HEAP=512
50333     fi
50334     STACK_SIZE=1536
50335   fi
50336 
50337   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50338   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50339   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50340   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50341   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50342   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50343     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50344     JVM_ARG_OK=true
50345   else
50346     $ECHO "Arg failed:" >&5
50347     $ECHO "$OUTPUT" >&5
50348     JVM_ARG_OK=false
50349   fi
50350 
50351 
50352   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50353   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50354   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50355   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50356   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50357   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50358     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50359     JVM_ARG_OK=true
50360   else
50361     $ECHO "Arg failed:" >&5
50362     $ECHO "$OUTPUT" >&5
50363     JVM_ARG_OK=false
50364   fi
50365 
50366 
50367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50368 $as_echo "$boot_jdk_jvmargs_big" >&6; }
50369 
50370   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50371 
50372 
50373 
50374   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50375 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50376 
50377   # Use serial gc for small short lived tools if possible
50378 
50379   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50380   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50381   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50382   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50383   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50384   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50385     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50386     JVM_ARG_OK=true
50387   else
50388     $ECHO "Arg failed:" >&5
50389     $ECHO "$OUTPUT" >&5
50390     JVM_ARG_OK=false
50391   fi
50392 
50393 
50394   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50395   $ECHO "Command: $JAVA -Xms32M -version" >&5
50396   OUTPUT=`$JAVA -Xms32M -version 2>&1`
50397   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50398   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50399   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50400     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50401     JVM_ARG_OK=true
50402   else
50403     $ECHO "Arg failed:" >&5
50404     $ECHO "$OUTPUT" >&5
50405     JVM_ARG_OK=false
50406   fi
50407 
50408 
50409   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50410   $ECHO "Command: $JAVA -Xmx512M -version" >&5
50411   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50412   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50413   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50414   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50415     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50416     JVM_ARG_OK=true
50417   else
50418     $ECHO "Arg failed:" >&5
50419     $ECHO "$OUTPUT" >&5
50420     JVM_ARG_OK=false
50421   fi
50422 
50423 
50424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50425 $as_echo "$boot_jdk_jvmargs_small" >&6; }
50426 
50427   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50428 
50429 
50430   JAVA_TOOL_FLAGS_SMALL=""
50431   for f in $JAVA_FLAGS_SMALL; do
50432     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
50433   done
50434 
50435 
50436 
50437 # Setup smart javac (after cores and memory have been setup)
50438 
50439 
50440 # Check whether --with-sjavac-server-java was given.
50441 if test "${with_sjavac_server_java+set}" = set; then :
50442   withval=$with_sjavac_server_java;
50443 fi
50444 
50445 
50446   if test "x$with_sjavac_server_java" != x; then
50447     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
50448     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
50449     if test "x$FOUND_VERSION" = x; then
50450       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
50451     fi
50452   else
50453     SJAVAC_SERVER_JAVA="$JAVA"
50454   fi
50455 
50456 
50457   if test "$MEMORY_SIZE" -gt "3000"; then
50458 
50459   $ECHO "Check if jvm arg is ok: -d64" >&5
50460   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
50461   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
50462   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50463   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50464   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50465     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
50466     JVM_ARG_OK=true
50467   else
50468     $ECHO "Arg failed:" >&5
50469     $ECHO "$OUTPUT" >&5
50470     JVM_ARG_OK=false
50471   fi
50472 
50473     if test "$JVM_ARG_OK" = true; then
50474       JVM_64BIT=true
50475       JVM_ARG_OK=false
50476     fi
50477   fi
50478 
50479   MX_VALUE=`expr $MEMORY_SIZE / 2`
50480   if test "$JVM_64BIT" = true; then
50481     # Set ms lower than mx since more than one instance of the server might
50482     # get launched at the same time before they figure out which instance won.
50483     MS_VALUE=512
50484     if test "$MX_VALUE" -gt "2048"; then
50485       MX_VALUE=2048
50486     fi
50487   else
50488     MS_VALUE=256
50489     if test "$MX_VALUE" -gt "1500"; then
50490       MX_VALUE=1500
50491     fi
50492   fi
50493   if test "$MX_VALUE" -lt "512"; then
50494     MX_VALUE=512
50495   fi
50496 
50497   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
50498   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
50499   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
50500   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50501   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50502   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50503     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
50504     JVM_ARG_OK=true
50505   else
50506     $ECHO "Arg failed:" >&5
50507     $ECHO "$OUTPUT" >&5
50508     JVM_ARG_OK=false
50509   fi
50510 
50511 
50512 
50513   # Check whether --enable-sjavac was given.
50514 if test "${enable_sjavac+set}" = set; then :
50515   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
50516 else
50517   ENABLE_SJAVAC='no'
50518 fi
50519 
50520   if test "x$JVM_ARG_OK" = "xfalse"; then
50521     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
50522 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
50523     ENABLE_SJAVAC=no;
50524   fi
50525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
50526 $as_echo_n "checking whether to use sjavac... " >&6; }
50527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
50528 $as_echo "$ENABLE_SJAVAC" >&6; }
50529 
50530 
50531   if test "x$ENABLE_SJAVAC" = xyes; then
50532     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
50533   else
50534     SJAVAC_SERVER_DIR=
50535   fi
50536 
50537 
50538 
50539 # Can the C/C++ compiler use precompiled headers?
50540 
50541 
50542   ###############################################################################
50543   #
50544   # Can the C/C++ compiler use precompiled headers?
50545   #
50546   # Check whether --enable-precompiled-headers was given.
50547 if test "${enable_precompiled_headers+set}" = set; then :
50548   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
50549 else
50550   ENABLE_PRECOMPH=yes
50551 fi
50552 
50553 
50554   USE_PRECOMPILED_HEADER=1
50555   if test "x$ENABLE_PRECOMPH" = xno; then
50556     USE_PRECOMPILED_HEADER=0
50557   fi
50558 
50559   if test "x$ENABLE_PRECOMPH" = xyes; then
50560     # Check that the compiler actually supports precomp headers.
50561     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50562       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
50563 $as_echo_n "checking that precompiled headers work... " >&6; }
50564       echo "int alfa();" > conftest.h
50565       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
50566       if test ! -f conftest.hpp.gch; then
50567         USE_PRECOMPILED_HEADER=0
50568         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50569 $as_echo "no" >&6; }
50570       else
50571         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50572 $as_echo "yes" >&6; }
50573       fi
50574       rm -f conftest.h conftest.hpp.gch
50575     fi
50576   fi
50577 
50578 
50579 
50580 
50581 # Setup use of ccache, if available
50582 
50583   # Check whether --enable-ccache was given.
50584 if test "${enable_ccache+set}" = set; then :
50585   enableval=$enable_ccache;
50586 fi
50587 
50588 
50589   CCACHE=
50590   CCACHE_STATUS=
50591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
50592 $as_echo_n "checking is ccache enabled... " >&6; }
50593   if test "x$enable_ccache" = xyes; then
50594     if test "x$TOOLCHAIN_TYPE" = "xgccapa" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
50595       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50596 $as_echo "yes" >&6; }
50597       OLD_PATH="$PATH"
50598       if test "x$TOOLCHAIN_PATH" != x; then
50599         PATH=$TOOLCHAIN_PATH:$PATH
50600       fi
50601 
50602 
50603 
50604   # Publish this variable in the help.
50605 
50606 
50607   if test "x$CCACHE" = x; then
50608     # The variable is not set by user, try to locate tool using the code snippet
50609     for ac_prog in ccache
50610 do
50611   # Extract the first word of "$ac_prog", so it can be a program name with args.
50612 set dummy $ac_prog; ac_word=$2
50613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50614 $as_echo_n "checking for $ac_word... " >&6; }
50615 if ${ac_cv_path_CCACHE+:} false; then :
50616   $as_echo_n "(cached) " >&6
50617 else
50618   case $CCACHE in
50619   [\\/]* | ?:[\\/]*)
50620   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50621   ;;
50622   *)
50623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50624 for as_dir in $PATH
50625 do
50626   IFS=$as_save_IFS
50627   test -z "$as_dir" && as_dir=.
50628     for ac_exec_ext in '' $ac_executable_extensions; do
50629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50630     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50632     break 2
50633   fi
50634 done
50635   done
50636 IFS=$as_save_IFS
50637 
50638   ;;
50639 esac
50640 fi
50641 CCACHE=$ac_cv_path_CCACHE
50642 if test -n "$CCACHE"; then
50643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50644 $as_echo "$CCACHE" >&6; }
50645 else
50646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50647 $as_echo "no" >&6; }
50648 fi
50649 
50650 
50651   test -n "$CCACHE" && break
50652 done
50653 
50654   else
50655     # The variable is set, but is it from the command line or the environment?
50656 
50657     # Try to remove the string !CCACHE! from our list.
50658     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
50659     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50660       # If it failed, the variable was not from the command line. Ignore it,
50661       # but warn the user (except for BASH, which is always set by the calling BASH).
50662       if test "xCCACHE" != xBASH; then
50663         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
50664 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
50665       fi
50666       # Try to locate tool using the code snippet
50667       for ac_prog in ccache
50668 do
50669   # Extract the first word of "$ac_prog", so it can be a program name with args.
50670 set dummy $ac_prog; ac_word=$2
50671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50672 $as_echo_n "checking for $ac_word... " >&6; }
50673 if ${ac_cv_path_CCACHE+:} false; then :
50674   $as_echo_n "(cached) " >&6
50675 else
50676   case $CCACHE in
50677   [\\/]* | ?:[\\/]*)
50678   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50679   ;;
50680   *)
50681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50682 for as_dir in $PATH
50683 do
50684   IFS=$as_save_IFS
50685   test -z "$as_dir" && as_dir=.
50686     for ac_exec_ext in '' $ac_executable_extensions; do
50687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50688     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50690     break 2
50691   fi
50692 done
50693   done
50694 IFS=$as_save_IFS
50695 
50696   ;;
50697 esac
50698 fi
50699 CCACHE=$ac_cv_path_CCACHE
50700 if test -n "$CCACHE"; then
50701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50702 $as_echo "$CCACHE" >&6; }
50703 else
50704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50705 $as_echo "no" >&6; }
50706 fi
50707 
50708 
50709   test -n "$CCACHE" && break
50710 done
50711 
50712     else
50713       # If it succeeded, then it was overridden by the user. We will use it
50714       # for the tool.
50715 
50716       # First remove it from the list of overridden variables, so we can test
50717       # for unknown variables in the end.
50718       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50719 
50720       # Check if the provided tool contains a complete path.
50721       tool_specified="$CCACHE"
50722       tool_basename="${tool_specified##*/}"
50723       if test "x$tool_basename" = "x$tool_specified"; then
50724         # A command without a complete path is provided, search $PATH.
50725         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
50726 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
50727         # Extract the first word of "$tool_basename", so it can be a program name with args.
50728 set dummy $tool_basename; ac_word=$2
50729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50730 $as_echo_n "checking for $ac_word... " >&6; }
50731 if ${ac_cv_path_CCACHE+:} false; then :
50732   $as_echo_n "(cached) " >&6
50733 else
50734   case $CCACHE in
50735   [\\/]* | ?:[\\/]*)
50736   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
50737   ;;
50738   *)
50739   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50740 for as_dir in $PATH
50741 do
50742   IFS=$as_save_IFS
50743   test -z "$as_dir" && as_dir=.
50744     for ac_exec_ext in '' $ac_executable_extensions; do
50745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50746     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
50747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50748     break 2
50749   fi
50750 done
50751   done
50752 IFS=$as_save_IFS
50753 
50754   ;;
50755 esac
50756 fi
50757 CCACHE=$ac_cv_path_CCACHE
50758 if test -n "$CCACHE"; then
50759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
50760 $as_echo "$CCACHE" >&6; }
50761 else
50762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50763 $as_echo "no" >&6; }
50764 fi
50765 
50766 
50767         if test "x$CCACHE" = x; then
50768           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50769         fi
50770       else
50771         # Otherwise we believe it is a complete path. Use it as it is.
50772         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
50773 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
50774         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
50775 $as_echo_n "checking for CCACHE... " >&6; }
50776         if test ! -x "$tool_specified"; then
50777           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50778 $as_echo "not found" >&6; }
50779           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
50780         fi
50781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50782 $as_echo "$tool_specified" >&6; }
50783       fi
50784     fi
50785   fi
50786 
50787 
50788 
50789   if test "x$CCACHE" = x; then
50790     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
50791   fi
50792 
50793 
50794       PATH="$OLD_PATH"
50795       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
50796       CCACHE_STATUS="Active ($CCACHE_VERSION)"
50797     else
50798       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50799 $as_echo "no" >&6; }
50800       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
50801 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
50802     fi
50803   elif test "x$enable_ccache" = xno; then
50804     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
50805 $as_echo "no, explicitly disabled" >&6; }
50806     CCACHE_STATUS="Disabled"
50807   elif test "x$enable_ccache" = x; then
50808     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50809 $as_echo "no" >&6; }
50810   else
50811     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
50812 $as_echo "unknown" >&6; }
50813     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
50814   fi
50815 
50816 
50817 
50818 # Check whether --with-ccache-dir was given.
50819 if test "${with_ccache_dir+set}" = set; then :
50820   withval=$with_ccache_dir;
50821 fi
50822 
50823 
50824   if test "x$with_ccache_dir" != x; then
50825     # When using a non home ccache directory, assume the use is to share ccache files
50826     # with other users. Thus change the umask.
50827     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
50828     if test "x$CCACHE" = x; then
50829       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
50830 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
50831     fi
50832   fi
50833 
50834   if test "x$CCACHE" != x; then
50835 
50836   if test "x$CCACHE" != x; then
50837     if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
50838       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
50839           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]'`
50840       if test "x$HAS_BAD_CCACHE" != "x"; then
50841         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
50842       fi
50843       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
50844 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
50845       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
50846       PUSHED_FLAGS="$CXXFLAGS"
50847       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
50848       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50849 /* end confdefs.h.  */
50850 
50851 int
50852 main ()
50853 {
50854 
50855   ;
50856   return 0;
50857 }
50858 _ACEOF
50859 if ac_fn_cxx_try_compile "$LINENO"; then :
50860   CC_KNOWS_CCACHE_TRICK=yes
50861 else
50862   CC_KNOWS_CCACHE_TRICK=no
50863 fi
50864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50865       CXXFLAGS="$PUSHED_FLAGS"
50866       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
50867         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50868 $as_echo "yes" >&6; }
50869         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
50870 
50871         CCACHE_SLOPPINESS=pch_defines,time_macros
50872       else
50873         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50874 $as_echo "no" >&6; }
50875         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
50876       fi
50877     fi
50878 
50879     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
50880         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
50881 
50882     if test "x$SET_CCACHE_DIR" != x; then
50883       mkdir -p $CCACHE_DIR > /dev/null 2>&1
50884       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
50885     fi
50886   fi
50887 
50888   fi
50889 
50890 
50891 ###############################################################################
50892 #
50893 # And now the finish...
50894 #
50895 ###############################################################################
50896 
50897 # Check for some common pitfalls
50898 
50899   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50900     file_to_test="$SRC_ROOT/LICENSE"
50901     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
50902       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
50903     fi
50904   fi
50905 
50906 
50907   # Did user specify any unknown variables?
50908 
50909   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
50910     # Replace the separating ! with spaces before presenting for end user.
50911     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
50912     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
50913 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
50914   fi
50915 
50916 
50917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
50918 $as_echo_n "checking if build directory is on local disk... " >&6; }
50919 
50920   # df -l lists only local disks; if the given directory is not found then
50921   # a non-zero exit code is given
50922   if test "x$DF" = x; then
50923     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50924       # msys does not have df; use Windows "net use" instead.
50925       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
50926       if test "x$IS_NETWORK_DISK" = x; then
50927         OUTPUT_DIR_IS_LOCAL="yes"
50928       else
50929         OUTPUT_DIR_IS_LOCAL="no"
50930       fi
50931     else
50932       # No df here, say it's local
50933       OUTPUT_DIR_IS_LOCAL="yes"
50934     fi
50935   else
50936     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
50937       OUTPUT_DIR_IS_LOCAL="yes"
50938     else
50939       OUTPUT_DIR_IS_LOCAL="no"
50940     fi
50941   fi
50942 
50943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
50944 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
50945 
50946 
50947 
50948   # Check if the user has any old-style ALT_ variables set.
50949   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
50950 
50951   # Before generating output files, test if they exist. If they do, this is a reconfigure.
50952   # Since we can't properly handle the dependencies for this, warn the user about the situation
50953   if test -e $OUTPUT_ROOT/spec.gmk; then
50954     IS_RECONFIGURE=yes
50955   else
50956     IS_RECONFIGURE=no
50957   fi
50958 
50959 
50960 # At the end, call the custom hook. (Dummy macro if no custom sources available)
50961 
50962 
50963 # We're messing a bit with internal autoconf variables to put the config.status
50964 # in the output directory instead of the current directory.
50965 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
50966 
50967 # Create the actual output files. Now the main work of configure is done.
50968 cat >confcache <<\_ACEOF
50969 # This file is a shell script that caches the results of configure
50970 # tests run on this system so they can be shared between configure
50971 # scripts and configure runs, see configure's option --config-cache.
50972 # It is not useful on other systems.  If it contains results you don't
50973 # want to keep, you may remove or edit it.
50974 #
50975 # config.status only pays attention to the cache file if you give it
50976 # the --recheck option to rerun configure.
50977 #
50978 # `ac_cv_env_foo' variables (set or unset) will be overridden when
50979 # loading this file, other *unset* `ac_cv_foo' will be assigned the
50980 # following values.
50981 
50982 _ACEOF
50983 
50984 # The following way of writing the cache mishandles newlines in values,
50985 # but we know of no workaround that is simple, portable, and efficient.
50986 # So, we kill variables containing newlines.
50987 # Ultrix sh set writes to stderr and can't be redirected directly,
50988 # and sets the high bit in the cache file unless we assign to the vars.
50989 (
50990   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
50991     eval ac_val=\$$ac_var
50992     case $ac_val in #(
50993     *${as_nl}*)
50994       case $ac_var in #(
50995       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
50996 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
50997       esac
50998       case $ac_var in #(
50999       _ | IFS | as_nl) ;; #(
51000       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51001       *) { eval $ac_var=; unset $ac_var;} ;;
51002       esac ;;
51003     esac
51004   done
51005 
51006   (set) 2>&1 |
51007     case $as_nl`(ac_space=' '; set) 2>&1` in #(
51008     *${as_nl}ac_space=\ *)
51009       # `set' does not quote correctly, so add quotes: double-quote
51010       # substitution turns \\\\ into \\, and sed turns \\ into \.
51011       sed -n \
51012         "s/'/'\\\\''/g;
51013           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51014       ;; #(
51015     *)
51016       # `set' quotes correctly as required by POSIX, so do not add quotes.
51017       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51018       ;;
51019     esac |
51020     sort
51021 ) |
51022   sed '
51023      /^ac_cv_env_/b end
51024      t clear
51025      :clear
51026      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51027      t end
51028      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51029      :end' >>confcache
51030 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51031   if test -w "$cache_file"; then
51032     if test "x$cache_file" != "x/dev/null"; then
51033       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51034 $as_echo "$as_me: updating cache $cache_file" >&6;}
51035       if test ! -f "$cache_file" || test -h "$cache_file"; then
51036         cat confcache >"$cache_file"
51037       else
51038         case $cache_file in #(
51039         */* | ?:*)
51040           mv -f confcache "$cache_file"$$ &&
51041           mv -f "$cache_file"$$ "$cache_file" ;; #(
51042         *)
51043           mv -f confcache "$cache_file" ;;
51044         esac
51045       fi
51046     fi
51047   else
51048     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51049 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51050   fi
51051 fi
51052 rm -f confcache
51053 
51054 test "x$prefix" = xNONE && prefix=$ac_default_prefix
51055 # Let make expand exec_prefix.
51056 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51057 
51058 # Transform confdefs.h into DEFS.
51059 # Protect against shell expansion while executing Makefile rules.
51060 # Protect against Makefile macro expansion.
51061 #
51062 # If the first sed substitution is executed (which looks for macros that
51063 # take arguments), then branch to the quote section.  Otherwise,
51064 # look for a macro that doesn't take arguments.
51065 ac_script='
51066 :mline
51067 /\\$/{
51068  N
51069  s,\\\n,,
51070  b mline
51071 }
51072 t clear
51073 :clear
51074 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
51075 t quote
51076 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
51077 t quote
51078 b any
51079 :quote
51080 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51081 s/\[/\\&/g
51082 s/\]/\\&/g
51083 s/\$/$$/g
51084 H
51085 :any
51086 ${
51087         g
51088         s/^\n//
51089         s/\n/ /g
51090         p
51091 }
51092 '
51093 DEFS=`sed -n "$ac_script" confdefs.h`
51094 
51095 
51096 ac_libobjs=
51097 ac_ltlibobjs=
51098 U=
51099 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51100   # 1. Remove the extension, and $U if already installed.
51101   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51102   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51103   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51104   #    will be set to the directory where LIBOBJS objects are built.
51105   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51106   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51107 done
51108 LIBOBJS=$ac_libobjs
51109 
51110 LTLIBOBJS=$ac_ltlibobjs
51111 
51112 
51113 
51114 : "${CONFIG_STATUS=./config.status}"
51115 ac_write_fail=0
51116 ac_clean_files_save=$ac_clean_files
51117 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51118 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51119 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51120 as_write_fail=0
51121 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51122 #! $SHELL
51123 # Generated by $as_me.
51124 # Run this file to recreate the current configuration.
51125 # Compiler output produced by configure, useful for debugging
51126 # configure, is in config.log if it exists.
51127 
51128 debug=false
51129 ac_cs_recheck=false
51130 ac_cs_silent=false
51131 
51132 SHELL=\${CONFIG_SHELL-$SHELL}
51133 export SHELL
51134 _ASEOF
51135 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51136 ## -------------------- ##
51137 ## M4sh Initialization. ##
51138 ## -------------------- ##
51139 
51140 # Be more Bourne compatible
51141 DUALCASE=1; export DUALCASE # for MKS sh
51142 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51143   emulate sh
51144   NULLCMD=:
51145   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51146   # is contrary to our usage.  Disable this feature.
51147   alias -g '${1+"$@"}'='"$@"'
51148   setopt NO_GLOB_SUBST
51149 else
51150   case `(set -o) 2>/dev/null` in #(
51151   *posix*) :
51152     set -o posix ;; #(
51153   *) :
51154      ;;
51155 esac
51156 fi
51157 
51158 
51159 as_nl='
51160 '
51161 export as_nl
51162 # Printing a long string crashes Solaris 7 /usr/bin/printf.
51163 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51164 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51165 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51166 # Prefer a ksh shell builtin over an external printf program on Solaris,
51167 # but without wasting forks for bash or zsh.
51168 if test -z "$BASH_VERSION$ZSH_VERSION" \
51169     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51170   as_echo='print -r --'
51171   as_echo_n='print -rn --'
51172 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51173   as_echo='printf %s\n'
51174   as_echo_n='printf %s'
51175 else
51176   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51177     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51178     as_echo_n='/usr/ucb/echo -n'
51179   else
51180     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51181     as_echo_n_body='eval
51182       arg=$1;
51183       case $arg in #(
51184       *"$as_nl"*)
51185         expr "X$arg" : "X\\(.*\\)$as_nl";
51186         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51187       esac;
51188       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51189     '
51190     export as_echo_n_body
51191     as_echo_n='sh -c $as_echo_n_body as_echo'
51192   fi
51193   export as_echo_body
51194   as_echo='sh -c $as_echo_body as_echo'
51195 fi
51196 
51197 # The user is always right.
51198 if test "${PATH_SEPARATOR+set}" != set; then
51199   PATH_SEPARATOR=:
51200   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51201     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51202       PATH_SEPARATOR=';'
51203   }
51204 fi
51205 
51206 
51207 # IFS
51208 # We need space, tab and new line, in precisely that order.  Quoting is
51209 # there to prevent editors from complaining about space-tab.
51210 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51211 # splitting by setting IFS to empty value.)
51212 IFS=" ""        $as_nl"
51213 
51214 # Find who we are.  Look in the path if we contain no directory separator.
51215 as_myself=
51216 case $0 in #((
51217   *[\\/]* ) as_myself=$0 ;;
51218   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51219 for as_dir in $PATH
51220 do
51221   IFS=$as_save_IFS
51222   test -z "$as_dir" && as_dir=.
51223     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51224   done
51225 IFS=$as_save_IFS
51226 
51227      ;;
51228 esac
51229 # We did not find ourselves, most probably we were run as `sh COMMAND'
51230 # in which case we are not to be found in the path.
51231 if test "x$as_myself" = x; then
51232   as_myself=$0
51233 fi
51234 if test ! -f "$as_myself"; then
51235   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51236   exit 1
51237 fi
51238 
51239 # Unset variables that we do not need and which cause bugs (e.g. in
51240 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51241 # suppresses any "Segmentation fault" message there.  '((' could
51242 # trigger a bug in pdksh 5.2.14.
51243 for as_var in BASH_ENV ENV MAIL MAILPATH
51244 do eval test x\${$as_var+set} = xset \
51245   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51246 done
51247 PS1='$ '
51248 PS2='> '
51249 PS4='+ '
51250 
51251 # NLS nuisances.
51252 LC_ALL=C
51253 export LC_ALL
51254 LANGUAGE=C
51255 export LANGUAGE
51256 
51257 # CDPATH.
51258 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51259 
51260 
51261 # as_fn_error STATUS ERROR [LINENO LOG_FD]
51262 # ----------------------------------------
51263 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51264 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51265 # script with STATUS, using 1 if that was 0.
51266 as_fn_error ()
51267 {
51268   as_status=$1; test $as_status -eq 0 && as_status=1
51269   if test "$4"; then
51270     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51271     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51272   fi
51273   $as_echo "$as_me: error: $2" >&2
51274   as_fn_exit $as_status
51275 } # as_fn_error
51276 
51277 
51278 # as_fn_set_status STATUS
51279 # -----------------------
51280 # Set $? to STATUS, without forking.
51281 as_fn_set_status ()
51282 {
51283   return $1
51284 } # as_fn_set_status
51285 
51286 # as_fn_exit STATUS
51287 # -----------------
51288 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51289 as_fn_exit ()
51290 {
51291   set +e
51292   as_fn_set_status $1
51293   exit $1
51294 } # as_fn_exit
51295 
51296 # as_fn_unset VAR
51297 # ---------------
51298 # Portably unset VAR.
51299 as_fn_unset ()
51300 {
51301   { eval $1=; unset $1;}
51302 }
51303 as_unset=as_fn_unset
51304 # as_fn_append VAR VALUE
51305 # ----------------------
51306 # Append the text in VALUE to the end of the definition contained in VAR. Take
51307 # advantage of any shell optimizations that allow amortized linear growth over
51308 # repeated appends, instead of the typical quadratic growth present in naive
51309 # implementations.
51310 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51311   eval 'as_fn_append ()
51312   {
51313     eval $1+=\$2
51314   }'
51315 else
51316   as_fn_append ()
51317   {
51318     eval $1=\$$1\$2
51319   }
51320 fi # as_fn_append
51321 
51322 # as_fn_arith ARG...
51323 # ------------------
51324 # Perform arithmetic evaluation on the ARGs, and store the result in the
51325 # global $as_val. Take advantage of shells that can avoid forks. The arguments
51326 # must be portable across $(()) and expr.
51327 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51328   eval 'as_fn_arith ()
51329   {
51330     as_val=$(( $* ))
51331   }'
51332 else
51333   as_fn_arith ()
51334   {
51335     as_val=`expr "$@" || test $? -eq 1`
51336   }
51337 fi # as_fn_arith
51338 
51339 
51340 if expr a : '\(a\)' >/dev/null 2>&1 &&
51341    test "X`expr 00001 : '.*\(...\)'`" = X001; then
51342   as_expr=expr
51343 else
51344   as_expr=false
51345 fi
51346 
51347 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51348   as_basename=basename
51349 else
51350   as_basename=false
51351 fi
51352 
51353 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51354   as_dirname=dirname
51355 else
51356   as_dirname=false
51357 fi
51358 
51359 as_me=`$as_basename -- "$0" ||
51360 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51361          X"$0" : 'X\(//\)$' \| \
51362          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51363 $as_echo X/"$0" |
51364     sed '/^.*\/\([^/][^/]*\)\/*$/{
51365             s//\1/
51366             q
51367           }
51368           /^X\/\(\/\/\)$/{
51369             s//\1/
51370             q
51371           }
51372           /^X\/\(\/\).*/{
51373             s//\1/
51374             q
51375           }
51376           s/.*/./; q'`
51377 
51378 # Avoid depending upon Character Ranges.
51379 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51380 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51381 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51382 as_cr_digits='0123456789'
51383 as_cr_alnum=$as_cr_Letters$as_cr_digits
51384 
51385 ECHO_C= ECHO_N= ECHO_T=
51386 case `echo -n x` in #(((((
51387 -n*)
51388   case `echo 'xy\c'` in
51389   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
51390   xy)  ECHO_C='\c';;
51391   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51392        ECHO_T=' ';;
51393   esac;;
51394 *)
51395   ECHO_N='-n';;
51396 esac
51397 
51398 rm -f conf$$ conf$$.exe conf$$.file
51399 if test -d conf$$.dir; then
51400   rm -f conf$$.dir/conf$$.file
51401 else
51402   rm -f conf$$.dir
51403   mkdir conf$$.dir 2>/dev/null
51404 fi
51405 if (echo >conf$$.file) 2>/dev/null; then
51406   if ln -s conf$$.file conf$$ 2>/dev/null; then
51407     as_ln_s='ln -s'
51408     # ... but there are two gotchas:
51409     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51410     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51411     # In both cases, we have to default to `cp -pR'.
51412     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51413       as_ln_s='cp -pR'
51414   elif ln conf$$.file conf$$ 2>/dev/null; then
51415     as_ln_s=ln
51416   else
51417     as_ln_s='cp -pR'
51418   fi
51419 else
51420   as_ln_s='cp -pR'
51421 fi
51422 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51423 rmdir conf$$.dir 2>/dev/null
51424 
51425 
51426 # as_fn_mkdir_p
51427 # -------------
51428 # Create "$as_dir" as a directory, including parents if necessary.
51429 as_fn_mkdir_p ()
51430 {
51431 
51432   case $as_dir in #(
51433   -*) as_dir=./$as_dir;;
51434   esac
51435   test -d "$as_dir" || eval $as_mkdir_p || {
51436     as_dirs=
51437     while :; do
51438       case $as_dir in #(
51439       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
51440       *) as_qdir=$as_dir;;
51441       esac
51442       as_dirs="'$as_qdir' $as_dirs"
51443       as_dir=`$as_dirname -- "$as_dir" ||
51444 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51445          X"$as_dir" : 'X\(//\)[^/]' \| \
51446          X"$as_dir" : 'X\(//\)$' \| \
51447          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
51448 $as_echo X"$as_dir" |
51449     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51450             s//\1/
51451             q
51452           }
51453           /^X\(\/\/\)[^/].*/{
51454             s//\1/
51455             q
51456           }
51457           /^X\(\/\/\)$/{
51458             s//\1/
51459             q
51460           }
51461           /^X\(\/\).*/{
51462             s//\1/
51463             q
51464           }
51465           s/.*/./; q'`
51466       test -d "$as_dir" && break
51467     done
51468     test -z "$as_dirs" || eval "mkdir $as_dirs"
51469   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
51470 
51471 
51472 } # as_fn_mkdir_p
51473 if mkdir -p . 2>/dev/null; then
51474   as_mkdir_p='mkdir -p "$as_dir"'
51475 else
51476   test -d ./-p && rmdir ./-p
51477   as_mkdir_p=false
51478 fi
51479 
51480 
51481 # as_fn_executable_p FILE
51482 # -----------------------
51483 # Test if FILE is an executable regular file.
51484 as_fn_executable_p ()
51485 {
51486   test -f "$1" && test -x "$1"
51487 } # as_fn_executable_p
51488 as_test_x='test -x'
51489 as_executable_p=as_fn_executable_p
51490 
51491 # Sed expression to map a string onto a valid CPP name.
51492 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
51493 
51494 # Sed expression to map a string onto a valid variable name.
51495 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
51496 
51497 
51498 exec 6>&1
51499 ## ----------------------------------- ##
51500 ## Main body of $CONFIG_STATUS script. ##
51501 ## ----------------------------------- ##
51502 _ASEOF
51503 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
51504 
51505 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51506 # Save the log message, to keep $0 and so on meaningful, and to
51507 # report actual input values of CONFIG_FILES etc. instead of their
51508 # values after options handling.
51509 ac_log="
51510 This file was extended by OpenJDK $as_me jdk9, which was
51511 generated by GNU Autoconf 2.69.  Invocation command line was
51512 
51513   CONFIG_FILES    = $CONFIG_FILES
51514   CONFIG_HEADERS  = $CONFIG_HEADERS
51515   CONFIG_LINKS    = $CONFIG_LINKS
51516   CONFIG_COMMANDS = $CONFIG_COMMANDS
51517   $ $0 $@
51518 
51519 on `(hostname || uname -n) 2>/dev/null | sed 1q`
51520 "
51521 
51522 _ACEOF
51523 
51524 case $ac_config_files in *"
51525 "*) set x $ac_config_files; shift; ac_config_files=$*;;
51526 esac
51527 
51528 
51529 
51530 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51531 # Files that config.status was made for.
51532 config_files="$ac_config_files"
51533 
51534 _ACEOF
51535 
51536 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51537 ac_cs_usage="\
51538 \`$as_me' instantiates files and other configuration actions
51539 from templates according to the current configuration.  Unless the files
51540 and actions are specified as TAGs, all are instantiated by default.
51541 
51542 Usage: $0 [OPTION]... [TAG]...
51543 
51544   -h, --help       print this help, then exit
51545   -V, --version    print version number and configuration settings, then exit
51546       --config     print configuration, then exit
51547   -q, --quiet, --silent
51548                    do not print progress messages
51549   -d, --debug      don't remove temporary files
51550       --recheck    update $as_me by reconfiguring in the same conditions
51551       --file=FILE[:TEMPLATE]
51552                    instantiate the configuration file FILE
51553 
51554 Configuration files:
51555 $config_files
51556 
51557 Report bugs to <build-dev@openjdk.java.net>.
51558 OpenJDK home page: <http://openjdk.java.net>."
51559 
51560 _ACEOF
51561 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51562 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
51563 ac_cs_version="\\
51564 OpenJDK config.status jdk9
51565 configured by $0, generated by GNU Autoconf 2.69,
51566   with options \\"\$ac_cs_config\\"
51567 
51568 Copyright (C) 2012 Free Software Foundation, Inc.
51569 This config.status script is free software; the Free Software Foundation
51570 gives unlimited permission to copy, distribute and modify it."
51571 
51572 ac_pwd='$ac_pwd'
51573 srcdir='$srcdir'
51574 AWK='$AWK'
51575 test -n "\$AWK" || AWK=awk
51576 _ACEOF
51577 
51578 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51579 # The default lists apply if the user does not specify any file.
51580 ac_need_defaults=:
51581 while test $# != 0
51582 do
51583   case $1 in
51584   --*=?*)
51585     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51586     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
51587     ac_shift=:
51588     ;;
51589   --*=)
51590     ac_option=`expr "X$1" : 'X\([^=]*\)='`
51591     ac_optarg=
51592     ac_shift=:
51593     ;;
51594   *)
51595     ac_option=$1
51596     ac_optarg=$2
51597     ac_shift=shift
51598     ;;
51599   esac
51600 
51601   case $ac_option in
51602   # Handling of the options.
51603   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
51604     ac_cs_recheck=: ;;
51605   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
51606     $as_echo "$ac_cs_version"; exit ;;
51607   --config | --confi | --conf | --con | --co | --c )
51608     $as_echo "$ac_cs_config"; exit ;;
51609   --debug | --debu | --deb | --de | --d | -d )
51610     debug=: ;;
51611   --file | --fil | --fi | --f )
51612     $ac_shift
51613     case $ac_optarg in
51614     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
51615     '') as_fn_error $? "missing file argument" ;;
51616     esac
51617     as_fn_append CONFIG_FILES " '$ac_optarg'"
51618     ac_need_defaults=false;;
51619   --he | --h |  --help | --hel | -h )
51620     $as_echo "$ac_cs_usage"; exit ;;
51621   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
51622   | -silent | --silent | --silen | --sile | --sil | --si | --s)
51623     ac_cs_silent=: ;;
51624 
51625   # This is an error.
51626   -*) as_fn_error $? "unrecognized option: \`$1'
51627 Try \`$0 --help' for more information." ;;
51628 
51629   *) as_fn_append ac_config_targets " $1"
51630      ac_need_defaults=false ;;
51631 
51632   esac
51633   shift
51634 done
51635 
51636 ac_configure_extra_args=
51637 
51638 if $ac_cs_silent; then
51639   exec 6>/dev/null
51640   ac_configure_extra_args="$ac_configure_extra_args --silent"
51641 fi
51642 
51643 _ACEOF
51644 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51645 if \$ac_cs_recheck; then
51646   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
51647   shift
51648   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
51649   CONFIG_SHELL='$SHELL'
51650   export CONFIG_SHELL
51651   exec "\$@"
51652 fi
51653 
51654 _ACEOF
51655 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51656 exec 5>>config.log
51657 {
51658   echo
51659   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
51660 ## Running $as_me. ##
51661 _ASBOX
51662   $as_echo "$ac_log"
51663 } >&5
51664 
51665 _ACEOF
51666 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51667 _ACEOF
51668 
51669 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51670 
51671 # Handling of arguments.
51672 for ac_config_target in $ac_config_targets
51673 do
51674   case $ac_config_target in
51675     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
51676     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
51677     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
51678     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
51679     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
51680 
51681   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
51682   esac
51683 done
51684 
51685 
51686 # If the user did not use the arguments to specify the items to instantiate,
51687 # then the envvar interface is used.  Set only those that are not.
51688 # We use the long form for the default assignment because of an extremely
51689 # bizarre bug on SunOS 4.1.3.
51690 if $ac_need_defaults; then
51691   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
51692 fi
51693 
51694 # Have a temporary directory for convenience.  Make it in the build tree
51695 # simply because there is no reason against having it here, and in addition,
51696 # creating and moving files from /tmp can sometimes cause problems.
51697 # Hook for its removal unless debugging.
51698 # Note that there is a small window in which the directory will not be cleaned:
51699 # after its creation but before its name has been assigned to `$tmp'.
51700 $debug ||
51701 {
51702   tmp= ac_tmp=
51703   trap 'exit_status=$?
51704   : "${ac_tmp:=$tmp}"
51705   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
51706 ' 0
51707   trap 'as_fn_exit 1' 1 2 13 15
51708 }
51709 # Create a (secure) tmp directory for tmp files.
51710 
51711 {
51712   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
51713   test -d "$tmp"
51714 }  ||
51715 {
51716   tmp=./conf$$-$RANDOM
51717   (umask 077 && mkdir "$tmp")
51718 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
51719 ac_tmp=$tmp
51720 
51721 # Set up the scripts for CONFIG_FILES section.
51722 # No need to generate them if there are no CONFIG_FILES.
51723 # This happens for instance with `./config.status config.h'.
51724 if test -n "$CONFIG_FILES"; then
51725 
51726 
51727 ac_cr=`echo X | tr X '\015'`
51728 # On cygwin, bash can eat \r inside `` if the user requested igncr.
51729 # But we know of no other shell where ac_cr would be empty at this
51730 # point, so we can use a bashism as a fallback.
51731 if test "x$ac_cr" = x; then
51732   eval ac_cr=\$\'\\r\'
51733 fi
51734 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
51735 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
51736   ac_cs_awk_cr='\\r'
51737 else
51738   ac_cs_awk_cr=$ac_cr
51739 fi
51740 
51741 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
51742 _ACEOF
51743 
51744 
51745 {
51746   echo "cat >conf$$subs.awk <<_ACEOF" &&
51747   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
51748   echo "_ACEOF"
51749 } >conf$$subs.sh ||
51750   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51751 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
51752 ac_delim='%!_!# '
51753 for ac_last_try in false false false false false :; do
51754   . ./conf$$subs.sh ||
51755     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51756 
51757   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
51758   if test $ac_delim_n = $ac_delim_num; then
51759     break
51760   elif $ac_last_try; then
51761     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
51762   else
51763     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
51764   fi
51765 done
51766 rm -f conf$$subs.sh
51767 
51768 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51769 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
51770 _ACEOF
51771 sed -n '
51772 h
51773 s/^/S["/; s/!.*/"]=/
51774 p
51775 g
51776 s/^[^!]*!//
51777 :repl
51778 t repl
51779 s/'"$ac_delim"'$//
51780 t delim
51781 :nl
51782 h
51783 s/\(.\{148\}\)..*/\1/
51784 t more1
51785 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
51786 p
51787 n
51788 b repl
51789 :more1
51790 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51791 p
51792 g
51793 s/.\{148\}//
51794 t nl
51795 :delim
51796 h
51797 s/\(.\{148\}\)..*/\1/
51798 t more2
51799 s/["\\]/\\&/g; s/^/"/; s/$/"/
51800 p
51801 b
51802 :more2
51803 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
51804 p
51805 g
51806 s/.\{148\}//
51807 t delim
51808 ' <conf$$subs.awk | sed '
51809 /^[^""]/{
51810   N
51811   s/\n//
51812 }
51813 ' >>$CONFIG_STATUS || ac_write_fail=1
51814 rm -f conf$$subs.awk
51815 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51816 _ACAWK
51817 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
51818   for (key in S) S_is_set[key] = 1
51819   FS = ""
51820 
51821 }
51822 {
51823   line = $ 0
51824   nfields = split(line, field, "@")
51825   substed = 0
51826   len = length(field[1])
51827   for (i = 2; i < nfields; i++) {
51828     key = field[i]
51829     keylen = length(key)
51830     if (S_is_set[key]) {
51831       value = S[key]
51832       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
51833       len += length(value) + length(field[++i])
51834       substed = 1
51835     } else
51836       len += 1 + keylen
51837   }
51838 
51839   print line
51840 }
51841 
51842 _ACAWK
51843 _ACEOF
51844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51845 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
51846   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
51847 else
51848   cat
51849 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
51850   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
51851 _ACEOF
51852 
51853 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
51854 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
51855 # trailing colons and then remove the whole line if VPATH becomes empty
51856 # (actually we leave an empty line to preserve line numbers).
51857 if test "x$srcdir" = x.; then
51858   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
51859 h
51860 s///
51861 s/^/:/
51862 s/[      ]*$/:/
51863 s/:\$(srcdir):/:/g
51864 s/:\${srcdir}:/:/g
51865 s/:@srcdir@:/:/g
51866 s/^:*//
51867 s/:*$//
51868 x
51869 s/\(=[   ]*\).*/\1/
51870 G
51871 s/\n//
51872 s/^[^=]*=[       ]*$//
51873 }'
51874 fi
51875 
51876 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51877 fi # test -n "$CONFIG_FILES"
51878 
51879 
51880 eval set X "  :F $CONFIG_FILES      "
51881 shift
51882 for ac_tag
51883 do
51884   case $ac_tag in
51885   :[FHLC]) ac_mode=$ac_tag; continue;;
51886   esac
51887   case $ac_mode$ac_tag in
51888   :[FHL]*:*);;
51889   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
51890   :[FH]-) ac_tag=-:-;;
51891   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
51892   esac
51893   ac_save_IFS=$IFS
51894   IFS=:
51895   set x $ac_tag
51896   IFS=$ac_save_IFS
51897   shift
51898   ac_file=$1
51899   shift
51900 
51901   case $ac_mode in
51902   :L) ac_source=$1;;
51903   :[FH])
51904     ac_file_inputs=
51905     for ac_f
51906     do
51907       case $ac_f in
51908       -) ac_f="$ac_tmp/stdin";;
51909       *) # Look for the file first in the build tree, then in the source tree
51910          # (if the path is not absolute).  The absolute path cannot be DOS-style,
51911          # because $ac_f cannot contain `:'.
51912          test -f "$ac_f" ||
51913            case $ac_f in
51914            [\\/$]*) false;;
51915            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
51916            esac ||
51917            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
51918       esac
51919       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
51920       as_fn_append ac_file_inputs " '$ac_f'"
51921     done
51922 
51923     # Let's still pretend it is `configure' which instantiates (i.e., don't
51924     # use $as_me), people would be surprised to read:
51925     #    /* config.h.  Generated by config.status.  */
51926     configure_input='Generated from '`
51927           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
51928         `' by configure.'
51929     if test x"$ac_file" != x-; then
51930       configure_input="$ac_file.  $configure_input"
51931       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
51932 $as_echo "$as_me: creating $ac_file" >&6;}
51933     fi
51934     # Neutralize special characters interpreted by sed in replacement strings.
51935     case $configure_input in #(
51936     *\&* | *\|* | *\\* )
51937        ac_sed_conf_input=`$as_echo "$configure_input" |
51938        sed 's/[\\\\&|]/\\\\&/g'`;; #(
51939     *) ac_sed_conf_input=$configure_input;;
51940     esac
51941 
51942     case $ac_tag in
51943     *:-:* | *:-) cat >"$ac_tmp/stdin" \
51944       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51945     esac
51946     ;;
51947   esac
51948 
51949   ac_dir=`$as_dirname -- "$ac_file" ||
51950 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51951          X"$ac_file" : 'X\(//\)[^/]' \| \
51952          X"$ac_file" : 'X\(//\)$' \| \
51953          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51954 $as_echo X"$ac_file" |
51955     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51956             s//\1/
51957             q
51958           }
51959           /^X\(\/\/\)[^/].*/{
51960             s//\1/
51961             q
51962           }
51963           /^X\(\/\/\)$/{
51964             s//\1/
51965             q
51966           }
51967           /^X\(\/\).*/{
51968             s//\1/
51969             q
51970           }
51971           s/.*/./; q'`
51972   as_dir="$ac_dir"; as_fn_mkdir_p
51973   ac_builddir=.
51974 
51975 case "$ac_dir" in
51976 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51977 *)
51978   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51979   # A ".." for each directory in $ac_dir_suffix.
51980   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51981   case $ac_top_builddir_sub in
51982   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51983   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51984   esac ;;
51985 esac
51986 ac_abs_top_builddir=$ac_pwd
51987 ac_abs_builddir=$ac_pwd$ac_dir_suffix
51988 # for backward compatibility:
51989 ac_top_builddir=$ac_top_build_prefix
51990 
51991 case $srcdir in
51992   .)  # We are building in place.
51993     ac_srcdir=.
51994     ac_top_srcdir=$ac_top_builddir_sub
51995     ac_abs_top_srcdir=$ac_pwd ;;
51996   [\\/]* | ?:[\\/]* )  # Absolute name.
51997     ac_srcdir=$srcdir$ac_dir_suffix;
51998     ac_top_srcdir=$srcdir
51999     ac_abs_top_srcdir=$srcdir ;;
52000   *) # Relative name.
52001     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52002     ac_top_srcdir=$ac_top_build_prefix$srcdir
52003     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52004 esac
52005 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52006 
52007 
52008   case $ac_mode in
52009   :F)
52010   #
52011   # CONFIG_FILE
52012   #
52013 
52014 _ACEOF
52015 
52016 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52017 # If the template does not know about datarootdir, expand it.
52018 # FIXME: This hack should be removed a few years after 2.60.
52019 ac_datarootdir_hack=; ac_datarootdir_seen=
52020 ac_sed_dataroot='
52021 /datarootdir/ {
52022   p
52023   q
52024 }
52025 /@datadir@/p
52026 /@docdir@/p
52027 /@infodir@/p
52028 /@localedir@/p
52029 /@mandir@/p'
52030 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52031 *datarootdir*) ac_datarootdir_seen=yes;;
52032 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52033   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52034 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52035 _ACEOF
52036 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52037   ac_datarootdir_hack='
52038   s&@datadir@&$datadir&g
52039   s&@docdir@&$docdir&g
52040   s&@infodir@&$infodir&g
52041   s&@localedir@&$localedir&g
52042   s&@mandir@&$mandir&g
52043   s&\\\${datarootdir}&$datarootdir&g' ;;
52044 esac
52045 _ACEOF
52046 
52047 # Neutralize VPATH when `$srcdir' = `.'.
52048 # Shell code in configure.ac might set extrasub.
52049 # FIXME: do we really want to maintain this feature?
52050 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52051 ac_sed_extra="$ac_vpsub
52052 $extrasub
52053 _ACEOF
52054 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52055 :t
52056 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52057 s|@configure_input@|$ac_sed_conf_input|;t t
52058 s&@top_builddir@&$ac_top_builddir_sub&;t t
52059 s&@top_build_prefix@&$ac_top_build_prefix&;t t
52060 s&@srcdir@&$ac_srcdir&;t t
52061 s&@abs_srcdir@&$ac_abs_srcdir&;t t
52062 s&@top_srcdir@&$ac_top_srcdir&;t t
52063 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52064 s&@builddir@&$ac_builddir&;t t
52065 s&@abs_builddir@&$ac_abs_builddir&;t t
52066 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52067 $ac_datarootdir_hack
52068 "
52069 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52070   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52071 
52072 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52073   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52074   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
52075       "$ac_tmp/out"`; test -z "$ac_out"; } &&
52076   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52077 which seems to be undefined.  Please make sure it is defined" >&5
52078 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52079 which seems to be undefined.  Please make sure it is defined" >&2;}
52080 
52081   rm -f "$ac_tmp/stdin"
52082   case $ac_file in
52083   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52084   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52085   esac \
52086   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52087  ;;
52088 
52089 
52090 
52091   esac
52092 
52093 done # for ac_tag
52094 
52095 
52096 as_fn_exit 0
52097 _ACEOF
52098 ac_clean_files=$ac_clean_files_save
52099 
52100 test $ac_write_fail = 0 ||
52101   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52102 
52103 
52104 # configure is writing to config.log, and then calls config.status.
52105 # config.status does its own redirection, appending to config.log.
52106 # Unfortunately, on DOS this fails, as config.log is still kept open
52107 # by configure, so config.status won't be able to write to it; its
52108 # output is simply discarded.  So we exec the FD to /dev/null,
52109 # effectively closing config.log, so it can be properly (re)opened and
52110 # appended to by config.status.  When coming back to configure, we
52111 # need to make the FD available again.
52112 if test "$no_create" != yes; then
52113   ac_cs_success=:
52114   ac_config_status_args=
52115   test "$silent" = yes &&
52116     ac_config_status_args="$ac_config_status_args --quiet"
52117   exec 5>/dev/null
52118   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52119   exec 5>>config.log
52120   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52121   # would make configure fail if this is the last instruction.
52122   $ac_cs_success || as_fn_exit 1
52123 fi
52124 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52125   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52126 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52127 fi
52128 
52129 
52130 # Try to move the config.log file to the output directory.
52131 if test -e ./config.log; then
52132   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52133 fi
52134 
52135 # Make the compare script executable
52136 $CHMOD +x $OUTPUT_ROOT/compare.sh
52137 
52138 # Finally output some useful information to the user
52139 
52140   # Finally output some useful information to the user
52141 
52142   printf "\n"
52143   printf "====================================================\n"
52144   if test "x$no_create" != "xyes"; then
52145     if test "x$IS_RECONFIGURE" != "xyes"; then
52146       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52147     else
52148       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52149     fi
52150   else
52151     if test "x$IS_RECONFIGURE" != "xyes"; then
52152       printf "A configuration has been successfully checked but not created\n"
52153     else
52154       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52155     fi
52156   fi
52157   if test "x$CONFIGURE_COMMAND_LINE" != x; then
52158     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52159   else
52160     printf "using default settings.\n"
52161   fi
52162 
52163   printf "\n"
52164   printf "Configuration summary:\n"
52165   printf "* Debug level:    $DEBUG_LEVEL\n"
52166   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52167   printf "* JDK variant:    $JDK_VARIANT\n"
52168   printf "* JVM variants:   $with_jvm_variants\n"
52169   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52170 
52171   printf "\n"
52172   printf "Tools summary:\n"
52173   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52174     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52175   fi
52176   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52177   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
52178   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52179   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52180 
52181   printf "\n"
52182   printf "Build performance summary:\n"
52183   printf "* Cores to use:   $JOBS\n"
52184   printf "* Memory limit:   $MEMORY_SIZE MB\n"
52185   if test "x$CCACHE_STATUS" != "x"; then
52186     printf "* ccache status:  $CCACHE_STATUS\n"
52187   fi
52188   printf "\n"
52189 
52190   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52191     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52192     printf "will result in longer build times.\n"
52193     printf "\n"
52194   fi
52195 
52196   if test "x$FOUND_ALT_VARIABLES" != "x"; then
52197     printf "WARNING: You have old-style ALT_ environment variables set.\n"
52198     printf "These are not respected, and will be ignored. It is recommended\n"
52199     printf "that you clean your environment. The following variables are set:\n"
52200     printf "$FOUND_ALT_VARIABLES\n"
52201     printf "\n"
52202   fi
52203 
52204   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52205     printf "WARNING: Your build output directory is not on a local disk.\n"
52206     printf "This will severely degrade build performance!\n"
52207     printf "It is recommended that you create an output directory on a local disk,\n"
52208     printf "and run the configure script again from that directory.\n"
52209     printf "\n"
52210   fi
52211 
52212   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52213     printf "WARNING: The result of this configuration has overridden an older\n"
52214     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52215     printf "proper build. Failure to do so might result in strange build problems.\n"
52216     printf "\n"
52217   fi
52218 
52219   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52220     printf "WARNING: The result of this configuration was not saved.\n"
52221     printf "You should run without '--no-create | -n' to create the configuration.\n"
52222     printf "\n"
52223   fi
52224 
52225 
52226 
52227 if test -e "$OUTPUT_ROOT/config.log"; then
52228   $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52229   if test $? -eq 0; then
52230     printf "The following warnings were produced. Repeated here for convenience:\n"
52231     # We must quote sed expression (using []) to stop m4 from eating the [].
52232     $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52233     printf "\n"
52234   fi
52235 fi
52236 
52237